Skip to content

Commit

Permalink
Use rapids-pip-retry in CI jobs that might need retries (#1814)
Browse files Browse the repository at this point in the history
Uses a retry wrapper for `pip` commands to try to alleviate CI failures due to hash mismatches that result from network hiccups

xref rapidsai/build-planning#148

This will retry failures that show up in CI like:

```
   Collecting nvidia-cublas-cu12 (from libraft-cu12==25.2.*,>=0.0.0a0)
    Downloading https://pypi.nvidia.com/nvidia-cublas-cu12/nvidia_cublas_cu12-12.8.3.14-py3-none-manylinux_2_27_aarch64.whl (604.9 MB)
       ━━━━━━━━━━━━━━━━━━━━━                 350.2/604.9 MB 229.2 MB/s eta 0:00:02
  ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
      nvidia-cublas-cu12 from https://pypi.nvidia.com/nvidia-cublas-cu12/nvidia_cublas_cu12-12.8.3.14-py3-none-manylinux_2_27_aarch64.whl#sha256=93a4e0e386cc7f6e56c822531396de8170ed17068a1e18f987574895044cd8c3 (from libraft-cu12==25.2.*,>=0.0.0a0):
          Expected sha256 93a4e0e386cc7f6e56c822531396de8170ed17068a1e18f987574895044cd8c3
               Got        849c88d155cb4b4a3fdfebff9270fb367c58370b4243a2bdbcb1b9e7e940b7be
```

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

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #1814
  • Loading branch information
gforsyth authored Feb 5, 2025
1 parent 51283b0 commit 1eb9895
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -56,7 +56,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -68,7 +68,7 @@ jobs:
run_script: "ci/build_docs.sh"
wheel-build-cpp:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: ${{ inputs.build_type || 'branch' }}
Expand All @@ -79,7 +79,7 @@ jobs:
wheel-build-python:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -89,7 +89,7 @@ jobs:
wheel-publish-cpp:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -100,7 +100,7 @@ jobs:
wheel-publish-python:
needs: wheel-build-python
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- devcontainer
- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@nvks-runners
if: always()
with:
needs: ${{ toJSON(needs) }}
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
needs:
- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@nvks-runners
with:
files_yaml: |
test_cpp:
Expand All @@ -79,40 +79,40 @@ jobs:
secrets: inherit
needs:
- telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@nvks-runners
with:
enable_check_generated_files: false
ignored_pr_jobs: telemetry-summarize
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners
with:
build_type: pull-request
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@nvks-runners
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners
with:
build_type: pull-request
conda-python-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
Expand All @@ -122,22 +122,22 @@ jobs:
wheel-build-cpp:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: pull-request
script: ci/build_wheel_cpp.sh
wheel-build-python:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
with:
build_type: pull-request
script: ci/build_wheel_python.sh
wheel-tests:
needs: [wheel-build-python, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
Expand All @@ -146,7 +146,7 @@ jobs:
secrets: inherit
needs:
- telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@nvks-runners
with:
arch: '["amd64"]'
cuda: '["12.8"]'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ on:
jobs:
cpp-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@use-nightly-matrix-for-branch-tests
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion ci/build_wheel_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd "${package_dir}"

sccache --zero-stats

python -m pip wheel . -w dist -v --no-deps --disable-pip-version-check
rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check

sccache --show-adv-stats

Expand Down
2 changes: 1 addition & 1 deletion ci/build_wheel_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "librmm-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${CPP_WHEELHOUSE}"/librmm
sccache --zero-stats

PIP_CONSTRAINT="${PWD}/build-constraints.txt" \
python -m pip wheel . -w dist -v --no-deps --disable-pip-version-check
rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check

sccache --show-adv-stats

Expand Down
2 changes: 1 addition & 1 deletion ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RAPIDS_PY_WHEEL_NAME="rmm_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-
rapids-generate-pip-constraints test_python ./constraints.txt

# echo to expand wildcard before adding '[extra]' requires for pip
python -m pip install \
rapids-pip-retry install \
-v \
--constraint ./constraints.txt \
"$(echo "${WHEELHOUSE}"/rmm_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]"
Expand Down

0 comments on commit 1eb9895

Please sign in to comment.