Repository navigation
refactor(components): promote component store to database-agnostic dbstore package - #1404
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors and renames the production Cloud Spanner persistence driver package from spanner to dbstore (pkg/components/store/dbstore), renaming the SpannerStore struct to Store and updating all associated tests, build files, imports, and documentation. Feedback on these changes suggests updating an unimplemented error message in GetPlatformHealth to refer to Store instead of SpannerStore, and correcting a file path reference in the README.md to point to ownership_fence.go instead of fence.go.
9be3002 to
f9f1c04
Compare
f9f1c04 to
77b3754
Compare
8f3fe9b to
714c678
Compare
…store package Rename pkg/components/store/spanner to pkg/components/store/dbstore, rename SpannerStore/NewSpannerStore to Store/New, and update experiment_state_server, health_service, and component documentation to import the database-agnostic dbstore package. TAG=agy CONV=5d43b8db-2f9c-4908-a311-376a2b7dfdf0
714c678 to
0ffa88a
Compare
There was a problem hiding this comment.
LGTM — clean mechanical rename that matches the description; Bazel targets and callers are updated consistently. Left two non-blocking nits about stale SpannerStore references in comments.
…omote-cms-store # Conflicts: # cmd/experiment_state_server/main.go
Qualify store.Store in the dbstore compile-time assertion comment and update remaining SpannerStore / spanner_store.go references across test headers, store comments, and api/buf.yaml. Comment link: #1404 (comment) Comment link: #1404 (comment) TAG=agy CONV=5d43b8db-2f9c-4908-a311-376a2b7dfdf0
Summary
Promote
pkg/components/store/spannerto the database-agnosticpkg/components/store/dbstorepackage (dbstore.Store/dbstore.New) now that all component queries, mutations, and transactions run throughstorage.Storage.Key Changes
dbstorePackage (pkg/components/store/dbstore): Movepkg/components/store/spannertopkg/components/store/dbstore, renamingSpannerStore/NewSpannerStoretoStore/Newwhile preserving Git rename similarity across all source and test files.cmd/experiment_state_server,cmd/health_service,pkg/components/README.md): PointinitCMS,HealthServiceLazySpannerWrapper.ComponentsProvider, Bazel targets, and package documentation atpkg/components/store/dbstore.Assumptions
pkg/components/store/dbstoretests still exercisedbstore.Storeagainst the Spanner emulator in this PR — making thedbstoretest harness backend-neutral across Spanner and PostgreSQL is split into the follow-up test PR in this stack —dbstore_testremains Spanner-emulator-backed until that follow-up lands.Verification
bazel test //pkg/components/... //cmd/experiment_state_server/... //cmd/health_service/... //internal/storage/...(Passed)./.githooks/pre-commit(Passed)TAG=agy
CONV=5d43b8db-2f9c-4908-a311-376a2b7dfdf0