Skip to content

Commit adc7880

Browse files
gopalldbclaude
andauthored
Fix cache warmer: Linux-only, OS-agnostic cache key (#1380)
## Summary - Fix cache warmer Windows failure: drop Windows from matrix (bash not available on Databricks protected Windows runners) - Make cache key OS-agnostic: Maven JARs/POMs are platform-independent, one cache entry serves both Linux and Windows - Cache key: `maven-deps-{hash(pom.xml)}` (was `{os}-maven-deps-{hash}`) - Includes all changes from #1369 (runner revert + forked PR caching infrastructure) ## Changes - `.github/actions/setup-maven/action.yml` -- Reusable composite action for fork detection + JFrog/cache setup - `.github/workflows/warmMavenCache.yml` -- Cache warmer workflow (Linux-only) - `.github/workflows/prCheck.yml`, `prIntegrationTests.yml`, `coverageReport.yml`, `prCheckJDK8.yml`, `concurrencyExecutionTests.yml` -- Use composite action ## Design doc https://docs.google.com/document/d/17g9QN6LwbaiELLvrbClT_yKUfKuOHR5fYSdMDMhXd80/edit ## Test plan - [ ] Trigger cache warmer on main after merge -- should succeed on Linux - [ ] Verify forked PR CI restores cache and builds - [ ] Verify same-repo PR CI uses JFrog OIDC unchanged NO_CHANGELOG=true This pull request was AI-assisted by Isaac. --------- Signed-off-by: Gopal Lal <gopal.lal@databricks.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4065b50 commit adc7880

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.github/actions/setup-maven/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ runs:
1818
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
1919
with:
2020
path: ~/.m2/repository
21-
key: ${{ runner.os }}-maven-deps-${{ hashFiles('**/pom.xml') }}
22-
restore-keys: ${{ runner.os }}-maven-deps-
21+
key: maven-deps-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: maven-deps-
2323

2424
- name: Configure Maven without credentials (fork)
2525
if: inputs.is-fork == 'true'
@@ -106,5 +106,5 @@ runs:
106106
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
107107
with:
108108
path: ~/.m2
109-
key: ${{ runner.os }}-maven-deps-${{ hashFiles('**/pom.xml') }}
110-
restore-keys: ${{ runner.os }}-maven-deps-
109+
key: maven-deps-${{ hashFiles('**/pom.xml') }}
110+
restore-keys: maven-deps-

.github/workflows/coverageReport.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
- name: Run tests with coverage
4848
run: mvn -pl jdbc-core clean test -Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled' jacoco:report -Ddependency-check.skip=true
4949

50-
5150
- name: Check for coverage override
5251
id: override
5352
env:

.github/workflows/warmMavenCache.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ permissions:
2929

3030
jobs:
3131
warm-cache:
32-
strategy:
33-
matrix:
34-
github-runner: [linux-ubuntu-latest, windows-server-latest]
32+
# Run on Linux only. Maven repository contents (JARs/POMs) are platform-independent.
33+
# Windows forked PRs restore this same cache via the restore-keys prefix match.
34+
# Note: Windows runners in databricks-protected-runner-group lack bash, which
35+
# is required for the OIDC token exchange scripts.
3536
runs-on:
3637
group: databricks-protected-runner-group
37-
labels: ${{ matrix.github-runner }}
38+
labels: linux-ubuntu-latest
3839

3940
steps:
4041
- name: Set up JDK
@@ -144,4 +145,4 @@ jobs:
144145
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
145146
with:
146147
path: ~/.m2/repository
147-
key: ${{ runner.os }}-maven-deps-${{ hashFiles('**/pom.xml') }}
148+
key: maven-deps-${{ hashFiles('**/pom.xml') }}

0 commit comments

Comments
 (0)