Commit dca1fd6
authored
improvement(ci): scan CodeQL PRs at the promotion boundary, refresh main daily (#7213)
Feature PRs land on staging and are ~90% of PR scan volume (90 of the last 100
PRs target staging, 4 target main). Every one of them is scanned again — against
the exact tree being promoted — when the staging->main PR opens, so restricting
PR scans to main defers the signal to the promotion boundary rather than
dropping it. No ruleset or branch protection requires a CodeQL check, and the
alert view is fed by the push-to-main and scheduled analyses, not by PR runs.
Deliberately a branch cut rather than an activity-type cut. Dropping
`synchronize` would have cut a similar share of runs, but it scans a PR's first
commit and never its final state — backwards, since review fixups land in later
pushes.
The scheduled scan moves from weekly to daily. Pushes to main are rare, so with
PR scans limited to main the default-branch alert view leans on the cron more
than it used to, and a week is too long to leave it stale. It also reseeds the
overlay-base database that PR runs restore from: that cache key embeds the
CodeQL bundle version, so a bundle bump invalidates it, and an unused Actions
cache is evicted after 7 days.
Also records, in codeql-config.yml, why the obvious speed-up is a trap: adding
`queries:`/`packs:`/`query-filters:` trips OverlayDisabledReason.NonDefaultQueries
and permanently disables overlay analysis, trading a documented up-to-10x win on
the extraction phase (~53% of a run) for a few percent off the query phase.1 parent 9e79dd2 commit dca1fd6
2 files changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | | - | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
| |||
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
44 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
45 | 61 | | |
46 | 62 | | |
47 | 63 | | |
| |||
0 commit comments