feat(router): entity caching with L1/L2, shadow mode, and per-request cache controls (3/6)#2945
Conversation
Dependency ReviewThe following issues were found:
Vulnerabilitiesdemo/go.modOnly included vulnerabilities with severity high or higher. OpenSSF ScorecardScorecard details
Scanned Files
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Router-nonroot image scan failed❌ Security vulnerabilities found in image: Please check the security vulnerabilities found in the PR. If you believe this is a false positive, please add the vulnerability to the |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## milinda/entity-caching-1b-demo #2945 +/- ##
===================================================================
+ Coverage 41.43% 57.64% +16.21%
===================================================================
Files 241 245 +4
Lines 27142 27734 +592
===================================================================
+ Hits 11247 15988 +4741
+ Misses 14636 10165 -4471
- Partials 1259 1581 +322
🚀 New features to boost your workflow:
|
eaced7f to
41292d0
Compare
0239d20 to
3cc3d77
Compare
3cc3d77 to
b8d95ae
Compare
1cf7860 to
e5ea054
Compare
9cff599 to
49e0e69
Compare
4bce8f5 to
43b3919
Compare
4f4af69 to
ba77a82
Compare
43b3919 to
1ee462b
Compare
ba77a82 to
c88671f
Compare
1ee462b to
c88671f
Compare
|
Auto-closed as merged by a force-push mishap (stack branches momentarily collapsed onto one commit). Replaced by #2955 — same content and stack position. |
Part 2 of 4 — split out from #2777 (
jensneuse/entity-caching-v2). Stacked on #2944.What's included
factoryresolvermapping of proto cache config to planner metadata, graph server wiring, per-request cache-control headers (graphql_handler), plan generator nil guard, config schema + defaultstestdata/config.jsonExcluded
router/internal/graphiql/graphiql.html(playground embed) ships in part 3/4 — this PR runs with the previous embedded playground.Verification
go build ./...passes inrouter/anddemo/;go vet ./entity_caching/...passes inrouter-tests/.🤖 Generated with Claude Code
Update: test subgraphs coupled to demo
The six entity_caching test subgraphs were moved into
demo/pkg/subgraphs/cachetest/and are imported by the suite — same coupling pattern as the main suite (testenv→demo/pkg/subgraphs). router-tests no longer carries subgraph implementations. Pure move: schemas/resolvers/data unchanged,make composereproduces an identicaltestdata/config.json, full suite green.Diff cleanup
HasNonDefaultExporter+ bootstrap guard) moved to the benchmark/tooling PR (6/6) — it is a general tracing perf change motivated by benchmarking, not entity caching.demo/pkg/subgraphs/projects/generatedproto churn — leftoverreservedmarkers from fields added and removed during development; the GraphQL schema is unchanged.router/entity-caching.config.yaml(unreferenced sample) androuter-tests/entity_caching/graph.yaml(duplicated the subgraph list thatcmd/composeowns; nothing consumed it).generatetarget moved todemo/Makefile(generate-cachetest) next to the subgraphs it regenerates.Rebased onto main (2026-06-10)
63fa1c88— PR feat: add caching to loader graphql-go-tools#1259 with v2.4.4 merged in (branchentity-caching-v244-merge; conflicts inresolve/context.go+resolve/resolvable.goresolved keeping caching fields + theactualListSizes→typeNameStatsrename). Needed because main's router uses v2.4.4 APIs (TypeNameStats) that the PR head lacked.MergeValuesWithPathreturn 2 values; main's flushwriter call site adapted.cmd/composereplaced with awgc-based Makefile target (+ restoredgraph.yamlinput) sincecomposition-gowas removed on main (chore: remove composition-go #2830);testdata/config.jsonregenerated with main's composition.ExecutionOptions.Cachingwiring in the WS path).