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

Cleanup swallows exit codes #59

Open
r-vdp opened this issue Oct 18, 2024 · 2 comments
Open

Cleanup swallows exit codes #59

r-vdp opened this issue Oct 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@r-vdp
Copy link
Member

r-vdp commented Oct 18, 2024

Describe the bug

When doing github-deploy cleanup <...> -- cmd and cmd exits uncleanly, github-deploy swallows the exit code and exits cleanly.
This makes it hard to know that something went wrong and makes things like github actions show green checks while actually there was a failure.

This happens because the main loop in the code for cleanup does check the exit code, but when it's non-zero it just logs a message and continues, without tracking the fact that there was a failure.

To Reproduce

Steps to reproduce the behavior:

  1. ...
  2. ...

Expected behavior

Exit uncleanly if at least one action didn't exit cleanly.

System information

Additional context

@r-vdp r-vdp added the bug Something isn't working label Oct 18, 2024
@zimbatm
Copy link
Member

zimbatm commented Oct 22, 2024

What error did you see exactly?

It would help because log.Fatalf also exits the process with an error code.

@r-vdp
Copy link
Member Author

r-vdp commented Oct 22, 2024

The invoked command was Terraform (wrapped in just and terragrunt), which failed during planning. I can check what's the exact exit code that gets returned, but it's definitely not 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants