api returning incorrect build for latest
lumpfish opened this issue · 4 comments
A new release jdk-11.0.4+11.2 was recently created for hotspot and openj9 builds.
The openj9 build release name is jdk-11.0.4+11.2_openj9-0.15.1. However, the new release is not returned as 'latest' via the API - https://api.adoptopenjdk.net/v2/info/releases/openjdk11?release=latest&os=mac&arch=x64&openjdk_impl=openj9&type=jdk&heap_size=normal
The new build is returned OK for the hotspot build: https://api.adoptopenjdk.net/v2/info/releases/openjdk11?release=latest&os=mac&arch=x64&openjdk_impl=hotspot&type=jdk&heap_size=normal
Asking for all builds (or viewing via the website) - https://api.adoptopenjdk.net/v2/info/releases/openjdk11?os=mac&arch=x64&openjdk_impl=openj9&type=jdk&heap_size=normal shows the new release listed as #5 and the previous release is #6.
So I infer that the releases are returned ordered by release name, that the insertion of the ".2" in the release name means the new release collates ahead of the previous release, and the api notion of 'latest' is simply 'last in list'.
Looks like the collation needs to be more sophisticated (e.g. based on release date?)
Unfortunately #176 does not appear to have fixed this issue - https://api.adoptopenjdk.net/v2/info/releases/openjdk11?release=latest&os=mac&arch=x64&openjdk_impl=openj9&type=jdk&heap_size=normal still returns the jdk-11.0.4+11_openj9-0.15.1 build, not the jdk-11.0.4+11.2_openj9-0.15.1 build.
Hm that's funky, yeah I'll take another look later today 👍.