Skip to content

fix(curio): honor container exit code in DB setup wait - #244

Closed
OzzyHelper wants to merge 1 commit into
FilOzone:mainfrom
OzzyHelper:koan/fix-curio-docker-wait-exit-code
Closed

OzzyHelper wants to merge 1 commit into
FilOzone:mainfrom
OzzyHelper:koan/fix-curio-docker-wait-exit-code

Conversation

@OzzyHelper

@OzzyHelper OzzyHelper commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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. Both create_base_cluster and create_pdp_layer checked output.status.success() on the docker wait output, which only reflected docker's own exit status — so a failing curio config new-cluster / curio config create inside the container was silently treated as success, and setup continued against a broken database.

How

  • New docker::core::wait_container_exit_code() parses the numeric code printed by docker wait and errors on unexpected output.
  • Both DB setup steps now compare the parsed code to zero, capture container logs before removal, and return an error including the exit code and logs.

Testing

  • cargo test --lib docker::core — 2 new parser tests pass (0, 2, 137; rejects empty/garbage output).
  • Full 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 warnings and cargo fmt --check clean.

Quality Report

Changes: 2 files changed, 63 insertions(+), 8 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: 1 issue(s)

  • Branch is not pushed to remote

…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.
@FilOzzy FilOzzy added this to FOC Nov 19, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Nov 19, 2026
@Kubuxu Kubuxu closed this Nov 19, 2026
@github-project-automation github-project-automation Bot moved this from 📌 Triage to 🎉 Done in FOC Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

2 participants