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

Exit codes #521

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Exit codes #521

wants to merge 2 commits into from

Conversation

ebekebe
Copy link

@ebekebe ebekebe commented Jul 13, 2022

Failure exit codes for build and push are currently not forwarded as exit code for podman-compose. This makes it impossible to use podman-compose in a scripted environment like CI.

With this PR, podman-compose stops building/pushing when the underlying podman command fails and forwards its exit code.

@mi-volodin
Copy link

mi-volodin commented Nov 10, 2022

Want to put +1 vote for this, this is really annoying.

Here's the example of how it looks like (podman machine is stopped, so it produces error).

image

@mi-volodin
Copy link

@ebekebe looks like other commands (like run) also suffers from this. Or am I missing something? Why did you choose to fix just these?

@ebekebe
Copy link
Author

ebekebe commented Nov 22, 2022

@mi-volodin I didn't notice that other commands also don't work. I would have included them at the time. However, we don't use podman-compose (and podman) anymore, because of how it is maintained. As there is no feedback from a project maintainer yet, I don't want to put any more effort into this. Feel free to make your own PR or add you changes to this PR. Let me know, if you want push access.

@emmanuel-apau
Copy link

sad to see an unmaintainable repo

@p12tic
Copy link
Collaborator

p12tic commented Apr 29, 2024

Seems like the issue fixed by this PR is still present at least for some commands.

@ebekebe Would you be open to rebase the PR?

@@ -1863,7 +1863,9 @@ def compose_push(compose, args):
continue
if services and cnt["_service"] not in services:
continue
compose.podman.run([], "push", [cnt["image"]], sleep=0)
exit_code = compose.podman.run([], "push", [cnt["image"]], sleep=0).wait()
if (not getattr(args, "ignore_push_failures", None)) and 0 != exit_code:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why can't we do args.ignore_push_failures? Seems simplier.

Also, please use exit_code != 0 style.

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.

4 participants