Files
renovate/lib/modules/datasource/java-version
Sebastian Poxhofer a3d265d45d refactor(datasource): stop double-caching releases at the index level (#46103)
* refactor(datasource): stop double-caching releases at the index level

15 datasources set `caching = true`, which makes the registry wrapper in
`lib/modules/datasource/index.ts` store every `getReleases` result under
`datasource-releases-<id>` for 15 minutes, while their own `cached()`
wrapper already stores the same result under `datasource-<id>` with a
longer TTL and stale-fallback. Drop `caching` from those 15; the four
that rely on the index cache alone (dart-version, flutter-version,
maven, pypi) keep it.

`caching` is documented as requiring the datasource to return the
`isPrivate` flag, and none of these 15 ever set it, so the index layer
was caching private results unconditionally. The remaining `cached()`
layer honours `cachePrivatePackages` as before.

Also fix two cache-key/registry defects found alongside:

- `galaxy-collection` declares `registryStrategy = 'hunt'` but keyed its
  cache on the package name only, so a `null` from the first hunted
  registry was replayed for the second one. The registry URL is now part
  of the key, which invalidates existing entries once.
- `typst` ignores `config.registryUrl` and always reads its default
  registry, so it now sets `customRegistrySupport = false`. A configured
  `registryUrls` for typst is now warned about and ignored instead of
  being silently dropped.

* Merge branch 'main' into secustor/refactor/datasource-remove-index-caching
2026-09-24 21:07:52 +00:00
..

This datasource returns releases from the Adoptium API.

It uses image_type=<jre|jdk>&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC as filter parameters. This means that the datasource finds:

  • JRE or JDK images
  • with a JDK project
  • which have the General Availability status And finally, the results are sorted in descending order.

When Renovate contacts the Adoptium API, it fetches 50 pages. Each page has 50 items. So 2500 items are fetched from the API in total.

If you want to get releases which come with the JDK, set the packageName to java-jdk or java.

If you want to get releases which come with the JRE, set the packageName to java-jre. LTS releases of Java will have a version that comes with the JRE. Non-LTS releases may not always include the JRE.

Additionally you can filter by os and architecture. For example, to get only Linux x64 jre releases, you can pass java-jre?os=linux&architecture=x64 as packageName. See https://api.adoptium.net/q/swagger-ui/#/Release%20Info/getReleaseVersions for allowed values.

Use java?system=true to let renovate detect the current os and architecture.