ci: ensure required checks always report status - #34674
Conversation
Remove paths filters from contributor-check and supply-chain-audit workflows. When no matching files changed, the workflows never ran and the required checks (check-attribution, supply chain scan, dep bounds) stayed "pending" forever, blocking merge. Now both workflows always trigger. A path-check step/job determines whether the real work should run; gate jobs with matching names report success when the real job was skipped, so branch protection always gets a check status. Also fixes dep-bounds: the old condition if: contains(github.event.pull_request.changed_files_url, 'pyproject.toml') || true was always true (the || true made it unconditional). Now uses the proper changes.deps output from the shared filter job.
🔎 Lint report:
|
|
Reviewed — this is correct and well-scoped. Thanks for catching this. The bug is real and documented. Per GitHub's docs: a workflow skipped by a The Both halves are mechanically sound per GitHub's own semantics:
One minor, non-blocking note: the Note that #33773 has since merged on its own, so the immediate motivation is resolved — but the underlying mechanism bug remains and will block the next nix/docs-only PR, so this is still worth landing. |
The scan-gate / dep-bounds-gate jobs use needs.changes; if the changes job itself fails, its dependents would be skipped via a failed dependency (not a conditional skip), leaving the required check unreported — the same "pending forever" failure this PR fixes. Add always() and switch the gate condition from == 'false' to != 'true' so the gate still fires (and reports SUCCESS) when changes fails and its output is empty.
What does this PR do?
Removes
paths:filters from thecontributor-checkandsupply-chain-auditworkflows so that their required checks always report a status. Currently, when no matching files change (e.g. a nix-only PR), those workflows never run and the checks stay "pending" forever, which blocks merge under the branch protection ruleset.The actual scanning/attribution work still skips when no relevant files changed — gate jobs with the same check name report success in the skip case.
Related Issue
Unblocks PRs like #33773 that only touch nix files and get stuck with pending required checks.
Fixes #
Type of Change
Changes Made
.github/workflows/contributor-check.yml— Removedpaths:fromon:trigger. Added aCheck if relevant files changedstep that setsrun=true/false. The attribution check step is now gated onsteps.filter.outputs.run == 'true'. When skipped, the job still reports success (satisfying the required check)..github/workflows/supply-chain-audit.yml— Removedpaths:fromon:trigger. Added achangesjob that computesscananddepspath-filter outputs.scananddep-boundsare gated on their respective outputs. Addedscan-gateanddep-bounds-gatejobs (with matchingname:values) that report success when the real job was skipped. Also fixeddep-bounds— its old conditionif: contains(..., 'pyproject.toml') || truewas always true; now uses the properneeds.changes.outputs.depsoutput.How to Test
check-attribution,Scan PR for critical supply chain risks, andCheck PyPI dependency upper boundsshould all report green (either from the real job or the gate job), not stay "pending"*.pyfiles — attribution check should run as beforepyproject.toml— both scan and dep-bounds should run as beforeChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — or N/A (CI workflow changes only)Documentation & Housekeeping
cli-config.yaml.example— or N/ACONTRIBUTING.mdorAGENTS.md— or N/AScreenshots / Logs
PR #33773 status before (3 required checks stuck pending):
After this change, the gate jobs report success for those same check names when no relevant files changed.