fix(ops): stabilize api rollout source correlation smoke
All checks were successful
CD Pipeline / tests (push) Successful in 1m41s
Code Review / ai-code-review (push) Successful in 17s
CD Pipeline / build-and-deploy (push) Successful in 5m10s
CD Pipeline / post-deploy-checks (push) Successful in 1m59s

This commit is contained in:
Your Name
2026-06-03 08:08:24 +08:00
parent 889376d7ef
commit 6432e47770
2 changed files with 9 additions and 3 deletions

View File

@@ -3459,9 +3459,13 @@ async def _fetch_source_correlation_summary(
WHERE project_id = :project_id
AND {provider_sql} IN ('sentry', 'signoz')
AND LOWER(COALESCE(source_envelope->>'stage', '')) = 'heartbeat'
AND received_at >= :window_start
GROUP BY {provider_sql}
"""),
{"project_id": safe_project_id},
{
"project_id": safe_project_id,
"window_start": window_start,
},
)
heartbeat_rows = list(heartbeat_result.mappings().all())

View File

@@ -176,7 +176,9 @@ spec:
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
# Phase K0.5: Startup Probe (允許最多 60 秒啟動時間)
# 2026-06-03 Codex: DB bootstrap DDL + background worker wiring can exceed
# 60s during rolling deploys. Keep liveness strict after startup, but allow
# cold-start to finish instead of killing the pod mid-bootstrap.
startupProbe:
httpGet:
path: /api/v1/health/live
@@ -184,7 +186,7 @@ spec:
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 12
failureThreshold: 60
# 反親和性 - 分散到不同節點
affinity:
podAntiAffinity: