Repository navigation
Fix unhealthy health check in GCP ALB for pusher endpoints - #6335
Conversation
Greptile SummaryThis PR fixes unhealthy GCP ALB health checks for the pusher service by switching K8s probes from
Confidence Score: 3/5Safe to merge with one missed blocking-call fix and a startup probe threshold worth revisiting The core fix is correct and well-targeted: async health endpoint + asyncio.to_thread wrapping properly prevents event loop starvation and makes health probes reflect real application responsiveness. However, send_audio_bytes_developer_webhook still calls blocking requests.post directly in an async function — the exact same pattern fixed elsewhere in the same PR. The prod startupProbe halving from 60→30 is a minor operational risk during large scale-out events. backend/utils/webhooks.py (send_audio_bytes_developer_webhook missing asyncio.to_thread fix), backend/charts/pusher/prod_omi_pusher_values.yaml (startupProbe failureThreshold reduced 60→30) Important Files Changed
Sequence DiagramsequenceDiagram
participant ALB as GCP ALB
participant K8s as Kubernetes
participant Pusher as Pusher Pod
participant EventLoop as Uvicorn Event Loop
participant Thread as Thread Pool
Note over ALB,Pusher: Before PR — tcpSocket probe (port open only)
ALB->>K8s: tcpSocket :8080 probe
K8s-->>ALB: TCP ACK (passes even if event loop is blocked)
Note over ALB,Pusher: After PR — httpGet /health (application-level)
ALB->>Pusher: GET /health HTTP
Pusher->>EventLoop: async health_check()
EventLoop-->>ALB: 200 {status: healthy}
Note over EventLoop,Thread: Blocking calls moved off event loop
EventLoop->>Thread: asyncio.to_thread(_trigger_realtime_integrations)
Thread->>Thread: spawn worker threads + join
Thread-->>EventLoop: done (event loop free during wait)
EventLoop->>Thread: asyncio.to_thread(requests.post) [realtime_transcript_webhook ✓]
Thread-->>EventLoop: HTTP response
Note over EventLoop: ⚠ send_audio_bytes_developer_webhook still calls requests.post directly
|
53a18ee to
0dff27a
Compare
0dff27a to
540464f
Compare
|
lgtm |
Uh oh!
There was an error while loading. Please reload this page.