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

[improvement] Allow app running with --once to exit with error when policy errors are encountered #503

Open
twelsh-aw opened this issue Mar 20, 2024 · 1 comment

Comments

@twelsh-aw
Copy link
Contributor

We operate allstar inside a GHA with --once and noticed (due to #501) that a policy check would fail to apply at a certain point, but the app just exited with return code 0. It stopped monitoring for any more policies, but also didn't notify us of failure. The only way to notice is that the execution time of the GHA was much smaller than normal.

My initial thought was to update the goroutine to return the error, but realized this will also cancel the errgroup context and block any more app installations from running.

We could likely keep track of errors similar to how we keep track of failures, and do a check to return them after the fact. This can probably be opt-in behaviour if we are worried, but it might make sense to always be the behaviour for --once.

@jeffmendoza
Copy link
Member

@twelsh-aw This sounds good. Allstar was originally meant to be run as a service only, but the --once usecase seems to be helpful to many folks.

I'm wondering if at some point, do we have two separate commands, but I don't think we are there yet.

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

No branches or pull requests

2 participants