Skip to content

Conversation

NathanFlurry
Copy link
Member

Changes

Copy link
Member Author

NathanFlurry commented Jun 20, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@NathanFlurry NathanFlurry force-pushed the 06-17-feat_pegboard_add_support_for_custom_host_entries branch from 0a32a7f to f56f348 Compare June 20, 2025 19:18
@NathanFlurry NathanFlurry force-pushed the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch from 046dd3e to 2a7b66a Compare June 20, 2025 19:18
@NathanFlurry NathanFlurry marked this pull request as ready for review June 20, 2025 19:22
Copy link

cloudflare-workers-and-pages bot commented Jun 20, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: eea0c38
Status: ✅  Deploy successful!
Preview URL: https://a648c09f.rivet.pages.dev
Branch Preview URL: https://06-17-feat-pegboard-expose-r.rivet.pages.dev

View logs

@graphite-app graphite-app bot force-pushed the 06-17-feat_pegboard_add_support_for_custom_host_entries branch from f56f348 to 7d71cc9 Compare June 20, 2025 19:40
@graphite-app graphite-app bot force-pushed the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch from 2a7b66a to 2b3a103 Compare June 20, 2025 19:40
Comment on lines +169 to +171
RIVET_SERVER_HOST="$(dig +short rivet-server)"
echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)"
add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DNS lookup for rivet-server lacks error handling. If the lookup fails, RIVET_SERVER_HOST will be empty, resulting in an invalid iptables rule (-j DNAT --to-destination ). Consider adding validation to ensure RIVET_SERVER_HOST contains a valid IP address before creating the rule:

RIVET_SERVER_HOST="$(dig +short rivet-server)"
if [ -z "$RIVET_SERVER_HOST" ]; then
    echo "ERROR: Failed to resolve rivet-server hostname"
    exit 1
fi
echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)"
add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST"

This ensures the script fails explicitly rather than creating a broken network configuration.

Suggested change
RIVET_SERVER_HOST="$(dig +short rivet-server)"
echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)"
add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST"
RIVET_SERVER_HOST="$(dig +short rivet-server)"
if [ -z "$RIVET_SERVER_HOST" ]; then
echo "ERROR: Failed to resolve rivet-server hostname"
exit 1
fi
echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)"
add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST"

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Copy link

cloudflare-workers-and-pages bot commented Jun 20, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: eea0c38
Status: ✅  Deploy successful!
Preview URL: https://55ee5baf.rivet-hub-7jb.pages.dev
Branch Preview URL: https://06-17-feat-pegboard-expose-r.rivet-hub-7jb.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Jun 20, 2025

Deploying rivet-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: eea0c38
Status:⚡️  Build in progress...

View logs

@MasterPtato MasterPtato force-pushed the 06-17-feat_pegboard_add_support_for_custom_host_entries branch from 38061b3 to f07e495 Compare June 26, 2025 01:10
@MasterPtato MasterPtato force-pushed the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch from 6fe1578 to 8cc2d55 Compare June 26, 2025 01:10
@MasterPtato MasterPtato force-pushed the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch from 8cc2d55 to eea0c38 Compare June 26, 2025 23:20
@MasterPtato MasterPtato force-pushed the 06-17-feat_pegboard_add_support_for_custom_host_entries branch from f07e495 to a130124 Compare June 26, 2025 23:20
@abcxff abcxff force-pushed the 06-17-feat_pegboard_add_support_for_custom_host_entries branch from a130124 to a38bee6 Compare June 27, 2025 19:30
@abcxff abcxff force-pushed the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch from eea0c38 to 14ceb65 Compare June 27, 2025 19:30
@MasterPtato MasterPtato force-pushed the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch from 14ceb65 to eea0c38 Compare June 28, 2025 01:22
@MasterPtato MasterPtato force-pushed the 06-17-feat_pegboard_add_support_for_custom_host_entries branch from a38bee6 to a130124 Compare June 28, 2025 01:22
Copy link
Contributor

graphite-app bot commented Jun 28, 2025

Merge activity

  • Jun 28, 1:49 AM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Jun 28, 1:50 AM UTC: CI is running for this pull request on a draft pull request (#2662) due to your merge queue CI optimization settings.
  • Jun 28, 1:51 AM UTC: Merged by the Graphite merge queue via draft PR: #2662.

graphite-app bot pushed a commit that referenced this pull request Jun 28, 2025
… compose (#2628)

<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot closed this Jun 28, 2025
@graphite-app graphite-app bot deleted the 06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose branch June 28, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant