Repository navigation
fix(lint): Don't fail CI on stale suppression budgets inherited from master - #126882
Conversation
|
Reviewed head
No artifact caching in this change. Keep automatic cleanup/bot commits as a separate follow-up; this PR should establish the warning-versus-failure behavior without weakening the ratchet. |
|
Retracting my suggestion to update CODEOWNERS for |
…dgets for verified bases
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
…126895) Because we don't require branches to be up-to-date when merging, there are situations where `oxlint-suppressions.json` could potentially be stale. #126882 made this condition non-failing, but it also causes PRs to spend longer checking their baseline. In this PR, we add a cleanup workflow that runs the existing full type-aware `--prune` command and maintains a baseline cleanup PR automatically.
PRs can merge without being up to date with master, so two merges can each prune the same file or reduce debt on their own. When that happens, master ends up with
oxlint-suppressions.jsonbudgets that are higher than the actual debt. The--ciratchet then fails on master, and on every PR after it, with "Suppression budgets are stale", even though nothing got worse.Stale budgets now only fail CI when the change caused them. New debt still fails everywhere.
--base: stale budgets print a warning (a::warning::annotation in Actions) and the ratchet passes.--base HEAD^1): a stale budget fails only if the PR edited that budget, or if live debt for that file and rule went down compared to the base's live debt. That covers reductions caused indirectly by edits to other files, such as type changes. Editing a file that already has stale budget, without reducing its debt, only warns.Skipping the stale check must not weaken the ratchet. A passing master run is no longer enough to reuse its committed budgets as a PR baseline.
--cinow writesbudgets=exact|staleto the step output. A newVerify exact lint budgetsstep runs only when the budgets are exact, andfind-verified-lint-base.jsonly trusts runs where that step succeeded. On a stale base, PR checks fall back to scanning the base, so the baseline is always the base's live debt. Refilling inherited slack, whether directly or indirectly, then shows up as a new violation.Tradeoff: until master is pruned, PRs pay for an extra base scan instead of reusing the verified budgets. Automatic pruning or bot commits will be a separate follow-up.
Also moves CODEOWNERS for
oxlint-suppressions.jsonto@getsentry/design-engineering.via Junior system actor
event.--
View Junior Session [Sentry]