{{ message }}
dist: Migrate from Zulu Discovery API to Azul Metadata API#1010
Open
jameswald wants to merge 11 commits into
Open
dist: Migrate from Zulu Discovery API to Azul Metadata API#1010jameswald wants to merge 11 commits into
jameswald wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Migrates the Zulu (Azul) distribution from the deprecated zulu/download/community/v1.0 API to the new metadata/v1/zulu/packages API, updating request parameters, response model fields, and architecture mapping accordingly.
Changes:
- Switched API endpoint and renamed query parameters (e.g.,
ext→archive_type,bundle_type→java_package_type,javafx→javafx_bundled); replacedhw_bitness/abiwith a singlearchvalue and addedavailability_types,page,page_sizeparameters. - Updated
IZuluVersionsmodel to use new field names (package_uuid,download_url,java_version,distro_version,latest,availability_type). - Updated tests and fixture data to align with the new API contract; updated README note about arch mapping.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
df4cd23 to
874ffb6
Compare
Author
|
Unintentionally implemented many of the same changes from #998 although the scope of this PR is a bit narrower. |
Fold CRaC-related work into the Zulu metadata API migration by wiring crac_supported query handling, extending Zulu package docs, and updating installer tests for jdk+crac/jre+crac behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Stop paginating on a short page to avoid an extra empty request - Guard against undefined results (not just null) - Cap iterations at 100 pages and warn if the limit is hit to prevent a runaway loop if the API misbehaves Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ab42a5b to
4c33a67
Compare
The Azul Metadata API returns java_version as a 3-element array (e.g. [17,0,7]) and reports the build number separately in openjdk_build_number. The migration mapped version directly from java_version, dropping the build and breaking exact-version lookups like 17.0.7+7 (e2e failure: "No matching version found for SemVer"). Add openjdk_build_number to IZuluVersions and append it to java_version before converting to semver so resolved versions retain the build (e.g. 17.0.7+7). Update the zulu test fixtures to mirror the real API shape (3-element java_version plus openjdk_build_number) so unit tests exercise the actual response format, and rebuild dist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
brunoborges
previously approved these changes
Jun 22, 2026
Author
|
Thanks @brunoborges! The additional changes look solid. |
brunoborges
approved these changes
Jun 22, 2026
Contributor
This was referenced Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Used Claude Sonnet 4.6 to implement https://docs.azul.com/core/detailed/metadata-api-migration.html. If it's way off the mark then we can close it but if it's salvageable then please feel free to push any necessary commits on top of what is already done although I believe the changes I've made for this PR are complete.
Summary
Migrates the
zuludistribution from the deprecated Zulu Discovery API (https://api.azul.com/zulu/download/community/v1.0/bundles/) to the new Azul Metadata API (https://api.azul.com/metadata/v1/zulu/packages/).Background
The old Zulu Discovery API was returning HTTP 520 errors for a few hours, breaking all
distribution: zuluworkflows. Since the beginning of 2023 Azul has recommended the Metadata API and published a migration guide.Changes
src/distributions/zulu/models.tsUpdated
IZuluVersionsto match the new API response shape:id: number→package_uuid: stringurl→download_urljdk_version→java_versionzulu_version→distro_versionlatest: booleanandavailability_type: stringsrc/distributions/zulu/installer.tshttps://api.azul.com/metadata/v1/zulu/packages/ext→archive_type,bundle_type→java_package_type,javafx→javafx_bundledhw_bitnessandabiquery parameters (no longer part of the API)availability_types=cato restrict to free community buildsgetArchitectureOptions(): now returns a plainstringinstead of{arch, hw_bitness, abi}. Architecture mapping:x64→x64,x86→x86,arm64/aarch64→aarch64linux_glibcinstead oflinuxto exclude musl packages, which standard GitHub-hosted runners do not usewin_aarhc4→win_aarch64README.mdUpdated the architecture-mapping note to reflect the new API's conventions (
arm64→aarch64).Test fixtures and tests
zulu-releases-default.json,zulu-linux.json,zulu-windows.json) to use the new field namesgetArchitectureOptionstest cases to expect strings instead of objectsDistroArchtype (no longer needed)Related issue
Fixes #795
Check list
README.md)Fixes #795
Fixes #636