Repository navigation
Map Zulu x86 architecture to i686 for Azul Metadata API - #1079
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
Pull request overview
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:
- Map Zulu
x86architecture requests to Azul Metadata APIarch=i686to return only 32-bit packages. - Update Zulu installer tests to assert the new
arch=i686query parameter and expected architecture mapping. - Rebuild
dist/to reflect the source change.
Show a summary per file
| 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. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/5 changed files
- Comments generated: 0
- Review effort level: Low
Member
|
Should we not include i386 in this logic too? Or does the Azul API specifically map to i686? |
Contributor
Author
|
Seems clear to me this is a matter of them mapping i686 |
zendesk-ops-ci
pushed a commit
to zendesk/setup-java
that referenced
this pull request
Jul 17, 2026
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)
zendesk-ops-ci
pushed a commit
to zendesk/setup-java
that referenced
this pull request
Jul 17, 2026
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>
mergify Bot
added a commit
to ArcadeData/arcadedb
that referenced
this pull request
Aug 30, 2026
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.7.0 to 6.0.0. Release notes *Sourced from [actions/setup-java's releases](https://github.com/actions/setup-java/releases).* > v6.0.0 > ------ > > What's Changed > -------------- > > * dist: Migrate from Zulu Discovery API to Azul Metadata API by [`@jameswald`](https://github.com/jameswald) in [actions/setup-java#1010](https://redirect.github.com/actions/setup-java/pull/1010) > * feat: add .mvn/extensions.xml to Maven cache key pattern by [`@brunoborges`](https://github.com/brunoborges) with [`@Copilot`](https://github.com/Copilot) in [actions/setup-java#1041](https://redirect.github.com/actions/setup-java/pull/1041) > * Migrate to ESM and upgrade dependencies by [`@priyagupta108`](https://github.com/priyagupta108) in [actions/setup-java#1078](
Summary
Follow-up to #1010 (Azul Metadata API migration). Fixes a regression where an explicit
architecture: x86request for the Zulu distribution could resolve to a 64-bit JDK.Problem
The migration mapped code arch
x86→ APIarch=x86. However, the Azul Metadata API'sarch=x86returns both 32-bit (i686) and 64-bit (x64) packages. The two variants share identicaljava_versionanddistro_version, sofindPackageForDownloadcannot 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'sarch=i686returns only genuine 32-bit builds, with verified full version parity to the legacy 32-bit behavior:x86+hw_bitness=32i686x64 and aarch64 resolution are unaffected.
Testing
getArchitectureOptionsmapping).dist/rebuilt.