fix(datasource/maven): make cache key extractedVersion specific #32658
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
I think I found a small regression with #32540 with one of our internal package from an internal maven registry.
It seem that if you use both the full version and extracted version of a dependency (e.g.
1.2.3-internal-5
&1.2.3
) there is a high chance (not on every run) that Renovate will use the same value for both updates (50/50 chance if it is the extracted one or the full one).My gut feeling is this is some caching & race-condition.
After making the cache key dependent on both version and versionOrig in https://github.com/renovatebot/renovate/pull/32540/files#diff-e51e63b36811d835c0f1a07638208603e43d5b223bf45b073b56cc8de7dccf10R257 I could no longer reproduce it with our internal repository
I wasn’t able to reproduce it yet with a public package (which is weird again), but will then make sure to open a discussion/issue. (This is my current testing PR, which for whatever reason behaves correctly: Shegox/spring-boot-pom#2).
Context
This PR adds as an additional cache key the (extracted) version. While this will create a few more cache entries (and cache misses) it will ensure that we include both
version
andversionOrig
(if available) in the cache key to ensure no mixup.Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: