Remove repository config caching logic - #410
Draft
alecbcs wants to merge 4 commits into
Draft
Conversation
Signed-off-by: Alec Scott <alec@llnl.gov>
cmelone
previously approved these changes
Aug 19, 2026
Comment on lines
+30
to
+32
| Fetched fresh on every event so all replicas always see the current | ||
| destination repo; a single contents-API call is well within App | ||
| installation rate limits. |
Member
There was a problem hiding this comment.
this can be simplified, not sure if the last clause is needed in the codebase
Comment on lines
+48
to
+49
| # we don't want to raise this as a RepoConfigError because telling users | ||
| # about the absence of the config will create noise and confusion |
Member
There was a problem hiding this comment.
-- because they may have installed the app but have not submitted a config file yet
Signed-off-by: Alec Scott <alec@llnl.gov>
alecbcs
force-pushed
the
remove/repository-config-cache
branch
from
August 20, 2026 20:37
31f8cb3 to
f0d7ae0
Compare
Signed-off-by: Alec Scott <alec@llnl.gov>
alecbcs
force-pushed
the
remove/repository-config-cache
branch
from
August 21, 2026 02:18
85b8c9c to
7f98e31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For a long time, the one sticking point when thinking about how to scale Hubcast to multiple Kubernetes replicas had been the repository config cache. Caching repository configs seemed like an obvious win. But with multiple replicas, only one replica would receive the config update event and the others could keep syncing events against a stale config for up to 30 minutes.
Ultimately the simpler answer is that the cache isn't worth its complexity. GitHub grants apps 5000 requests/hr per installation and we're no where near that limit. Additionally we already hit GitHub on every event either by responding to a comment or by fetching a packfile so removing the cache doesn't introduce another point of failure.
As such this PR proposes the kinda radical idea to remove the repository config cache entirely. Instead every event reads the current config so all replica pods are always consistent.
If we ever get close to the 5,000 req/hr/installation limit we could swap to using conditional requests. GitHub returns an ETag header on API responses; sending it back via If-None-Match yields a 304 "Not Modified" when the content hasn't changed. Also 304 responses don't count against the rate limit. Since repo configs change rarely, nearly all config fetches would be 304 responses and wouldn't count against our limit.