fix: ensure Analysis Results job fails on dependency failure#2670
Open
DerekRoberts wants to merge 1 commit intomainfrom
Open
fix: ensure Analysis Results job fails on dependency failure#2670DerekRoberts wants to merge 1 commit intomainfrom
DerekRoberts wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions “Analysis Results” job gating so it executes even when its dependent test jobs fail, preventing merges from being unblocked due to skipped status evaluation.
Changes:
- Add
always()to theAnalysis Resultsjob-levelif:condition so the gate runs regardless of dependency outcomes.
Comments suppressed due to low confidence (1)
.github/workflows/analysis.yml:122
needs.<job>.resultuses the valuecancelled(double “l”) when a dependency job is canceled. This step is checking for'canceled', so the Results gate can incorrectly report success when a dependency is canceled (especially important now that the job runs viaalways()). Update the string tocancelled(or switch to usingcancelled()/a dedicated check for cancellations) so cancellations correctly fail the gate.
if: always() && (! github.event.pull_request.draft)
runs-on: ubuntu-slim
steps:
- if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled')
run: echo "At least one job has failed." && exit 1
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
This PR fixes the logic in the
Analysis Resultsjob to prevent it from silently skipping when tests fail.The Problem
The reason PR #2667 merged is that the
Analysis Resultsjob skipped when the tests failed. Because it didn't havealways(), GitHub didn't see an explicit failure to block the merge.The Fix
By adding
always()to the job condition, we ensure that the results gate always evaluates its dependencies.Action Required
Ensure that
Analysis Resultsis marked as a Required Status Check in Branch Protection settings.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: