Skip to content

Commit 22ed240

Browse files
authored
ci: fail fast on integration test binary cache miss (#447)
In run https://github.com/scylladb/cpp-rs-driver/actions/runs/25594930991, the build job successfully built the integration test binary but failed to save it to the GitHub Actions cache (transient cache service timeout). The test jobs then silently proceeded without the binary, and build-integration-test-bin-if-missing attempted to rebuild from source without build dependencies (libuv) installed, producing an unrelated CMake error that was difficult to diagnose. Set `fail-on-cache-miss: true` on the cache restore steps so that test jobs fail immediately with a clear error when the binary is not available, instead of falling through to a doomed rebuild attempt.
2 parents 7f58af4 + e342fe0 commit 22ed240

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/build-lint-and-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ jobs:
125125
with:
126126
path: ${{ env.INTEGRATION_TEST_BIN }}
127127
key: ${{ env.INTEGRATION_TEST_BIN_CACHE_KEY }}
128+
# Otherwise the binary won't be present, and test workflows will attempt to build it,
129+
# failing due to build dependencies not being installed in the test workflow.
130+
# It's better to fail early; this is a transient error that can be fixed by re-running
131+
# the build-lint-and-unit-test job.
132+
fail-on-cache-miss: true
128133

129134
- name: Prepare environment
130135
run: make update-rust-tooling prepare-integration-test
@@ -213,6 +218,11 @@ jobs:
213218
with:
214219
path: ${{ env.INTEGRATION_TEST_BIN }}
215220
key: ${{ env.INTEGRATION_TEST_BIN_CACHE_KEY }}
221+
# Otherwise the binary won't be present, and test workflows will attempt to build it,
222+
# failing due to build dependencies not being installed in the test workflow.
223+
# It's better to fail early; this is a transient error that can be fixed by re-running
224+
# the build-lint-and-unit-test job.
225+
fail-on-cache-miss: true
216226

217227
- name: Prepare environment
218228
run: make update-rust-tooling prepare-integration-test

0 commit comments

Comments
 (0)