Repository navigation
CI: give revert pull requests a green light at once - #120767
Conversation
A revert restores a state of `master` that CI has already validated, while the state it replaces is broken, so every minute spent on the revert's own checks is a minute `master` stays broken. The `should_skip_job` filter hook now skips every job of a revert pull request, which makes the `Ready For Merge` status green immediately. The `ci-force-all` label opts out and runs the whole workflow. A pull request counts as a revert by its canonical shape only - the title `Revert "..."` or the anchored `Reverts <owner>/<repo>#<n>` line in the body, which is what `git revert`, the GitHub "Revert" button and the `Revert CI regressions` job produce. Pushes to `master` and release branches are not affected: the revert commit is tested there as usual, and the merge queue still runs its own checks. The green status explains itself: a new `Info.set_ready_for_merge_description` channel (a `JOB_KV_DATA` key) lets a Config Workflow hook set the description of the `Ready For Merge` commit status for a green workflow, and the hook uses it together with a workflow note on the report page. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [5e39fd3] Summary: ✅ AI ReviewSummaryThis PR teaches the PR workflow to treat revert-shaped pull requests as fully skippable, threads a custom green Findings❌ Blockers
Final VerdictStatus: ❌ Block Minimum required action: make the revert fast path depend on verifiable evidence that the PR is actually reverting an already-merged change, rather than on title/body markers alone. |
| `Revert "..."` title, or the anchored `Reverts <repo>#<n>` marker line in | ||
| the body. See `_REVERT_TITLE_RE` for why only the canonical shapes count. | ||
| """ | ||
| if _REVERT_TITLE_RE.fullmatch((title or "").strip()): |
There was a problem hiding this comment.
The invariant for this fast path is "only an actual revert of already-validated code may bypass PR CI". is_revert_pr does not establish that: any contributor can make an unrelated PR look like a revert just by adding a canonical marker such as Reverts ClickHouse/ClickHouse#99999999 (or a matching title). pr_body_check.py already treats that marker as Not for changelog, so this path would skip the whole PR matrix and still make Ready For Merge green even though nothing real was reverted.
Please gate this on verifiable evidence from GitHub/history instead of title/body text alone. At minimum the claimed PR should be checked to exist and be merged before this one; for the CI-bypass path I would also avoid accepting a bare Revert "..." title with no corroborating claim.
There was a problem hiding this comment.
Not a problem. We can tolerate that.
|
It skips all jobs for revert-revert :) |
|
Style check must not be skipped. It initiates CH Inc Sync on success and also validates the settings history for consistency, which might be broken by a revert. |
Edited by the nightly changelog CI job following .claude/skills/edit-changelog/SKILL.md. Changelog-revert: 120763 120477 Revert "Remove stale entries from `parallel_replicas_blacklist.txt`" Changelog-revert: 120801 120767 Revert "CI: give revert pull requests a green light at once" Changelog-revert: 120930 118612 Revert "Do not allocate from peer-declared sizes when reading settings from the Native protocol" Changelog-deleted-entry: 118612 [Bug Fix (user-visible misbehavior in an official stable release)] [raw] * Reading settings from the Native protocol no longer sizes a string from the length a peer declares before the payload arrives, so a Query packet or a server hello can no longer turn a few bytes on the wire into a large memory allocation. This covers `BaseSettings::read`, `BaseSettings::readBinary` and `readQueryParameters`, on the server and in the client. [#118612](#118612) ([Groene AI](https://github.com/groeneai)). Changelog-deleted-entry: 120767 [NOT FOR CHANGELOG / INSIGNIFICANT] [raw] * CI: give revert pull requests a green light at once. [#120767](#120767) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
A revert restores a state of
masterthat CI has already validated, while the state it replaces is broken, so every minute spent on the revert's own checks is a minutemasterstays broken. With this change theshould_skip_jobfilter hook skips every job of a revert pull request, which makes theReady For Mergestatus green immediately, so the revert can be merged as quickly as possible. Theci-force-alllabel opts out and runs the whole workflow.The green light explains itself: the
Ready For Mergestatus description saysSkipped: revert PR, CI is bypassed unless labeled 'ci-force-all', the same reason is shown for every skipped job on the report page, and a note on the report page explains it in full. This goes through a small new channel in praktika,Info.set_ready_for_merge_description, which lets a Config Workflow hook set the description of a greenReady For Mergestatus (a red status keeps describing the failed jobs).A pull request counts as a revert by its canonical shape only: the title
Revert "..."or the anchoredReverts ClickHouse/ClickHouse#<n>line in the body, which is whatgit revert, the GitHub "Revert" button and theRevert CI regressionsjob produce. A prose mention of a revert does not count. Pushes tomasterand release branches are not affected (the hook requires a pull request number), so the revert commit is tested there as usual, and the merge queue still runs its own checks.Documented in the Continuous Integration page under "Revert pull requests".
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/120767]