-
Notifications
You must be signed in to change notification settings - Fork 520
Return non-zero exit_code on failure when doing up -d
#1181
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
Conversation
The unitest failed, but the Related pr: #964 |
podman_compose.py
Outdated
if not args.no_build: | ||
# `podman build` does not cache, so don't always build | ||
build_args = argparse.Namespace(if_not_exists=(not args.build), **args.__dict__) | ||
if await compose.commands["build"](compose, build_args) != 0: | ||
build_result = await compose.commands["build"](compose, build_args) |
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.
Let's name build_exit_code
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.
Looks good overall.
Please add release notes to the newsfragments directory (you can look here for inspiration on how release note looks like).
I think it's worth moving pids_limit change to separate PR, because it will take some time to understand why tests fail for your |
up -d
, implement pids_limitup -d
Tests are currently failing, do they fail for you locally? |
@zeyugao Sounds fair, thanks for explaining. Could we detect root by e.g. doing |
I have considered it as a solution, but this will make the CI on GitHub Actions unable to test the functionality correctly, making it less usefully. We have to test it locally. |
b588910
to
915994f
Compare
I have changed the expected exit code accordingly |
Signed-off-by: Elsa <[email protected]>
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.
Looks great, thank you!
I rebased the PR and fixed merge conflict. |
When run
podman-compose up -d
, it returns directly without handling the error.Related issues:
#806
#626
pids_limit spec:
https://github.com/compose-spec/compose-spec/blob/main/05-services.md#pids_limit and https://github.com/compose-spec/compose-spec/blob/main/deploy.md#pids