Skip to content
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
DerekRoberts merged 5 commits into
mainfrom
fix/workflow-result-check
Apr 17, 2026
Merged

fix: prevent cancelled jobs from passing result checks#464
DerekRoberts merged 5 commits into
mainfrom
fix/workflow-result-check

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

Fixes a bug where cancelled or failed jobs were incorrectly treated as success by downstream "results" aggregator jobs.

Root causes

  1. Misspelled status: Checks used 'canceled' (US) instead of 'cancelled' (GitHub's actual status) so cancellations were never detected.
  2. Missing check: The pr-validate.yml results job had no failure/cancellation detection at all.

Changes

  • Fix spelling: 'canceled''cancelled' in all workflows
  • Add missing check to pr-validate.yml results job

This ensures needs.*.result correctly 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:

@DerekRoberts DerekRoberts requested a review from mishraomp as a code owner April 17, 2026 11:32
Copilot AI review requested due to automatic review settings April 17, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.*.result wildcard aggregation with explicit per-job checks for downstream “results” jobs.
  • Update cancellation detection to use GitHub’s cancelled status (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.

Comment thread .github/workflows/pr-open.yml Outdated
Comment thread .github/workflows/analysis.yml Outdated
Comment thread .github/workflows/analysis.yml Outdated
Comment thread .github/workflows/pr-validate.yml Outdated
Comment thread .github/workflows/pr-open.yml Outdated
- 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.
@DerekRoberts DerekRoberts force-pushed the fix/workflow-result-check branch from cc81f54 to 429d3a1 Compare April 17, 2026 11:43
@DerekRoberts DerekRoberts moved this from New to Active in DevOps (NR) Apr 17, 2026
@DerekRoberts DerekRoberts self-assigned this Apr 17, 2026
DerekRoberts and others added 3 commits April 17, 2026 10:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DerekRoberts DerekRoberts merged commit f8912ed into main Apr 17, 2026
14 checks passed
@DerekRoberts DerekRoberts deleted the fix/workflow-result-check branch April 17, 2026 17:52
@github-project-automation github-project-automation Bot moved this from Active to Done in DevOps (NR) Apr 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants