Repository navigation
Conversation
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9612 +/- ##
============================================
+ Coverage 91.57% 91.67% +0.10%
+ Complexity 5182 5134 -48
============================================
Files 1300 1304 +4
Lines 58133 58088 -45
Branches 7615 7582 -33
============================================
+ Hits 53236 53253 +17
+ Misses 2959 2923 -36
+ Partials 1938 1912 -26
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/request-review @parshimers |
✅ No material benchmark regressions detected🟢 7 better · 🔴 0 worse · ⚪ 8 noise (<±5%) · 0 without baseline
Baseline detailsLatest main
Raw CSVconfig_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,350.20,200,128000,571,0.349,17042.48,24243.68,24243.68
1,100,10,64,20,1593.26,2000,1280000,1255,0.766,79778.94,98003.98,98003.98
2,1000,10,64,20,13627.11,20000,12800000,1468,0.896,680507.57,747823.69,747823.69 |
5d11ae3 to
5665069
Compare
backport-auto-label's decide() now reads the configured release/* labels currently on a PR and, when the PR title is no longer a fix, returns a "cleanup" outcome carrying that label list instead of doing nothing. The report step removes those labels as github-actions[bot] and rewrites its in-place report comment to say the PR is no longer a fix and that the labels return if the title goes back to fix. The remembered-opt-out set that suppresses re-adding a label is built from unlabeled timeline events excluding github-actions[bot], so the bot's own cleanup removals are not read as a decline: re-titling a PR back to fix re-adds the labels, while a deliberate human or PAT removal is still remembered and keeps that branch declined. The report comment posted when labels are applied also explains how to clear a red Backport Approvals check: remove one branch's release/* label to decline just it, add no-backport-needed to decline every branch, or retitle the PR away from fix to drop all of them at once.
5665069 to
526666a
Compare
xuang7
left a comment
There was a problem hiding this comment.
Thanks for working on this. Left a few comments, mainly on which labels get removed and whether Backport Approvals reruns after the removal.
| function cleanupOrNone() { | ||
| const toRemove = configuredBranches.filter((b) => currentLabels.has(b)); | ||
| if (toRemove.length === 0) return { mode: "none" }; | ||
| return { mode: "cleanup", toRemove }; | ||
| } |
There was a problem hiding this comment.
This also removes release/* labels that were added by hand to non-fix PRs (docs, licensing, CI changes), and it runs on every edit, including body edits. It should only run when the title actually changes from a fix to a non-fix, and only for active branches.
There was a problem hiding this comment.
Cleanup now runs only on an edited event whose title actually changed away from a backportable fix (via changes.title.from) and only removes the actively-supported release/* labels, so a body-only edit and a label hand-added to a PR that was never a fix are both left untouched.
| core.info(`PR #${pr.number} is fix(ci), CI-only and never backported; skipping.`); | ||
| return { mode: "none" }; |
There was a problem hiding this comment.
The description says retitling to fix(ci): also clears the labels, but this branch still returns none, so they stay.
There was a problem hiding this comment.
Folded the fix(ci): case into the same isBackportableFix test as non-fix titles, so retitling a labeled PR to fix(ci): now clears its release labels instead of returning none.
| await github.rest.issues.removeLabel({ | ||
| owner, repo, issue_number: pr.number, name: label, | ||
| }); |
There was a problem hiding this comment.
I have not tested this, but a removal made with the default GITHUB_TOKEN should not trigger an unlabeled event, so Backport Approvals may not rerun and could stay red after the labels are gone. One option is to remove them with the PAT in the Label step. The opt-out check would then need to depend on the title at the time of removal rather than on the actor.
There was a problem hiding this comment.
Moved the label removal into the PAT-authored Label step so the unlabeled event reruns Backport Approvals, and switched the opt-out test from the removing actor to the PR title at the time of removal (reconstructed from the timeline's renamed events), so the workflow's own cleanup is not mistaken for a decline.
backport-auto-label collapses "is this auto-backportable?" into one isBackportableFix(title) test: a conventional-commit fix: that is not fix(ci):. Both a non-fix type and fix(ci): route through cleanupDecision(), which removes the actively-supported release/* labels only when the PR's title actually transitioned away from a backportable fix on this edit (context.payload.changes.title.from was a fix and the current title is not). A body-only edit carries no title change and a label hand-added to a PR that was never a fix has no such transition, so both are left untouched, and only the branches this workflow would itself auto-label are considered. The stale-label removal now runs in the PAT-authored Label step rather than the default-token Report step, so the resulting unlabeled event retriggers the required Backport Approvals check; a removal under the default GITHUB_TOKEN does not retrigger downstream workflows and could leave that check red after the labels are gone. The Report step's cleanup branch now only upserts the report comment. Opt-out detection is judged by the PR title at the moment each label was removed instead of by the removing actor. titleAt(whenISO) reconstructs the title in effect at any time from the timeline's renamed events; a label removed while the title was a backportable fix is a deliberate human decline and is remembered, while a removal made when the title was not a backportable fix is this workflow's own cleanup and is ignored, so retitling back to fix: re-adds the labels.
What changes were proposed in this PR?
Any related issues, documentation, discussions?
Closes: #9611
How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF