Skip to content

MintMaker: Deploy Redis for Renovate cache #6085

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

querti
Copy link
Contributor

@querti querti commented Apr 9, 2025

Redis will be used by renovate PLRs to store and retrieve cache in order to improve performance and decrease the number of API calls. Connection is not password protected, but a network policy exists to restrict access only to pods in the "mintmaker" namespace. I think that a password is unnecessary since it would complicate the deployment and no sensitive or important data will be stored in the database. The persistent volume exists to back up the data so that Redis can reload it after restart.

The memory limit was chosen somewhat arbitrarily, but we can increase it if high use is observed over time. OOM errors should not happen since Redis limit is configured lower than Openshift limit.

Copy link

openshift-ci bot commented Apr 9, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved label Apr 9, 2025
@querti querti force-pushed the mintmaker-redis-cache branch from ef7075c to e22bfec Compare April 9, 2025 13:03
@querti querti marked this pull request as ready for review April 9, 2025 13:23
@openshift-ci openshift-ci bot requested review from FernandesMF and staticf0x April 9, 2025 13:23
@querti querti requested review from qixiang and nvtnlucie April 9, 2025 13:23
@querti
Copy link
Contributor Author

querti commented Apr 10, 2025

/retest

@staticf0x
Copy link
Contributor

This looks great! My only question is whether you tested it on some repos (especially Go based) and if you have any numbers/observations if this cache reduces the amount of HTTP requests and how much.

@querti
Copy link
Contributor Author

querti commented Apr 10, 2025

This looks great! My only question is whether you tested it on some repos (especially Go based) and if you have any numbers/observations if this cache reduces the amount of HTTP requests and how much.

I tried checking how the x-ratelimit-used header number changes based on whether the cache is used and whether the repos have already been cached. The results have been pretty odd so far - many DB records get crated in the cache, for a file like https://github.com/querti/renovate-tests/blob/master/go.mod as many as 250. On subsequent runs, I can observe cache hits, so the cache is functioning properly. But this doesn't correspond to the values of x-ratelimit-used, which are 6-20 regardless of whether cache is even used. This makes me think that Go updates don't use github API at all and instead query Github directly, which doesn't count toward the API limit. The limits being hit may simply come from regular git operations - many PRs being created and managed by renovate. Enabling go exacerbated this situation since this manager usually creates many PRs. Rate limit graph on the Mintmaker dashboard sort-of suggests it as well, rate limits are all over the place even on a non-go day.

This is only the global cache, so enabling Redis for repository cache should hopefully improve the rate-limiting issue. I think that following this approach is still the best path forward, even if the results haven't been very promising so far.

@querti
Copy link
Contributor Author

querti commented Apr 10, 2025

/retest

@staticf0x
Copy link
Contributor

Great, thanks for the comment. There might be many factors, Renovate uses GraphQL for some GitHub API operations, but REST for some other (I think), and AFAIK we also don't know how the rate limit is reset on GitHub's side, but if there are hits on the cache, that's a good sign imo.

Copy link

openshift-ci bot commented Apr 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: querti, staticf0x

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@querti
Copy link
Contributor Author

querti commented Apr 14, 2025

/retest

@querti querti force-pushed the mintmaker-redis-cache branch 6 times, most recently from 51bf3c7 to 8fbc68c Compare April 15, 2025 12:53
Redis will be used by renovate PLRs to store and retrieve cache in order
to improve performance and decrease the number of API calls. Connection
is not password protected, but a network policy exists to restrict
access only to pods in the "mintmaker" namespace. I think that a
password is unnecessary since it would complicate the deployment and no
sensitive or important data will be stored in the database. The
persistent volume exists to back up the data so that Redis can reload it
after restart.

The memory limit was chosen somewhat arbitrarily, but we can increase it
if high use is observed over time. OOM errors should not happen since
Redis limit is configured lower than Openshift limit.
@querti querti force-pushed the mintmaker-redis-cache branch from 8fbc68c to a3f9862 Compare April 16, 2025 10:02
@querti
Copy link
Contributor Author

querti commented Apr 16, 2025

/test all

2 similar comments
@querti
Copy link
Contributor Author

querti commented Apr 16, 2025

/test all

@querti
Copy link
Contributor Author

querti commented Apr 17, 2025

/test all

@querti
Copy link
Contributor Author

querti commented Apr 17, 2025

/retest

Copy link

openshift-ci bot commented Apr 17, 2025

@querti: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/appstudio-e2e-tests a3f9862 link true /test appstudio-e2e-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants