Skip to content

Commit 54f97d7

Browse files
authored
CI: tolerate transient sccache backend failures (#3346)
closes #3273 Skip startup cache checks in Linux wheel builds so transient GHA cache failures do not prevent compilation. Configure cache I/O backoff after five errors within five seconds. Apply the same backoff to Linux sdist builds using local-disk sccache. Omit startup-check skipping there because the disk check performs no I/O. Validation: actionlint, YAML configuration checks, and git diff --check.
1 parent 526b119 commit 54f97d7

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎.github/workflows/build-wheel.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ jobs:
238238
# extras: uv puts uv on PATH (required on Windows).
239239
CIBW_BUILD_FRONTEND: "build[uv]"
240240
# CIBW mounts the host filesystem under /host
241+
# Skip startup cache probes and back off on repeated cache errors (#3273).
241242
CIBW_ENVIRONMENT_LINUX: >
242243
CUDA_PATH=/host/${{ env.CUDA_PATH }}
243244
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
@@ -247,6 +248,9 @@ jobs:
247248
CXX="/host/${{ env.SCCACHE_PATH }} c++"
248249
SCCACHE_GHA_ENABLED=true
249250
SCCACHE_PREPROCESSOR_CACHE_GHA_ENABLED=true
251+
SCCACHE_SKIP_CACHE_CHECK=true
252+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT=5
253+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS=5
250254
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
251255
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
252256
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
@@ -335,6 +339,7 @@ jobs:
335339
# See the cuda.bindings step above for UV_* vs PIP_*.
336340
CIBW_BUILD_FRONTEND: "build[uv]"
337341
# CIBW mounts the host filesystem under /host
342+
# Skip startup cache probes and back off on repeated cache errors (#3273).
338343
CIBW_ENVIRONMENT_LINUX: >
339344
CUDA_PATH=/host/${{ env.CUDA_PATH }}
340345
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
@@ -346,6 +351,9 @@ jobs:
346351
CXX="/host/${{ env.SCCACHE_PATH }} c++"
347352
SCCACHE_GHA_ENABLED=true
348353
SCCACHE_PREPROCESSOR_CACHE_GHA_ENABLED=true
354+
SCCACHE_SKIP_CACHE_CHECK=true
355+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT=5
356+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS=5
349357
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
350358
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
351359
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
@@ -614,6 +622,7 @@ jobs:
614622
# See the cuda.bindings step above for UV_* vs PIP_*.
615623
CIBW_BUILD_FRONTEND: "build[uv]"
616624
# CIBW mounts the host filesystem under /host
625+
# Skip startup cache probes and back off on repeated cache errors (#3273).
617626
CIBW_ENVIRONMENT_LINUX: >
618627
CUDA_PATH=/host/${{ env.CUDA_PATH }}
619628
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
@@ -625,6 +634,9 @@ jobs:
625634
CXX="/host/${{ env.SCCACHE_PATH }} c++"
626635
SCCACHE_GHA_ENABLED=true
627636
SCCACHE_PREPROCESSOR_CACHE_GHA_ENABLED=true
637+
SCCACHE_SKIP_CACHE_CHECK=true
638+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT=5
639+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS=5
628640
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
629641
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
630642
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
BUILD_BINDINGS: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.needs_build }}
3535
BUILD_CORE: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.needs_build }}
3636
BUILD_PYTHON: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_build }}
37+
# Back off on repeated local-disk cache I/O errors (#3273).
38+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT: "5"
39+
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS: "5"
3740
timeout-minutes: 60
3841
runs-on: linux-amd64-cpu8
3942
steps:

0 commit comments

Comments
 (0)