Skip to content

Commit a2b1e31

Browse files
authored
ci: route wheel test artifact downloads through the retry action (#3052)
* ci: pass retry-delay-seconds through env in the retry action Interpolating the input directly into the shell run block let a non-numeric retry-delay-seconds value inject commands. Pass it through env instead, so a bad value only fails the sleep rather than executing arbitrary shell. Signed-off-by: Ralf Juengling <rjuengling@nvidia.com> * ci: route wheel test artifact downloads through the retry action Swap the 14 download-artifact steps in test-wheel-linux.yml and test-wheel-windows.yml to f20d661, the composite action introduced in #3037, so transient "other side closed" flakes retry once instead of failing the job. The wheel jobs check out inputs.sha (the head of the last successful main CI run), which can predate the action, so a local ./.github/actions reference would 404. The remote ref is fetched directly from that commit and resolves regardless of the checked-out tree. Each step's name, if, and with (including run-id and github-token) are unchanged, preserving behavior; the steps also move from download-artifact v8.0.1 to v8.0.2 as a side effect of routing through the action, matching the sdist jobs. The prior-branch gh run download steps and the remaining steps in build-wheel.yml, build-docs.yml, and coverage.yml are unchanged. Signed-off-by: Ralf Juengling <rjuengling@nvidia.com> --------- Signed-off-by: Ralf Juengling <rjuengling@nvidia.com>
1 parent 106da2f commit a2b1e31

3 files changed

Lines changed: 20 additions & 16 deletions

File tree

‎.github/actions/download-artifact-retry/action.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ runs:
5252
- name: Wait before retry
5353
if: ${{ steps.attempt1.outcome == 'failure' }}
5454
shell: bash --noprofile --norc -euo pipefail {0}
55+
env:
56+
# Pass through env instead of interpolating the input into the shell
57+
# script, so a non-numeric value cannot inject commands.
58+
RETRY_DELAY_SECONDS: ${{ inputs.retry-delay-seconds }}
5559
run: |
56-
echo "::warning::Artifact download failed (attempt 1); retrying in ${{ inputs.retry-delay-seconds }}s"
57-
sleep "${{ inputs.retry-delay-seconds }}"
60+
echo "::warning::Artifact download failed (attempt 1); retrying in ${RETRY_DELAY_SECONDS}s"
61+
sleep "$RETRY_DELAY_SECONDS"
5862
5963
- name: Download artifact (attempt 2)
6064
if: ${{ steps.attempt1.outcome == 'failure' }}

‎.github/workflows/test-wheel-linux.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177

178178
- name: Download cuda-pathfinder build artifacts
179179
if: ${{ env.TEST_PATHFINDER == 'true' || env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' || env.TEST_PYTHON == 'true' }}
180-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
180+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
181181
with:
182182
name: cuda-pathfinder-wheel
183183
path: ./cuda_pathfinder
@@ -186,7 +186,7 @@ jobs:
186186

187187
- name: Download cuda-python build artifacts
188188
if: ${{ env.TEST_PYTHON == 'true' && env.BINDINGS_SOURCE == 'main' }}
189-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
189+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
190190
with:
191191
name: cuda-python-wheel
192192
path: .
@@ -196,7 +196,7 @@ jobs:
196196
- name: Download cuda.bindings build artifacts
197197
if: ${{ (env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' || env.TEST_PYTHON == 'true') &&
198198
env.BINDINGS_SOURCE == 'main' }}
199-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
199+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
200200
with:
201201
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
202202
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -267,7 +267,7 @@ jobs:
267267
268268
- name: Download cuda.bindings Cython tests
269269
if: ${{ env.TEST_BINDINGS == 'true' && env.SKIP_CYTHON_TEST == '0' }}
270-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
270+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
271271
with:
272272
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}-tests
273273
path: ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
@@ -282,7 +282,7 @@ jobs:
282282
283283
- name: Download cuda.core build artifacts
284284
if: ${{ env.TEST_CORE == 'true' }}
285-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
285+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
286286
with:
287287
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
288288
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -297,7 +297,7 @@ jobs:
297297
298298
- name: Download cuda.core Cython tests
299299
if: ${{ env.TEST_CORE == 'true' && env.SKIP_CYTHON_TEST == '0' }}
300-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
300+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
301301
with:
302302
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-tests
303303
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
@@ -312,7 +312,7 @@ jobs:
312312
313313
- name: Download cuda.core test binaries
314314
if: ${{ env.TEST_CORE == 'true' }}
315-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
315+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
316316
with:
317317
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
318318
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}

‎.github/workflows/test-wheel-windows.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168

169169
- name: Download cuda-pathfinder build artifacts
170170
if: ${{ env.TEST_PATHFINDER == 'true' || env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' || env.TEST_PYTHON == 'true' }}
171-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
171+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
172172
with:
173173
name: cuda-pathfinder-wheel
174174
path: ./cuda_pathfinder
@@ -177,7 +177,7 @@ jobs:
177177

178178
- name: Download cuda-python build artifacts
179179
if: ${{ env.TEST_PYTHON == 'true' && env.BINDINGS_SOURCE == 'main' }}
180-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
180+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
181181
with:
182182
name: cuda-python-wheel
183183
path: .
@@ -187,7 +187,7 @@ jobs:
187187
- name: Download cuda.bindings build artifacts
188188
if: ${{ (env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' || env.TEST_PYTHON == 'true') &&
189189
env.BINDINGS_SOURCE == 'main' }}
190-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
190+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
191191
with:
192192
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
193193
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -249,7 +249,7 @@ jobs:
249249
250250
- name: Download cuda.bindings Cython tests
251251
if: ${{ env.TEST_BINDINGS == 'true' && env.SKIP_CYTHON_TEST == '0' }}
252-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
252+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
253253
with:
254254
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}-tests
255255
path: ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
@@ -264,7 +264,7 @@ jobs:
264264
265265
- name: Download cuda.core build artifacts
266266
if: ${{ env.TEST_CORE == 'true' }}
267-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
267+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
268268
with:
269269
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
270270
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -279,7 +279,7 @@ jobs:
279279
280280
- name: Download cuda.core Cython tests
281281
if: ${{ env.TEST_CORE == 'true' && env.SKIP_CYTHON_TEST == '0' }}
282-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
282+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
283283
with:
284284
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-tests
285285
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
@@ -294,7 +294,7 @@ jobs:
294294
295295
- name: Download cuda.core test binaries
296296
if: ${{ env.TEST_CORE == 'true' }}
297-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
297+
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
298298
with:
299299
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
300300
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}

0 commit comments

Comments
 (0)