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
Move registryUrls handling into datasource #6533
Comments
@JamieMagee does this conflict with any of the ideas you've had about Datasource classes? |
First step we need to do before moving this to |
|
Datasources can optionally export a new field
|
This also gives us the possibility to record which registry/registries that results were found on, although I haven't thought of a use for that. |
I don't think my work with datasources should be affected by this. Rather, I think it might actively help us to achieve this. I have been sitting on the conversion of the cndjs for over a week now. I should tidy it up and send it out for (draft) PR and get some feedback on the approach. |
Haha, I was also starting with |
It's actually not the perfect one for me to start with though because it's one of the datasources that is best doing its own caching instead of delegating it to the main datasource. |
Waiting on #6538 |
datasource implementations can export a `registryStrategy` field that is used by the datasource index/controller to manage the approach: - ‘first’: send only the first registryUrl - ‘hunt’: return the first successful result - ‘merge’: try all registries and combined/deduplicate the results Closes #6533
🎉 This issue has been resolved in version 21.13.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What would you like Renovate to be able to do?
Shift the complexity of trying multiple registries into the shared datasource logic instead of re-implemented into each datasource type.
Describe the solution you'd like
Default behavior for multiple datasources should be "hunt" - i.e. try the registryUrls in order and return as soon as there's one result. An alternative would be "merge" or "combine" - i.e. try them all and combine the results. If a datasource needs "combine" it would be an exported configuration option.
Describe alternatives you've considered
Today each datasource implements/re-implements hunt or merging logic on its own.
Additional context
If each datasource's
getReleases()
logic needs to take into consideration only oneregistryUrl
then it will also improve our caching ability for times when there's a mix of public and private results.The text was updated successfully, but these errors were encountered: