fix(cli): mount the config from an absolute --config path correctly - #497
Open
JasonVranek wants to merge 1 commit into
Open
fix(cli): mount the config from an absolute --config path correctly#497JasonVranek wants to merge 1 commit into
JasonVranek wants to merge 1 commit into
Conversation
JasonVranek
force-pushed
the
fix/init-absolute-config-path
branch
from
September 11, 2026 02:03
e239761 to
67033e1
Compare
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.
The bug
cb initbuilds the config bind-mount source as./{config_path}:The
./is needed for a relative path — compose reads a source with no/or./prefix as a named volume, socb-config.toml:/cb-config.toml:rowould quietly create a volume namedcb-config.tomlinstead of mounting the file.It is applied unconditionally, though, so an absolute
--configproduces.//abs/path/cb-config.toml. Compose resolves that relative to the project directory, docker materialises a root-owned directory tree at it, and the sidecar comes up with a directory mounted at/cb-config.toml.Reproduced end to end:
and it leaves a root-owned
./abs/path/...tree next to the compose file that the operator then needssudoto clean up.The fix
Add the prefix only when the path needs it. Every other mount the generator emits (chain spec, mux key files, signer keys/secrets, proxy dirs) already passes its path through unchanged; the config mount was the only one prefixing.
Blast radius
--config— what every doc example uses (commit-boost init --config cb-config.toml) — generates a byte-identical compose file. No behaviour change.--configgoes from broken to working.Tests
test_init_compose_file_pbs_service_structurealready invokedcommit-boost initwith an absolute--config(a tempdir path) but asserted only that some volume ends with:/cb-config.toml:ro, so the bug rendered underneath it. It now pins the host side of the mount as well, which fails without this change. A unit test covers the helper directly (absolute, relative,./- and../-prefixed).