Support release-candidate builds as a first-class mode - #274
Conversation
| 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 |
There was a problem hiding this comment.
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]}" |
There was a problem hiding this comment.
I think this merits a comment on BASH_REMATCH semantics, because I always have to look it up
| exit 1 | ||
| fi | ||
| readonly source_major_minor="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" | ||
| readonly candidate_major_minor="${candidate_version%.*}" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| 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
| # A "release" build occurs when the workflow explicitly identifies a release | ||
| # candidate or when GITHUB_REF matches the pattern "refs/tags/vYY.MM.PP". |
There was a problem hiding this comment.
identifies works here semantically in both the active and the passive form, which makes the meaning unclear.
| # 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". |
| # 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 |
There was a problem hiding this comment.
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.
|
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. |
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:
rapidsaiandrapidsai-nightlychannels when solving, which is for isolating our release candidate artifacts, ensuring that they are a self-consistent working setWhat changes
rapids-generate-versionacceptsRAPIDS_RELEASE_CANDIDATE_VERSIONand returns that exact final, three-component numeric version without requiring a published Git tag.RAPIDS_RELEASE_CANDIDATE_SOURCE_VERSIONpreserves that source value when a build script writes generated output back toVERSION.rapids-is-release-buildrecognizesRAPIDS_BUILD_TYPE=release-candidate, allowing shared workflows to pass the mode through directly instead of shadowing this command at runtime.rapids-rattler-channel-stringgives candidates explicit channel policy: use caller-prepended frozen candidate channels andconda-forge, with neither public RAPIDS channel added.rapids-github-run-idrecognizes candidate runs asbuild.yamlruns.release-candidateas a supported build type.