Skip to content

Conversation

@brandon-b-miller
Copy link
Contributor

Xref #699

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 7, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@brandon-b-miller
Copy link
Contributor Author

/ok to test

nvrtc_pkgs=$(dpkg --get-selections | awk '/nvrtc/ {print $1}')

if [[ -z "$nvvm_pkgs" || -z "$nvrtc_pkgs" ]]; then
echo "Expected both nvvm and nvrtc packages to be present, but at least one was missing"
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem that helpful since it leaves a person guessing which one was missing.

Can we have two conditionals, one for each of nvvm and nvrtc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup - addressing

@brandon-b-miller
Copy link
Contributor Author

/ok to test

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR refactors the nvvm and nvrtc package removal logic in the wheel dependency test script. The changes improve error handling by explicitly checking for package existence before attempting removal, providing clearer error messages when expected packages are missing. The refactored code stores package names in variables first, validates their presence, and then removes them - making the script more robust and easier to debug. The removal of apt-get update is appropriate since package list updates aren't needed for removal operations.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The changes improve the robustness of the package removal logic with better error handling and validation. The refactored code is clearer and more maintainable. One minor style suggestion was noted about variable quoting, but the current unquoted usage is actually correct for this use case since word splitting is needed to pass multiple package names as separate arguments
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
ci/test_wheel_deps_wheels.sh 4/5 Improved package removal logic with explicit validation and clearer error messages; removes unnecessary apt-get update call

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Additional Comments (1)

ci/test_wheel_deps_wheels.sh
variables should be quoted to prevent potential word splitting issues

apt remove --purge -y "$nvvm_pkgs"
apt remove --purge -y "$nvrtc_pkgs"

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR fixes the test_wheel_deps_wheels.sh script to properly detect and uninstall nvvm and nvrtc packages for CUDA 13 testing. The old implementation used inline command substitution with backticks which could fail silently if no packages were found. The new implementation:

  • Stores package names in variables before attempting removal
  • Validates that packages exist with clear error messages before proceeding
  • Exits with status 1 if expected packages are not found, preventing silent failures

Key improvements:

  • Added validation checks (lines 32-40) that error out if packages aren't found
  • Removed apt-get update which was unnecessary for package removal
  • Changed from inline command substitution to variable storage for better error handling
  • More descriptive error messages that specify which package type is missing

Minor improvement suggested:

  • Variables on lines 42-43 should be quoted per bash best practices

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk - it improves error detection in CI scripts
  • The changes improve robustness by adding validation checks that prevent silent failures. The logic is straightforward and addresses a real issue where package removal could fail without being detected. Score is 4/5 (not 5) due to the unquoted variable expansion on lines 42-43, which should be quoted per bash best practices to prevent potential word splitting issues
  • No files require special attention - the suggested improvement is a minor style fix

Important Files Changed

File Analysis

Filename Score Overview
ci/test_wheel_deps_wheels.sh 4/5 Script improved to validate nvvm/nvrtc packages exist before removal with better error messages; unquoted variable expansion on lines 42-43 could be more robust

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Additional Comments (1)

ci/test_wheel_deps_wheels.sh
Variables should be quoted to prevent word splitting and glob expansion

apt remove --purge -y "$nvvm_pkgs"
apt remove --purge -y "$nvrtc_pkgs"

@cpcloud cpcloud merged commit ea25218 into NVIDIA:main Jan 7, 2026
129 checks passed
gmarkall added a commit to gmarkall/numba-cuda that referenced this pull request Jan 12, 2026
- Add arch specific target support (NVIDIA#549)
- chore: disable `locked` flag to bypass prefix-dev/pixi#5256 (NVIDIA#714)
- ci: relock pixi (NVIDIA#712)
- ci: remove redundant conda build in ci (NVIDIA#711)
- chore(deps): bump numba-cuda version and relock pixi (NVIDIA#707)
- Dropping bits in the old CI & Propagating recent changes from cuda-python (NVIDIA#683)
- Fix `test_wheel_deps_wheels.sh` to actually uninstall `nvvm` and `nvrtc` packages for CUDA 13 (NVIDIA#701)
- perf: remove some exception control flow and buffer-exception penalization for arrays (NVIDIA#700)
- perf: let CAI fall through instead of calling from_cuda_array_interface (NVIDIA#694)
- chore: perf lint (NVIDIA#697)
- chore(deps): bump deps in pixi lockfile (NVIDIA#693)
- fix: use freethreading-supported `_PySet_NextItemRef` where possible (NVIDIA#682)
- Support python `3.14` (NVIDIA#599)
- Remove customized address space tracking and address class emission in debug info (NVIDIA#669)
- Drop `experimental` from cuda.core namespace imports (NVIDIA#676)
- Remove dangling references to NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY (NVIDIA#675)
- Use `rapidsai/sccache` in CI (NVIDIA#674)
- chore(dev-deps): remove ipython and pyinstrument (NVIDIA#670)
- Set up a new VM-based CI infrastructure  (NVIDIA#604)
@gmarkall gmarkall mentioned this pull request Jan 12, 2026
gmarkall added a commit that referenced this pull request Jan 12, 2026
- Add arch specific target support (#549)
- chore: disable `locked` flag to bypass
prefix-dev/pixi#5256 (#714)
- ci: relock pixi (#712)
- ci: remove redundant conda build in ci (#711)
- chore(deps): bump numba-cuda version and relock pixi (#707)
- Dropping bits in the old CI & Propagating recent changes from
cuda-python (#683)
- Fix `test_wheel_deps_wheels.sh` to actually uninstall `nvvm` and
`nvrtc` packages for CUDA 13 (#701)
- perf: remove some exception control flow and buffer-exception
penalization for arrays (#700)
- perf: let CAI fall through instead of calling
from_cuda_array_interface (#694)
- chore: perf lint (#697)
- chore(deps): bump deps in pixi lockfile (#693)
- fix: use freethreading-supported `_PySet_NextItemRef` where possible
(#682)
- Support python `3.14` (#599)
- Remove customized address space tracking and address class emission in
debug info (#669)
- Drop `experimental` from cuda.core namespace imports (#676)
- Remove dangling references to
NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY (#675)
- Use `rapidsai/sccache` in CI (#674)
- chore(dev-deps): remove ipython and pyinstrument (#670)
- Set up a new VM-based CI infrastructure  (#604)
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