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
.github: Set commit status to error when workflow are cancelled #16155
.github: Set commit status to error when workflow are cancelled #16155
Conversation
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.
it can also happen for other automatic reasons (not yet determined)
Did you see this happen? The only case I've seen workflows get cancelled is when they hit the timeout, which is expected.
I personally still think both user cancellation and timeout cancellation resulting in pending
is better than marking the job as failed, because when a job is cancelled it should simply be retriggered. Keeping it marked as pending makes it clearer IMO.
In any case, if we do want to move forward with marking jobs as failure, then I would recommend we instead just refactor both in the existing failure state by replacing:
- name: Set commit status to failure
if: ${{ failure() }}
with
- name: Set commit status to failure
if: ${{ !success() }}
(or failure() || cancelled()
)
I've seen this is https://github.com/cilium/cilium/actions/runs/836840304, and it is indeed because of the 30 minutes timeout. I was not aware that was a potential reason for cancellation.
Ideally, we'd have a We can raise this on Monday to get the opinion of more folks.
👍 I'll make the change. |
This comment has been minimized.
This comment has been minimized.
GitHub jobs are usually set to status 'error' when cancelled. We should do the same for ci-xxx jobs when they are cancelled. Having the state appear as an error clarifies that the author, janitor, and reviewers should take notice of that workflow's result. Signed-off-by: Paul Chaignon <paul@cilium.io>
0999bf5
to
bfe555b
Compare
GitHub jobs are usually set to status 'error' when cancelled. We should do the same for ci-xxx jobs when they are cancelled. Having the state appear as an error clarifies that the author, janitor, and reviewers should take notice of that workflow's result.