Skip to content

fix(ci): fix backport auto-label and skip fix(ci) from backport - #6970

Merged
Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:ci/backport-auto-label-no-require
Jul 28, 2026
Merged

fix(ci): fix backport auto-label and skip fix(ci) from backport#6970
Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:ci/backport-auto-label-no-require

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The Backport Auto Label workflow crashed on every PR into main with Cannot find module '@actions/github': it built a second Octokit via require("@actions/github"), but github-script's require resolves from the checked-out workspace, which has no such package. Regressed in #6962.

Instead of github-script's __original_require__ escape hatch, this splits the single step into two, each with its own github-token, so no second Octokit is built in-script:

  • Label (PAT): all reads and label writes, so a labeled event still retriggers the backport pre-merge check.
  • Report (GITHUB_TOKEN): requests reviewers and upserts the report comment as github-actions[bot].

Also skips fix(ci): PRs — CI-only fixes are never backported. Behavior is otherwise unchanged.

Any related issues, documentation, discussions?

Closes #6969

How was this PR tested?

  • node --check on both script bodies and a YAML parse of the workflow.
  • This PR's own Backport Auto Label check stays red until merge: pull_request_target runs the base-branch (still-broken) workflow.

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

Generated-by: Claude Code (Claude Opus 4.8)

The Backport Auto Label workflow built a second Octokit with
`require("@actions/github").getOctokit(BOT_TOKEN)`, but github-script's
patched `require` resolves modules from the checked-out workspace, which
has no such package — so every run aborted with
`Cannot find module '@actions/github'`.

Split the single github-script step into two, each with its own natural
`github-token`, so no second Octokit is constructed in-script:
  - Label (PAT): all reads and label writes, so a `labeled` event still
    retriggers the backport pre-merge check; hands its decisions to the
    next step via a JSON step output.
  - Report (GITHUB_TOKEN): requests reviewers and upserts the report
    comment as github-actions[bot], so neither retriggers a
    comment-/review-driven workflow.

Also skip `fix(ci):` PRs: CI-only fixes never land on a release branch,
so they are treated like non-fix titles and left unlabeled.

Closes apache#6969

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Yicong-Huang Yicong-Huang changed the title ci: fix backport auto-label crash; skip fix(ci) from backport fix(ci): backport auto-label crash; skip fix(ci) from backport Jul 28, 2026
@Yicong-Huang Yicong-Huang changed the title fix(ci): backport auto-label crash; skip fix(ci) from backport fix(ci): fix backport auto-label and skip fix(ci) from backport Jul 28, 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.

@github-actions github-actions Bot added the ci changes related to CI label Jul 28, 2026
@Yicong-Huang
Yicong-Huang enabled auto-merge July 28, 2026 06:58
@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.96%. Comparing base (5040cad) to head (722f241).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6970      +/-   ##
============================================
- Coverage     78.97%   78.96%   -0.01%     
  Complexity     3783     3783              
============================================
  Files          1160     1160              
  Lines         46105    46105              
  Branches       5115     5115              
============================================
- Hits          36413    36409       -4     
- Misses         8068     8072       +4     
  Partials       1624     1624              
Flag Coverage Δ
access-control-service 70.00% <ø> (ø)
agent-service 76.76% <ø> (ø)
amber 72.16% <ø> (-0.02%) ⬇️
computing-unit-managing-service 20.49% <ø> (ø)
config-service 66.66% <ø> (ø)
file-service 67.21% <ø> (ø)
frontend 82.99% <ø> (ø)
notebook-migration-service 78.94% <ø> (ø)
pyamber 95.34% <ø> (-0.05%) ⬇️
workflow-compiling-service 26.31% <ø> (ø)

☔ 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

Copy link
Copy Markdown
Contributor

✅ No material benchmark regressions detected

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

Compared against main 5040cad 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 428 0.261 23,257/30,470/30,470 us 🟢 -9.0% / 🔴 +87.7%
🟢 bs=100 sw=10 sl=64 952 0.581 103,555/123,367/123,367 us 🟢 -10.9% / 🔴 +13.5%
bs=1000 sw=10 sl=64 1,100 0.671 913,228/962,156/962,156 us ⚪ within ±5% / 🟢 -10.7%
Baseline details

Latest main 5040cad from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 428 tuples/sec 429 tuples/sec 767.9 tuples/sec -0.2% -44.3%
bs=10 sw=10 sl=64 MB/s 0.261 MB/s 0.262 MB/s 0.469 MB/s -0.4% -44.3%
bs=10 sw=10 sl=64 p50 23,257 us 23,298 us 12,502 us -0.2% +86.0%
bs=10 sw=10 sl=64 p95 30,470 us 33,499 us 16,234 us -9.0% +87.7%
bs=10 sw=10 sl=64 p99 30,470 us 33,499 us 18,919 us -9.0% +61.1%
bs=100 sw=10 sl=64 throughput 952 tuples/sec 951 tuples/sec 974.8 tuples/sec +0.1% -2.3%
bs=100 sw=10 sl=64 MB/s 0.581 MB/s 0.58 MB/s 0.595 MB/s +0.2% -2.3%
bs=100 sw=10 sl=64 p50 103,555 us 104,475 us 102,449 us -0.9% +1.1%
bs=100 sw=10 sl=64 p95 123,367 us 138,428 us 108,652 us -10.9% +13.5%
bs=100 sw=10 sl=64 p99 123,367 us 138,428 us 116,310 us -10.9% +6.1%
bs=1000 sw=10 sl=64 throughput 1,100 tuples/sec 1,110 tuples/sec 1,004 tuples/sec -0.9% +9.6%
bs=1000 sw=10 sl=64 MB/s 0.671 MB/s 0.678 MB/s 0.613 MB/s -1.0% +9.5%
bs=1000 sw=10 sl=64 p50 913,228 us 903,451 us 999,606 us +1.1% -8.6%
bs=1000 sw=10 sl=64 p95 962,156 us 934,011 us 1,046,770 us +3.0% -8.1%
bs=1000 sw=10 sl=64 p99 962,156 us 934,011 us 1,076,937 us +3.0% -10.7%
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,467.13,200,128000,428,0.261,23256.97,30470.44,30470.44
1,100,10,64,20,2101.24,2000,1280000,952,0.581,103554.65,123366.96,123366.96
2,1000,10,64,20,18184.61,20000,12800000,1100,0.671,913228.26,962155.95,962155.95

@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@Yicong-Huang
Yicong-Huang removed this pull request from the merge queue due to a manual request Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@Yicong-Huang
Yicong-Huang removed this pull request from the merge queue due to a manual request Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2026
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
Merged via the queue into apache:main with commit bfe2b53 Jul 28, 2026
48 of 52 checks passed
@Yicong-Huang
Yicong-Huang deleted the ci/backport-auto-label-no-require branch July 28, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport Auto Label workflow fails with "Cannot find module '@actions/github'"

3 participants