Skip to content

refactor: switch to rapids-artifact-name for consistent artifact naming#2370

Draft
gforsyth wants to merge 6 commits intorapidsai:mainfrom
gforsyth:rapids-artifact-name
Draft

refactor: switch to rapids-artifact-name for consistent artifact naming#2370
gforsyth wants to merge 6 commits intorapidsai:mainfrom
gforsyth:rapids-artifact-name

Conversation

@gforsyth
Copy link
Copy Markdown
Contributor

@gforsyth gforsyth commented Apr 27, 2026

  • refactor(conda): use rapids-artifact-name for all artifact naming
  • refactor(wheel): use rapids-artifact-name for all artifact naming
  • revertme: vendor in new rapids-artifact-name to test

xref rapidsai/build-planning#270

vendoring in the new bash script to test -- going to open a PR to gha-tools with the changes in a bit.
Once the changes go in upstream, I'll revert out the vendored version.

@gforsyth gforsyth added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Apr 27, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 27, 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.

@gforsyth
Copy link
Copy Markdown
Contributor Author

/ok to test

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 62e51452-7816-4dc4-8bef-6e5f83025578

📥 Commits

Reviewing files that changed from the base of the PR and between ae40f55 and 3568afa.

📒 Files selected for processing (10)
  • ci/build_cpp.sh
  • ci/build_docs.sh
  • ci/build_python.sh
  • ci/build_wheel_cpp.sh
  • ci/build_wheel_python.sh
  • ci/test_cpp.sh
  • ci/test_python.sh
  • ci/test_python_integrations.sh
  • ci/test_wheel.sh
  • ci/test_wheel_integrations.sh
🚧 Files skipped from review as they are similar to previous changes (7)
  • ci/build_wheel_cpp.sh
  • ci/build_cpp.sh
  • ci/test_cpp.sh
  • ci/test_python.sh
  • ci/build_docs.sh
  • ci/test_python_integrations.sh
  • ci/test_wheel_integrations.sh

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Enhanced continuous integration build and test workflow scripts with improved artifact resolution and dependency management for more consistent CUDA version handling across build and test processes.

Walkthrough

Refactors CI scripts to standardize artifact resolution by replacing multiple helper functions (rapids-download-conda-from-github, rapids-package-name, rapids-download-wheels-from-github) with a unified approach using rapids-artifact-name combined with rapids-download-from-github.

Changes

Cohort / File(s) Summary
C++ Build Artifacts
ci/build_cpp.sh, ci/build_wheel_cpp.sh
Added RAPIDS_PACKAGE_NAME export using rapids-artifact-name with conda_cpp/wheel_cpp artifact groups, librmm, rmm, and RAPIDS_CUDA_VERSION.
Python and Docs Build Artifacts
ci/build_python.sh, ci/build_docs.sh, ci/build_wheel_python.sh
Updated channel and package sourcing to use rapids-artifact-name with explicit artifact identifiers (conda_cpp/conda_python/wheel_python), replacing prior helper methods. Now includes CUDA version in artifact naming.
Test C++ Channel Artifacts
ci/test_cpp.sh, ci/test_python.sh, ci/test_python_integrations.sh
Replaced rapids-download-conda-from-github and rapids-package-name calls with rapids-artifact-name-driven rapids-download-from-github for CPP_CHANNEL and PYTHON_CHANNEL resolution.
Test Wheel Artifacts
ci/test_wheel.sh, ci/test_wheel_integrations.sh
Changed wheelhouse artifact derivation from rapids-download-wheels-from-github and rapids-package-name to rapids-artifact-name with rapids-download-from-github for both wheel_cpp and wheel_python targets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • bdice
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: switching to rapids-artifact-name for consistent artifact naming across all CI scripts.
Description check ✅ Passed The description is directly related to the changeset, explaining the refactoring of conda and wheel artifact naming to use rapids-artifact-name, with a reference to the related issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
ci/build_python.sh (1)

51-51: Make artifact naming explicit here for full cross-script parity.

Line 51 currently relies on implicit defaults (repo and CUDA value). Passing explicit repo/CUDA like other scripts keeps producer naming deterministic across environments (including forks) and easier to reason about.

Proposed consistency tweak
-RAPIDS_PACKAGE_NAME="$(rapids-artifact-name conda_python rmm --stable --cuda)"
+RAPIDS_PACKAGE_NAME="$(rapids-artifact-name conda_python rmm rmm --stable --cuda "$RAPIDS_CUDA_VERSION")"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/build_python.sh` at line 51, RAPIDS_PACKAGE_NAME is being set via
rapids-artifact-name with implicit defaults which can vary across environments;
change the call to rapids-artifact-name used to populate RAPIDS_PACKAGE_NAME to
pass the explicit --repo and --cuda arguments (matching the values used in the
other build scripts) so the artifact name is deterministic across
forks/environments; update the invocation around
RAPIDS_PACKAGE_NAME="$(rapids-artifact-name conda_python rmm --stable --cuda)"
to include the explicit repo and CUDA values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ci/tools/rapids-artifact-name`:
- Around line 107-110: The script currently allows passing '--py' for C++
artifacts but ignores cpython_version, so add a validation alongside the
existing C++ check: when pkg_lang == "cpp" and the Python-specific option (the
'--py' flag / cpython_version variable) is set, call rapids-echo-stderr "'--py'
is only valid for Python package types" and exit 1; place this new conditional
with the existing block that checks stable_flag/pure_flag to ensure callers
cannot pass --py for C++ packages.
- Around line 15-17: The script assumes the helper executable rapids-echo-stderr
is on PATH; fix by resolving it relative to this script and export a variable
(e.g., set RAPIDS_ECHO_STDERR to "$(dirname "$0")/rapids-echo-stderr" or the
appropriate resolved path using $0) so callers that run the script directly find
the helper; then replace all bare invocations of rapids-echo-stderr with
"${RAPIDS_ECHO_STDERR}" in this file and ensure any failure to locate or execute
it emits a clear error via "${RAPIDS_ECHO_STDERR}" or process exit so
RAPIDS_SCRIPT_NAME logs meaningful messages.

---

Nitpick comments:
In `@ci/build_python.sh`:
- Line 51: RAPIDS_PACKAGE_NAME is being set via rapids-artifact-name with
implicit defaults which can vary across environments; change the call to
rapids-artifact-name used to populate RAPIDS_PACKAGE_NAME to pass the explicit
--repo and --cuda arguments (matching the values used in the other build
scripts) so the artifact name is deterministic across forks/environments; update
the invocation around RAPIDS_PACKAGE_NAME="$(rapids-artifact-name conda_python
rmm --stable --cuda)" to include the explicit repo and CUDA values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bb9989f6-c22b-4cda-9167-64f9f03ec479

📥 Commits

Reviewing files that changed from the base of the PR and between 386f76d and eb4a2f2.

📒 Files selected for processing (12)
  • ci/build_cpp.sh
  • ci/build_docs.sh
  • ci/build_python.sh
  • ci/build_wheel_cpp.sh
  • ci/build_wheel_python.sh
  • ci/test_cpp.sh
  • ci/test_python.sh
  • ci/test_python_integrations.sh
  • ci/test_wheel.sh
  • ci/test_wheel_integrations.sh
  • ci/tools/rapids-artifact-name
  • ci/tools/rapids-echo-stderr

Comment thread ci/tools/rapids-artifact-name Outdated
Comment on lines +15 to +17
set -euo pipefail
export RAPIDS_SCRIPT_NAME="rapids-artifact-name"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Resolve rapids-echo-stderr relative to this script.

All of the validation branches below assume rapids-echo-stderr is on PATH, but that is only true when a caller has already prepended ci/tools. Running ci/tools/rapids-artifact-name ... directly will hit command not found on the first error instead of emitting the intended message.

Suggested fix
 set -euo pipefail
 export RAPIDS_SCRIPT_NAME="rapids-artifact-name"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+RAPIDS_ECHO_STDERR="${SCRIPT_DIR}/rapids-echo-stderr"

Then replace the later bare rapids-echo-stderr invocations with "${RAPIDS_ECHO_STDERR}" ....

As per coding guidelines, for CI/build scripts: verify proper error handling and meaningful error messages.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
set -euo pipefail
export RAPIDS_SCRIPT_NAME="rapids-artifact-name"
set -euo pipefail
export RAPIDS_SCRIPT_NAME="rapids-artifact-name"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RAPIDS_ECHO_STDERR="${SCRIPT_DIR}/rapids-echo-stderr"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/tools/rapids-artifact-name` around lines 15 - 17, The script assumes the
helper executable rapids-echo-stderr is on PATH; fix by resolving it relative to
this script and export a variable (e.g., set RAPIDS_ECHO_STDERR to "$(dirname
"$0")/rapids-echo-stderr" or the appropriate resolved path using $0) so callers
that run the script directly find the helper; then replace all bare invocations
of rapids-echo-stderr with "${RAPIDS_ECHO_STDERR}" in this file and ensure any
failure to locate or execute it emits a clear error via "${RAPIDS_ECHO_STDERR}"
or process exit so RAPIDS_SCRIPT_NAME logs meaningful messages.

Comment thread ci/tools/rapids-artifact-name Outdated
Comment on lines +107 to +110
if [[ "${pkg_lang}" == "cpp" ]] && (( stable_flag == 1 || pure_flag == 1 )); then
rapids-echo-stderr "'--stable' and '--pure' are only valid for Python package types"
exit 1
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Reject --py for C++ artifact types.

--py is documented as Python-only, but C++ package types currently accept it and then ignore it because the C++ branch drops cpython_version entirely. That makes a caller typo look successful and can point the job at the wrong artifact.

Suggested fix
-if [[ "${pkg_lang}" == "cpp" ]] && (( stable_flag == 1 || pure_flag == 1 )); then
-  rapids-echo-stderr "'--stable' and '--pure' are only valid for Python package types"
+if [[ "${pkg_lang}" == "cpp" ]] && (( py_flag == 1 || stable_flag == 1 || pure_flag == 1 )); then
+  rapids-echo-stderr "'--py', '--stable', and '--pure' are only valid for Python package types"
   exit 1
 fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [[ "${pkg_lang}" == "cpp" ]] && (( stable_flag == 1 || pure_flag == 1 )); then
rapids-echo-stderr "'--stable' and '--pure' are only valid for Python package types"
exit 1
fi
if [[ "${pkg_lang}" == "cpp" ]] && (( py_flag == 1 || stable_flag == 1 || pure_flag == 1 )); then
rapids-echo-stderr "'--py', '--stable', and '--pure' are only valid for Python package types"
exit 1
fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/tools/rapids-artifact-name` around lines 107 - 110, The script currently
allows passing '--py' for C++ artifacts but ignores cpython_version, so add a
validation alongside the existing C++ check: when pkg_lang == "cpp" and the
Python-specific option (the '--py' flag / cpython_version variable) is set, call
rapids-echo-stderr "'--py' is only valid for Python package types" and exit 1;
place this new conditional with the existing block that checks
stable_flag/pure_flag to ensure callers cannot pass --py for C++ packages.

@gforsyth
Copy link
Copy Markdown
Contributor Author

/ok to test

rapids-bot Bot pushed a commit to rapidsai/shared-workflows that referenced this pull request Apr 28, 2026
This is part of rapidsai/build-planning#270.

I'm rolling out a new `rapids-artifact-name` tool to make our artifact names more consistent - part of the first phase of this is overriding the "default" names that get created by `shared-workflows`.  I previously added the capability to override the artifact name from within the ci scripts for the stable ABI work, but that only covered the `python-build` workflows, this extends that capability to the `cpp-build` workflows.

Tested this in rapidsai/rmm#2370 along with the vendored version of the script from rapidsai/gha-tools#253

Authors:
  - Gil Forsyth (https://github.com/gforsyth)

Approvers:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

URL: #528
rapids-bot Bot pushed a commit to rapidsai/gha-tools that referenced this pull request Apr 28, 2026
This is part of rapidsai/build-planning#270

It adds a new tool `rapids-artifact-name` that handles naming more consistently.

The arguments are:

`rapids-artifact-name package_type package_name repo --cuda [version] --py [version] --stable --pure`

`--stable`, `--py [version]`, and `--pure` are mutually exclusive and are only available when naming `python` artifacts.

```sh
> rapids-artifact-name conda_cpp librmm rmm --cuda 12.9
rmm_conda_cpp_librmm_amd64_cu12

> rapids-artifact-name wheel_cpp librmm rmm --cuda 12.9
rmm_wheel_cpp_librmm_amd64_cu12

> rapids-artifact-name conda_python pylibcudf cudf --cuda 13.1 --stable
cudf_conda_python_pylibcudf_amd64_abi3_cu13

> rapids-artifact-name wheel_python pylibcudf cudf --cuda 13.1 --stable
cudf_wheel_python_pylibcudf_amd64_abi3_cu13

> rapids-artifact-name wheel_python dask-cudf cudf --cuda 13.1 --pure
cudf_wheel_python_dask-cudf_amd64_pure_cu13

> rapids-artifact-name wheel_python dask-cudf cudf --pure
cudf_wheel_python_dask-cudf_amd64_pure
```

I tested this in rapidsai/rmm#2370 by vendoring the script as written there (along with some related small changes to `shared-workflows` to allow overriding artifact names in the conda cpp builds)

Authors:
  - Gil Forsyth (https://github.com/gforsyth)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)

URL: #253
@gforsyth
Copy link
Copy Markdown
Contributor Author

/ok to test

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

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant