AdoptOpenJDK/openjdk-api

"Latest" orders releases by timestamp, rather than version

supahgreg opened this issue · 5 comments

Currently https://api.adoptopenjdk.net/v2/info/releases/openjdk8?release=latest&openjdk_impl=hotspot is returning jdk8u191-b12 since it has a timestamp of 2018-11-08T15:09:35Z, even though the actual "latest" release (for the vast majority of combinations) is jdk8u192-b12 with timestamp 2018-10-20T05:16:33Z.

One of the more obvious results of this is that the homepage won't give the majority of users a direct download link, since the only OS for jdk8u191-b12 is aarch64 Linux. It's also unexpected to click "Latest release" and then see the newer version on the Releases page.

This also requires API consumers to specify their OS for /v2/info/releases/openjdk8?release=latest, otherwise they'll only get the jdk8u191-b12 aarch64 Linux release.

Looking at past release names (8-11, including nightlies) formats seem to be all over the place, but it might be worth ordering by that as opposed to timestamp out-of-order releases are expected to occur.

For a lot of the website using the latestAssets api is probably better, I think it is correct for most cases https://api.adoptopenjdk.net/v2/latestAssets/releases/openjdk8?release=latest&openjdk_impl=hotspot

Just noticed this also limits the OpenJDK 8 installation instructions to "Linux aarch64 jdk" and "Linux aarch64 jre".

@johnoliver If we should deprecate/remove https://api.adoptopenjdk.net/v2/info/releases in favour of https://api.adoptopenjdk.net/v2/latestAssets/releases we'll have to do that as a v3 change...

@supahgreg Does #125 give you the expected behaviour for both the API and the installation instructions?

@karianna it does get things back to the way they were prior to the jdk8u191-b12 release, and what most would probably expect "latest" to return.

I dont think releases needs to be deprecated, just that latestAssets is more appropriate for most of what the website wants