Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture output from docker compose logs on failure #1090

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

olekoliinyk
Copy link
Contributor

@olekoliinyk olekoliinyk commented Jan 30, 2025

Problem

When a container fails to start during docker compose up, the failure is not printed out because the exception is not being handled.
Also, in core-api container, the re-tries is missing for the healthcheck.

Solution

Catch the CalledProcessError exception and invoke check_containers method to output information from docker compose logs <service>

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

@olekoliinyk olekoliinyk requested a review from a team as a code owner January 30, 2025 09:10
@olekoliinyk olekoliinyk marked this pull request as draft January 30, 2025 09:10
@olekoliinyk olekoliinyk force-pushed the olekoliinyk/get_docker_compose_log_on_failure branch from fc0af4d to 8b2a65a Compare January 30, 2025 11:09
@olekoliinyk olekoliinyk changed the title Print out docker compose logs on failure Capture output from docker compose logs on failure Jan 30, 2025
@olekoliinyk olekoliinyk marked this pull request as ready for review January 30, 2025 11:20
@ThrasherLT
Copy link
Contributor

+1.0

Copy link
Contributor

@tomaszklak tomaszklak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@olekoliinyk olekoliinyk force-pushed the olekoliinyk/get_docker_compose_log_on_failure branch from 8b2a65a to f9653f5 Compare February 3, 2025 14:12
@olekoliinyk olekoliinyk enabled auto-merge February 3, 2025 14:12
@olekoliinyk olekoliinyk merged commit 854ce04 into main Feb 3, 2025
65 checks passed
@olekoliinyk olekoliinyk deleted the olekoliinyk/get_docker_compose_log_on_failure branch February 3, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants