feat(stability): unify readiness and recovery
CI - Build & Test / Backend (.NET) (push) Successful in 45s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 1m0s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 2m49s
CI - Build & Test / Security Check (push) Successful in 7s
CI - Build & Test / Deploy Nexus (push) Has been skipped

This commit is contained in:
AzuTear
2026-08-01 01:21:33 +02:00
parent 38282e4f7f
commit cd8c78d165
67 changed files with 2616 additions and 601 deletions
+13 -4
View File
@@ -188,8 +188,16 @@ jobs:
WAIT=1
while [ $RETRY -lt $MAX ]; do
RETRY=$((RETRY + 1))
READY_CODE=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 https://nexus.noveria.net/health/ready || true)
HEALTH_BODY=$(curl -sf --max-time 10 https://nexus.noveria.net/health || true)
if printf '%s' "$HEALTH_BODY" | grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'; then
# Releases before v0.2.60 have no readiness endpoint; retain a
# visible compatibility fallback for emergency rollback only.
if [ "$READY_CODE" = "200" ] || [ "$READY_CODE" = "404" ]; then
READY_OK=true
else
READY_OK=false
fi
if [ "$READY_OK" = "true" ] && printf '%s' "$HEALTH_BODY" | grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'; then
echo ""
echo "✅ Health check passed with Healthy runtime and database state (attempt $RETRY/$MAX)"
exit 0
@@ -227,11 +235,12 @@ jobs:
}
check_health() {
local body
local body ready_code
ready_code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 "${BASE}/health/ready" || true)
body=$(curl -sf --max-time 10 "${BASE}/health" || true)
printf " %-25s" "Health API:"
if printf '%s' "$body" | grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'; then
echo " HTTP 200 Healthy ✅"
if { [ "$ready_code" = "200" ] || [ "$ready_code" = "404" ]; } && printf '%s' "$body" | grep -Eq '^[[:space:]]*\{[[:space:]]*"status"[[:space:]]*:[[:space:]]*"Healthy"'; then
echo " ready=${ready_code} full=Healthy ✅"
PASS=$((PASS + 1))
else
echo " not healthy ❌"