fix(config): validate rpc cache redis connection at startup#375
Conversation
Greptile SummaryThis PR closes a gap in the config validation pipeline where Key changes:
Notable observations:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Config Validation Start] --> B{cache.enabled?}
B -- No --> C[Skip RPC cache validation]
B -- Yes --> D[validate_rpc_cache]
D --> E{cache.url present?}
E -- No --> F[Error: no Redis URL configured]
E -- Yes --> G{URL starts with redis:// or rediss://?}
G -- No --> H[Error: invalid cache_url format]
G -- Yes --> I[test_redis_connection]
I -- OK --> J[No errors]
I -- Err --> K[Error: RPC cache Redis connection failed]
F --> L[Errors propagated to startup validator]
H --> L
K --> L
J --> M[Startup proceeds]
L --> N[Startup blocked]
Last reviewed commit: 9757514 |
|
Added connection failure test using unreachable port and clarified |
|
@dev-jodee done. Sanitized both error messages — removed cache_url from |
|
✅ Fork external live tests passed. fork-external-live-pass:2a98ccfdeb77133586fcc7aede5f5357c86f89d0 |
2c9d7f2
into
solana-foundation:release/2.2.0
|
Thanks for merging, @dev-jodee. Is there any other work here where I can help you? I'm free these days, so if there's something, I'd be happy to assist |
|
Hey @raushan728 thanks for all the work, I've created this issue if you want to take a crack at it #377 |
|
@dev-jodee I can do but I really need your guidance and also how I show you my work — can I share a pdf or markdown with you? |
config.kora.cache was completely skipped during config validation —
operators could pass kora config validate with a bad Redis URL that
only fails at runtime. Now mirrors the existing UsageLimitConfig
cache validation pattern.