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(cache): redis global cache #6315

Merged
merged 12 commits into from
May 25, 2020
Merged

feat(cache): redis global cache #6315

merged 12 commits into from
May 25, 2020

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented May 24, 2020

Adds redis as an option for the global cache. global.renovateCache will be refactored later.

docs/usage/self-hosted-configuration.md Outdated Show resolved Hide resolved
lib/config/common.ts Outdated Show resolved Hide resolved
rarkins and others added 2 commits May 24, 2020 16:59
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@rarkins rarkins requested a review from viceice May 24, 2020 19:02
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 think we should change the redis libr to handy-redis.
It has better typescript support and recent releases.

I can do the switch.

@rarkins rarkins requested a review from viceice May 25, 2020 07:04
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.

some type safety

lib/util/cache/global/redis.ts Outdated Show resolved Hide resolved
lib/util/cache/global/redis.ts Outdated Show resolved Hide resolved
lib/util/cache/global/redis.ts Outdated Show resolved Hide resolved
lib/util/cache/global/redis.ts Outdated Show resolved Hide resolved
lib/util/cache/global/redis.ts Outdated Show resolved Hide resolved
lib/util/cache/global/redis.ts Outdated Show resolved Hide resolved
rarkins and others added 4 commits May 25, 2020 09:17
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@rarkins rarkins requested a review from viceice May 25, 2020 08:05

export function end(): void {
try {
client?.redis?.end(true); // TODO: Why is this not supported by client directly?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@viceice I wonder if I'm missing something here. Renovate wouldn't exit without the redis client being cleaned up, so I can't understand why it is not a first-class function in handy-redis.

Copy link
Member

Choose a reason for hiding this comment

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

strange, client.quit() is there

@rarkins rarkins merged commit 8ed1eb0 into master May 25, 2020
@rarkins rarkins deleted the feat/redis-cache branch May 25, 2020 08:23
@@ -85,6 +85,7 @@ export async function start(): Promise<0 | 1> {
await repositoryWorker.renovateRepository(repoConfig);
}
setMeta({});
globalCache.cleanup(config);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should call this in finally and use redis.quit instead of end

redis/node-redis#714

@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 20.3.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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants