Skip to content

Include compose up diagnostics and attach logs on compose startup failures#93

Merged
jooh merged 2 commits into
mainfrom
codex/capture-podman-compose-build-logs
Jun 5, 2026
Merged

Include compose up diagnostics and attach logs on compose startup failures#93
jooh merged 2 commits into
mainfrom
codex/capture-podman-compose-build-logs

Conversation

@jooh

@jooh jooh commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide richer diagnostics when docker-compose up creates a container that is not running so users get stdout/stderr and service logs.

Description

  • Add ComposeUpResult to capture project_name, service, stdout, and stderr from up_service and change up_service to return it instead of ().
  • Add service_logs to invoke compose logs and new helpers compose_startup_failure_error, append_diagnostic_section, and truncate_diagnostic to build a diagnostic message that includes compose up output and compose logs, truncating to 16KiB.
  • Update callers in container discovery (create_compose_container and refresh_compose_container) to use the new up_service result and produce a detailed error when the expected container cannot be resolved after compose up.
  • Add a unit test ensure_compose_container_reports_logs_when_created_service_is_not_running that verifies the failure message includes compose stdout/stderr and compose logs.

Testing

  • Ran the unit test suite with cargo test for the modified module and the new test ensure_compose_container_reports_logs_when_created_service_is_not_running, and all tests passed.
  • Existing compose-related tests such as ensure_compose_container_marks_changed_container_id_as_created were executed and passed.

Codex Task

@jooh

jooh commented Jun 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jooh jooh merged commit 8a582bb into main Jun 5, 2026
5 checks passed
@jooh jooh deleted the codex/capture-podman-compose-build-logs branch June 5, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant