foojayio / discoapi

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

Is it expected that unversioned URLs are vended sometimes? #64

Closed mikehearn closed 1 year ago

mikehearn commented 1 year ago

Consider the following queries:

https://api.foojay.io/disco/v2.0/packages?package_type=jdk&archive_type=zip&archive_type=tar.gz&archive_type=tar.Z&javafx_bundled=false&distro=corretto

https://api.foojay.io/disco/v2.0/ephemeral_ids/1cdbe12ea0d4e90f241dc18f7930960c

The goal here is to get a fixed, stable URL for every known Corretto download. It mostly works. However, the query returns results for versions like 17 on its own and those URLs resolve to things like:

https://corretto.aws/downloads/latest_sha256/amazon-corretto-11-x64-macos-jdk.pkg

which is clearly meant to be a volatile, changing URL. Not quite sure what latest_sha256 is about?

Is there a way to ask the API to exclude these sorts of results that don't go to a fixed version? Thanks!

HanSolo commented 1 year ago

You are absolutely right, that should not happen. Will remove those pkgs from the database and fix it asap. Thx for the heads up

HanSolo commented 1 year ago

The latest_sha256 pkgs should not appear anymore.

mikehearn commented 1 year ago

This is still happening e.g. with amazon 15.0 I got URLs like this:

https://corretto.aws/downloads/latest/amazon-corretto-16-aarch64-linux-jdk.tar.gz

Was the underlying bug fixed or just the bad entries deleted from the DB?