Skip to content

refactor update-version.sh to handle new branching strategy#42

Merged
rapids-bot[bot] merged 6 commits intorapidsai:mainfrom
jameslamb:update-version
Feb 12, 2026
Merged

refactor update-version.sh to handle new branching strategy#42
rapids-bot[bot] merged 6 commits intorapidsai:mainfrom
jameslamb:update-version

Conversation

@jameslamb
Copy link
Copy Markdown
Member

@jameslamb jameslamb commented Feb 9, 2026

Contributes to rapidsai/build-planning#224

Updates this repo to work with the new RAPIDS branching strategy.

Notes for Reviewers

How I tested this

./ci/release/update-version.sh \
  '--run-context=release' \
  '26.06.00'

# look for missed references
git grep -E '26\.[0]*4'

# check the diff
git diff

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Feb 9, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Feb 9, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added conda Relates to conda packaging ci Cython / Python labels Feb 9, 2026
@jameslamb
Copy link
Copy Markdown
Member Author

/ok to test

# Python version updates (pyproject.toml, version files)
for FILE in python/*/pyproject.toml; do
sed_runner "s/version = \".*\"/version = \"${NEXT_FULL_TAG}\"/g" "${FILE}"
sed_runner "s/^version = \".*\"/version = \"${NEXT_FULL_TAG}\"/g" "${FILE}"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Without this ^, this ends up overwriting any line containing version, like these:

https://github.com/rapidsai/cuforest/blob/c2b4c71afbd28adb92a4d00f64e9bd5bbfd56904/python/cuforest/pyproject.toml#L108-L109

sed_runner "s/cuforest==.*/cuforest==${NEXT_SHORT_TAG}.*,>=0.0.0a0/g" dependencies.yaml
sed_runner "s/libcuforest==.*/libcuforest==${NEXT_SHORT_TAG}.*,>=0.0.0a0/g" dependencies.yaml
sed_runner "s/libcuforest-tests==.*/libcuforest-tests==${NEXT_SHORT_TAG}.*,>=0.0.0a0/g" dependencies.yaml
DEPENDENCIES=(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's use the pattern every other RAPIDS project uses here, which:

  • does not differentiate between from-this-repo and other RAPIDs packages
  • accounts for -cu{12,13} suffixes in wheel names (this script previously missed those)
  • uses the PEP 440 versions for Python packages (26.6.0, not 26.06.0)

@jameslamb jameslamb changed the title WIP: refactor update-version.sh to handle new branching strategy refactor update-version.sh to handle new branching strategy Feb 9, 2026
@jameslamb jameslamb marked this pull request as ready for review February 9, 2026 19:24
@jameslamb jameslamb requested review from a team as code owners February 9, 2026 19:24
@jameslamb jameslamb requested a review from AyodeAwe February 9, 2026 19:24
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 9, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated RAPIDS package dependencies (libraft, librmm, pylibraft, rapids-xgboost, libcuforest) from version 26.04.* to 26.4.* across conda environments and Python project files.
    • Enhanced release automation script with improved argument parsing, validation, and branch-targeting logic for main and release workflows.

Walkthrough

This pull request refactors the release version update script with improved CLI argument parsing, validation, and version normalization logic. It also applies a coordinated version bump from 26.04.* to 26.4.* across all conda environment files, central dependencies manifest, and Python project configurations.

Changes

Cohort / File(s) Summary
CI Release Script Refactor
ci/release/update-version.sh
Introduces robust CLI argument parsing for --run-context and version arguments with validation. Adds context-based branch targeting (main or release), replaces in-place file operations with write operations for RAPIDS_BRANCH and VERSION, normalizes version strings using Python packaging.version, and refactors dependency updates into a loop over a DEPENDENCIES list targeting multiple package registries.
Conda Environment Files
conda/environments/all_cuda-129_arch-aarch64.yaml, all_cuda-129_arch-x86_64.yaml, all_cuda-131_arch-aarch64.yaml, all_cuda-131_arch-x86_64.yaml, clang_tidy_cuda-129_arch-x86_64.yaml, clang_tidy_cuda-131_arch-x86_64.yaml, cpp_all_cuda-129_arch-x86_64.yaml, cpp_all_cuda-131_arch-x86_64.yaml
Updates version specifiers for RAPIDS-related packages (libraft, librmm, libraft-headers, pylibraft, rapids-xgboost) from 26.04.\* to 26.4.\* while preserving lower-bound constraints.
Central Dependency and Python Configuration
dependencies.yaml, python/cuforest/pyproject.toml, python/libcuforest/pyproject.toml
Updates dependency version constraints from 26.04.\* to 26.4.\* across central dependency manifest and Python project build configurations for packages including libcuforest, libraft, librmm, pylibraft, and rapids-xgboost.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

Copy link
Copy Markdown
Contributor

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

Approving with one question


echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"
# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_SHORT_TAG}'))")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did this get tested? Wouldn't `${NEXT_SHORT_TAG}' remain unexpanded due to the single quotes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep yep I did test this.

I think it gets expanded because the outermost quotes are double quotes.

$ NEXT_SHORT_TAG="26.04"
$ NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_SHORT_TAG}'))")
$ echo ${NEXT_SHORT_TAG_PEP440}
26.4

@jameslamb
Copy link
Copy Markdown
Member Author

Thanks very much for the careful review!

@jameslamb
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit ec17659 into rapidsai:main Feb 12, 2026
74 checks passed
@jameslamb jameslamb deleted the update-version branch February 12, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci conda Relates to conda packaging Cython / Python improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants