This repository was archived by the owner on May 29, 2026. It is now read-only.
fix: prevent cancelled jobs from passing result checks#464
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates GitHub Actions “results/aggregator” jobs so they correctly fail when upstream jobs are failed or cancelled, preventing cancelled/failed validations from being treated as successful required checks.
Changes:
- Replace
needs.*.resultwildcard aggregation with explicit per-job checks for downstream “results” jobs. - Update cancellation detection to use GitHub’s
cancelledstatus (double “l”). - Add missing failure/cancellation detection in the PR validation results workflow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/pr-validate.yml | Adds a results-step guard to fail “Validate Results” when validate fails/cancels. |
| .github/workflows/pr-open.yml | Makes “PR Results” explicitly check builds and deploys results for failure/cancellation. |
| .github/workflows/analysis.yml | Makes “Analysis Results” explicitly check trivy, java, and python results for failure/cancellation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix misspelling: 'canceled' → 'cancelled' (GitHub's actual status) - Replace wildcard needs.*.result with explicit job checks to avoid transitive ancestor bug (actions/runner #2346) - Add missing validation check to pr-validate results job - Now properly fail when any needed job fails or is cancelled This prevents a cancelled or failed job from being incorrectly treated as success by downstream result-aggregating jobs.
cc81f54 to
429d3a1
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Fixes a bug where cancelled or failed jobs were incorrectly treated as success by downstream "results" aggregator jobs.
Root causes
pr-validate.ymlresults job had no failure/cancellation detection at all.Changes
'canceled'→'cancelled'in all workflowspr-validate.ymlresults jobThis ensures
needs.*.resultcorrectly detects failures and cancellations across all three result-aggregator jobs.Why this matters
In PR #458, the "Validate PR" job was cancelled (due to concurrency), but the "Validate Results" job still passed because it didn't check for cancellation. This allowed the PR to merge despite a cancelled validation run.
After this fix, if any needed job fails or is cancelled, the aggregator job will also fail, preventing incorrect merges.
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: