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
Cache pom.xml content of non-SNAPSHOT versions to improve Maven cache efficiency #6572
Comments
I would be very happy to receive any PR that helps improve this experience for yourself and others. If so, I recommend we discuss the choices of approaches here before you start coding, just to make sure the final implementation is acceptable. First of all I'd like to make sure I understand what is causing so many requests. Is it because you have a lot of dependencies, or because certain dependencies have a lot of available versions available? i.e. if we have an I'd also like you to elaborate a bit more about your caching idea, as I'm not sure I understand it. FYI I also created #6573 as I think that's a separate approach that may help too. |
It's because certain dependencies have a lot of available versions available. On second though the Currently caching happens in the To improve caching, I suggest to introduce some I'm going to rename this issue name accordingly. |
If defined in env, this will bypass pom checks and instead rely on the metadata alone. Related: #6591, #6572
I added an experimental workaround in 5b24943 If you define |
Awesome ! |
@zharinov let's work out how to address this. First of all, should the metadata file always be "correct", and the only way it's not correct is due to some type of mistake in the registry's data? Even if it's only due to a mistake, we then need to evaluate if it happens often enough that we should protect against it anyway (like we have tried to do). Or if for example we think it's ok to require users to fix it themselves with Finally, if we still need to protect against it, we need to work out the best approach. One example is "lazy" verification as suggested in #6591. This would mean a significant refactoring of our lookup/evaluate logic so we'd do something like this instead:
|
Seems like this is solved |
What would you like Renovate to be able to do?
We have around 350 to 450 -SNAPSHOT versions of a dozen internal artifacts,
and it takes Renovate 2 hours to analyze a single git repository containing a
pom.xml
with dependencies to those artifacts.Hence, we would like Renovate cache mechanism to be improved in order to limit numerous
pom.xml
downloads & parsing.Describe the solution you'd like
Based on datasource/maven/index.ts code source, it looks like currently Renovate retrieve
maven-metadata.xml
files in order to list all existing versions of an artifact. It also uses a cache with a TTL of 10min.We suggest to improve the caching mechanism in order to avoid unncessary HTTP calls.
This could be done by using the<lastUpdated>
field of maven-metadata.xml to only downloadpom.xml
files if they were updated since Renovate last downloaded them and stored them in cache.The idea would be to cache all non-SNAPSHOT versions
pom.xml
content.Describe alternatives you've considered
Our Renovate instance use JFrog Artifactory as its main registry.
We considered playing with its zone / repository system to limit the number of artifacts listed,
or even simply purging old -SNAPSHOT versions.
This may be a valid workaround for us on short term, but I thought it may still be worth suggesting this feature.
The text was updated successfully, but these errors were encountered: