Commit 484c4ce
ci: fail generate-e2e-matrix.sh on a stale GINKGO_FOCUS mapping
Verified directly: Ginkgo v2's -ginkgo.focus reports "SUCCESS!" and
exits 0 when it matches zero specs. This script hardcodes a Scenario ->
GINKGO_FOCUS mapping; if a Describe() tag in a spec file is ever renamed
without updating this script, the corresponding matrix case would
silently run 0 specs and report green forever -- prompted by checking
https://www.brokenpip3.com/posts/2024-25-02-ginkgo-github-actions-matrix/,
whose own "focus values must be globally unique" gotcha is the same
underlying fragility (GINKGO_FOCUS trusting a hand-maintained string
against source that can drift out from under it), just the inverse
failure direction.
Now greps test/e2e/(packaging/)*.go for each generated focus value's
literal text before emitting the matrix, refusing to generate one if
anything's stale. Verified both directions: passes clean today, and
fails loudly when a tag is deliberately renamed (reverted after
confirming).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent c03c1c7 commit 484c4ce
1 file changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
16 | 52 | | |
17 | 53 | | |
18 | 54 | | |
| |||
72 | 108 | | |
73 | 109 | | |
74 | 110 | | |
| 111 | + | |
| 112 | + | |
75 | 113 | | |
76 | 114 | | |
77 | 115 | | |
| |||
0 commit comments