diff --git a/agents/core-logic/app.py b/agents/core-logic/app.py index 22995ca..ca2213b 100644 --- a/agents/core-logic/app.py +++ b/agents/core-logic/app.py @@ -86,6 +86,11 @@ 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 17da89d..4af4a6e 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -71,24 +71,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å /health ..." + echo "Venter på /debug-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 " /health forsøk $$i: kunne ikke hente token, venter..." + echo " /debug-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/health") - echo " /health forsøk $$i: HTTP $$STATUS" + 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" = "200" ] && break sleep 10 done if [ "$$STATUS" != "200" ]; then - echo "❌ /health svarte ikke 200 etter 90s (siste: $$STATUS)" + echo "❌ /debug-health svarte ikke 200 etter 90s (siste: $$STATUS)" exit 1 fi