[AIROCMLIR-1146][CI] Always report required checks on external/llvm-project-only PRs - #2443
Merged
mirza-halilcevic merged 6 commits intoAug 6, 2026
Conversation
Signed-off-by: Bogdan Petkovic <bpetkovi@amd.com>
|
1 task done
…ed code Signed-off-by: Bogdan Petkovic <bpetkovi@amd.com>
…e merge) Co-authored-by: Cursor <cursoragent@cursor.com>
…rt before merge)" This reverts commit a36bf14.
Co-authored-by: Cursor <cursoragent@cursor.com>
bogdan-petkovic
marked this pull request as ready for review
August 6, 2026 14:48
mirza-halilcevic
approved these changes
Aug 6, 2026
… measuring)" This reverts commit a849d7c.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2443 +/- ##
===========================================
+ Coverage 82.57% 83.60% +1.04%
===========================================
Files 120 121 +1
Lines 42852 43182 +330
Branches 7110 7181 +71
===========================================
+ Hits 35381 36101 +720
+ Misses 4815 4499 -316
+ Partials 2656 2582 -74
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
mirza-halilcevic
deleted the
users/bpetkovi/ci-external-only-required-checks
branch
August 6, 2026 21:31
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.
Motivation
The GitHub Actions workflow never runs on LLVM upstream merges, nor on PRs confined to
external/llvm-project/**. Its required checks then sit as "Expected - waiting for status to be reported" and the PR cannot merge without an admin bypass. A skipped workflow is not a skipped job: the former never creates a check run, so branch protection has nothing to observe.Two causes. GitHub evaluates
on: <event>: paths:filters against only the first 300 files of a diff, so an LLVM subtree pull fills every slot withexternal/llvm-project/entries and no run is created at all — which is why #2427 produced zero runs despite changing 12 files this workflow owns.Technical Details
The path set moves out of the trigger filters into a single
relevant-changesjob that the three existing jobs key their steps off. They now always run and always report, but do no work when nothing relevant changed. The path set is unchanged, so which PRs get checked does not change, only how that decision is computed, and the required check names are untouched, so no branch protection changes are needed. The filter is dropped from thepushtrigger too, since the 300-file cap applies there as well and the path set should live in one place.Detection needs no checkout. For a pull request it fetches GitHub's merge preview ref with
--depth=2 --filter=tree:0and diffs it against its first parent; for a push it diffs the event's before/after range.So every branch that cannot prove there is nothing in scope answers
true, and the guards test!= 'false'rather than== 'true': a failed or missing detection runs the real checks instead of passing them.--ignore-externalis passed topremerge-checks.pywhen the diff touchesexternal/llvm-project, mirroring theignoreExternalLintingparameter Jenkins sets by hand. Without it the first upstream merge to reach this workflow would lint ~18k vendored files held to upstream style.Also added:
permissions: contents: read, aconcurrencygroup matching theclaude_auto_review*convention, andtimeout-minuteson the detection job.Test Plan
The exact
run:block was extracted from the workflow and executed under GitHub's own shell invocation,bash --noprofile --norc -e -o pipefail, withGITHUB_OUTPUTredirected to a file — so the tested code is the code that ships, witherrexitactive. It was exercised against real PRs and a real push range covering both outcomes, all four event types, and the failure paths. Since this PR touches.github/workflows/it always resolves torelevant=true, so the external-only outcome was observed on a live run by temporarily forcing the result and reverting immediately after.Test Result
relevant=true ignore_external=trueexternal/llvm-project/relevant=false ignore_external=truedevelop~3..developrelevant=true ignore_external=trueworkflow_dispatchrelevant=true ignore_external=truerelevant=true(fail-safe)Every case exits
0under-e. Live runs on this PR:relevant=truerelevant=false(forced, then reverted)In the forced run all three jobs reported
SUCCESSunder their required check names, confirming that a job whose steps are all guarded off still reports success rather than a skipped conclusion — the behaviour an external-only PR depends on, now measured rather than assumed.Submission Checklist