| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The Azul Metadata API's `arch=x86` returns both 32-bit (i686) and 64-bit (x64) packages. Because the two variants share identical java_version and distro_version, setup-java cannot distinguish them and may resolve an explicit `architecture: x86` request to a 64-bit JDK (and for Java 21+, where 32-bit is dropped, x86 silently returns x64 instead of failing). The legacy Zulu Discovery API used `arch=x86&hw_bitness=32` to target only 32-bit builds. The Metadata API exposes the equivalent via `arch=i686`, which returns only genuine 32-bit builds with full version parity to the old behavior. Map x86 -> i686 to restore correct 32-bit resolution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
This PR fixes Azul Zulu architecture resolution for explicit architecture: x86 requests after the migration to the Azul Metadata API, ensuring x86 consistently targets true 32-bit builds rather than sometimes resolving to 64-bit packages.
Changes:
| File | Description |
|---|---|
| src/distributions/zulu/installer.ts | Changes x86 mapping to i686 to ensure only genuine 32-bit Zulu builds are returned by the Metadata API. |
| dist/setup/index.js | Updates the compiled distribution output to match the new x86 → i686 mapping. |
| tests/distributors/zulu-windows-installer.test.ts | Updates URL/query assertions and architecture mapping expectations for Windows Zulu. |
| tests/distributors/zulu-linux-installer.test.ts | Updates URL/query assertions and architecture mapping expectations for Linux Zulu. |
| tests/distributors/zulu-installer.test.ts | Updates URL/query assertions and architecture mapping expectations in the generic Zulu installer tests. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
Should we not include i386 in this logic too? Or does the Azul API specifically map to i686? |
Sorry, something went wrong.
|
Seems clear to me this is a matter of them mapping i686 |
Sorry, something went wrong.
The Azul Metadata API's `arch=x86` returns both 32-bit (i686) and 64-bit (x64) packages. Because the two variants share identical java_version and distro_version, setup-java cannot distinguish them and may resolve an explicit `architecture: x86` request to a 64-bit JDK (and for Java 21+, where 32-bit is dropped, x86 silently returns x64 instead of failing). The legacy Zulu Discovery API used `arch=x86&hw_bitness=32` to target only 32-bit builds. The Metadata API exposes the equivalent via `arch=i686`, which returns only genuine 32-bit builds with full version parity to the old behavior. Map x86 -> i686 to restore correct 32-bit resolution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 8a3e815)
actions#1084) Regenerate the CommonJS bundle so the compiled dist/ reflects the source changes backported from main, without the ESM migration (actions#1078). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Summary
Follow-up to #1010 (Azul Metadata API migration). Fixes a regression where an explicit architecture: x86 request for the Zulu distribution could resolve to a 64-bit JDK.
Problem
The migration mapped code arch x86 → API arch=x86. However, the Azul Metadata API's arch=x86 returns both 32-bit (i686) and 64-bit (x64) packages. The two variants share identical java_version and distro_version, so findPackageForDownload cannot distinguish them and picks whichever the API returns first.
Consequences for architecture: x86:
The legacy Zulu Discovery API avoided this by using arch=x86&hw_bitness=32, which returned only 32-bit builds.
Fix
Map x86 → i686. The Metadata API's arch=i686 returns only genuine 32-bit builds, with verified full version parity to the legacy 32-bit behavior:
x64 and aarch64 resolution are unaffected.
Testing