Skip to content

fix(backport-test): change shared line (veto) - #21

Closed
Yicong-Huang wants to merge 4 commits into
mainfrom
test/s3-veto
Closed

Yicong-Huang wants to merge 4 commits into
mainfrom
test/s3-veto

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Owner

S3: opened with no-backport-needed -> all backport ops vetoed.

Yicong-Huang and others added 4 commits July 27, 2026 12:58
Make release backports opt-out instead of easy-to-forget opt-in, and turn
a failing backport into an actionable PR instead of a comment nobody reads.

- .github/release-branches.yml: single source of truth mapping each active
  release branch to its release manager (release/v1.2 -> xuang7,
  release/v1.1 -> bobbai00), with a stdlib-only parser.
- backport-auto-label: on a fix: PR into main, label it with every configured
  release/* target and request review from that branch's release manager.
  A removed label is remembered (timeline unlabeled event), so opting out
  sticks across later edits.
- required-checks: split the pre-merge backport into a fast git-only
  apply-check that gates the expensive build matrix, and drop backport from
  the Required Checks aggregator so a red backport no longer blocks merge.
- direct-backport-push: classify each target from the apply-check/build
  signal — green cherry-picks straight to the release branch (unchanged),
  red opens a draft backport PR (fix(scope, vX.Y): ...) with the conflicted
  tree committed, assigned to the author with the manager as reviewer.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A fix for a feature that only exists on main should not be backported.
Detect it automatically and add an explicit manual override, so neither
case relies on someone remembering.

- Auto-label: before labeling a target, skip it when every file the PR
  *modifies* (added files excluded) is absent on that release branch — the
  feature clearly isn't there. Any ambiguity keeps the label.
- no-backport-needed label: a hard manual override that vetoes all backport
  work — honored by auto-label, the required-checks precheck (so apply-check
  and build skip), and the post-merge discover.
- Red path: create-backport-branch applies the same feature-absent guard;
  when it fires, direct-backport-push records it on the PR instead of opening
  a doomed draft PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Yicong-Huang Yicong-Huang added the no-backport-needed Do not backport label Jul 27, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks for opening this pull request, @Yicong-Huang!

It looks like the pull request description doesn't quite follow our template yet:

  • The What changes were proposed in this PR? section is missing; please keep the template's headings.
  • The How was this PR tested? section is missing; please keep the template's headings.
  • The Was this PR authored or co-authored using generative AI tooling? section is missing; please keep the template's headings.

Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.

You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.

@github-actions

Copy link
Copy Markdown

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.

renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Jul 27, 2026
…che#6941)

### What changes were proposed in this PR?

This PR overhauls the release-backport lifecycle so it stops depending
on people remembering. Three problems today, each addressed below.

**Problem 1 — Backports are forgotten.** The `release/*` label is added
by hand, so authors and committers routinely forget to request a
backport, and fixes silently never reach the release branch.

_Solution:_ Backporting becomes **opt-out**. A new `backport-auto-label`
workflow labels every `fix:` PR into `main` with the configured
`release/*` targets and requests review from each branch's **release
manager**. `.github/release-branches.yml` is the single source of truth
mapping each release branch to its manager and an `actively-supporting`
flag (`release/v1.2` → `xuang7`, active; `release/v1.1` → `bobbai00`,
inactive), parsed by a stdlib-only helper. Only actively-supporting
branches are auto-labeled; an inactive branch stays a valid manual
target but isn't offered by default. Remove a label to decline — a
removal is remembered via the timeline, so a later edit never silently
re-adds it.

**Problem 2 — Failed backports are lost.** When a backport conflicts,
the only trace is a PR comment that sinks to the bottom and gets
forgotten; nobody is on the hook to finish it. And a conflicting
cherry-pick still burns the full build matrix.

_Solution:_ The pre-merge backport is split into a fast, git-only
**apply-check** that gates the expensive build (a conflict is reported
in seconds and no longer spins up the stacks), and `backport` is
**removed from the Required Checks aggregator** so it's advisory, not a
merge gate. Post-merge, `direct-backport-push` classifies each target
from that signal: **green** cherry-picks straight to the release branch;
**red** (conflict, or applies-but-won't-build) auto-opens a **draft**
backport PR `fix(scope, vX.Y): …` on `backport/<PR>-<slug>-<target>`,
with the conflicted tree committed, **assigned to the author** with the
release manager as reviewer — an actionable task instead of a lost
comment.

**Problem 3 — Fixes for main-only features get backported anyway.** A
fix for a feature that only exists on `main` shouldn't go to the release
at all, but it still gets labeled and attempted.

_Solution:_ **Automatic feature-absent skip** — before labeling a target
(and again on the red path), skip it when every file the PR *modifies*
(added files excluded) is absent on that release branch: the feature
clearly isn't there. Any ambiguity keeps the label and lets the
apply-check decide. For what automation can't catch (new code inside an
existing file, or pure judgment), a **`no-backport-needed`** label is a
hard manual veto honored end-to-end (auto-label, pre-merge precheck, and
post-merge push).

Note: a red apply-check now shows as a (non-blocking) red check on the
PR — the intended "this needs a manual backport" signal, not a merge
blocker.

### Any related issues, documentation, discussions?

Resolves apache#6940.

### How was this PR tested?

Static: `actionlint` on all workflows; YAML parses; every
`github-script` block passes `node --check`; `bash -n` on the scripts;
unit-checked the parser, branch-slug derivation, `fix(scope, vX.Y)`
title injection, and the feature-absent git guard.

End-to-end on a fork test harness
([`Yicong-Huang/texera`](https://github.com/Yicong-Huang/texera),
throwaway `release/test-clean` + `release/test-conflict` branches,
docs-only fixes to skip the heavy build):

| Scenario | Result | Evidence |
| --- | --- | --- |
| `fix:` PR into main → auto-labeled with both targets | ✅ | [PR
apache#19](Yicong-Huang#19) |
| apply-check: green on clean target, red on conflicting one | ✅ |
[run](https://github.com/Yicong-Huang/texera/actions/runs/30303217100) |
| red apply-check does **not** block merge (Required Checks green) | ✅ |
[run](https://github.com/Yicong-Huang/texera/actions/runs/30303217100) |
| green target → cherry-picked to the release branch (author preserved)
| ✅ | [commit
`ef1df63`](Yicong-Huang@ef1df63)
· [run](https://github.com/Yicong-Huang/texera/actions/runs/30303765765)
|
| red target → draft PR `fix(scope, vX.Y): …`, conflict markers
committed, assigned to author | ✅ | [PR
apache#22](Yicong-Huang#22) |
| fix touching only files absent on the release branch → not labeled | ✅
| [PR apache#20](Yicong-Huang#20) |
| `no-backport-needed` → all backport work vetoed | ✅ | [PR
apache#21](Yicong-Huang#21) |
| remove a label then edit → not re-added (opt-out remembered) | ✅ | [PR
apache#23](Yicong-Huang#23) |

Not exercised on the fork: the request-review success path (the test
manager was the PR author, so it correctly took the skip branch) and a
full heavy-build green path (docs-only by design).

### 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) <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has
not had any activity for 30 days. It will be closed in 7 days if no
further activity occurs.

If this PR is still relevant, please:

  • Push new commits or rebase onto the latest main, or
  • Comment with a status update, or
  • Address any open review feedback.

To exempt this PR from auto-close, a maintainer can add the pinned label.
Thank you for your contribution to Apache Texera (incubating)!

@github-actions github-actions Bot added the stale label Aug 31, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed due to 37 days of inactivity.
If you would like to continue this work, please re-open the PR or open a new
one referencing this. Thank you for your contribution.

@github-actions github-actions Bot closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant