setup-java/__tests__
Julien Dubois f4bfb3ddea
Report concrete versions for floating Oracle JDK downloads (#1213)
* Fix floating Oracle JDK version resolution

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Update generated distribution bundles

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Harden floating artifact cache identity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Regenerate setup bundle after cache hardening

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Temporarily enable hosted full validation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Export hosted formatting results

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Apply repository formatting

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Run hosted validation after formatting

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Correct floating version regression tests

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Remove temporary validation wiring

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Cache checksum-less floating artifacts by their response fingerprint

Oracle and Oracle GraalVM do not always publish a `.sha256` sibling next
to a `/latest/` artifact. Those floating releases were excluded from both
the resolution cache and the JDK cache, so `cache-jdk` users lost caching
entirely for them.

A floating URL is a constant string, so it cannot serve as a cache
identity on its own — a stale entry would be reused forever. Instead,
derive a validator from the headers of the HEAD request that already
resolves the artifact: the ETag when present, otherwise `Last-Modified`
combined with `Content-Length`. Republishing changes the validator, which
changes the cache key, so a new build is downloaded rather than masked.

`getJdkReleaseIdentity` now falls back to that fingerprint before the
URL, and the floating cache gates ask whether the release has a stable
identity (checksum or fingerprint) rather than a checksum specifically. A
floating release with neither is still left uncached.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bruno Borges <brborges@microsoft.com>
2026-08-05 11:57:27 -04:00
..
cache Restore dependency and wrapper caches concurrently (#1174) 2026-07-29 13:41:24 -04:00
data Remove legacy Adopt distributions in v6 (#1185) 2026-07-31 15:48:18 -04:00
distributors Report concrete versions for floating Oracle JDK downloads (#1213) 2026-08-05 11:57:27 -04:00
auth.test.ts Optimize Maven configuration warm path (#1182) 2026-07-30 15:09:35 -04:00
benchmark-cache-restore.sh Restore dependency and wrapper caches concurrently (#1174) 2026-07-29 13:41:24 -04:00
cache-feature.test.ts Optimize Temurin tool-cache fast path with lazy loading (#1179) 2026-07-29 17:53:33 -04:00
cache.test.ts Add dependency cache path overrides (#1175) 2026-07-29 14:43:55 -04:00
check-dir.sh Extract repeated directory-check assertions into check-dir.sh helper (#1127) 2026-07-15 11:14:40 -04:00
checksum.test.ts Verify JDK downloads with vendor checksums (#1167) 2026-07-29 04:43:56 -04:00
cleanup-java.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
gpg.test.ts Migrate to ESM and upgrade dependencies (#1078) 2026-07-08 10:15:00 +01:00
java-package-contract.test.ts chore(deps): bump brace-expansion from 5.0.8 to 5.0.9 (#1202) 2026-08-04 21:15:15 -04:00
java-platform-contract.test.ts Remove legacy Adopt distributions in v6 (#1185) 2026-07-31 15:48:18 -04:00
jdk-cache.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
jdk-resolution-cache.test.ts Report concrete versions for floating Oracle JDK downloads (#1213) 2026-08-05 11:57:27 -04:00
maven-args.test.ts Migrate to ESM and upgrade dependencies (#1078) 2026-07-08 10:15:00 +01:00
maven-xml-loading.test.ts Optimize Maven configuration warm path (#1182) 2026-07-30 15:09:35 -04:00
problem-matcher.test.ts Add an option to disable Java problem matchers (#1133) 2026-07-16 11:28:10 -04:00
retrying-http-client.test.ts Consolidate JDK metadata retry handling (#1162) 2026-07-29 00:09:37 -04:00
setup-java.module-loading.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
setup-java.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
toolchains.test.ts Optimize Maven configuration warm path (#1182) 2026-07-30 15:09:35 -04:00
util-install.test.ts Report concrete versions for floating Oracle JDK downloads (#1213) 2026-08-05 11:57:27 -04:00
util.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
verify-java.sh Report concrete versions for floating Oracle JDK downloads (#1213) 2026-08-05 11:57:27 -04:00