Skip to content

ci: report backport auto-label decisions on the PR - #6962

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

ci: report backport auto-label decisions on the PR#6962
Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:ci/backport-auto-label-report

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The backport auto-label workflow (.github/workflows/backport-auto-label.yml) decides, per actively-supported release branch, whether to add a release/* label to a fix: PR. Until now every skip was silent — visible only in the Actions log. Its cheap "is this feature on the branch?" check compares exact file paths, so a file moved or renamed after the branch was cut reads as absent and the label is dropped with no signal to the author. #6960 hit exactly this: its files live under coordinator/ on main but controller/ on release/v1.2, so a fix that genuinely applied to v1.2 was never labeled.

This PR makes the workflow write its reasoning back to the PR as a single report comment:

  • One row per actively-supported release branch, with the decision and why:
    • labeled — change detected on the branch; label added (and who was requested for review);
    • ⚠️ skipped — none of the modified files exist on the branch (the files are listed), with a prompt to check and add the label by hand if the fix should be backported;
    • 🚫 declined — a previously removed label (opt-out), not re-added.
  • The comment is upserted in place via a hidden marker, so edited re-runs update the same comment instead of stacking new ones (editing a comment sends no notification, so re-runs stay quiet).
  • It links the auto-label run, and is authored by github-actions[bot] like the existing review request (no label PAT needed).
  • Inactive branches and non-fix: PRs are unchanged (no comment); a no-backport-needed PR gets a one-line note instead of the table.

Labeling behavior itself is unchanged — this only surfaces the decisions that were already being made.

Any related issues, documentation, discussions?

Resolves #6961. Follow-up to the backport lifecycle automation (#6941, #6959). Motivated by #6960, which was silently not labeled for release/v1.2.

How was this PR tested?

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

Generated-by: Claude Code (Claude Opus 4.8)

The auto-label workflow decides per release branch whether to add a
release/* label, but its skips were only visible in the Actions log.
When it skips because a modified file's exact path is absent on a
release branch, the author got no signal — a file moved or renamed
after the branch was cut (e.g. coordinator/ on main vs controller/ on
release/v1.2 in apache#6960) reads as "feature absent" and silently drops a
backport the fix actually needed.

Post a single, in-place-updated report comment (identified by a hidden
marker, so `edited` re-runs update it instead of stacking): one row per
actively-supported release branch stating whether the label was added
(change detected), skipped (with the modified files that were absent and
a prompt to add the label by hand), or declined (opt-out). The comment
links the auto-label run. Authored by github-actions[bot] like the
review request, so it needs no label PAT.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the ci changes related to CI label 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.

@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.97%. Comparing base (ee41d9a) to head (2ef56e0).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6962      +/-   ##
============================================
- Coverage     78.98%   78.97%   -0.02%     
+ Complexity     3786     3782       -4     
============================================
  Files          1160     1160              
  Lines         46105    46105              
  Branches       5115     5115              
============================================
- Hits          36418    36410       -8     
- Misses         8067     8072       +5     
- Partials       1620     1623       +3     
Flag Coverage Δ
access-control-service 70.00% <ø> (ø)
agent-service 76.76% <ø> (ø)
amber 72.15% <ø> (-0.05%) ⬇️
computing-unit-managing-service 20.49% <ø> (ø)
config-service 66.66% <ø> (ø)
file-service 67.21% <ø> (ø)
frontend 82.99% <ø> (ø)
notebook-migration-service 78.94% <ø> (ø)
pyamber 95.38% <ø> (ø)
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

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main ee41d9a 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 395 0.241 22,971/35,532/35,532 us 🔴 +17.0% / 🔴 +118.9%
🟢 bs=100 sw=10 sl=64 937 0.572 107,315/130,715/130,715 us 🟢 -17.8% / 🔴 +20.3%
🔴 bs=1000 sw=10 sl=64 1,081 0.66 919,953/1,040,820/1,040,820 us 🔴 +9.5% / 🟢 -8.0%
Baseline details

Latest main ee41d9a from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 395 tuples/sec 470 tuples/sec 767.9 tuples/sec -16.0% -48.6%
bs=10 sw=10 sl=64 MB/s 0.241 MB/s 0.287 MB/s 0.469 MB/s -16.0% -48.6%
bs=10 sw=10 sl=64 p50 22,971 us 19,638 us 12,502 us +17.0% +83.7%
bs=10 sw=10 sl=64 p95 35,532 us 33,001 us 16,234 us +7.7% +118.9%
bs=10 sw=10 sl=64 p99 35,532 us 33,001 us 18,919 us +7.7% +87.8%
bs=100 sw=10 sl=64 throughput 937 tuples/sec 900 tuples/sec 974.8 tuples/sec +4.1% -3.9%
bs=100 sw=10 sl=64 MB/s 0.572 MB/s 0.55 MB/s 0.595 MB/s +4.0% -3.9%
bs=100 sw=10 sl=64 p50 107,315 us 103,811 us 102,449 us +3.4% +4.7%
bs=100 sw=10 sl=64 p95 130,715 us 159,047 us 108,652 us -17.8% +20.3%
bs=100 sw=10 sl=64 p99 130,715 us 159,047 us 116,310 us -17.8% +12.4%
bs=1000 sw=10 sl=64 throughput 1,081 tuples/sec 1,114 tuples/sec 1,004 tuples/sec -3.0% +7.7%
bs=1000 sw=10 sl=64 MB/s 0.66 MB/s 0.68 MB/s 0.613 MB/s -2.9% +7.7%
bs=1000 sw=10 sl=64 p50 919,953 us 896,619 us 999,606 us +2.6% -8.0%
bs=1000 sw=10 sl=64 p95 1,040,820 us 950,443 us 1,046,770 us +9.5% -0.6%
bs=1000 sw=10 sl=64 p99 1,040,820 us 950,443 us 1,076,937 us +9.5% -3.4%
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,506.21,200,128000,395,0.241,22971.12,35531.92,35531.92
1,100,10,64,20,2133.59,2000,1280000,937,0.572,107314.77,130714.83,130714.83
2,1000,10,64,20,18497.70,20000,12800000,1081,0.660,919953.02,1040820.14,1040820.14

@xuang7 xuang7 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.

LGTM

@Yicong-Huang
Yicong-Huang enabled auto-merge July 28, 2026 05:19
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 28, 2026
Merged via the queue into apache:main with commit 5040cad Jul 28, 2026
68 of 70 checks passed
@Yicong-Huang
Yicong-Huang deleted the ci/backport-auto-label-report branch July 28, 2026 05:46
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Jul 28, 2026
…he#6970)

### 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
apache#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 apache#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)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Jul 29, 2026
…pache#7022)

### What changes were proposed in this PR?

The `Report backport decisions` step in `backport-auto-label.yml` is
skipped on every run, so the report comment and release-manager review
request added in apache#6962 never fire.

Root cause: the step's guard reads `steps.label.outputs.result`.
`actions/github-script` always writes the script's return value to an
output named `result` after the body runs. The `Label fix PRs` script
has no `return`, so that post-run write blanks out the explicit
`core.setOutput("result", …)` — the guard is therefore always false.

Fix: rename the output to `decisions` (github-script only reserves
`result`), and update the guard and the `RESULT` env reference to match.
No logic in either step changes.

### Any related issues, documentation, discussions?

Closes apache#7021.

### How was this PR tested?

- Confirmed the failure on run `30423275226` (PR apache#7013): the `Report
backport decisions` step shows `skipped`.
- Verified 0 `<!-- backport-auto-label-report -->` comments across
apache#7013, apache#6983, apache#6958, apache#6908 (including PRs that were auto-labeled),
confirming the step is systemically skipped.
- Change is name-only; the report/review logic is untouched, so it runs
unchanged once the guard sees the output.

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

Generated-by: Claude Code (Claude Opus 4.8)

Co-authored-by: Claude Opus 4.8 (1M context) <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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task(ci): report backport auto-label decisions on the PR

3 participants