feat: add memfs-py service (#9315)
* feat: add memfs-py service * add tf for bucket access and secrets v2 access * feat(memfs): add helm charts, deploy workflow, and bug fixes - Add dev helm chart (helm/dev/memfs-py/) with CSI secrets pattern - Update prod helm chart with CSI secrets and correct service account - Add GitHub Actions deploy workflow - Change port from 8284 to 8285 to avoid conflict with core's dulwich sidecar - Fix chunked transfer encoding issue (strip HTTP_TRANSFER_ENCODING header) - Fix timestamp parsing to handle both ISO and HTTP date formats - Fix get_head_sha to raise FileNotFoundError on 404 🐾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> --------- Co-authored-by: Kian Jones <kian@letta.com> Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -433,7 +433,8 @@ class SyncServer(object):
|
||||
def _init_memory_repo_manager(self) -> Optional[MemoryRepoManager]:
|
||||
"""Initialize the memory repository manager if configured.
|
||||
|
||||
Configure the object store via settings (recommended):
|
||||
If LETTA_MEMFS_SERVICE_URL is set, uses the external memfs service.
|
||||
Otherwise, configure the object store via settings (recommended):
|
||||
|
||||
LETTA_OBJECT_STORE_URI="gs://my-bucket/repository?project=my-gcp-project"
|
||||
|
||||
@@ -441,7 +442,7 @@ class SyncServer(object):
|
||||
- gs:// (or gcs://) -> Google Cloud Storage
|
||||
|
||||
Returns:
|
||||
MemoryRepoManager if configured, None otherwise
|
||||
MemoryRepoManager (or MemfsClient) if configured, None otherwise
|
||||
"""
|
||||
|
||||
# Keep import local to avoid import/circular issues during server bootstrap.
|
||||
@@ -449,6 +450,13 @@ class SyncServer(object):
|
||||
|
||||
from letta.settings import settings
|
||||
|
||||
# Check if memfs service is configured (takes priority over local object store)
|
||||
if settings.memfs_service_url:
|
||||
from letta.services.memory_repo import MemfsClient
|
||||
|
||||
logger.info("Memory repo manager using memfs service: %s", settings.memfs_service_url)
|
||||
return MemfsClient(base_url=settings.memfs_service_url)
|
||||
|
||||
uri = settings.object_store_uri
|
||||
if not uri:
|
||||
logger.debug("Memory repo manager not configured (object_store_uri not set)")
|
||||
|
||||
Reference in New Issue
Block a user