Skip to content

fix(release): open stack trains with a mergeable bump and an inventory - #2971

Merged
kristinapathak merged 1 commit into
mainfrom
kristinapathak/fix-stack-branch-cut
Oct 28, 2026
Merged

kristinapathak merged 1 commit into
mainfrom
kristinapathak/fix-stack-branch-cut

Conversation

@kristinapathak

@kristinapathak kristinapathak commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Opening the self-managed v1.1 train with branch-cut hit two problems, tracked in #2970:

  • The VERSION bump pull request (chore(nvcf-self-managed-stack): advance release train to v1.2 #2969) was built on the release branch snapshot commit. It shared almost no history with main, so it conflicted and listed the whole repository as changed, and it had to be fixed by hand before it could merge.
  • The deploy/stacks/self-managed/v1.1.0 tag release could not render its stack inventory. The inventory requires each pinned source chart tag to be an ancestor of the stack commit, and no chart tag is an ancestor of a snapshot. The release was published without nvcf-self-managed-stack-inventory.json.

The v1.0 trains avoided both because their release branches sit directly on a main commit rather than on a snapshot.

What changed

  • branch-cut builds the bump on the selected default-branch commit, on both the create and reuse paths.
  • The bump branch moves from release-bump/<id>/... to chore/release-train/<id>/vX.Y-to-vX.Y+1. The old name fell under the release-* ruleset, whose linear-history rule is why the bump had been moved onto the snapshot, and it also matched the release-**/v* push trigger of release-tags.
  • The snapshot commit records the selected commit in a Snapshot-Of: <sha> trailer.
  • docs-version-sync accepts a pinned source chart tag that is an ancestor of the stack commit, or of the snapshot's recorded source commit once that commit is confirmed to hold the snapshot's tree. A snapshot cut before the trailer existed is matched to a commit with the identical tree. A tag outside both histories is still rejected.
  • docs/dev/github-release-process.md describes the trailer and the new bump branch.

Customer Release Notes

Not customer visible

Plan Summary

Not applicable

Usage

After this merges, the missing v1.1.0 inventory can be rendered without moving the tag: dispatch release-tags from main with inventory_tag=deploy/stacks/self-managed/v1.1.0, download the stack-inventory artifact, and attach it to the release as nvcf-self-managed-stack-inventory.json.

Testing

  • python3 tools/ci/test-github-release.py: 120 tests pass. The new bump test fails on both paths without the fix.
  • go test ./... and go vet ./... in tools/docs-version-sync: pass. 5 of the 7 new subtests fail without the fix.
  • Against this repository, the v1.1 snapshot, which predates the trailer, resolves to its source commit, and the source chart tags pinned by v1.1.0 are ancestors of it.
  • git diff --check: clean.
  • No QA needed: release tooling only.

Notes

  • Existing release branches run their own copy of this tooling. Later patches on the v1.1 train need the docs-version-sync change backported to release-deploy/stacks/self-managed/v1.1 to produce their inventories.
  • Unchanged limitation: a maintenance patch that pins a source chart released after the branch cut still fails the ancestry check, on every train.

References

Fixes #2970

Related Pull Requests

Dependencies

None

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Release Process
    • Release snapshots now record their source commit, and version updates are based on the selected default-branch state.
    • Chart validation now recognizes valid history through release snapshots, including older snapshots without recorded source commits.
  • Documentation
    • Updated release-process guidance to explain snapshot ancestry and version-update branch history.

branch-cut built the next-train VERSION bump on the release branch
snapshot. The snapshot copies the default branch tree onto a parent from
before the first merge in its history, so the bump shared no recent
history with the default branch. Its pull request conflicted and listed
the whole repository as changed. Build the bump on the selected
default-branch commit instead, on both the create and reuse paths. That
history includes the default branch's merges, so the bump branch moves
from release-bump/ to chore/release-train/, outside the release-* names
that the release ruleset holds to a linear history.

The tag workflow's stack inventory requires every pinned source chart
tag to be an ancestor of the stack commit. Chart tags released from the
default branch are never ancestors of a snapshot, so the first release
of a train rooted at a snapshot could not produce its inventory. The
snapshot now records the selected commit in a Snapshot-Of trailer. The
inventory also accepts a chart tag that is an ancestor of that commit,
after confirming the commit holds the snapshot's tree. A snapshot cut
before the trailer existed is matched to a commit with the same tree.
A chart tag outside both histories is still rejected.

Fixes #2970

Signed-off-by: Kristina Pathak <kpathak@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kristinapathak kristinapathak added the cicd Continuous integration, build, and release pipeline work label Oct 28, 2026
@kristinapathak
kristinapathak requested a review from a team as a code owner October 28, 2026 06:39
@kristinapathak kristinapathak self-assigned this Oct 28, 2026
@kristinapathak
kristinapathak requested a review from a team as a code owner October 28, 2026 06:39
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 3caf122 and a279943.

Files selected for processing: 5
  • docs/dev/github-release-process.md
  • tools/ci/github-release
  • tools/ci/test-github-release.py
  • tools/docs-version-sync/resolved_inventory_publish.go
  • tools/docs-version-sync/resolved_inventory_publish_test.go

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

Walkthrough

Release snapshots now record their source commit. VERSION bump branches start from the selected default-branch commit. Source-chart validation accepts ancestry through a recorded snapshot origin and supports legacy snapshots without a trailer.

Changes: Release snapshot lineage

Layer / File(s) Summary
Snapshot creation and VERSION bump
tools/ci/github-release, tools/ci/test-github-release.py, docs/dev/github-release-process.md
Release snapshots record the selected base SHA. VERSION bump branches use the chore/release-train/ namespace and start from the selected default-branch commit. Tests check the branch history, pull-request target, and snapshot trailer. Documentation describes these rules.
Source-chart ancestry validation
tools/docs-version-sync/resolved_inventory_publish.go, tools/docs-version-sync/resolved_inventory_publish_test.go, docs/dev/github-release-process.md
Source-chart tag validation checks ancestry against the stack commit and discovered snapshot origins. Trailer-based origins must resolve to a commit with the snapshot tree. Legacy snapshots use matching-tree commits. Tests cover accepted and rejected ancestry paths.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: sbaum1994, balajinvda

Merge Risk: Minimal · up to a2799

The documented v1.1.0 inventory dispatch can find the source commit needed to validate its pinned chart tags. No merge-blocking issue remains identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the valid Conventional Commits format fix(release): subject. The fix type accurately describes the release-tooling bug fix, and the subject reflects the mergeable VERSION bump and i…
Linked Issues check Passed Issue #2970 coding requirements are met. branch_cut creates the version bump from base_sha on both create and reuse paths. The tests verify one VERSION-only commit on the selected default-branch…
Out of Scope Changes check Passed The changes stay within issue #2970. The branch-cut changes fix bump ancestry and snapshot provenance. The docs-version-sync changes enable inventory rendering for snapshot-based release branches. T…
Full details: Title check

Explanation

The title uses the valid Conventional Commits format fix(release): subject. The fix type accurately describes the release-tooling bug fix, and the subject reflects the mergeable VERSION bump and inventory changes.

Full details: Linked Issues check

Explanation

Issue #2970 coding requirements are met. branch_cut creates the version bump from base_sha on both create and reuse paths. The tests verify one VERSION-only commit on the selected default-branch commit. The snapshot records Snapshot-Of, and docs-version-sync accepts chart tags from the stack commit or the verified snapshot source, with legacy same-tree fallback and rejection of unrelated histories. The release process documentation records these rules and the new bump branch. The PR description documents the release-tags dispatch procedure to attach the existing v1.1.0 inventory without moving its tag.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #2970. The branch-cut changes fix bump ancestry and snapshot provenance. The docs-version-sync changes enable inventory rendering for snapshot-based release branches. The added tests and release-process documentation verify and explain these changes. No unrelated product or release behavior is changed.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

@kristinapathak
kristinapathak added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 83d99fe Oct 28, 2026
32 checks passed
@kristinapathak
kristinapathak deleted the kristinapathak/fix-stack-branch-cut branch October 28, 2026 07:23
kristinapathak added a commit that referenced this pull request Oct 28, 2026
Picks up the squash merge of #2971 and later main changes.

Signed-off-by: Kristina Pathak <kpathak@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@balajinvda

Copy link
Copy Markdown
Contributor

This PR is included in version 1.37.2.

The release is available on GitHub release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd Continuous integration, build, and release pipeline work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(release): stack branch-cut opens a conflicting VERSION PR and the first train release has no inventory

3 participants