Querying for latest nightly binary retrieves a json instead of the binary
dinogun opened this issue · 4 comments
Querying with this API https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdkIml=hotspot&os=linux&arch=aarch64&type=jdk&release=latest
returns the following json object
Multiple binaries match request: [ { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201802071856.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201802071856.tar.gz", "binary_size": 79431427, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201802071856.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201803071856.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201803071856.tar.gz", "binary_size": 79436211, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201803071856.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201818061901.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201818061901.tar.gz", "binary_size": 79429347, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201818061901.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201819071858.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201819071858.tar.gz", "binary_size": 79430574, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201819071858.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201822061857.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201822061857.tar.gz", "binary_size": 79429376, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201822061857.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201825061855.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201825061855.tar.gz", "binary_size": 79436595, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201825061855.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201827061855.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201827061855.tar.gz", "binary_size": 79430239, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201827061855.sha256.txt", "version": "8" }, { "os": "linux", "architecture": "aarch64", "binaryType": "jdk", "openjdk_impl": "hotspot", "binary_name": "OpenJDK8_aarch64_Linux_201829061900.tar.gz", "binary_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201829061900.tar.gz", "binary_size": 79429962, "checksum_link": "https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/download/jdk8u172-b00-201829061900/OpenJDK8_aarch64_Linux_201829061900.sha256.txt", "version": "8" } ]
Is this expected behaviour ? Ideally querying with the tags "latest", "binary" should just return the last build no matter how many builds match the query.
This is because the release at:
https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/tag/jdk8u172-b00-201829061900
Has created multiple binaries of the same type, in the same release, this has confused the api, as when you are asking for a download it expects one and only one asset to redirect you to.
This combined with the fact that 201829061900 appears to be the most recent release as it is in the interesting YYYYDDMMHHMM format, has caused this issue.
Will attempt to figure out what to do here.
Fixed by cleaning up releases
@karianna @johnoliver
This issue has surfaced again and looking at the same release that you have mentioned above, https://github.com/AdoptOpenJDK/openjdk8-nightly/releases/tag/jdk8u172-b00-201829061900, I see that all of binaries for that data still exist. The strange thing here is that they were not there for a couple of days. Have they been recreated for some reason ? It appears to be the last available aarch64 build, so running a aarch64 build job will create those specific binaries again ?
I've manually cleaned those up again. Not sure why they reappeared, the build job should not create binaries for a date in the past...