fix(ci): deploy-server 隧道 healthcheck 改非致命(本地 healthz 才是权威闸)
Deploy Server / deploy-server (push) Failing after 22s
Deploy Server / deploy-server (push) Failing after 22s
隧道 /healthz 依赖 cloudflared/CF 边缘,与本次二进制是否健康是两回事; CF 边缘抖动或隧道尚未 provision 不应判整次部署失败。改为失败仅告警。 (最终 whole-branch review 的 Minor A 决议) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
@@ -54,8 +54,16 @@ systemctl start pangolin-server
|
||||
systemctl is-active pangolin-server
|
||||
REMOTE
|
||||
|
||||
# 8080 现仅 loopback(经 cloudflared 隧道对外):ssh 内本地校验 + 经隧道校验对外真实可达。
|
||||
# 8080 现仅 loopback(经 cloudflared 隧道对外)。
|
||||
# 本地 /healthz 是本次二进制部署成败的**权威闸**:新 server 起来即通过。
|
||||
$SSH "root@${DEPLOY_HOST}" 'curl -fsS -m 10 --retry 5 --retry-connrefused http://127.0.0.1:8080/healthz >/dev/null && echo "healthz(local) OK"'
|
||||
curl -fsS -m 10 --retry 5 "https://api.yanmeiai.com/healthz" >/dev/null && echo "healthz(tunnel) OK"
|
||||
# 隧道 /healthz 是端到端冒烟(最贴近真实客户端路径),但**非致命**:它依赖 cloudflared/CF 边缘,
|
||||
# 与「本次二进制是否健康」是两回事——CF 边缘抖动或隧道尚未 provision 不应判整次部署失败
|
||||
# (本地闸已证明 server 健康)。失败只告警,不 exit。
|
||||
if curl -fsS -m 10 --retry 3 "https://api.yanmeiai.com/healthz" >/dev/null; then
|
||||
echo "healthz(tunnel) OK"
|
||||
else
|
||||
echo "==> deploy-server: 警告 —— 隧道 https://api.yanmeiai.com/healthz 不通(CF 边缘抖动/隧道未就绪?);本地 healthz 已通过,不阻断部署。" >&2
|
||||
fi
|
||||
|
||||
echo "==> deploy-server: done"
|
||||
|
||||
Reference in New Issue
Block a user