Skip to content

[DO NOT MERGE] Test RAFT 3052#1431

Open
divyegala wants to merge 2 commits into
NVIDIA:mainfrom
divyegala:test-raft-3052
Open

[DO NOT MERGE] Test RAFT 3052#1431
divyegala wants to merge 2 commits into
NVIDIA:mainfrom
divyegala:test-raft-3052

Conversation

@divyegala

Copy link
Copy Markdown

No description provided.

@divyegala divyegala requested a review from a team as a code owner June 12, 2026 17:20
@divyegala divyegala requested a review from jakirkham June 12, 2026 17:20
@copy-pr-bot

copy-pr-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rgsl888prabhu

Copy link
Copy Markdown
Collaborator

/ok to test ec7f82a

@rgsl888prabhu rgsl888prabhu added breaking Introduces a breaking change improvement Improves an existing functionality labels Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds two CI helper scripts and integrates them into nine existing build and test scripts, enabling the CI pipeline to use conda packages and wheels from PR artifacts. use_conda_packages_from_prs.sh fetches conda channels and registers them system-wide; use_wheels_from_prs.sh creates pip constraints pointing to local wheel files. All integrations are non-breaking source statements added at appropriate setup points.

Changes

PR artifact integration for conda packages and wheels

Layer / File(s) Summary
Conda packages from PRs helper script
ci/use_conda_packages_from_prs.sh
New Bash script that downloads conda channel artifacts for raft builds, stores them in RAPIDS_PREPENDED_CONDA_CHANNELS, and adds each channel to system conda configuration.
Wheels from PRs helper script
ci/use_wheels_from_prs.sh
New Bash script that downloads raft wheel artifacts for both C++ and Python, derives a CUDA-specific suffix, and writes PIP_CONSTRAINT file pointing pip to local wheel files.
Conda packages integration in builds
ci/build_cpp.sh, ci/build_docs.sh, ci/build_python.sh
Each build script sources the conda helper before generating RAPIDS rattler channel strings or conda environment YAML.
Conda packages integration in tests
ci/test_cpp.sh, ci/test_cpp_memcheck.sh, ci/test_notebooks.sh, ci/test_python.sh
Each test script sources the conda helper after setting channel environment variables and before generating/creating conda environments for testing.
Wheels integration in builds
ci/build_wheel_cuopt.sh, ci/build_wheel_libcuopt.sh
Each wheel build script sources the wheels helper before updating pip constraints and installing wheel dependencies.
Wheels integration in tests
ci/test_self_hosted_service.sh, ci/test_wheel_cuopt.sh, ci/test_wheel_cuopt_server.sh
Each test script sources the wheels helper after downloading wheelhouse artifacts and before generating pip constraints and installing wheels.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

non-breaking, improvement

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a description explaining the purpose of the new CI helper scripts and why they are needed.
Title check ❓ Inconclusive The title mentions a test reference (RAFT 3052) but lacks clarity about the actual changes, which involve adding CI helper scripts for sourcing conda packages and wheels from PRs across multiple build and test scripts. Consider updating the title to reflect the main change, such as 'Add CI helpers to source conda packages and wheels from PRs' for better clarity.
✅ Passed checks (3 passed)
Check name Status Explanation
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ci/test_wheel_cuopt.sh (1)

23-30: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve helper-generated RAFT constraints instead of overwriting them.

Line 23 sources ci/use_wheels_from_prs.sh, but Lines 26-30 use cat > "${PIP_CONSTRAINT}", which replaces the file and drops the RAFT entries from the helper. That makes this integration a no-op for RAFT PR wheels.

Suggested patch
-cat > "${PIP_CONSTRAINT}" <<EOF
+cat >> "${PIP_CONSTRAINT}" <<EOF
 cuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${CUOPT_WHEELHOUSE}"/cuopt_"${RAPIDS_PY_CUDA_SUFFIX}"-*.whl)
 cuopt-sh-client @ file://$(echo "${CUOPT_SH_CLIENT_WHEELHOUSE}"/cuopt_sh_client-*.whl)
 libcuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBCUOPT_WHEELHOUSE}"/libcuopt_"${RAPIDS_PY_CUDA_SUFFIX}"-*.whl)
 EOF
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/test_wheel_cuopt.sh` around lines 23 - 30, The script currently overwrites
PIP_CONSTRAINT with the cuopt lines, dropping RAFT entries added by sourcing
ci/use_wheels_from_prs.sh; change behavior so helper-generated RAFT constraints
are preserved by merging rather than replacing: read existing
"${PIP_CONSTRAINT}" (created by use_wheels_from_prs.sh), extract and keep any
RAFT-related lines, then append or write the cuopt lines (using e.g. >> to
append or a temp file that first writes preserved RAFT lines then the cuopt
entries) so variables like PIP_CONSTRAINT, CUOPT_WHEELHOUSE,
CUOPT_SH_CLIENT_WHEELHOUSE and LIBCUOPT_WHEELHOUSE are used but RAFT entries
from the helper script are not lost.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/use_conda_packages_from_prs.sh`:
- Around line 6-7: The script currently hard-codes raft PR id 3052 in the
rapids-get-pr-artifact calls for LIBRAFT_CHANNEL and RAFT_CHANNEL; change these
to read the PR id from a CI input/env var (e.g., RAFT_PR or INPUT_RAFT_PR) and
use that variable in the rapids-get-pr-artifact invocations, providing a
sensible fallback or failing fast with a clear error if the variable is missing;
update the references to LIBRAFT_CHANNEL and RAFT_CHANNEL so they call
rapids-get-pr-artifact with the parameterized PR id instead of the literal 3052.
- Around line 1-5: Add strict shell options to the script by inserting the line
enabling "set -euo pipefail" immediately after the existing shebang
(#!/bin/bash) so the script exits on errors, treats unset variables as failures,
and propagates failures through pipes; do not add custom guards—rely on set -u
for unbound-variable behavior as preferred by the repo.

In `@ci/use_wheels_from_prs.sh`:
- Around line 1-8: This script lacks Bash strict-mode so failures can be masked;
add a strict-mode declaration by inserting set -euo pipefail (and optionally
IFS=$'\n\t' if desired) immediately after the shebang so any failure in sourcing
rapids-init-pip, the rapids-wheel-ctk-name-gen call, or use of
RAPIDS_PY_CUDA_SUFFIX will abort and surface errors; ensure the declaration
appears before the source rapids-init-pip and before any use of
RAPIDS_CUDA_VERSION/RAPIDS_PY_CUDA_SUFFIX.

---

Outside diff comments:
In `@ci/test_wheel_cuopt.sh`:
- Around line 23-30: The script currently overwrites PIP_CONSTRAINT with the
cuopt lines, dropping RAFT entries added by sourcing ci/use_wheels_from_prs.sh;
change behavior so helper-generated RAFT constraints are preserved by merging
rather than replacing: read existing "${PIP_CONSTRAINT}" (created by
use_wheels_from_prs.sh), extract and keep any RAFT-related lines, then append or
write the cuopt lines (using e.g. >> to append or a temp file that first writes
preserved RAFT lines then the cuopt entries) so variables like PIP_CONSTRAINT,
CUOPT_WHEELHOUSE, CUOPT_SH_CLIENT_WHEELHOUSE and LIBCUOPT_WHEELHOUSE are used
but RAFT entries from the helper script are not lost.
🪄 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: afac498b-1894-4763-a55b-b03e4a1e7bad

📥 Commits

Reviewing files that changed from the base of the PR and between 1ec39b3 and ec7f82a.

📒 Files selected for processing (14)
  • ci/build_cpp.sh
  • ci/build_docs.sh
  • ci/build_python.sh
  • ci/build_wheel_cuopt.sh
  • ci/build_wheel_libcuopt.sh
  • ci/test_cpp.sh
  • ci/test_cpp_memcheck.sh
  • ci/test_notebooks.sh
  • ci/test_python.sh
  • ci/test_self_hosted_service.sh
  • ci/test_wheel_cuopt.sh
  • ci/test_wheel_cuopt_server.sh
  • ci/use_conda_packages_from_prs.sh
  • ci/use_wheels_from_prs.sh

Comment on lines +1 to +5
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

# download CI artifacts

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 | 🟡 Minor | ⚡ Quick win

Add strict shell options in this new CI helper.

This new script lacks set -euo pipefail, so standalone invocation can miss failures or unset-variable mistakes.

💡 Proposed fix
 #!/bin/bash
 # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
 # SPDX-License-Identifier: Apache-2.0
+
+set -euo pipefail

As per coding guidelines, new scripts under ci/**/*.sh should follow set -euo pipefail hygiene. Based on learnings, this repository prefers relying on set -u unbound-variable behavior instead of custom guards.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/use_conda_packages_from_prs.sh` around lines 1 - 5, Add strict shell
options to the script by inserting the line enabling "set -euo pipefail"
immediately after the existing shebang (#!/bin/bash) so the script exits on
errors, treats unset variables as failures, and propagates failures through
pipes; do not add custom guards—rely on set -u for unbound-variable behavior as
preferred by the repo.

Sources: Coding guidelines, Learnings

Comment on lines +6 to +7
LIBRAFT_CHANNEL=$(rapids-get-pr-artifact raft 3052 cpp conda)
RAFT_CHANNEL=$(rapids-get-pr-artifact raft 3052 python conda)

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 | ⚡ Quick win

Avoid hard-coding a single upstream PR artifact ID.

Line 6 and Line 7 pin artifact retrieval to raft PR 3052, which makes these jobs validate against one fixed external PR and can fail when that artifact is unavailable. Parameterize the PR ID from CI input.

💡 Proposed fix
- LIBRAFT_CHANNEL=$(rapids-get-pr-artifact raft 3052 cpp conda)
- RAFT_CHANNEL=$(rapids-get-pr-artifact raft 3052 python conda)
+ RAFT_PR_ID="${RAFT_PR_ID}"
+ LIBRAFT_CHANNEL=$(rapids-get-pr-artifact raft "${RAFT_PR_ID}" cpp conda)
+ RAFT_CHANNEL=$(rapids-get-pr-artifact raft "${RAFT_PR_ID}" python conda)
📝 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
LIBRAFT_CHANNEL=$(rapids-get-pr-artifact raft 3052 cpp conda)
RAFT_CHANNEL=$(rapids-get-pr-artifact raft 3052 python conda)
RAFT_PR_ID="${RAFT_PR_ID}"
LIBRAFT_CHANNEL=$(rapids-get-pr-artifact raft "${RAFT_PR_ID}" cpp conda)
RAFT_CHANNEL=$(rapids-get-pr-artifact raft "${RAFT_PR_ID}" python conda)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/use_conda_packages_from_prs.sh` around lines 6 - 7, The script currently
hard-codes raft PR id 3052 in the rapids-get-pr-artifact calls for
LIBRAFT_CHANNEL and RAFT_CHANNEL; change these to read the PR id from a CI
input/env var (e.g., RAFT_PR or INPUT_RAFT_PR) and use that variable in the
rapids-get-pr-artifact invocations, providing a sensible fallback or failing
fast with a clear error if the variable is missing; update the references to
LIBRAFT_CHANNEL and RAFT_CHANNEL so they call rapids-get-pr-artifact with the
parameterized PR id instead of the literal 3052.

Comment thread ci/use_wheels_from_prs.sh
Comment on lines +1 to +8
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

# initialize PIP_CONSTRAINT
source rapids-init-pip

RAPIDS_PY_CUDA_SUFFIX=$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")

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 | 🟡 Minor | ⚡ Quick win

Add strict mode in the helper script entry.

Line 1 introduces a standalone CI helper, but set -euo pipefail is not enabled. If this file is sourced by a non-strict caller, failed artifact lookup or constraint generation can continue silently.

Suggested patch
 #!/bin/bash
 # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
 # SPDX-License-Identifier: Apache-2.0
 
+set -euo pipefail
+
 # initialize PIP_CONSTRAINT
 source rapids-init-pip

As per coding guidelines, CI shell scripts should keep set -euo pipefail hygiene, and based on learnings this repo prefers relying on Bash’s built-in unbound-variable handling via set -u.

🧰 Tools
🪛 Shellcheck (0.11.0)

[info] 6-6: Not following: rapids-init-pip was not specified as input (see shellcheck -x).

(SC1091)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/use_wheels_from_prs.sh` around lines 1 - 8, This script lacks Bash
strict-mode so failures can be masked; add a strict-mode declaration by
inserting set -euo pipefail (and optionally IFS=$'\n\t' if desired) immediately
after the shebang so any failure in sourcing rapids-init-pip, the
rapids-wheel-ctk-name-gen call, or use of RAPIDS_PY_CUDA_SUFFIX will abort and
surface errors; ensure the declaration appears before the source rapids-init-pip
and before any use of RAPIDS_CUDA_VERSION/RAPIDS_PY_CUDA_SUFFIX.

Sources: Coding guidelines, Learnings

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

Labels

breaking Introduces a breaking change improvement Improves an existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants