Conversation
…kages by owning service
roychying
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
September 22, 2026 16:49
behinddwalls
requested changes
Sep 22, 2026
behinddwalls
left a comment
Collaborator
There was a problem hiding this comment.
tbh, i don't think it makes sense to separate them like this... each storage extension need to hold on to its schema in itself... the way i think of by moving the extension inside gateway and orchestrator with the split view, not just for storage but for all the extensions i would say.. that way it will have 1:1 mapping for things which are being used with-in gateway and orchstrator, we can do storage first and then others after that
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.
Why?
The gateway and orchestrator own disjoint halves of this schema. That is already the documented design —
doc/rfc/submitqueue/status-list-api.mdsays:schema/README.mdgroups the same four tables under a "Gateway request read model" heading, and the code agrees exactly: the gateway tree reaches for those fourStorageaccessors and no others, the orchestrator tree for the other nine, with no crossover through the sharedcore/helpers.But the split exists only in prose. The whole schema is one filegroup, so a deployment that gives each service its own database has no way to provision just that service's tables — it gets all 13 in both, including tables the service
never reads. This makes the ownership line expressible as a build target.
What?
Two Bazel packages, by owning service:
schema/readmodel/— gateway read model: the append-only request log plus the three materialized projections (4 tables).schema/pipeline/— orchestrator pipeline working state: requests, batches, builds, changes, speculation (9 tables).:schemaremains the union and remains the default, so a deployment colocating both services on one database is unaffected. The subpackages are for deployments that separate them; they do not assert that anyone must.Ownership is expressed by file location rather than a list in
BUILD.bazel, so adding a table means putting its.sqlin the owning package — nothing to keep in sync, and a misfile is visible in the diff path. A checked-in list would silently default a forgotten table into the wrong group, which downstream means creating it in the wrong database.Three call sites globbed
*.sqlat a single level and had to learn the tree:test/testutil/schema.go—ApplySchemawalks recursively, so callers keep passing the schema root. Log lines now show the path relative to that root.tool/linter/queueshard— newfindSchemaFileswalks each schema root.schemaRootsis unchanged, so a future subpackage needs no linter edit.Makefile— thelocal-init-submitqueue-schemasglob.Test Plan
bazel buildof the schema packages and every integration, e2e, testutil and linter dependent — clean.queueshardreports "All 25 tables are shardable", identical tomain, so nothing fell out of the linter's view.make check-gazelleclean;gofmt,go vet, andgo test ./tool/linter/queueshard/...pass.ApplySchema's walk verified against a built runfiles tree — where the subdirectories are real directories with symlinked leaf files — and finds all 13.Issue