From b1464bd0656f31198fbc51f57c288d3d5f74dd52 Mon Sep 17 00:00:00 2001 From: Chris Christiansen Date: Wed, 10 Jun 2026 16:48:08 +0000 Subject: [PATCH] chore: revert debug endpoint and smoke test to /health --- agents/core-logic/app.py | 5 ----- cloudbuild.yaml | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/agents/core-logic/app.py b/agents/core-logic/app.py index ca2213b..22995ca 100644 --- a/agents/core-logic/app.py +++ b/agents/core-logic/app.py @@ -86,11 +86,6 @@ async def health(): return JSONResponse({"status": "ok", "service": APP_NAME}) -@app.get("/debug-health") -async def debug_health(): - return JSONResponse({"status": "debug-ok"}) - - # ── agent run ──────────────────────────────────────────────────────────────── @app.post("/run", response_model=RunResponse) async def run(req: RunRequest): diff --git a/cloudbuild.yaml b/cloudbuild.yaml index ac6500e..30b6544 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -75,24 +75,24 @@ steps: # Vent på at Cloud Run-instansen er klar (cold start kan ta opptil 90s) # Henter fersk token per forsøk siden token kan utløpe under lang cold start - echo "Venter på /debug-health ..." + echo "Venter på /health ..." sleep 30 STATUS="000" for i in $$(seq 1 9); do TOKEN=$$(gcloud auth print-identity-token 2>/dev/null) if [ -z "$$TOKEN" ]; then - echo " /debug-health forsøk $$i: kunne ikke hente token, venter..." + echo " /health forsøk $$i: kunne ikke hente token, venter..." sleep 10 continue fi - STATUS=$$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $$TOKEN" "$$BASE_URL/debug-health") - echo " /debug-health forsøk $$i: HTTP $$STATUS" + STATUS=$$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $$TOKEN" "$$BASE_URL/health") + echo " /health forsøk $$i: HTTP $$STATUS" [ "$$STATUS" = "200" ] && break sleep 10 done if [ "$$STATUS" != "200" ]; then - echo "❌ /debug-health svarte ikke 200 etter 90s (siste: $$STATUS)" + echo "❌ /health svarte ikke 200 etter 90s (siste: $$STATUS)" exit 1 fi