DocumentsVault
Release Branch Management
Release Branch Management
Type
Topic
Status
Published
Created
Jul 8, 2026
Updated
Jul 8, 2026

Release Branch Management#

Vault maintains multiple active release branches simultaneously using a label-driven backport system backed by a custom Go pipeline CLI. The key components are:

  • release/X.Y.x branches — tracked release lines for each active minor version
  • backport/X.Y.x labels — applied to merged PRs to trigger automated backport PR creation
  • pipeline github create backport — the CLI command that executes the backport logic, including CE/Enterprise file filtering
  • .release/versions.hcl — the source of truth for which versions are active, LTS, and have active CE counterparts

Active Version Tracking#

.release/versions.hcl is the authoritative manifest for active release branches. As of the current state of the repo, the following versions are defined :

VersionCE ActiveLTS
2.0.x✅ yes✅ yes
1.21.x❌ no
1.20.x❌ no
1.19.x❌ no✅ yes

main is always implicitly active. Any version absent from this file is treated as inactive . The CI pipeline configuration in .release/ci.hcl registers main and release/** as the official release branches.


Label-Based Backporting#

The backport workflow is triggered by applying a backport/X.Y.x label to a merged PR (e.g., backport/1.20.x). The PR template reminds HashiCorp employees to apply the right labels and specifies that all available enterprise labels must be used for critical security or severity-1 bug fixes that need to reach current LTS versions.

On merge, the pipeline CLI (invoked via GitHub Actions) calls pipeline github create backport <PR-number>, which:

  1. Reads the PR's backport labels to determine target branches
  2. Determines whether the PR base is an enterprise or CE branch to decide which counterpart branches also need backporting
  3. Cherry-picks the merge commit into each target branch and opens a backport PR titled "Backport of [description] into release/X.Y.x"
  4. Posts a comment on the original PR summarizing each backport attempt and its status

If an automatic cherry-pick fails due to conflicts, the generated PR includes conflict-resolution instructions for a human to resolve manually .


CE/Enterprise File Filtering#

Enterprise branches automatically get a corresponding CE backport. When creating these CE backports, the pipeline tool strips out all enterprise-only files using the file groupings defined in .release/pipeline.hcl.

The enterprise file group — the most important grouping in the repo — matches:

  • Go files with _ent.go or _ent_test.go suffixes
  • The entire vault_ent/ directory and other enterprise-only directories
  • Config/workflow/doc files containing -ent, _ent, hsm, or merkle-tree patterns

The --ce-exclude-groups flag (default: "enterprise") controls which file groups are stripped. If a PR touches only enterprise files, the CE backport is skipped entirely. If a PR touches both enterprise and non-enterprise files, the CE backport is created with enterprise files removed .

Inactive CE branches receive backports only for docs, pipeline, and README changes . The --ce-allow-inactive-groups flag controls which file groups are allowed through to inactive CE branches.


Key Files and Entry Points#

FilePurpose
.release/versions.hclActive version manifest; source of truth for LTS and CE-active status
.release/ci.hclRegisters main and release/** as CI release branches
.release/pipeline.hclDefines file groupings (esp. enterprise) used for CE filtering
tools/pipeline/.../github_create_backport.goCLI command entry point (pipeline github create backport)
tools/pipeline/.../github/create_backport.goCore backport logic: branch resolution, CE filtering, PR creation
.github/pull_request_template.mdPR checklist with backport label guidance for contributors
Release Branch Management | Dosu