Skip to content

fix(release): keep version bump branches linear - #757

Open
kristinapathak wants to merge 1 commit into
mainfrom
kpathak/fix-nvca-release-bump-linear
Open

fix(release): keep version bump branches linear#757
kristinapathak wants to merge 1 commit into
mainfrom
kpathak/fix-nvca-release-bump-linear

Conversation

@kristinapathak

@kristinapathak kristinapathak commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

TL;DR

  • Advance NVCA to 3.3.0 and keep generated VERSION bump branches linear when the selected default branch history contains merge commits.

Additional Details

  • Start the generated bump commit from the existing linear-history helper.
  • Retain the selected default branch tree and change only the expected VERSION file.

For the Reviewer

  • Review the bump-branch base selection, the NVCA VERSION bump, and regression coverage for source and bump history.

For QA

  • python3 tools/ci/test-github-release.py
  • python3 tools/ci/github-release branch-cut --service nvca --dry-run
  • python3 -m py_compile tools/ci/github-release tools/ci/test-github-release.py

Issues

Fixes #756

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Updated the NVCA service version to 3.3.0.
  • Bug Fixes

    • Release branches now start from a clean, linear release base.
    • Release branches contain only the intended service version update and no merge commits.
  • Tests

    • Added coverage for linearizing release bases.
    • Added validation that already-linear bases remain unchanged.

@kristinapathak
kristinapathak requested a review from a team as a code owner August 10, 2026 22:36
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now creates version-bump branches from a linearized release base. Tests verify branch ancestry, version-only changes, and the absence of merge commits. The NVCA version changes to 3.3.0.

Changes

Release branch linearity

Layer / File(s) Summary
Linearized release base integration
tools/ci/github-release
branch_cut passes the selected base through linear_release_branch_base before creating the version-bump branch.
Release branch validation and version update
tools/ci/test-github-release.py, src/compute-plane-services/nvca/VERSION
Tests verify the branch parent, changed files, merge history, and handling of an already-linear base. The NVCA version changes from 3.2.0 to 3.3.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: mikeyrcamp

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The implementation and tests ensure linear bump branches, preserve default branch content, and modify only the expected VERSION file [#756].
Out of Scope Changes check ✅ Passed All changes support the linked issue, including release logic, regression tests, and the expected NVCA VERSION update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses valid Conventional Commits syntax and accurately describes the release branch linearity fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kpathak/fix-nvca-release-bump-linear

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

Start generated VERSION bump branches from the same linear snapshot used for release branches when the selected history contains merges. Advance NVCA to 3.3.0 for the missing release-train bump.

Refs: #756
Signed-off-by: Kristina Pathak <kpathak@nvidia.com>
@kristinapathak
kristinapathak force-pushed the kpathak/fix-nvca-release-bump-linear branch from b50e00c to 494c86d Compare August 10, 2026 22:39
@kristinapathak
kristinapathak requested a review from a team as a code owner August 10, 2026 22:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
tools/ci/test-github-release.py (2)

637-642: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy lift

Exercise branch_cut in this regression.

This block manually creates the bump branch and commits VERSION. It does not execute the changed branch_cut lines 924-925. A regression in the production wiring can therefore pass. Add a publish-mode integration case with a temporary remote, stub the gh pr create call, and inspect the pushed bump branch.

As per coding guidelines, changed tool behavior requires focused tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/ci/test-github-release.py` around lines 637 - 642, Add a publish-mode
integration test alongside the existing release regression setup that invokes
the production branch_cut flow with a temporary remote, stubs gh pr create, and
verifies the pushed release-bump branch and VERSION commit. Replace the manual
branch creation and commit in this regression with the branch_cut invocation so
the changed production wiring is exercised.

Source: Coding guidelines


650-655: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Assert the pull-request diff, not only the tree diff.

Line 652 compares the two final trees directly. It does not check the three-dot diff used by a pull request. With this merge fixture, the PR-style diff also contains merged.txt and src/compute-plane-services/nvca/README.md. Add a separate merge-base diff assertion and keep the current comparison as the tree-preservation check.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/ci/test-github-release.py` around lines 650 - 655, Add a separate
assertion in the test around the existing git diff check that compares the
PR-style three-dot diff from the merge base to bump_head, expecting merged.txt
and src/compute-plane-services/nvca/README.md. Preserve the current two-commit
tree diff assertion unchanged as the tree-preservation check, using the existing
self.github_release.run invocation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tools/ci/github-release`:
- Around line 924-925: Update the release branch setup around
linear_release_branch_base and the git switch so pull-request comparison
preserves the selected base commit, either by branching from that commit or
comparing against the linearized branch. In tools/ci/test-github-release.py
lines 650-655, add a three-dot merge-base diff assertion while retaining the
existing direct tree comparison separately.

---

Nitpick comments:
In `@tools/ci/test-github-release.py`:
- Around line 637-642: Add a publish-mode integration test alongside the
existing release regression setup that invokes the production branch_cut flow
with a temporary remote, stubs gh pr create, and verifies the pushed
release-bump branch and VERSION commit. Replace the manual branch creation and
commit in this regression with the branch_cut invocation so the changed
production wiring is exercised.
- Around line 650-655: Add a separate assertion in the test around the existing
git diff check that compares the PR-style three-dot diff from the merge base to
bump_head, expecting merged.txt and src/compute-plane-services/nvca/README.md.
Preserve the current two-commit tree diff assertion unchanged as the
tree-preservation check, using the existing self.github_release.run invocation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 99f861d7-b628-4ba7-ade8-3be76846ca20

📥 Commits

Reviewing files that changed from the base of the PR and between 73b1efb and b50e00c.

📒 Files selected for processing (2)
  • tools/ci/github-release
  • tools/ci/test-github-release.py

Comment thread tools/ci/github-release
Comment on lines +924 to +925
bump_base = linear_release_branch_base(root, base_sha)
run(["git", "switch", "-C", bump_branch, bump_base], cwd=root)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

The linearized snapshot changes the pull-request merge base.

When the selected base contains merges, the synthetic snapshot is rooted before the first merge. The resulting pull request can include unrelated files even when the final trees differ only in VERSION.

  • tools/ci/github-release#L924-L925: use a branch strategy that preserves the selected commit for the pull-request comparison, or compare the pull request against the linearized branch.
  • tools/ci/test-github-release.py#L650-L655: add a three-dot merge-base diff assertion and retain the direct tree comparison separately.
📍 Affects 2 files
  • tools/ci/github-release#L924-L925 (this comment)
  • tools/ci/test-github-release.py#L650-L655
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/ci/github-release` around lines 924 - 925, Update the release branch
setup around linear_release_branch_base and the git switch so pull-request
comparison preserves the selected base commit, either by branching from that
commit or comparing against the linearized branch. In
tools/ci/test-github-release.py lines 650-655, add a three-dot merge-base diff
assertion while retaining the existing direct tree comparison separately.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(release): keep version bump branches linear

1 participant