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

Refactor: Datasource classes #8647

Closed
rarkins opened this issue Feb 11, 2021 · 5 comments · Fixed by #14193
Closed

Refactor: Datasource classes #8647

rarkins opened this issue Feb 11, 2021 · 5 comments · Fixed by #14193
Assignees
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code

Comments

@rarkins
Copy link
Collaborator

rarkins commented Feb 11, 2021

I would like to consider class-based datasources to achieve better DRY than today plus some enhance features.

Currently datasources are somewhat declaration-based and the datasource index then handles things, e.g. caching, default registryUrls, etc. This type of stuff should remain although maybe much of the datasource index's logic will move into the base datasource class.

We definitely want error handling shared as much as possible.

Caching would be another aspect done automatically.

Something new: our http layer returns an auth variable today to indicate that the request was auth'd. In future I think we may return an auth fingerprint (e.g. sha256 the authorization header content and then use the first 5 chars). This would then be used in conjunction with caching, to allow private lookup caching.

Need to discuss how to do this. Start small and then enhance it?

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code status:requirements Full requirements are not yet known, so implementation should not be started labels Feb 11, 2021
@JamieMagee
Copy link
Contributor

My initial attempt at converting cdnjs, clojure, and crate is in #6747. It needs rebasing, but it shows how we can achieve this datasource by datasource instead of having to do a 'big bang' approach.

@rarkins
Copy link
Collaborator Author

rarkins commented Feb 13, 2021

@JamieMagee I understand that PR better now. Perhaps worth refreshing and merging after @viceice refactors our modules to statically load instead of dynamic?

@viceice viceice mentioned this issue Feb 13, 2021
6 tasks
@rarkins rarkins added status:in-progress Someone is working on implementation and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Mar 7, 2021
@viceice
Copy link
Member

viceice commented Feb 15, 2022

Are we really done here?

@JamieMagee
Copy link
Contributor

There's some cleanup to do, but the majority of the work is now done.

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 31.82.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants