Skip to content

fix(temurin): include specificversion in ReportConfig - #9850

Merged
olblak merged 2 commits into
mainfrom
fix/9821-temurin-cache-key
Aug 7, 2026
Merged

fix(temurin): include specificversion in ReportConfig#9850
olblak merged 2 commits into
mainfrom
fix/9821-temurin-cache-key

Conversation

@loispostula

Copy link
Copy Markdown
Contributor

Fix #9821

The source cache keys entries on resource.ReportConfig() (pkg/core/cache/source.go:69), but Temurin.ReportConfig() omitted SpecificVersion.

In the reported manifest the two get_windows_x64_installer_url sources differ only by specificversion, resolved from the JDK21 vs JDK25 source. With that field dropped from the reported config both hashed to the same key, so the JDK25 source got a cache hit on the JDK21 installer URL. The latestJDKVersion sources were unaffected because they differ by featureversion, which was already reported.

ReportConfig predates the source cache. It was added in #4898 for report export, where the omission was harmless.

SpecificVersion is neither sensitive nor context-specific, so it belongs in the reported config.

Test

cd pkg/plugins/resources/temurin
go test

TestReportConfig asserts the reported config round-trips the full spec, so a future field addition that forgets ReportConfig fails the test.

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

None. The change is additive and the field carries no secrets.

Potential improvement

This is not isolated to temurin. 11 other plugins omit spec fields that change what Source() returns, so the same silent cache collision applies to them. Audit and open questions in #9849.

The source cache keys entries on ReportConfig. Omitting specificversion
made two temurin sources differing only by that field hash identically,
so the second source received the first one's value.

Fixes #9821

Signed-off-by: Loïs Postula <lois@postu.la>
@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@olblak
olblak enabled auto-merge (squash) August 7, 2026 08:37
@olblak olblak added the bug Something isn't working label Aug 7, 2026
@olblak
olblak merged commit 418f85c into main Aug 7, 2026
8 checks passed
@olblak
olblak deleted the fix/9821-temurin-cache-key branch August 7, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Caching issue with templating + temurin plugin

2 participants