From 8ce716192fd177d4173d6efad286902e7a5fcf35 Mon Sep 17 00:00:00 2001 From: Garrett Delfosse Date: Wed, 17 Jun 2026 14:19:23 +0000 Subject: [PATCH 1/3] ci(.github/workflows/backport): include ESR branches in backport targets The backport workflow now targets the latest 3 release branches plus all active ESR (Extended Support Release) branches. ESR versions are defined in scripts/lib/esr_versions.sh, which is also sourced by the release calendar generator to keep the list in one place. Duplicates are removed automatically since it is typical for one of the latest 3 releases to also be an ESR. --- .github/workflows/backport.yaml | 29 +++++++++++++++++++++++++---- scripts/lib/esr_versions.sh | 8 ++++++++ scripts/update-release-calendar.sh | 7 ++++--- 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100755 scripts/lib/esr_versions.sh diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 160391eb8cdda..e301bea23b927 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -1,11 +1,16 @@ -# Automatically backport merged PRs to the last N release branches when the -# "backport" label is applied. Works whether the label is added before or -# after the PR is merged. +# Automatically backport merged PRs to the last 3 release branches plus all +# active ESR branches when the "backport" label is applied. Works whether the +# label is added before or after the PR is merged. +# +# ESR (Extended Support Release) versions are defined in +# scripts/lib/esr_versions.sh. It is typical for one of the latest 3 releases +# to also be an ESR; duplicates are removed automatically. # # Usage: # 1. Add the "backport" label to a PR targeting main. # 2. When the PR merges (or if already merged), the workflow detects the -# latest release/* branches and opens one cherry-pick PR per branch. +# latest release/* branches and ESR branches, then opens one cherry-pick +# PR per branch. # # The created backport PRs follow existing repo conventions: # - Branch: backport/-to- @@ -49,6 +54,10 @@ jobs: - name: Find latest release branches id: find run: | + # Source the shared ESR version list. + # shellcheck source=../../scripts/lib/esr_versions.sh + source "${GITHUB_WORKSPACE}/scripts/lib/esr_versions.sh" + # List remote release branches matching the exact release/2.X # pattern (no suffixes like release/2.31_hotfix), sort by minor # version descending, and take the top 3. @@ -60,6 +69,18 @@ jobs: | head -3 ) + # Append ESR release branches that are not already in the list. + for minor in "${ESR_VERSIONS[@]}"; do + esr_branch="release/2.${minor}" + if echo "$BRANCHES" | grep -qxF "$esr_branch"; then + continue + fi + # Only add if the branch actually exists on the remote. + if git branch -r | grep -qE "^\s*origin/${esr_branch}$"; then + BRANCHES=$(printf '%s\n%s' "$BRANCHES" "$esr_branch") + fi + done + if [ -z "$BRANCHES" ]; then echo "No release branches found." echo "branches=[]" >> "$GITHUB_OUTPUT" diff --git a/scripts/lib/esr_versions.sh b/scripts/lib/esr_versions.sh new file mode 100755 index 0000000000000..50b9d865389f5 --- /dev/null +++ b/scripts/lib/esr_versions.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Known active ESR (Extended Support Release) minor versions. +# Update this list when new ESR versions are designated or old ones reach end +# of life. This file is sourced by the backport workflow and the release +# calendar generator. +# shellcheck disable=SC2034 # ESR_VERSIONS is used by the sourcing script. +ESR_VERSIONS=(29 34) diff --git a/scripts/update-release-calendar.sh b/scripts/update-release-calendar.sh index 801f5b9c707b8..cb7b4d56c18d3 100755 --- a/scripts/update-release-calendar.sh +++ b/scripts/update-release-calendar.sh @@ -16,9 +16,10 @@ DOCS_FILE="docs/install/releases/index.md" CALENDAR_START_MARKER="" CALENDAR_END_MARKER="" -# Known active ESR (Extended Support Release) minor versions. -# Update this list when new ESR versions are designated or old ones reach end of life. -ESR_VERSIONS=(29 34) +# Source the shared ESR version list used by multiple scripts and workflows. +SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=scripts/lib/esr_versions.sh +source "${SOURCE_DIR}/lib/esr_versions.sh" # Check if a minor version is a known active ESR version. is_esr_version() { From 9e544ab55cf075b9f3fcaaf198d7b5b95bfe84e2 Mon Sep 17 00:00:00 2001 From: Garrett Delfosse Date: Wed, 17 Jun 2026 15:16:30 +0000 Subject: [PATCH 2/3] docs(about/contributing): note ESR branches in backport section --- docs/about/contributing/CONTRIBUTING.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/about/contributing/CONTRIBUTING.md b/docs/about/contributing/CONTRIBUTING.md index 97d1a82f9515e..26293a93a7833 100644 --- a/docs/about/contributing/CONTRIBUTING.md +++ b/docs/about/contributing/CONTRIBUTING.md @@ -305,9 +305,13 @@ to use the original commit title instead of the PR title. When a merged PR on `main` should also ship in older releases, add the `backport` label to the PR. The [backport workflow](https://github.com/coder/coder/blob/main/.github/workflows/backport.yaml) -will automatically detect the latest three `release/*` branches, -cherry-pick the merge commit onto each one, and open PRs for -review. +will automatically detect the latest three `release/*` branches plus any +active ESR (Extended Support Release) branches, cherry-pick the merge +commit onto each one, and open PRs for review. A release that is both in +the latest three and an active ESR is only backported once. + +Active ESR versions are defined in +[`scripts/lib/esr_versions.sh`](https://github.com/coder/coder/blob/main/scripts/lib/esr_versions.sh). The label can be added before or after the PR is merged. Each backport PR reuses the original title (e.g. From e09cb29eea8c386e4081c81b7075fd08256b2559 Mon Sep 17 00:00:00 2001 From: Garrett Delfosse Date: Wed, 17 Jun 2026 15:24:51 +0000 Subject: [PATCH 3/3] docs: fix broken links in CONTRIBUTING surfaced by link check The link checker uses filter_mode: file, so editing CONTRIBUTING.md caused linkspector to check every link in the file and surface two pre-existing broken links: - The Nix environment link pointed to a nonexistent /nix directory. Point it at flake.nix, where the Nix environment is now defined. - reflectoring.io returns 503 to CI and browser clients, matching the existing list of sites that block runner IPs. Add it to the linkspector ignore patterns. --- .github/.linkspector.yml | 1 + docs/about/contributing/CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.linkspector.yml b/.github/.linkspector.yml index 012d9e76973fb..f012503cbb5a5 100644 --- a/.github/.linkspector.yml +++ b/.github/.linkspector.yml @@ -29,6 +29,7 @@ ignorePatterns: - pattern: "claude.ai" - pattern: "splunk.com" - pattern: "stackoverflow.com/questions" + - pattern: "reflectoring.io" - pattern: "developer.hashicorp.com/terraform/language" - pattern: "platform.openai.com" - pattern: "api.openai.com" diff --git a/docs/about/contributing/CONTRIBUTING.md b/docs/about/contributing/CONTRIBUTING.md index 26293a93a7833..904f2a52cd0f2 100644 --- a/docs/about/contributing/CONTRIBUTING.md +++ b/docs/about/contributing/CONTRIBUTING.md @@ -4,7 +4,7 @@
-To get started with Coder, the easiest way to set up the required environment is to use the provided [Nix environment](https://github.com/coder/coder/tree/main/nix). +To get started with Coder, the easiest way to set up the required environment is to use the provided [Nix environment](https://github.com/coder/coder/blob/main/flake.nix). Learn more [how Nix works](https://nixos.org/guides/how-nix-works). ### Nix