llama-stack-mirror/src/llama_stack/core
Ashwin Bharambe fcf649b97a
Some checks failed
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 0s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 0s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 0s
Integration Tests (Replay) / generate-matrix (push) Successful in 3s
Test External Providers Installed via Module / test-external-providers-from-module (venv) (push) Has been skipped
Test Llama Stack Build / generate-matrix (push) Successful in 2s
Python Package Build Test / build (3.12) (push) Failing after 4s
API Conformance Tests / check-schema-compatibility (push) Successful in 11s
Python Package Build Test / build (3.13) (push) Failing after 17s
Test Llama Stack Build / build-single-provider (push) Successful in 31s
Test External API and Providers / test-external (venv) (push) Failing after 32s
Vector IO Integration Tests / test-matrix (push) Failing after 45s
Test Llama Stack Build / build (push) Successful in 47s
UI Tests / ui-tests (22) (push) Successful in 1m42s
Test Llama Stack Build / build-ubi9-container-distribution (push) Successful in 2m8s
Unit Tests / unit-tests (3.13) (push) Failing after 2m7s
Unit Tests / unit-tests (3.12) (push) Failing after 2m28s
Test Llama Stack Build / build-custom-container-distribution (push) Successful in 2m32s
Pre-commit / pre-commit (push) Successful in 3m20s
Integration Tests (Replay) / Integration Tests (, , , client=, ) (push) Failing after 3m33s
feat(storage): share sql/kv instances and add upsert support (#4140)
A few changes to the storage layer to ensure we reduce unnecessary
contention arising out of our design choices (and letting the database
layer do its correct thing):

- SQL stores now share a single `SqlAlchemySqlStoreImpl` per backend,
and `kvstore_impl` caches instances per `(backend, namespace)`. This
avoids spawning multiple SQLite connections for the same file, reducing
lock contention and aligning the cache story for all backends.

- Added an async upsert API (with SQLite/Postgres dialect inserts) and
routed it through `AuthorizedSqlStore`, then switched conversations and
responses to call it. Using native `ON CONFLICT DO UPDATE` eliminates
the insert-then-update retry window that previously caused long WAL lock
retries.

### Test Plan

Existing tests, added a unit test for `upsert()`
2025-11-12 12:14:26 -08:00
..
access_control chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
conversations feat(storage): share sql/kv instances and add upsert support (#4140) 2025-11-12 12:14:26 -08:00
prompts fix: add missing shutdown methods to PromptServiceImpl and ConversationServiceImpl (#3925) 2025-10-27 13:41:38 -07:00
routers feat: allow returning embeddings and metadata from /vector_stores/ methods; disallow changing Provider ID (#4046) 2025-11-12 09:59:48 -08:00
routing_tables feat: allow returning embeddings and metadata from /vector_stores/ methods; disallow changing Provider ID (#4046) 2025-11-12 09:59:48 -08:00
server chore(api)!: remove tool_runtime.rag_tool from the API surface (#4067) 2025-11-04 14:50:54 -08:00
storage chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
store chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
telemetry feat: remove core.telemetry as a dependency of llama_stack.apis (#4064) 2025-11-06 10:58:30 -08:00
utils feat: ability to use postgres as store for starter distro (#4076) 2025-11-05 15:37:06 -08:00
__init__.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
build.py chore: remove dead code (#4125) 2025-11-12 10:09:14 +01:00
client.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
common.sh chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
configure.py fix: handle missing external_providers_dir (#3974) 2025-10-30 17:01:31 -07:00
datatypes.py feat: support workers in run config (#3992) 2025-10-30 16:34:12 -07:00
distribution.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
external.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
id_generation.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
inspect.py refactor: inspect routes now shows all non-deprecated APIs (#4116) 2025-11-10 15:57:17 -08:00
library_client.py feat: allow returning embeddings and metadata from /vector_stores/ methods; disallow changing Provider ID (#4046) 2025-11-12 09:59:48 -08:00
providers.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
request_headers.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
resolver.py feat: remove core.telemetry as a dependency of llama_stack.apis (#4064) 2025-11-06 10:58:30 -08:00
stack.py chore(api)!: remove tool_runtime.rag_tool from the API surface (#4067) 2025-11-04 14:50:54 -08:00
start_stack.sh chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00
testing_context.py chore(package): migrate to src/ layout (#3920) 2025-10-27 12:02:21 -07:00