Add CI concurrency groups and fix spurious cancelled-run failures#77
Merged
Conversation
Superseded workflow runs (e.g. after a force-push) could linger and, in the Integration tests workflow, surface as spurious failures: when a run was cancelled mid-flight the always() debug steps still executed, ran 'cat metrics' on a file that was never written, and exited 1 — flipping the run from cancelled to failure. Add a concurrency group to each workflow so superseded runs of the same event on the same ref cancel cleanly (push and pull_request runs for the same commit remain independent). Make the 'show metrics'/'show log' debug steps tolerate a missing file so a cancelled run is not reported as a failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Each commit on a branch with an open PR triggers the
Integration testsworkflow twice (pushandpull_request). When one run is superseded/cancelled (e.g. after a force-push), itsif: always()debug steps still run,cat metricson a file that was never written exits 1, and the run flips from cancelled to failure — a red X on the PR for the exact same SHA that the sibling run passed. (Observed on #69 during this branch's history.)Fix
concurrencygroup to all three workflows keyed by workflow + event + ref, withcancel-in-progress: true, so superseded runs cancel cleanly instead of lingering.pushandpull_requestruns for the same commit stay independent (differentevent_name).show metrics/show logdebug steps tolerate a missing file (|| true) so a cancelled run is never reported as a failure.YAML validated for all three workflows.
Follow-up to the CI work merged earlier in #73/#70/#71.