From e58c76124af697ee94dcf1c844ad8528ef211f60 Mon Sep 17 00:00:00 2001 From: Kian Jones <11655409+kianjones9@users.noreply.github.com> Date: Wed, 8 Oct 2025 15:25:22 -0700 Subject: [PATCH] fix: refactor into common uri parsing logic, fix test, and fix compose file (#5261) refactor into common uri parsing logic, fix test, and fix compose file --- .github/workflows/docker-integration-tests.yaml | 6 ++---- dev-compose.yaml | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-integration-tests.yaml b/.github/workflows/docker-integration-tests.yaml index 9a3a929c..dd2c0c58 100644 --- a/.github/workflows/docker-integration-tests.yaml +++ b/.github/workflows/docker-integration-tests.yaml @@ -11,13 +11,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 env: - # Database configuration for docker-compose - # Note: LETTA_PG_HOST is intentionally NOT set here because: - # - Inside containers: uses 'letta_db' (from dev-compose.yaml defaults) - # - Host pytest tests: uses 'localhost' (to connect via port mapping) + # Database configuration - these will be used by dev-compose.yaml LETTA_PG_DB: letta LETTA_PG_USER: letta LETTA_PG_PASSWORD: letta + LETTA_PG_HOST: pgvector_db # Internal Docker service name LETTA_PG_PORT: 5432 # Server configuration for tests LETTA_SERVER_PASS: test_server_token diff --git a/dev-compose.yaml b/dev-compose.yaml index e5ca0a93..81d08478 100644 --- a/dev-compose.yaml +++ b/dev-compose.yaml @@ -31,9 +31,9 @@ services: - LETTA_PG_DB=${LETTA_PG_DB:-letta} - LETTA_PG_USER=${LETTA_PG_USER:-letta} - LETTA_PG_PASSWORD=${LETTA_PG_PASSWORD:-letta} - - LETTA_PG_HOST=${LETTA_PG_HOST:-letta_db} + - LETTA_PG_HOST=${LETTA_PG_HOST:-pgvector_db} - LETTA_PG_PORT=${LETTA_PG_PORT:-5432} - - LETTA_PG_URI=postgresql://${LETTA_PG_USER:-letta}:${LETTA_PG_PASSWORD:-letta}@${LETTA_PG_HOST:-letta_db}:${LETTA_PG_PORT:-5432}/${LETTA_PG_DB:-letta} + - LETTA_PG_URI=${LETTA_PG_URI:-postgresql://${LETTA_PG_USER:-letta}:${LETTA_PG_PASSWORD:-letta}@${LETTA_PG_HOST:-pgvector_db}:${LETTA_PG_PORT:-5432}/${LETTA_PG_DB:-letta}} - LETTA_DEBUG=True - OPENAI_API_KEY=${OPENAI_API_KEY} - GROQ_API_KEY=${GROQ_API_KEY}