-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 stdout and stderr when executing docker compose #18859
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
e9b5b62
to
4ebee2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo this needs a changelog for datadog_checks_dev
added change log entry |
* commit * linter * get compose logs * linter * linter * import SubprocessError * fix SubprocessError * remove -f * capture output * linter * docker compose output * remove import subprocesserror * removed capture * force ci * capture * propagate capture * propagate capture * self.capture * linter * test case for docker_run capture=True * restored README.md * add change log 849a253
What does this PR do?
Capture
stdout
stderr
ofdocker compose
in case of error.Motivation
This is essential for troubleshooting.
Additional Notes
We can't hardcode
capture=True
in the docker compose call because some integrations, like Confluence, exceed the maximum argument limit, causing an error:Therefore, the caller of
docker_run
decides whether thedocker compose
output should be captured.Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged