Repository navigation
Fix/loopback port bindings - #284
Merged
Merged
Conversation
A contract test across the CLI and the server: a stacker.yml with ports bound to 127.0.0.1 goes through the CLI's build_project_body and then through derive_public_ports_from_metadata and the compose port conversion. Each half had its own unit test and the bug kept coming back: the CLI drops the host IP, the server expects it with the mapping, and databases bound to 127.0.0.1 ended up open in the firewall and published on every interface. Fails on the current code: 5432, 6379 and 8025 reach the firewall and none is published on 127.0.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012TKZy6f5shPzM9WLdswH6f
The CLI sent "127.0.0.1:5432:5432" as host_port 5432 / container_port 5432, so the server never saw the loopback binding: it opened 5432 in the cloud firewall and the compose file published it on every interface. The CLI now sends the whole mapping in container_port when it carries a host IP, the form the server already parses (forms::project::port normalize_port_mapping) for the firewall and for compose. parse_port_mapping itself is unchanged. Regression: routes::project::deploy::loopback_ports_contract (previous commit) now passes; lib 2238 passed, BDD 334 scenarios passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012TKZy6f5shPzM9WLdswH6f
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.