Repository navigation
[1.5] ci: make all-done and all-done-actionlint fail when a needed job fails - #5615
Merged
Merged
Conversation
When a job is skipped (e.g. because it is only applicable to pull requests), all the jobs that need it are skipped, too, including all-done-validate. To work around it, the PR-only commit job had its pull_request condition on the step rather than on the job. Instead, run all-done-validate unless the workflow is cancelled, and explicitly fail it if any of the needed jobs has failed or was cancelled (but not skipped). Now the commit job condition can be moved to the job level. (cherry picked from commit 4e2d2c5) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Without a status function in its if, all-done is skipped (not failed) when a needed job fails or is cancelled, and a skipped required check counts as passing, also in the merge queue. Use the same pattern as all-done-validate in validate.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vx41jkTKgrWAx3u5A78K5p Signed-off-by: Lucas Sotomayor <sotomayorlucas@pm.me> (cherry picked from commit d0de2df) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
It only wraps the single actionlint job and, having no status function, is skipped (and passes as a required check) when actionlint fails. Drop it and require actionlint itself instead, as suggested in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vx41jkTKgrWAx3u5A78K5p Signed-off-by: Lucas Sotomayor <sotomayorlucas@pm.me> (cherry picked from commit c172dc9) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Contributor
Author
Contributor
Author
|
merging without review as this is a backport and in order to fix 1.5 CI |
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.
Backport of #5609 to release-1.5. Original description follows.
all-done(test.yml) andall-done-actionlint(actionlint.yml) have no status function inif, so GitHub appliessuccess()implicitly: when a needed job fails or is cancelled, these jobs are skipped rather than failed, and a skipped required check counts as passing. Since both are required checks andmainuses a merge queue, a merge group whose tests fail can still be merged by the queue (on regular PRs the red jobs are visible, but the required checks don't block).This applies the pattern already used by
all-done-validatein validate.yml: run withif: ${{ !cancelled() }}and fail unless every needed job succeeded (skipped is still accepted, as there). No change when everything passes.Discussed privately with the security team, who suggested handling it as a regular PR.