Skip to content

Support release-candidate builds as a first-class mode - #274

Open
msarahan wants to merge 4 commits into
mainfrom
codex/release-candidate-version
Open

Support release-candidate builds as a first-class mode#274
msarahan wants to merge 4 commits into
mainfrom
codex/release-candidate-version

Conversation

@msarahan

@msarahan msarahan commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Why

The release platform builds final-version artifacts before their source tags are published. This is a new build type that is different from existing behaviors.

The behaviors are:

  • we skip devcontainer builds to save resources, because they don't produce our release artifacts
  • we exclude rapidsai and rapidsai-nightly channels when solving, which is for isolating our release candidate artifacts, ensuring that they are a self-consistent working set
  • we skip upload steps to anaconda.org. The artifacts we produce go to a private S3 bucket instead. This is both for isolation, as well as to avoid confusion that the artifacts represent any kind of official release. The artifacts in this system have the final version, without any prerelease indicators.

What changes

  • rapids-generate-version accepts RAPIDS_RELEASE_CANDIDATE_VERSION and returns that exact final, three-component numeric version without requiring a published Git tag.
  • Candidate versions are checked against the source repository's major/minor version. RAPIDS_RELEASE_CANDIDATE_SOURCE_VERSION preserves that source value when a build script writes generated output back to VERSION.
  • rapids-is-release-build recognizes RAPIDS_BUILD_TYPE=release-candidate, allowing shared workflows to pass the mode through directly instead of shadowing this command at runtime.
  • rapids-rattler-channel-string gives candidates explicit channel policy: use caller-prepended frozen candidate channels and conda-forge, with neither public RAPIDS channel added.
  • rapids-github-run-id recognizes candidate runs as build.yaml runs.
  • The local configuration prompt documents release-candidate as a supported build type.

Comment thread tools/rapids-generate-version Outdated
readonly candidate_version="${RAPIDS_RELEASE_CANDIDATE_VERSION}"
readonly candidate_version_regex='^[0-9]+\.[0-9]+\.[0-9]+$'
if [[ ! "${candidate_version}" =~ ${candidate_version_regex} ]]; then
echo "RAPIDS_RELEASE_CANDIDATE_VERSION must use a three-component numeric format, got '${candidate_version}'" >&2

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.

I don't think this is going to handle UCXX versioning.

And maybe the error message should include a template like YY.MM.XX?

echo "source version must begin with two numeric components, got '${source_version}'" >&2
exit 1
fi
readonly source_major_minor="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"

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.

I think this merits a comment on BASH_REMATCH semantics, because I always have to look it up

Comment thread tools/rapids-generate-version Outdated
exit 1
fi
readonly source_major_minor="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
readonly candidate_major_minor="${candidate_version%.*}"

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.

Let's move this up to line 13 so it's closer to where candidate_version is defined
scratch that, let's just define this inline in the comparison in line 29 -- this doesn't need to be a variable if we never use it again.

fi
readonly source_major_minor="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
readonly candidate_major_minor="${candidate_version%.*}"
if [[ "${source_major_minor}" != "${candidate_major_minor}" ]]; then

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.

Suggested change
if [[ "${source_major_minor}" != "${candidate_major_minor}" ]]; then
if [[ "${source_major_minor}" != "${candidate_version%.*}" ]]; then

This also makes the error message more consistent with the comparison

Comment thread tools/rapids-is-release-build Outdated
Comment on lines +4 to +5
# A "release" build occurs when the workflow explicitly identifies a release
# candidate or when GITHUB_REF matches the pattern "refs/tags/vYY.MM.PP".

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.

identifies works here semantically in both the active and the passive form, which makes the meaning unclear.

Suggested change
# A "release" build occurs when the workflow explicitly identifies a release
# candidate or when GITHUB_REF matches the pattern "refs/tags/vYY.MM.PP".
# A "release" build occurs when the workflow explicitly specifies a release
# candidate or when GITHUB_REF matches the pattern "refs/tags/vYY.MM.PP".

Comment on lines +38 to +42
# Candidate dependencies come only from the frozen local candidate channel and
# conda-forge. They must not resolve from either public RAPIDS channel.
if [[ "${RAPIDS_BUILD_TYPE:-}" == "release-candidate" ]]; then
RAPIDS_CHANNEL=""
elif rapids-is-release-build; then

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.

This is fine for nearly all of rapids, but cucim still uses conda-build and their configuration script is vendored in the cucim ci/ directory, so these changes will need to be made there, too.

@msarahan
msarahan removed the request for review from KyleFromNVIDIA September 3, 2026 14:39
@msarahan

msarahan commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @gforsyth. I got the LLM to make a few corrections, but I'm going to take a closer look myself tomorrow. I'll ping you when I think it's ready.

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.

2 participants