fix: prefix networks and volumes with project name#86
Open
Jaro-c wants to merge 1 commit into
Open
Conversation
Bare compose keys (e.g. "default", "db-data") were used as-is for
network and volume names. Two projects sharing the same key would
attach to the same network and write to the same volume, breaking
isolation and risking data corruption.
resolve_network_name/resolve_network_mode now accept a project
parameter and produce "{project}_{key}" when no explicit name: is
configured. External networks/volumes (which carry fixed names by
definition) are unaffected.
Closes #75
Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
4 tasks
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.
Summary
name:now use{project}_{key}instead of the bare compose key, preventing cross-project isolation breachesresolve_network_nameandresolve_network_modeaccept aprojectparameter and apply the prefix consistently across create, connect, and down pathsTest plan
cargo test --libpasses (127 tests)networks: default:use distinct host networks (proj1_default,proj2_default)name:overrides the prefix as beforeCloses #75