Repository navigation
fix(release): open stack trains with a mergeable bump and an inventory - #2971
Conversation
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>
|
No actionable comments were generated in the recent review.
|
| 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:
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: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title uses the valid Conventional Commits format
fix(release): subject. Thefixtype 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
#2970coding requirements are met.branch_cutcreates the version bump frombase_shaon both create and reuse paths. The tests verify oneVERSION-only commit on the selected default-branch commit. The snapshot recordsSnapshot-Of, anddocs-version-syncaccepts 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 therelease-tagsdispatch 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. Thedocs-version-syncchanges 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.
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>
|
This PR is included in version 1.37.2. The release is available on GitHub release. |
Why
Opening the self-managed v1.1 train with
branch-cuthit two problems, tracked in #2970:VERSIONbump 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 withmain, so it conflicted and listed the whole repository as changed, and it had to be fixed by hand before it could merge.deploy/stacks/self-managed/v1.1.0tag 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 withoutnvcf-self-managed-stack-inventory.json.The v1.0 trains avoided both because their release branches sit directly on a
maincommit rather than on a snapshot.What changed
branch-cutbuilds the bump on the selected default-branch commit, on both the create and reuse paths.release-bump/<id>/...tochore/release-train/<id>/vX.Y-to-vX.Y+1. The old name fell under therelease-*ruleset, whose linear-history rule is why the bump had been moved onto the snapshot, and it also matched therelease-**/v*push trigger ofrelease-tags.Snapshot-Of: <sha>trailer.docs-version-syncaccepts 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.mddescribes 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-tagsfrommainwithinventory_tag=deploy/stacks/self-managed/v1.1.0, download thestack-inventoryartifact, and attach it to the release asnvcf-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 ./...andgo vet ./...intools/docs-version-sync: pass. 5 of the 7 new subtests fail without the fix.git diff --check: clean.Notes
docs-version-syncchange backported torelease-deploy/stacks/self-managed/v1.1to produce their inventories.References
Fixes #2970
Related Pull Requests
Dependencies
None
🤖 Generated with Claude Code
Summary by CodeRabbit