Skip to content

Commit d54693a

Browse files
Fix main CI: JFrog mirror bypass and Windows pwsh parse error (#1428)
## Summary Three CI workflows on `main` have been failing. This PR fixes the root causes. ### 1. `Integration Tests Workflow - Main Branch` (failing 30+ runs in a row since Apr 8) - The cache step uses `path: ~/.m2` with a long-lived restore-key `${{ runner.os }}-m2`. It restores a stale cache from before the JFrog OIDC migration, whose `~/.m2/settings.xml` (the github-server one written by `actions/setup-java`) **overwrites** the JFrog mirror config that the preceding "Configure maven" step just wrote. - Maven then tries to resolve from `repo.maven.apache.org` directly, which the protected runner cannot reach: `Could not transfer artifact ... from/to central (https://repo.maven.apache.org/maven2): Remote host terminated the handshake`. - **Fix**: narrow `path` to `~/.m2/repository` so `settings.xml` is left alone (matches the pattern used by `warmMavenCache.yml`). ### 2. `Weekly bug catcher` — same root cause as #1 Same fix in `bugCatcher.yml`. ### 3. `Test JDBC Logging` (Windows jobs failing since Apr 27) - The "Get JFrog OIDC token" step uses bash syntax (`if [ -z "$X" ]`, `set -euo pipefail`) but has no `shell:` directive. On Windows runners the default shell is `pwsh`, which fails parsing the bash `if` with `Missing '(' after 'if'`. The "Configure maven" step has the same problem (bash heredoc). - **Fix**: pin both steps to `shell: bash`. Linux jobs were unaffected because their default shell is already bash. ## Test plan - [ ] After merge, confirm `Integration Tests Workflow - Main Branch` passes on the next push to `main` - [ ] After merge, confirm `Test JDBC Logging` Windows jobs pass on the next push to `main` - [ ] Next scheduled `Weekly bug catcher` run (Mondays 00:00 UTC) is green NO_CHANGELOG=true OVERRIDE_FREEZE=true This pull request and its description were written by Isaac. --------- Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent 618141b commit d54693a

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/bugCatcher.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ jobs:
8181
- name: Cache Maven packages
8282
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
8383
with:
84-
path: ~/.m2
84+
# Cache only the local repository — caching ~/.m2 itself would
85+
# restore a stale settings.xml on top of the JFrog-configured one
86+
# written above, causing Maven to bypass the mirror and hit Maven
87+
# Central directly.
88+
path: ~/.m2/repository
8589
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
8690
restore-keys: ${{ runner.os }}-m2
8791

.github/workflows/loggingTesting.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
java-version: '21'
4545

4646
- name: Get JFrog OIDC token
47+
shell: bash
4748
run: |
4849
set -euo pipefail
4950
@@ -70,6 +71,7 @@ jobs:
7071
echo "JFrog OIDC token obtained successfully"
7172
7273
- name: Configure maven
74+
shell: bash
7375
run: |
7476
set -euo pipefail
7577

.github/workflows/runIntegrationTests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ jobs:
8585
echo "Maven configured to use JFrog registry"
8686
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
8787
with:
88-
path: ~/.m2
88+
# Cache only the local repository — caching ~/.m2 itself would
89+
# restore a stale settings.xml on top of the JFrog-configured one
90+
# written above, causing Maven to bypass the mirror and hit Maven
91+
# Central directly.
92+
path: ~/.m2/repository
8993
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
9094
restore-keys: ${{ runner.os }}-m2
9195
- name: Create .pem file from secret

0 commit comments

Comments
 (0)