-
Notifications
You must be signed in to change notification settings - Fork 0
fix: replace tcpSocket probes with valkey-cli exec probes, switch to non-alpine valkey image #249
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
Changes from all commits
3084c68
3bcf555
6907d02
a4a3940
a5fcaf1
cc5b4e3
9564d2c
ea36046
9f9a3e4
bba9418
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Dev environment overlay — sourced AFTER .env to override prod values | ||
| # Secrets are inherited from .env; only env-specific config is set here. | ||
|
|
||
| # Pod identity | ||
| POD_NAME="dev-router-pod" | ||
|
|
||
| # Public URLs | ||
| BASEURL="dev.vendeuvre.lan" | ||
| BASE_URL="dev.vendeuvre.lan" | ||
| PUBLIC_BASE_URL="https://dev.vendeuvre.lan/llm-routing" | ||
|
|
||
| # Dev port assignments (+10 offset from production) | ||
| ROUTER_PORT="5010" | ||
| LITELLM_PORT="4010" | ||
| LANGFUSE_WEB_PORT="3011" | ||
| LANGFUSE_WORKER_PORT="3040" | ||
| POSTGRES_PORT="5442" | ||
| VALKEY_CACHE_PORT="6389" | ||
| VALKEY_LF_PORT="6390" | ||
| CLICKHOUSE_HTTP_PORT="8133" | ||
| CLICKHOUSE_TCP_PORT="9010" | ||
| CLICKHOUSE_INTERSERVER_PORT="9019" | ||
| MINIO_S3_PORT="9012" | ||
| MINIO_CONSOLE_PORT="9011" | ||
|
|
||
| # Dev uses locally-built router image (for testing code changes) | ||
| ROUTER_IMAGE="localhost/llm-routing-dev:latest" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,8 +16,7 @@ | |
| line = line.strip() | ||
| if line and not line.startswith("#") and "=" in line: | ||
| key, _, val = line.partition("=") | ||
| val = val.strip().strip('"').strip("'") | ||
| os.environ[key] = val | ||
| os.environ.setdefault(key, val) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Inspect the .env parsing logic in litellm/entrypoint.py lines 12-20
sed -n '12,20p' litellm/entrypoint.pyRepository: sheepdestroyer/LLM-Routing Length of output: 469 Strip 🤖 Prompt for AI Agents |
||
|
|
||
| # Load Gemini OAuth token from credentials JSON | ||
| creds_path = "/config/gemini_auth/oauth_creds.json" | ||
|
|
@@ -46,9 +45,10 @@ def check_tcp_port(ip: str, port: int) -> bool: | |
| return False | ||
|
|
||
| max_wait = 60 | ||
| print(f"🔌 Waiting for PostgreSQL on :5432 (max {max_wait}s)...") | ||
| postgres_port = int(os.environ.get("POSTGRES_PORT", "5432")) | ||
| print(f"🔌 Waiting for PostgreSQL on :{postgres_port} (max {max_wait}s)...") | ||
| for i in range(max_wait): | ||
| if check_tcp_port("127.0.0.1", 5432): | ||
| if check_tcp_port("127.0.0.1", postgres_port): | ||
| print(f"✅ PostgreSQL ready after {i+1}s") | ||
| break | ||
| time.sleep(1) | ||
|
|
@@ -127,5 +127,6 @@ def _serialize_dt(dt): | |
| # Start LiteLLM Proxy | ||
| import litellm | ||
| from litellm.proxy.proxy_cli import run_server | ||
| sys.argv = ["litellm", "--config", "/app/config.yaml", "--port", "4000"] | ||
| litellm_port = os.environ.get("LITELLM_PORT", os.environ.get("PORT", "4000")) | ||
| sys.argv = ["litellm", "--config", "/app/config.yaml", "--port", litellm_port] | ||
| run_server() | ||
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.
The quote and whitespace stripping was accidentally removed during the refactoring to
os.environ.setdefault. Without stripping, values in.envthat are wrapped in quotes (e.g.,POSTGRES_PORT="5442") will be loaded with literal quotes, causing parsing failures (such asValueErrorwhen convertingPOSTGRES_PORTto an integer on line 48).