Skip to content

rapids-generate-version: respect RAPIDS_VERSION_SUFFIX env variable for non-release builds - #268

Merged
rapids-bot[bot] merged 1 commit into
mainfrom
version-suffixes
Jul 29, 2026
Merged

rapids-generate-version: respect RAPIDS_VERSION_SUFFIX env variable for non-release builds#268
rapids-bot[bot] merged 1 commit into
mainfrom
version-suffixes

Conversation

@jameslamb

@jameslamb jameslamb commented Jul 27, 2026

Copy link
Copy Markdown
Member

After this PR, if environment variable RAPIDS_VERSION_SUFFIX is non-empty, its value is appended to the output of rapids-generate-version on non-release builds.

Notes for Reviewers

Motivation

Helps resolve a long-standing issue where newly-built nightly packages aren't published because their version numbers match existing published packages (rapidsai/build-planning#218).

How I tested this

$ export PATH="$(pwd)/tools:${PATH}"
$ pushd ~/repos/cudf
$ git fetch upstream --tags
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install dunamai

$ env -u RAPIDS_VERSION_SUFFIX rapids-generate-version
26.10.00a93

$ RAPIDS_VERSION_SUFFIX="+abcd" rapids-generate-version
26.10.00a93+abcd

$ RAPIDS_VERSION_SUFFIX=".post1785251654" rapids-generate-version
26.10.00a93.post1785251654

See more testing on these PRs:

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jul 27, 2026
@jameslamb jameslamb changed the title WIP: rapids-generate-version: respect RAPIDS_VERSION_SUFFIX env variable for non-release builds rapids-generate-version: respect RAPIDS_VERSION_SUFFIX env variable for non-release builds Jul 28, 2026
@jameslamb
jameslamb requested review from bdice and vyasr July 28, 2026 16:09
@jameslamb
jameslamb marked this pull request as ready for review July 28, 2026 16:10
@jameslamb
jameslamb requested a review from a team as a code owner July 28, 2026 16:10
@jameslamb

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 02ea00f into main Jul 29, 2026
5 checks passed
@jameslamb
jameslamb deleted the version-suffixes branch July 29, 2026 13:28
rapids-bot Bot pushed a commit to rapidsai/shared-workflows that referenced this pull request Jul 29, 2026
…uild time (#603)

Contributes to rapidsai/build-planning#218

Proposes adding a new workflow, `compute-build-details`, which computes information to be passed into builds.

Right now this only calculates a version suffix like `.post{current-time-in-epoch-seconds}` to help with distinguishing nightlies, but proposing giving it a generic workflow name in case we want to stick other data in here in the future.

## Notes for Reviewers

### How does this solve the problem with nightlies?

With this time-based version component, every new non-release run of `build.yaml` in a RAPIDS repo should produce packages with a never-before-seen version, so uploads to anaconda.org should succeed.

e.g. we might see this version sequence for nightlies:

```text
26.08.00a35.post1785176675  # 35 commits past '26.08.00a' tag, CI run started at epoch time 1785176675
26.08.00a35.post1785180275  # 35 commits past '26.08.00a' tag, CI run started 1 hour later
26.08.00a36.post1785180475  # 36 commits past '26.08.00a' tag, CI run started a little later
```

These versions will only be used in pre-releases built on `main`, not releases or packages built in PR CI (rapidsai/gha-tools#268).

### What about timing problems?

This workflow will run once at the very beginning of the branch/nightly workflow run, then its output is passed as input to all other build jobs.

That makes the value static across an entire workflow run, so packages will have the same version even for:

* builds starting at different times due to scheduling delays
* builds starting at different times from clicking "re-run failed jobs" (e.g. for network failures)

### How I tested this

Confirmed that versions like this are recognized as valid PEP 440 versions and sort the way we expect in `packaging.Version`.

```python
from packaging.version import Version

Version("2026.08.00") > Version("2026.08.00a35.post1785176675")
# True

Version("2026.08.00rc0") > Version("2026.08.00a35.post1785176675")
# True

# same commit, newer build wins
Version("2026.08.00a35.post1885176675") > Version("2026.08.00a35.post1785176675")
# True

# later commit wins
Version("2026.08.00a36.post1885176675") > Version("2026.08.00a35.post1785176675")
# True
```

Also tested live with on `cugraph-gnn`, see "How I tested this" on rapidsai/cugraph-gnn#508

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

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

Labels

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.

2 participants