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 key uses repo.org only if USE_CONFIG_FROM_PULL_REQUEST is disabled. #775

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mhflink
Copy link

@mhflink mhflink commented Nov 21, 2024

Change the cache key to repo.org if only global mergeable configuration can be used.

This logic applies only in a combination of

  • USE_CONFIG_FROM_PULL_REQUEST = false
  • USE_ORG_AS_DEFAULT_CONFIG = true
  • USE_CONFIG_CACHE = true

Before this change, mergeable would already cache the org config for each repo, but would always use the org/repo cache key. Unfortunately if only global repository is used, this leads to a lot of cache misses if PRs are opened across many repositories within the organization.

In our case, the current behavior let to us being rate-limited by GitHub.

Change the cache key to repo.org if only global mergeable configuration
can be used.

Before this change, mergeable would already cache the org config for
each repo, but would always use the org/repo cache key. Unfortunately
if only global repository is used, this leads to a lot of cache misses
if PRs are opened across many repositories within the organization.
@mhflink mhflink changed the title Cache key uses repo.org only if USE_CONFIG_FROM_PULL_REQUEST is disabled. feat: Cache key uses repo.org only if USE_CONFIG_FROM_PULL_REQUEST is disabled. Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants