Add isolated load_library() smoke tests for library wheels
Description
RAPIDS wheel test jobs can install a library wheel together with its high-level wheel and test extras. Those additional packages can satisfy runtime dependencies that are missing from the library wheel's metadata, so the test suite passes even though a user installing only the library wheel cannot load its shared library.
For example, rapidsai/kvikio#1013 tests libkvikio in an isolated virtual environment:
python -m venv libkvikio-env
. libkvikio-env/bin/activate
rapids-pip-retry install --prefer-binary --constraint "${PIP_CONSTRAINT}" \
"${LIBKVIKIO_WHEELHOUSE}"/libkvikio_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl
python -c "import libkvikio; libkvikio.load_library()"
deactivate
We should roll this pattern out to every library wheel that exposes load_library(). The smoke test must run before installing the high-level wheel or test extras.
Benefits
- Detects missing shared-library runtime dependencies from the library wheel alone.
- Exercises the same load path users take when installing a library wheel directly.
- Keeps the existing full wheel test suite focused on functional testing.
Acceptance Criteria
- Each repository runs its wheel test script through
rapidsai/shared-workflows/.github/workflows/wheels-test.yaml. We only modify the script that is called in that workflow.
- Each library wheel exposing
load_library() is installed in a fresh virtual environment with the generated test constraints and without test extras.
- The smoke test imports the library package and calls its
load_library() entry point.
- The existing high-level-wheel installation and test suite do not use the smoke-test environment.
- The smoke test runs for every supported CUDA wheel variant in the existing wheel-test matrix.
Approach
For each repository below:
- Add the
wheels-test.yaml reusable workflow job if the repository does not already invoke it.
- In the wheel test script, create and activate a virtual environment before the existing package and test-extra installation.
- Install only the library wheel, using the existing generated constraints and wheel-selection convention.
- Run
python -c "import <library-package>; <library-package>.load_library()".
- Deactivate the environment, then continue the existing wheel tests in their own environment.
Tracking
The following repositories expose a Python load_library() API.
Add isolated
load_library()smoke tests for library wheelsDescription
RAPIDS wheel test jobs can install a library wheel together with its high-level wheel and test extras. Those additional packages can satisfy runtime dependencies that are missing from the library wheel's metadata, so the test suite passes even though a user installing only the library wheel cannot load its shared library.
For example, rapidsai/kvikio#1013 tests
libkvikioin an isolated virtual environment:We should roll this pattern out to every library wheel that exposes
load_library(). The smoke test must run before installing the high-level wheel or test extras.Benefits
Acceptance Criteria
rapidsai/shared-workflows/.github/workflows/wheels-test.yaml. We only modify the script that is called in that workflow.load_library()is installed in a fresh virtual environment with the generated test constraints and without test extras.load_library()entry point.Approach
For each repository below:
wheels-test.yamlreusable workflow job if the repository does not already invoke it.python -c "import <library-package>; <library-package>.load_library()".Tracking
The following repositories expose a Python
load_library()API.libcudf,libcudf_streaming: #23414)libcugraph: #5608)libwholegraph: #506)libcuml: #8406)libcuopt: #1624)libkvikio: #1013)libnvforest: #178)rapids_logger; no wheel-test workflow yet)librapidsmpf: #1141)librmm: #2494)libucxx: #715)libucx: #39)