-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I've been playing with the Disco API since a few days as part of apache/maven-wrapper#337.
I did setup some IT that do use the Disco API to actually perform a few requests and tests the real behaviours. However, the results are really unstable and the same requests may work or return empty results, no idea why.
For example, in this workflow, most ITs failed:
https://github.com/apache/maven-wrapper/actions/runs/16498393081/job/46650180851?pr=337
There are mainly two different errors:
the first one is about LTS versions:
Warning: DEBUG: Known LTS version 17 detected as non-LTS!
Warning: DEBUG: This indicates a Disco API issue. Re-fetching with debug logging...
Warning: DEBUG: Fetching LTS versions from Disco API due to incorrect LTS detection
Warning: DEBUG: Disco API request details:
Warning: URL: https://api.foojay.io/disco/v3.0/major_versions?ea=false&ga=false&maintained=true&include_build=false&include_versions=false
Warning: Max attempts: 3
Warning: Base delay: 2000ms
Warning: Attempt 1/3: HTTP 200
Warning: Response length: 32 characters
Warning: Response body: { "result":[ ], "message":""}
Warning: DEBUG: Parsed LTS versions from API response: []
Warning: DEBUG: Fallback LTS versions: [17, 33, 21, 8, 25, 11, 29]
Warning: DEBUG: LTS version 17 still not found after debug re-fetch!
Warning: DEBUG: This is a confirmed Disco API issue. Using fallback LTS detection.
the second one is about a JDK 17 temurin which is not found
Querying Disco API for JDK versions: https://api.foojay.io/disco/v3.0/packages?distro=temurin&package_type=jdk&jdk_version=17&operating_system=macos&architecture=aarch64&archive_type=tar.gz&latest=available&release_status=ga&directly_downloadable=true&include_versions=false
No matching JDK version found for 17 with distribution temurin
DEBUG: JDK 17 with Temurin should be available but was not found!
DEBUG: This indicates a Disco API issue. Logging request details:
DEBUG: API URL: https://api.foojay.io/disco/v3.0/packages?distro=temurin&package_type=jdk&jdk_version=17&operating_system=macos&architecture=aarch64&archive_type=tar.gz&latest=available&release_status=ga&directly_downloadable=true&include_versions=false
DEBUG: HTTP Status:
DEBUG: Response length: 45 characters
DEBUG: Full API response: {"result":[],"message":"No package(s) found"}
DEBUG: Expected pattern: "java_version":"17.x.x"
DEBUG: Actual matches:
I often had 503 errors in the past days, so I implemented a retry strategy.
We also had the failure where most packages were not returned anymore.
Is there anything we can do to help stabilise the infrastructure ? What could cause such instability ?
If there's no way to improve it, I'll have to find another solution for Maven.