BiteTheDDDDt opened a new pull request, #62820:
URL: https://github.com/apache/doris/pull/62820

   ## Problem
   
   The `BE UT (macOS)` workflow on `macos-15` started failing with:
   
   ```
   Check JAVA version
   ERROR: The JAVA version is 25, it must be JDK-17.
   ```
   
   ## Root cause
   
   The `macos-15` GitHub-hosted runner is **arm64 (Apple Silicon)**, confirmed 
by job logs: `Target system: Darwin; Target arch: arm64`. On arm64 macOS 
runners, the env var `JAVA_HOME_17_X64` is **not set** (only 
`JAVA_HOME_17_arm64` would be), so:
   
   ```bash
   export JAVA_HOME="${JAVA_HOME_17_X64%/}"  # JAVA_HOME=""
   ```
   
   ends up empty. Then `env.sh` (`check_jdk_version`) falls back to `command -v 
java`, which on `macos-15` is now JDK 25 by default, hence the failure.
   
   ## Fix
   
   Use `actions/setup-java@v4` (Temurin 17) to install JDK 17 in a 
runner-arch-agnostic way; the action sets `JAVA_HOME` automatically. Drop the 
obsolete `export JAVA_HOME="${JAVA_HOME_17_X64%/}"` line.
   
   This avoids depending on hosted-runner preinstalled JDK env vars (which 
differ across image versions and architectures) and matches the pattern already 
used by other workflows in the repo (e.g. `.github/workflows/checkstyle.yaml` 
and `build-extension.yml`).
   
   ## Release note
   
   None (CI fix only).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to