finish-release-process.sh updates to preserve release/* branch integrity#544
Conversation
…ciliation - Updated the release process to include the creation of an adopt branch (`adopt/vX.Y`) that reconciles the version in `pyproject.toml` with the main branch before merging. - Modified the script to close the original release PR and open a new PR from the adopt branch to main. - Updated documentation to reflect changes in the release process and branch naming conventions. - Added tests to ensure the adopt branch is created and merges cleanly into main. This change improves the release workflow by maintaining the integrity of the release branch for future patch releases. Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Both start-release.sh and finish-release.sh now fetch the remote and verify that local branches match their upstream counterparts before proceeding. This prevents tagging or branching from a stale local checkout. finish-release.sh also checks for a clean working tree, matching the guard already present in start-release.sh. The checks are skipped when --no-push is set (test environments without a real remote). Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
There was a problem hiding this comment.
Pull request overview
Updates the repository’s release workflow to avoid version-string conflicts between main and release/v* by introducing an intermediate adopt/v* branch that reconciles pyproject.toml before merging release fixes back into main.
Changes:
- Introduces an
adopt/vX.Ybranch flow infinish-release.sh(create adopt branch, fix version to matchmain, open adopt PR). - Adds branch consistency checks in
start-release.sh(verifies localmainmatches the configured remote before proceeding). - Updates release documentation and the end-to-end release script tests to reflect the new adopt-branch workflow.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/release-process.md | Documents the adopt-branch model and updated release-day procedure. |
| devtools/finish-release.sh | Implements adopt-branch creation/version reconciliation + PR close/create behavior. |
| devtools/start-release.sh | Adds remote/local branch consistency validation and clarifies PR purpose. |
| devtools/test-release-scripts.sh | Extends tests to validate adopt branch creation, version reconciliation, and clean merge behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
harrism
left a comment
There was a problem hiding this comment.
One doc issue and one question. Otherwise this looks great, thanks.
| main: ──A──B──C──D─────────────G──H──I── ... | ||
| \ / | ||
| release/v0.4: E──F──────────────T (tag v0.4.0) | ||
| main: ──A──B──C──D──────────────────G──H──I── ... |
There was a problem hiding this comment.
This diagram shows release/v0.4 merging back into main, rather than adopt/v0.4. I believe the latter is merged, not the former, to reconcile the version conflict?
There was a problem hiding this comment.
Good catch, I've fixed that up.
| /path/to/fvdb-core/devtools/finish-release.sh 0.4.0 | ||
| ``` | ||
|
|
||
| After each `finish-release.sh` run, merge the resulting `adopt/v*` PR |
There was a problem hiding this comment.
Do we then delete the adopt/v* branch and keep the release/v* branch around for fixes? Or do we delete both and just rely on the tag?
There was a problem hiding this comment.
I think we should delete the adopt/v* branch and keep the release/v* branches around for any patch releases needed in the future.
There was a problem hiding this comment.
I've clarified that in the docs now.
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
## Summary - Add `devtools/update-doc-versions.sh` -- a repo-agnostic script that updates `fvdb_core_stable_version` in `docs/conf.py` and optionally bumps the `fvdb-core>=` dependency floor in `pyproject.toml` - Integrate `update-doc-versions.sh` into `start-release.sh` so docs are updated on the release branch automatically (and flow back to main on merge) - Centralize the fvdb-core version in `docs/conf.py` via `rst_prolog` substitutions so `installation.rst` uses a single-source version variable instead of a hardcoded string - Update install sections from PyTorch 2.8.0 / CUDA 12.8 to **PyTorch 2.10.0 / CUDA 12.8** and **CUDA 13.0** (matching published 0.4.0 wheels) - Add 6 new tests to `test-release-scripts.sh` covering the new script (help, dry-run, dependency floor update, conf.py update, version validation, integration with start-release) This prevents the version staleness that caused openvdb/fvdb-reality-capture#273. The companion PR in fvdb-reality-capture (openvdb/fvdb-reality-capture#275) applies the same `conf.py` / `rst_prolog` pattern and fixes the immediate issue. **Note:** This PR may need to be reconciled with #544 (adopt branch workflow changes) depending on merge order. --------- Signed-off-by: Mark Harris <mharris@nvidia.com> Signed-off-by: Jonathan Swartz <jonathan@jswartz.info> Co-authored-by: Jonathan Swartz <jonathan@jswartz.info>
harrism
left a comment
There was a problem hiding this comment.
Looks good, thanks for fixing.
After running the
start-release.shscript, themainandrelease/v*branch will have conflicting commits that have changed thepyproject.tomlversion string. To preserve the version string onrelease/v*branch correctly matches therelease/v*branch's name (and is accurate to the release if we go back to it for a patch version), this PR creates anadopt/v*branch to merge intomainwhen finalizing the release instead of merging therelease/v*branch directly. The adopt branch reconciles version differences, preserves the integrity of the release branch for future patch releases, and simplifies the merge back intomain. The documentation, scripts, and tests have all been updated to reflect this new workflow.Release process improvements:
adopt/vX.Ybranch from the release branch upon finishing the release process, set its version to matchmain, and merge it intomainvia a new PR. The original release branch remains untouched for patch releases. [1] [2] F5db4f32L5R7, [3]docs/release-process.md) to describe the new adopt branch model, including updated diagrams, procedures, and step-by-step instructions. (F5db4f32L5R7, [1] [2] [3] [4] [5] [6] [7] [8]Script changes and enhancements:
devtools/finish-release.shto implement the adopt branch workflow, including new functions for version reconciliation and branch consistency checks. Updated help text and argument descriptions. [1] [2] [3] [4] [5] [6] [7] [8]devtools/start-release.shto check branch consistency and clarify the purpose of the draft release PR as a burndown tracker, not for direct merging. [1] [2] [3]Testing updates:
devtools/test-release-scripts.shto validate the existence and correctness of the adopt branch, its version reconciliation, DCO sign-off, and clean merge intomain. [1] [2][1] [2] [3] F5db4f32L5R7, [4]