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

podman-compose build exits 0 when build fails #476

Open
OneMoreByte opened this issue Apr 15, 2022 · 6 comments
Open

podman-compose build exits 0 when build fails #476

OneMoreByte opened this issue Apr 15, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@OneMoreByte
Copy link

Hello!

I have been using podman-compose for a bit and love it but I noticed that when I run podman-compose build it always exits 0 regardless of if the build failed or not.

It does print out the exit code of the underlying podman command but I don't want to parse the output for that. Would it be possible to have the build command exit with the underlying exit code if it runs into a failure?

I have my local version of podman-compose patched with:

obj = types.SimpleNamespace()
compose.podman.run([], "build", build_args, sleep=0, obj=obj)
if obj.exit_code != 0:
  sys.exit(obj.exit_code)

on https://github.com/containers/podman-compose/blob/devel/podman_compose.py#L1898. I'm not sure if there's a better solution.

@OneMoreByte OneMoreByte added the enhancement New feature or request label Apr 15, 2022
@rsevilla87
Copy link

Hi, we're running into the same issue, is there an expected fix for this?

@morenod
Copy link

morenod commented May 25, 2022

This is not an enhacement, this is a bug

@defanator
Copy link

Facing this behavior as well, pretty inconsistent when podman-compose is being used in CI workflows.

@OneMoreByte
Copy link
Author

OneMoreByte commented Jul 28, 2022

@muayyad-alsadi Are you considering PR #521 or is that now how you'd perfer podman-compose to work?

@ztane
Copy link

ztane commented Aug 26, 2022

What is worse, podman-compose up --build continues even though the build fails for one image, and it starts the old version of the image and to figure that out I'd just have to keep eye on whatever output podman-compose spits out

@GrimzEcho
Copy link

This affects our efforts to have the same recipes for running services in both Docker and Podman as we migrate. It also makes debugging significantly more difficult, because if the image fails to build, then typically Podman will also fail for a different reason, such as the container not being present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants