hello-stephen opened a new pull request, #67119:
URL: https://github.com/apache/doris/pull/67119
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
`Code Review Runner` currently has no per-PR concurrency control, so a new
`/review` request can run alongside an older review for the same PR. A manual
rerun of an older workflow can also consume another full runner allocation.
This PR keeps concurrency at the `code-review` job level and groups jobs by
PR number:
- a new review request cancels the older running or queued review for the
same PR;
- unrelated issue comments remain skipped and cannot cancel an active review;
- an old workflow attempt cannot be rerun; retrying requires a fresh
`/review`, which becomes the latest logical task;
- `workflow_dispatch` and `workflow_call` use their explicit `pr_number`
input.
#### Measured effect
The sample covers the last three complete workdays in CST: 2026-08-20,
2026-08-21, and 2026-08-24.
Methodology:
- count only `Code Review Runner` jobs that were assigned a real
GitHub-hosted runner;
- bind issue-comment runs to the exact PR using the eligible `/review`
comment actor and timestamp;
- treat a run as cancellable only when the newer request was created before
the older job completed;
- estimate saved runner time from the newer run creation time to the older
job completion time.
| CST date | Review runs/jobs | Runner time | Later same-PR requests |
Overlapping old runs | Reclaimable runner time |
|---|---:|---:|---:|---:|---:|
| 2026-08-20 | 81 / 82 | 2,500.6 min | 39 | 3 | 56.1 min |
| 2026-08-21 | 63 / 63 | 2,766.1 min | 38 | 6 | 96.6 min |
| 2026-08-24 | 69 / 69 | 3,241.9 min | 25 | 2 | 61.7 min |
| **Total** | **213 / 214** | **8,508.6 min** | **102** | **11** | **214.5
min** |
Most repeated requests were sequential re-reviews after the previous job had
finished, so they are intentionally not counted as waste. The 11 actual
overlaps would have reclaimed about **214.5 runner minutes (3.58 hours, 2.5%)**.
One overlapping old workflow was manually rerun and consumed another 37.8
minutes. Requiring a fresh `/review` also removes that stale rerun path,
increasing the modeled saving to **252.3 minutes (4.21 hours, 3.0%)** for this
sample.
### Release note
None
### Check List (For Author)
- Test
- [ ] Regression test
- [ ] Unit Test
- [x] Manual test
- Parsed `.github/workflows/code-review-runner.yml` with Ruby/Psych.
- Ran `actionlint`; the result contains only the same four
pre-existing shellcheck findings as `origin/master`.
- Verified the PR-keyed concurrency, cancellation, and first-attempt
policy assertions.
- [ ] No need to test or manual test.
- Behavior changed:
- [ ] No.
- [x] Yes. Only the newest review request for a PR remains eligible to
run; retry requires a new `/review` request.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]