ci: backport to ESR and ESR-1 release branches#27460
Open
f0ssel wants to merge 3 commits into
Open
Conversation
Extend the backport workflow to target every actively supported release channel: mainline (n), stable (n-1), security (n-2), plus the current ESR and maintenance ESR (ESR-1) branches. ESR branches are not derivable from version ordering, so introduce scripts/release_channels/esr_versions.txt as the single source of truth for the active ESR minors. update-release-calendar.sh now reads that file instead of a hardcoded array, and the backport detect job unions the latest 3 release/2.X branches with the ESR branches, de-duplicating overlaps. Backport PRs now also get a backport/v<version> label, mirroring the cherry-pick workflow, so per-release backports can be filtered.
aslilac
reviewed
Jul 23, 2026
Each matrix branch now always ends with a PR, real or placeholder, and no longer aborts other work: - Attach label, assignee, and reviewer after creating the PR, as best-effort steps. Requesting review from or assigning the PR author is rejected by GitHub, which previously aborted 'gh pr create' under 'set -e' and left no PR at all. - Use the existence of a backport PR (not the branch) as the idempotency guard, and reuse an existing backport branch instead of bailing, so a re-run recovers a branch that was pushed before its PR was opened. - Comment on the original PR with the created backport link, flagging conflicts that still need manual resolution. Conflicting cherry-picks continue to open a placeholder PR with copy-paste resolution steps rather than failing.
- Store full major.minor versions (2.29, 2.34) in esr_versions.txt instead of bare minors, and derive the branch as release/<version> in the backport workflow. - update-release-calendar.sh extracts the minor component for its 2.x-scoped calendar logic. - Trim the data file comments: drop the ESR explanation and the format note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extend the backport workflow so the
backportlabel fans out to every actively supported release channel, not just the latest three minors.Target branches are now the union of:
release/2.Xbranches (mainlinen, stablen-1, securityn-2), andThe set is de-duplicated, so a branch that is both stable and ESR (today
release/2.34) is backported once. Dry-run against the current branch list yieldsrelease/2.29,release/2.33,release/2.34,release/2.35.Why
ESR / ESR-1 are designated biannually and can sit well below the top-3 window, so the previous
head -3heuristic silently skipped them (e.g. the maintenance ESRrelease/2.29). The current ESR was only covered by coincidence when it happened to equal stable.Changes
scripts/release_channels/esr_versions.txtas the single source of truth for active ESR minors.scripts/update-release-calendar.shnow reads that file instead of a hardcodedESR_VERSIONSarray (calendar output verified unchanged).backport.yamldetectjob unions the latest 3 branches with the ESR branches (existence-checked, warns and skips missing ones) and de-duplicates.backport/v<version>label, mirroringcherry-pick.yaml, withissues: writeadded to create the label.Resilience to partial failures
Even with the independent matrix (
fail-fast: false), a single branch's job could previously abort without leaving anything behind, forcing the remaining branches to be backported entirely by hand. Fixed so each branch always ends with a PR (real or placeholder):gh pr createunderset -eand left no PR.Validation
actionlint,shellcheck -x, andzizmorall pass.update-release-calendar.sh; ESR statuses (2.29 Extended Support Release,2.34 Stable (ESR)) are identical after the refactor.Implementation plan
Plan: Backport to all supported release channels (mainline, stable, security, ESR, ESR-1)
Goal
The backport GitHub Action should open cherry-pick PRs against every actively supported release branch:
release/2.35release/2.34release/2.33release/2.34release/2.29All channels map to
release/2.Xbranches.What we targeted before
.github/workflows/backport.yamltook the exactrelease/2.Xbranches, sorted by minor descending, and kept the top 3 (mainline/stable/security). ESR and ESR-1 are not derivable from version ordering, so the maintenance ESR was silently skipped.Source of truth for ESR branches
scripts/update-release-calendar.shalready encoded the active ESR minors (ESR_VERSIONS=(29 34)), driving the release calendar. Rather than maintaining a second list, this list was extracted into a shared data file consumed by both the calendar script and the workflow.Changes
scripts/release_channels/esr_versions.txt; updateupdate-release-calendar.shto read it.detectjob to emit the union of the top-3 branches and onerelease/2.<minor>per ESR entry, existence-checked and de-duplicated.backport/v<version>labels (withissues: write), mirroring the cherry-pick workflow.Assumptions
2(matches existing code).cherry-pick.yamlstays single-branch and is out of scope.Opened by Coder Agents on behalf of @f0ssel.