Skip to content

Overhaul backport lifecycle: auto-label fix PRs, request release-manager review, auto-open PRs for failed backports #6940

Description

@Yicong-Huang

Task Summary

Backporting currently relies on people remembering, which creates two gaps: (1) the release/* label is added by hand, so authors and committers routinely forget to request a backport; (2) when a merged backport conflicts, the only trace is a PR comment that sinks to the bottom and the manual follow-up gets forgotten.

Add .github/release-branches.yml mapping each active release branch to its release manager as the single source of truth for the backport automation. Changes:

  1. Auto-label + request review: on a fix: PR into main, auto-add each configured target's release/* label and request review from that branch's release manager. Backporting becomes opt-out — remove the label to decline (a removal is remembered, so a later edit never silently re-adds it).
  2. CI becomes a signal, not a gate: split the pre-merge backport into a fast, git-only apply-check that gates the expensive build matrix, and drop the backport check from Required Checks so a failing trial cherry-pick no longer blocks merge.
  3. Post-merge splits on 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.
  4. Fixes for main-only features: skip a target automatically when every file the PR modifies is absent on that release branch, plus a no-backport-needed label as a manual override honored end-to-end.

Net: every fix gets a backport decision by default, and every failed backport becomes an actionable PR instead of a forgotten comment.

Task Type

  • DevOps / Deployment / CI

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions