foojayio / discoapi

The foojay discovery api (discoapi) is made to discover java packages (jre/jdk) from different distributions.
GNU General Public License v2.0
112 stars 13 forks source link

Cannot request GraalVM packages with filtering on `jdk_version` #66

Closed jbartok closed 1 year ago

jbartok commented 1 year ago

Works: https://api.foojay.io/disco/v3.0/packages?distro=graalvm_ce16

Doesn't: https://api.foojay.io/disco/v3.0/packages?distro=graalvm_ce16&jdk_version=16

Also works (sanity check): https://api.foojay.io/disco/v3.0/packages?distro=temurin&jdk_version=16

jbartok commented 1 year ago

Weirdly following also works, though I wouldn't expect it, if the problem is with jdk_version: https://api.foojay.io/disco/v3.0/packages?jdk_version=11&distro=graalvm_ce11&operating_system=macos&latest=available

HanSolo commented 1 year ago

Hmm...so a bit of history here first, originally the disco api was made for builds of openjdk only but then we also added builds of graalvm which came with their own versioning which is different from openjdk. For that reason the jdk_version field was added. So the problem with graalvm is that you can get the same version e.g. 22.3 based on different jdk's, in this case for example on jdk 17 and jdk 19. That is also the reason why we add every graalvm version based on their jdk at the moment. This might change in the future where there might only be graalvm with a java version of 22.3 and a jdk version of 17 for example. But for the moment it is what it is. So it's expected that if you ask for graalvm_ce11 and jdk_version 11 you should get the right pkgs, it's not ok that if you ask for graalvm_ce16 and jdk_version 16 you get an empty response...there should be pkgs. Usually to get the latest version you would ask for distribution=graalvm_ce16 and latest=available. So I will look into this right now...thx for the heads up 👍🏻

jbartok commented 1 year ago

Ok, thanks. I'm looking for the latest version for a certain language/jdk level. Context: https://github.com/gradle/foojay-toolchains (adding the GraalVM support currently).

HanSolo commented 1 year ago

Found the issue and already fixed it, the deployment is on it's way, so expect it to work within the next 2 hours. Will post here as soon as it will be in production.

jbartok commented 1 year ago

Found the issue and already fixed it, the deployment is on it's way, so expect it to work within the next 2 hours. Will post here as soon as it will be in production.

Appreciated!

HanSolo commented 1 year ago

The deployment is done so it should now work as expected...fingers crossed :)

jbartok commented 1 year ago

Looks like it does, thank you!

HanSolo commented 1 year ago

Good to know, thanks for testing 👍🏻