Skip to content

Bump actions/setup-java to v3.14.1 with zulu distribution#774

Merged
hectorcast-db merged 2 commits intomainfrom
hector/bump-setup-java-arm64-fix
Apr 22, 2026
Merged

Bump actions/setup-java to v3.14.1 with zulu distribution#774
hectorcast-db merged 2 commits intomainfrom
hector/bump-setup-java-arm64-fix

Conversation

@hectorcast-db
Copy link
Copy Markdown
Contributor

@hectorcast-db hectorcast-db commented Apr 22, 2026

Summary

Fixes intermittent CI failures on arm64 `macos-latest` runners for PRs touching anything unrelated to the workflow itself.

The `setup-build-environment` composite action was pinned to `actions/setup-java@v1.4.4` (August 2020). That version hard-codes an x64 tool-cache path. Current `macos-latest` runners are arm64 (Image: `macos-15-arm64`), so v1.4.4 intermittently lands on a non-existent JDK path and fails with:

```
JAVA_HOME: /Users/runner/hostedtoolcache/jdk/8.0.492/x64
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.
```

Observed today on PR #773 run 24765873049 — jobs `unit-tests (macos-latest, 8)`, `(macos-latest, 11)`, `(macos-latest, 17)` all failed at the JDK setup step. Java 20 on the same commit passed, and a subsequent re-run of the same SHA hit the same three failures, confirming this is not transient.

`release.yml` and `package.yml` in this repo already use `actions/setup-java@v3.14.1` with `distribution: "adopt"`; this change brings `setup-build-environment` in line with them.

Change

  • `.github/actions/setup-build-environment/action.yml`: bump `actions/setup-java` pin from `b6e674f4b717d7b0ae3baee0fbe79f498905dfde` (v1.4.4) to `17f84c3641ba7b8f6deff6309fc4c864478f5d62` (v3.14.1), and add the required `distribution: "adopt"` input.

Test plan

  • CI on this PR runs `unit-tests (macos-latest, {8,11,17,20})` to green
  • Ubuntu jobs still pass (this is the default pre-existing behavior but is worth confirming given `adopt` is the explicit distribution here)

This pull request was AI-assisted by Isaac.

NO_CHANGELOG=true

The setup-build-environment composite action was pinned to
actions/setup-java@v1.4.4 (Aug 2020). On arm64 macos-latest runners
(Image: macos-15-arm64) v1.4.4 resolves JDKs under the legacy
x64-only tool cache path and intermittently fails with:

    JAVA_HOME: /Users/runner/hostedtoolcache/jdk/8.0.492/x64
    The JAVA_HOME environment variable is not defined correctly,
    this environment variable is needed to run this program.

Observed on PR #773 run 24765873049, jobs unit-tests
(macos-latest, 8), (macos-latest, 11), and (macos-latest, 17). Java
20 on the same commit passed, and the same workflow on the same
commit SHA has alternated between pass and fail, confirming the
x64/arm64 mismatch is the root cause.

release.yml and package.yml already use v3.14.1 with
distribution: "adopt"; this change aligns setup-build-environment
with them.

Co-authored-by: Isaac
First attempt used distribution: "adopt" to mirror release.yml /
package.yml. release.yml runs on ubuntu-latest (x64) where adopt ships
Java 8, but this composite action is also used on macos-latest (arm64)
where adopt has dropped Java 8 — only 11+ are published. On PR #774
run 24767042972 unit-tests (macos-latest, 8) failed at setup-java with:

    Could not find satisfied version for SemVer '8'.
    Available versions: 26.0.0+35, 25.0.2+10.0.LTS, ..., 11.0.15+10

Switching to zulu, which publishes Java 8 for arm64 macOS. zulu also
matches the default used by setup-java v1.4.4 before this bump, so
behavior under the composite action on existing callers is unchanged
for x64. release.yml and package.yml still use adopt; they only run
on ubuntu so they are unaffected.

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-java

Inputs:

  • PR number: 774
  • Commit SHA: 581d5b975aef682a94df181cad25c58f49216f04

Checks will be approved automatically on success.

@hectorcast-db hectorcast-db changed the title Bump actions/setup-java to v3.14.1 with adopt distribution Bump actions/setup-java to v3.14.1 with zulu distribution Apr 22, 2026
@hectorcast-db hectorcast-db added this pull request to the merge queue Apr 22, 2026
Merged via the queue into main with commit 6ba6691 Apr 22, 2026
18 of 19 checks passed
@hectorcast-db hectorcast-db deleted the hector/bump-setup-java-arm64-fix branch April 22, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants