ci: required-check anchors for cypress-matrix and playwright-tests (unblock docs-only PRs)#40780
Conversation
…ests Follow-up to #40772, which added anchor jobs for the skippable matrix jobs unit-tests and test-postgres. cypress-matrix and playwright-tests have the same shape: they are matrix jobs gated on change detection (python || frontend). On a PR that touches neither — most notably a docs-only PR — the job is skipped at the job level, before matrix expansion, so the per-combination contexts (cypress-matrix (0, chrome), cypress-matrix (1, chrome), playwright-tests (chromium)) are never produced. Branch protection requires those contexts, so docs-only PRs sit forever on "Expected — Waiting for status to be reported". (The frontend case wasn't affected because a frontend change sets frontend=true and these jobs run; only docs-only / neither-group PRs hit it.) Add always-running cypress-matrix-required and playwright-tests-required anchors that pass when the underlying job succeeded or was skipped, and point branch protection at them (a single cypress-matrix-required replaces both shard contexts). The matrix jobs stay fully skipped on unrelated PRs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #230117Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The security warning regarding overly broad permissions in .github/workflows/superset-e2e.yml |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40780 +/- ##
=======================================
Coverage 64.07% 64.07%
=======================================
Files 2664 2664
Lines 143786 143786
Branches 33072 33072
=======================================
Hits 92125 92125
Misses 50054 50054
Partials 1607 1607
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zizmor flagged cypress-matrix-required and playwright-tests-required for
using default (overly broad) permissions. These jobs only read the needs
context to check a result string — no checkout, no API calls — so deny-all
`permissions: {}` is the correct least-privilege setting.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed the zizmor finding in 5a6bee5 — added |
Per review: the anchors accepted a 'skipped' matrix result unconditionally, but GHA also skips cypress-matrix/playwright-tests when their `needs: changes` dependency fails or is cancelled. That would let a broken change-detector report a false green. Require `needs.changes.result == 'success'` before honouring a skip, so only a legitimate docs-only gate-off passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SUMMARY
Follow-up to #40772. Docs-only PRs currently can't merge — they hang on
cypress-matrix (0, chrome),cypress-matrix (1, chrome), andplaywright-tests (chromium)showing "Expected — Waiting for status to bereported" (e.g. #38108).
Root cause (same as #40772):
cypress-matrixandplaywright-testsarematrix jobs gated on change detection (
python || frontend). On a PR thattouches neither group — a docs-only PR — they're skipped at the job level,
which happens before matrix expansion, so the per-combination contexts are
never produced. Branch protection requires them → it waits forever.
The frontend Dependabot case (#40772) didn't expose this for the e2e jobs
because a frontend change sets
frontend=true, so cypress/playwright run.Only docs-only / neither-group PRs hit it — and the docs "build" people expect
(the Netlify Deploy Preview) does run and pass; it just isn't a required GHA
check, so the orphaned cypress/playwright contexts are what actually gate.
Fix: add always-running
cypress-matrix-required/playwright-tests-requiredanchors that pass when the underlying job is
successorskipped, andrequire those instead of the matrix-expanded names. A single
cypress-matrix-requiredreplaces both shard contexts. The matrix jobs stayfully skipped on unrelated PRs.
.asf.yaml:cypress-matrix (0, chrome)+cypress-matrix (1, chrome)→cypress-matrix-requiredplaywright-tests (chromium)→playwright-tests-requiredWith this, every required matrix job (
unit-tests,test-postgresvia #40772;cypress-matrix,playwright-testshere) has a stable anchor, so PRs of anyshape — python, frontend, or docs-only — can satisfy branch protection.
TESTING INSTRUCTIONS
shard genuinely fails).
ADDITIONAL INFORMATION
🤖 Generated with Claude Code