Skip to content

fix(ci): stop cancelling in-progress Backport Approvals runs - #8523

Open
mengw15 wants to merge 3 commits into
apache:mainfrom
mengw15:fix/backport-approval-check-cancel-race
Open

fix(ci): stop cancelling in-progress Backport Approvals runs#8523
mengw15 wants to merge 3 commits into
apache:mainfrom
mengw15:fix/backport-approval-check-cancel-race

Conversation

@mengw15

@mengw15 mengw15 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Backport Approvals is a required status check on main, and GitHub evaluates the LATEST check run with that name. The workflow's concurrency group had cancel-in-progress: true, so when two PR events land close together (a push right after a review request or a label change), the newer run cancels the older one — and when the older run's "cancelled" terminal state is recorded after the newer run's success, the required check reads as failed and the merge button is blocked. This happened on #8516: the check showed a cancelled run as its latest state while a sibling run of the same commit had already passed; re-running the cancelled run unblocked the merge.

The job completes in seconds, so cancellation saves nothing. This stops cancelling the in-progress run (cancel-in-progress: false). GitHub still keeps at most one pending run per concurrency group and replaces it on a newer event, but a replaced pending run is cancelled before its successor even starts, so its cancelled state can never land last: the latest check run on the commit always ends as a real verdict. A skipped intermediate evaluation loses nothing, because the job reads the live labels and reviews at run time rather than the event payload.

Any related issues, documentation, discussions?

Closes #8522. Observed on #8516 (a cancelled Backport Approvals run blocked an otherwise green merge).

How was this PR tested?

Config-only change to the workflow's concurrency setting; no executable code path changes. Verified the failure mechanism on #8516: the blocked merge showed the cancelled run as the latest Backport Approvals check run, and re-running it (6s pass) unblocked the merge immediately.

Was this PR authored or co-authored using generative AI tooling?

Yes. Generated-by: Claude Code (Claude Fable 5, Anthropic). Reviewed by the author before submission.

🤖 Generated with Claude Code

Backport Approvals is a required status check, and GitHub takes the
latest check run with that name. With cancel-in-progress on, two events
close together (a push right after a label or review request) let the
newer run cancel the older one, whose cancelled state then landed after
the newer run's success and blocked the merge as a failed required
check (seen on apache#8516). The job runs in seconds, so queue instead.

Closes apache#8522.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added fix ci changes related to CI labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@codecov-commenter

codecov-commenter commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.91%. Comparing base (0b103f8) to head (428dfb4).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8523   +/-   ##
=========================================
  Coverage     95.90%   95.91%           
  Complexity      459      459           
=========================================
  Files           586      586           
  Lines         33635    33635           
  Branches       4182     4182           
=========================================
+ Hits          32257    32260    +3     
  Misses          811      811           
+ Partials        567      564    -3     
Flag Coverage Δ *Carryforward flag
access-control-service 80.18% <ø> (ø)
agent-service 99.32% <ø> (ø)
amber 90.82% <ø> (ø)
computing-unit-managing-service 77.14% <ø> (ø)
config-service 87.12% <ø> (ø)
file-service 83.65% <ø> (ø) Carriedforward from 32ac293
frontend 96.73% <ø> (+0.01%) ⬆️ Carriedforward from 32ac293
notebook-migration-service 83.73% <ø> (ø)
pyamber 98.47% <ø> (ø)
workflow-compiling-service 74.09% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 2 better · 🔴 5 worse · ⚪ 8 noise (<±5%) · 0 without baseline

Compared against main 0b103f8 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 427 0.26 22,538/32,454/32,454 us 🔴 -11.9% / 🔴 +115.4%
🟢 bs=100 sw=10 sl=64 917 0.56 106,476/126,922/126,922 us 🟢 -17.4% / 🔴 +23.6%
🔴 bs=1000 sw=10 sl=64 1,081 0.66 920,802/1,067,737/1,067,737 us 🔴 +11.1% / 🔴 +9.0%
Baseline details

Latest main 0b103f8 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 427 tuples/sec 483 tuples/sec 807.77 tuples/sec -11.6% -47.1%
bs=10 sw=10 sl=64 MB/s 0.26 MB/s 0.295 MB/s 0.493 MB/s -11.9% -47.3%
bs=10 sw=10 sl=64 p50 22,538 us 20,824 us 12,280 us +8.2% +83.5%
bs=10 sw=10 sl=64 p95 32,454 us 31,052 us 15,066 us +4.5% +115.4%
bs=10 sw=10 sl=64 p99 32,454 us 31,052 us 19,166 us +4.5% +69.3%
bs=100 sw=10 sl=64 throughput 917 tuples/sec 938 tuples/sec 1,054 tuples/sec -2.2% -13.0%
bs=100 sw=10 sl=64 MB/s 0.56 MB/s 0.573 MB/s 0.643 MB/s -2.3% -12.9%
bs=100 sw=10 sl=64 p50 106,476 us 102,058 us 96,023 us +4.3% +10.9%
bs=100 sw=10 sl=64 p95 126,922 us 153,603 us 102,660 us -17.4% +23.6%
bs=100 sw=10 sl=64 p99 126,922 us 153,603 us 114,950 us -17.4% +10.4%
bs=1000 sw=10 sl=64 throughput 1,081 tuples/sec 1,081 tuples/sec 1,086 tuples/sec 0.0% -0.5%
bs=1000 sw=10 sl=64 MB/s 0.66 MB/s 0.66 MB/s 0.663 MB/s 0.0% -0.5%
bs=1000 sw=10 sl=64 p50 920,802 us 923,947 us 940,412 us -0.3% -2.1%
bs=1000 sw=10 sl=64 p95 1,067,737 us 960,898 us 979,930 us +11.1% +9.0%
bs=1000 sw=10 sl=64 p99 1,067,737 us 960,898 us 1,015,625 us +11.1% +5.1%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,468.82,200,128000,427,0.260,22537.76,32454.29,32454.29
1,100,10,64,20,2180.77,2000,1280000,917,0.560,106476.41,126922.34,126922.34
2,1000,10,64,20,18498.43,20000,12800000,1081,0.660,920802.24,1067736.75,1067736.75

@mengw15
mengw15 requested a lite review from Copilot September 12, 2026 17:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Narrow the documented guarantee or remove the shared concurrency group to ensure every event is evaluated.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates the required Backport Approvals workflow to avoid cancelling in-progress runs.

Changes:

  • Sets cancel-in-progress to false.
  • Adds concurrency rationale and documentation.
File summaries
File Summary
.github/workflows/backport-approval-check.yml Adjusts workflow concurrency; pending runs may still be replaced, so the FIFO/every-run guarantee is not met.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/backport-approval-check.yml Outdated
GitHub keeps at most one running and one pending run per concurrency
group and replaces the pending one on a newer event, so 'queue, every
run completes' overstated it. What holds and matters: the in-progress
run is never cancelled, and a replaced pending run is cancelled before
its successor even starts, so the latest check run always ends as a
real verdict. A skipped intermediate evaluation loses nothing: the job
reads the live labels and reviews at run time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport Approvals required check can block a merge with a cancelled run

3 participants