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

feat: repositoryCache #6589

Merged
merged 16 commits into from Jun 29, 2020
Merged

feat: repositoryCache #6589

merged 16 commits into from Jun 29, 2020

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Jun 25, 2020

Adds a new capability to cache manager extract results per-branch. If the commit as well as the config haven't changed then the previously extracted results are reused.

@rarkins rarkins requested a review from viceice June 25, 2020 21:28
@rarkins rarkins marked this pull request as draft June 27, 2020 10:24
@rarkins rarkins mentioned this pull request Jun 28, 2020
@rarkins rarkins added this to In progress in Performance Improvement Jun 28, 2020
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we try to have all caches with nearly same API and behavior? 🤔

lib/workers/repository/init/config.ts Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Jun 28, 2020

Why using json files instead of global cache?

I think a checkbox in master issue for repo cache clean on next run makes sense.

@rarkins
Copy link
Collaborator Author

rarkins commented Jun 28, 2020

Why using json files instead of global cache?

From a "layered security" point of view, the global cache should contain as little provate information as possible, in case there were ever a leak. I renamed it to "package cache" recently to reflect that, and will keep trying to tighten it up. Whereas this repo cache should have a better level of protection in the app (I will ensure it's copied and erased after each repo).

For typical users, these JSON files are essentially going to sit alongside the global/package cache in ${config.cacheDir}/renovate/.

I think a checkbox in master issue for repo cache clean on next run makes sense.

Yes, that would be a good feature to add, but I won't do it right away. For now the feature will default to false anyway.

# Conflicts:
#	lib/workers/repository/init/config.ts
#	package.json
@rarkins rarkins marked this pull request as ready for review June 29, 2020 12:02
@rarkins rarkins requested a review from viceice June 29, 2020 12:25
@rarkins
Copy link
Collaborator Author

rarkins commented Jun 29, 2020

@viceice ready to merge this now with limited API but using types instead. please let me know if you spot any problems

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with it for now, as it's experimental and disabled by default. We can optimize the api later.

Just some small suggestions.

lib/workers/repository/process/extract-update.ts Outdated Show resolved Hide resolved
lib/util/cache/repository/index.ts Outdated Show resolved Hide resolved
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@rarkins rarkins merged commit d70b8c1 into master Jun 29, 2020
Performance Improvement automation moved this from In progress to Done Jun 29, 2020
@rarkins rarkins deleted the feat/repository-cache branch June 29, 2020 13:51
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 21.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants