Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(datasource/maven): make cache key extractedVersion specific #32658

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

Shegox
Copy link
Contributor

@Shegox Shegox commented Nov 21, 2024

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 and versionOrig (if available) in the cache key to ensure no mixup.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins added this pull request to the merge queue Nov 21, 2024
Merged via the queue into renovatebot:main with commit 6e36262 Nov 21, 2024
39 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 39.25.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants