Repository navigation
fix(curio): honor container exit code in DB setup wait - #244
Closed
OzzyHelper wants to merge 1 commit into
Closed
OzzyHelper wants to merge 1 commit into
OzzyHelper wants to merge 1 commit into
Conversation
…ners `docker wait` exits 0 and prints the container's exit code on stdout, so checking the command's status always reported success even when `curio config new-cluster` or `curio config create` failed inside the container. Parse the printed code, surface it with container logs, and fail the setup step accordingly.
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.
What
Detect container command failures when waiting on Curio DB setup containers.
Why
docker wait <container>exits with status 0 and prints the container's exit code to stdout. Bothcreate_base_clusterandcreate_pdp_layercheckedoutput.status.success()on thedocker waitoutput, which only reflected docker's own exit status — so a failingcurio config new-cluster/curio config createinside the container was silently treated as success, and setup continued against a broken database.How
docker::core::wait_container_exit_code()parses the numeric code printed bydocker waitand errors on unexpected output.Testing
cargo test --lib docker::core— 2 new parser tests pass (0,2,137; rejects empty/garbage output).cargo test --lib: 53 passed, 2 pre-existing Docker-CLI-only failures (test_print_running_status,test_print_uptime) unrelated to this change.cargo clippy --lib -- -D warningsandcargo fmt --checkclean.Quality Report
Changes: 2 files changed, 63 insertions(+), 8 deletions(-)
Code scan: clean
Tests: skipped
Branch hygiene: 1 issue(s)