-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Don't cancel GHA runs on subsequent push events #9917
Conversation
With our switch to using the GitHub merge queue with speculative merging, it's now possible for us to have two push events to a protected branch (like `main`) within a couple of minutes. If this happens, the eager cancellation rules we have set for the coverage and Neko runs in GHA trigger, causing a spurious build failure to appear in the commit logs, and for the coverage history to be lost for one commit. Instead, we can set the cancel-on-update behaviour to only trigger on PR sync events, not branch-push events.
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
33284ba
to
d772150
Compare
I tested this by pushing an empty commit to the branch (and then force-pushed it away again). You can see that the coverage and Neko runs were suitably cancelled, for example here: https://github.com/Qiskit/qiskit-terra/actions/runs/4623222644. |
Pull Request Test Coverage Report for Build 4623231438
💛 - Coveralls |
With our switch to using the GitHub merge queue with speculative merging, it's now possible for us to have two push events to a protected branch (like `main`) within a couple of minutes. If this happens, the eager cancellation rules we have set for the coverage and Neko runs in GHA trigger, causing a spurious build failure to appear in the commit logs, and for the coverage history to be lost for one commit. Instead, we can set the cancel-on-update behaviour to only trigger on PR sync events, not branch-push events.
With our switch to using the GitHub merge queue with speculative merging, it's now possible for us to have two push events to a protected branch (like `main`) within a couple of minutes. If this happens, the eager cancellation rules we have set for the coverage and Neko runs in GHA trigger, causing a spurious build failure to appear in the commit logs, and for the coverage history to be lost for one commit. Instead, we can set the cancel-on-update behaviour to only trigger on PR sync events, not branch-push events.
Summary
With our switch to using the GitHub merge queue with speculative merging, it's now possible for us to have two push events to a protected branch (like
main
) within a couple of minutes. If this happens, the eager cancellation rules we have set for the coverage and Neko runs in GHA trigger, causing a spurious build failure to appear in the commit logs, and for the coverage history to be lost for one commit.Instead, we can set the cancel-on-update behaviour to only trigger on PR sync events, not branch-push events.
Details and comments
We also likely want to set the workflows to only trigger on pushes to Qiskit repos so users' notifications don't get spammed, and we're not just burning the planet running unnecessary CI, but that's a separate logical change.