-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(stores)!: use backend storage references instead of configs #3697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the direction this is going in, but have a general comment about some class structure here now that it seems these StoreConfig
classes are combining functionality more than before.
If this is out of scope of this PR, let's open up a follow up issue to track some of this possible refactoring. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall this is really nice! just one nit so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
c232167
to
32d9e39
Compare
ok CI is green. landing! |
This PR changes configurations in a backward incompatible way.
Run configs today repeat full SQLite/Postgres snippets everywhere a store is needed, which means duplicated credentials, extra connection pools, and lots of drift between files. This PR introduces named storage backends so the stack and providers can share a single catalog and reference those backends by name.
Key Changes
storage.backends
toStackRunConfig
, register each KV/SQL backend once at startup, and validate that references point to the right family.storage.stores
with lightweight references (backend + namespace/table) instead of full configs.Migration
Before:
After:
Provider configs follow the same pattern—for example, a Chroma vector adapter switches from:
to:
Once the backends are declared, everything else just points at them, so rotating credentials or swapping to Postgres happens in one place and the stack reuses a single connection pool.