Repository navigation
Revert "Revert "Add hourly workflow to revert PRs merged with broken CI"" - #100700
alexey-milovidov merged 43 commits into
Conversation
|
Workflow [PR], commit [a0f8628] Summary: ✅ AI ReviewSummaryThis PR reintroduces the scheduled Final VerdictStatus: ✅ Approve |
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow
…itialize` Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
|
The MSan stress test failure (MemorySanitizer: use-of-uninitialized-value, STID 4179-5154 or 4148-3044) is a known pre-existing issue unrelated to this PR. Fix: #102158 |
…t-97623-revert-broken-prs-workflow # Conflicts: # src/Coordination/KeeperDispatcher.h
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow
|
@alexey-milovidov, the fix is up: #103539. Root cause analysis (different from prior fixes): The race lives at the cache state lock level, not the priority lock level.
Fix: This preserves the existing Regression test: Added CC @kssenii — assigned to you per @alexey-milovidov's request. |
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow # Conflicts: # programs/keeper-bench/Runner.cpp # src/Disks/DiskObjectStorage/DiskObjectStorage.cpp # tests/integration/test_mask_sensitive_info/test.py # tests/integration/test_storage_delta/test.py
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow
|
@groeneai, find the fix for "Logical error: Port is already connected" and link the corresponding PR here. |
|
@alexey-milovidov yes — STID 0996 family ( Status: OPEN, awaiting merge / re-approval.
Once #103230 lands, STID 0996 will clear from this PR's CI as well. cc @KochetovNicolai @CurtizJ — could one of you re-approve the rebased HEAD? |
…t-97623-revert-broken-prs-workflow
…t-97623-revert-broken-prs-workflow
…ert workflow Address review: the merge-commit and PR-head check-run filters only treated `conclusion == "failure"` as broken. GitHub check-runs can also complete with other terminal non-success conclusions — `timed_out`, `cancelled`, and `action_required` — which have `status == "completed"`, so they were caught by neither the `failure` branch nor the `status != "completed"` (incomplete) branch. A PR merged with a timed-out or cancelled required job would therefore produce empty `merge_failures`/`common_failures`, and the workflow would skip the revert even though CI never passed. Collect these terminal non-success conclusions consistently on both sides: add them to the merge-commit `select`, label them on the PR-head side, and extend the suffix-stripping in the intersection step so the names still match. The commit-status side already covers all of its terminal states (`failure` and `error`), so it is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Addresses the remaining AI Review major on #100700: the merge-commit and PR-head check-run filters in `.github/workflows/revert_broken_prs.yml` only treated `failure`, `timed_out`, `cancelled`, and `action_required` as broken. GitHub's `CheckConclusionState` also has the terminal non-success conclusions `startup_failure` and `stale`; a merge commit and PR head whose matching required check ended with one of those left `merge_failures`/`common_failures` empty, so the workflow skipped the revert even though CI never passed. Add `startup_failure` and `stale` consistently to the merge-commit filter, the PR-head filter (with matching diagnostic labels), and the suffix-stripping in the intersection step. This now covers the complete set of terminal non-success conclusions (`failure`, `timed_out`, `cancelled`, `action_required`, `startup_failure`, `stale`); only the success-equivalent ones (`success`, `neutral`, `skipped`) and not-yet-completed runs remain excluded, so no terminal conclusion can be missed. Validated by running the embedded `jq` filters and the strip/intersection pipeline against a synthetic merge/head pair whose shared checks ended with `startup_failure` and `stale`: both are selected on the merge side, labeled on the head side, and recovered by the intersection (so a revert is triggered), while `success`/`neutral`/`skipped`/incomplete runs are ignored. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Important: from now on, with every update of this PR, check it by dry-running the same logic and post, which PRs would it revert if active. |
Dry-run of the revert logic (per the standing request)Ran the workflow's exact logic and filters from this PR's head ( Result: it would revert 0 PRs.
So 35 of the 57 merges arrived with a non-excluded CI failure on the merge commit, and in every case the intersection guard correctly classified it as flaky — the same failing check did not also fail (or stay incomplete) on the PR's own merged head. None of them would have been reverted. The 35 merges that had a merge-commit failure but were filtered out as flakyClean PR head (21): No matching intersection (14): CI on this PR is green, the AI review verdict is ✅ Approve, and there are no unresolved review threads, so no code changes were made this round. |
…t-97623-revert-broken-prs-workflow
Dry-run of the revert logic (per the standing request)Ran the workflow's exact logic and filters from this PR's head ( Result: it would revert 0 PRs.
All 12 merge commits in the window are accounted for. 10 of them arrived on The window is smaller than the previous run (12 vs 57 merges) because it covers a weekend (Sat–Sun), when fewer PRs are merged. (This is a fewer-merges weekend snapshot; the guard continues to filter every flaky case correctly — no PR would have been reverted.) |
|
No way something in the world would understand 300 lines of GH action written in bash. |
Dry-run of the revert logic (per the standing request)Ran the workflow's exact logic and filters from this PR's head ( Result: it would revert 1 PR — and that one would be a false positive.
All 36 merge commits in the window are accounted for. 30 of them arrived on The one it would revert: #107764 — and it should not be reverted
This is a false positive. The corroborating signal is in the failing sets themselves: the merge commit and the merged head are essentially the same code (the head is the merge commit's second parent), yet they fail different subsets — the merge commit fails What this reveals about the guardThe intersection guard assumes "the same check failing on both the merge commit and the merged head ⇒ a real, non-flaky failure." That holds for a test that fails because of the change, but it does not hold for a test that is independently flaky: a consistently-flaky stress test (MSan especially) can fail on two consecutive runs of the same code, and the merge commit + merged head are two such runs. So the guard can still false-positive on a chronically-flaky check. Leaving the design response to you (this is exactly the signal the dry-run was meant to surface before activation). Possible directions, none applied here:
|
Dry-run of the revert logic (per the standing request)Ran the workflow's exact logic and filters from this PR's head ( Result: it would revert 0 PRs.
All 65 merge commits in the window are accounted for. 44 of them arrived on The dominant pattern remains the same: nearly every merge commit shows a transient Continuity note on yesterday's findingThe one would-be revert from the previous run — #107764, a false positive driven by a coincidental |
|
Dry-run of the The dry-run script was re-verified byte-faithful to the workflow at the current head
Breakdown (all 46 accounted):
So 35/46 merges arrived with a non-excluded merge-commit CI failure, yet the same-check intersection guard classified all of them as flaky → no false-positive mass-revert. Continuity note (guard weakness first surfaced 2026-06-23, still open for your decision): the same-check-on-both-runs intersection can be defeated by a chronically flaky check (e.g. |
|
Dry-run of the The dry-run script was re-verified byte-faithful to the workflow at the current head
Breakdown (all 42 accounted):
So 23/42 merges arrived with a non-excluded merge-commit CI failure, yet the same-check intersection guard classified all of them as flaky → no false-positive mass-revert. Continuity note (guard weakness first surfaced 2026-06-23, still open for your decision): the same-check-on-both-runs intersection can be defeated by a chronically flaky check (e.g. |
|
It works very well! |
|
Dry-run of the The dry-run script was re-verified byte-faithful to the workflow at the current head
Breakdown (all 64 accounted):
So 42/64 merges arrived with a non-excluded merge-commit CI failure, yet the same-check intersection guard classified all of them as flaky → no false-positive mass-revert. Continuity note (guard weakness first surfaced 2026-06-23, still open for your decision): the same-check-on-both-runs intersection can be defeated by a chronically flaky check (e.g. |
Address review on PR ClickHouse#100700: `gh api .../commits?...&per_page=100` returned only the first page, so when `master` has more than 100 commits in the last 24 hours, older commits inside the window were silently excluded and never evaluated for revert. Switch to `--paginate --jq '.[]' | jq -s '.'` so the resulting `commits_json` is a single JSON array containing every commit across all pages, matching the contract of the existing downstream `jq` filters.
Two AI Review majors on PR ClickHouse#100700 (revert-broken-prs workflow): - The four `gh api` check/status queries used `2>/dev/null || true`, which made an API, auth, rate-limit, or `jq` failure indistinguishable from "no failed checks". An empty `merge_failures` then let the workflow succeed while silently skipping a broken merge. Each query now lets a real failure surface: it is logged and only that candidate is skipped (retried on the next hourly run), rather than being misread as clean data. - The PR-head attribution check derived `pr_head_sha` from the PR object's current `.head.sha`. A closed PR's source branch can still move, so this could compare the merge failure against a later commit and cause false reverts or missed bad merges. It now derives the merged head from the merge commit's second parent (`.parents[1].sha`, already present in `commits_json`), which is stable. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Addresses the remaining AI Review major on ClickHouse#100700: the merge-commit and PR-head check-run filters in `.github/workflows/revert_broken_prs.yml` only treated `failure`, `timed_out`, `cancelled`, and `action_required` as broken. GitHub's `CheckConclusionState` also has the terminal non-success conclusions `startup_failure` and `stale`; a merge commit and PR head whose matching required check ended with one of those left `merge_failures`/`common_failures` empty, so the workflow skipped the revert even though CI never passed. Add `startup_failure` and `stale` consistently to the merge-commit filter, the PR-head filter (with matching diagnostic labels), and the suffix-stripping in the intersection step. This now covers the complete set of terminal non-success conclusions (`failure`, `timed_out`, `cancelled`, `action_required`, `startup_failure`, `stale`); only the success-equivalent ones (`success`, `neutral`, `skipped`) and not-yet-completed runs remain excluded, so no terminal conclusion can be missed. Validated by running the embedded `jq` filters and the strip/intersection pipeline against a synthetic merge/head pair whose shared checks ended with `startup_failure` and `stale`: both are selected on the merge side, labeled on the head side, and recovered by the intersection (so a revert is triggered), while `success`/`neutral`/`skipped`/incomplete runs are ignored. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…vert-97623-revert-broken-prs-workflow Revert "Revert "Add hourly workflow to revert PRs merged with broken CI""
Reverts #100696
Reintroduces the hourly workflow (
.github/workflows/revert_broken_prs.yml) that scans merge commits on master from the last 24 hours and automatically opens revert PRs for merges that arrive with broken CI.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.7.1.170(included in26.7and later)