Remove repository config caching logic - #410
Merged
Merged
Conversation
cmelone
previously approved these changes
Aug 19, 2026
alecbcs
force-pushed
the
remove/repository-config-cache
branch
2 times, most recently
from
August 21, 2026 02:18
85b8c9c to
7f98e31
Compare
Signed-off-by: Alec Scott <alec@llnl.gov>
Signed-off-by: Alec Scott <alec@llnl.gov>
Signed-off-by: Alec Scott <alec@llnl.gov>
Signed-off-by: Alec Scott <alec@llnl.gov>
alecbcs
force-pushed
the
remove/repository-config-cache
branch
from
August 26, 2026 17:40
7f98e31 to
94be205
Compare
alecbcs
marked this pull request as ready for review
August 26, 2026 17:40
Signed-off-by: Alec Scott <alec@llnl.gov>
cmelone
approved these changes
Aug 26, 2026
cmelone
left a comment
Member
There was a problem hiding this comment.
this is a nice simplification
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.