chore(resource): remove the unused resource-config cache#1766
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR removes the resource configuration repository and YAML model, simplifies ChangesResource dependency cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 29564793022Coverage increased (+0.1%) to 46.11%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
What
Removes the
ResourcesRepositoryblob cache, which is dead code.InitCacheloaded the resource config into memory and refreshed it every 2 minutes, butnothing ever read it:
GetAllandGetRelationsForNamespacehave no callers, andresource.Serviceheld theConfigRepositorybut never called it.internal/store/blob/resources_repository.go, theConfigRepositoryinterface,the
YAMLtype, and the generated mock; dropped theconfigRepositoryfield/param fromresource.Service; removed theInitCache/refresh wiring fromStartServer.What is NOT changed
The boot-time resource config flow is untouched.
MigrateSchemastill seeds the SpiceDBschema from the config, and the permission delete-guard still reads it — both go through
SchemaConfigRepository, which reads the blob bucket directly and never used this cache.StartServernow passes that bucket straight toNewSchemaConfigRepository.No behavior change; pure dead-code removal. Build,
go test ./core/resource/... ./cmd/... ./internal/store/blob/..., and lint all pass.