adoptium / api.adoptium.net

Adoptium API 🚀
https://api.adoptium.net
Apache License 2.0
32 stars 26 forks source link

Not all versions returned in `available_releases` have a corresponding binary #922

Open Linloir opened 5 months ago

Linloir commented 5 months ago

Describe the bug For aarch64+mac (mac m2 devices), there is no release of feature version 8, which results in an inconsistency between the binary api and the available_releases api

screenshot_2024-02-20 21 09 29 截屏2024-02-20 21 10 15

Maybe add some filters to the available_releases api?

To Reproduce Steps to reproduce the behavior:

  1. Fetch the available releases from the available_releases api
  2. Use the version 8 returned to construct a new request for binary
  3. Make the request
  4. Get the 404 error

Expected behavior Either build the version or add filters to the available releases api

Device (please complete the following information):

usmanovbf commented 4 months ago

The same issue. Please, fix that

karianna commented 4 months ago

IIRC - There is no Java 8 binary for Mac OS X (Silicon) that we release, so this is a bug in our API filtering.

tellison commented 2 months ago

IIRC - There is no Java 8 binary for Mac OS X (Silicon) that we release, so this is a bug in our API filtering.

It is not a bug, the available_releases accurately returns the union of all release feature versions, with lts, most recent, and tip info. It doesn't take any parameters to specify the platform, or return any platform information - so you cannot assume all releases are available on all platforms (they are not).

Platform specific release information can be retrieved from, for example, the release_names request, e.g. for architecture=aarch64 and os=mac you can find the names for GA releases of a JDK via

curl -X 'GET' 'https://api.adoptium.net/v3/info/release_names?architecture=aarch64&os=mac&image_type=jdk&release_type=ga'
johnoliver commented 2 months ago

Calculating this page for an arbitrary set of user supplied filters would be potentially a comparatively expensive operation, and I am not sure if it offers a significant increase in functionality that other endpoints don't already make available, such as the /v3/info/release_names, /v3/info/release_versions or /v3/assets/feature_releases which can be used to determine if a version is available for a specific feature version.

karianna commented 2 months ago

Calculating this page for an arbitrary set of user supplied filters would be potentially a comparatively expensive operation, and I am not sure if it offers a significant increase in functionality that other endpoints don't already make available, such as the /v3/info/release_names, /v3/info/release_versions or /v3/assets/feature_releases which can be used to determine if a version is available for a specific feature version.

An update to our API docs then?