Skip to content

Commit 696b8c0

Browse files
committed
Rename simulation gateway health probe
1 parent a8a8e98 commit 696b8c0

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/migration-pr3-cloud-run-candidate-runbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ After GitHub Actions prints the candidate URL:
158158
curl -i "$CLOUD_RUN_CANDIDATE_URL/health"
159159
curl -i "$CLOUD_RUN_CANDIDATE_URL/readiness-check"
160160
curl -i "$CLOUD_RUN_CANDIDATE_URL/liveness-check"
161-
curl -i "$CLOUD_RUN_CANDIDATE_URL/health/simulation-gateway"
161+
curl -i "$CLOUD_RUN_CANDIDATE_URL/simulation-gateway-check"
162162
curl -i "$CLOUD_RUN_CANDIDATE_URL/us/metadata"
163163
```
164164

165165
Expected behavior:
166166

167167
- `/health` returns FastAPI JSON: `{"status":"healthy"}`.
168-
- `/health/simulation-gateway` returns FastAPI JSON confirming the existing
168+
- `/simulation-gateway-check` returns FastAPI JSON confirming the existing
169169
simulation gateway client can initialize and reach the gateway health check.
170170
- `/readiness-check` and `/liveness-check` return existing Flask text `OK`.
171171
- `/us/metadata` returns the existing v1 metadata contract from Cloud SQL.

policyengine_api/asgi_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
FASTAPI_NATIVE_LOGGED_PATHS = frozenset(
1818
{
1919
"/health",
20-
"/health/simulation-gateway",
20+
"/simulation-gateway-check",
2121
}
2222
)
2323

@@ -78,7 +78,7 @@ def health() -> HealthResponse:
7878
return HealthResponse(status="healthy")
7979

8080
@app.get(
81-
"/health/simulation-gateway",
81+
"/simulation-gateway-check",
8282
response_model=SimulationGatewayHealthResponse,
8383
include_in_schema=False,
8484
)

policyengine_api/migration_flags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def infer_route_group(path: str) -> str:
7171
return "home"
7272
if path in {
7373
"/health",
74-
"/health/simulation-gateway",
74+
"/simulation-gateway-check",
7575
"/liveness-check",
7676
"/readiness-check",
7777
}:

tests/integration/test_cloud_run_candidate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_cloud_run_candidate_health_routes(api_client):
1111
assert readiness_response.status_code == 200, readiness_response.text
1212
assert readiness_response.text == "OK"
1313

14-
simulation_gateway_response = api_client.get("/health/simulation-gateway")
14+
simulation_gateway_response = api_client.get("/simulation-gateway-check")
1515
assert simulation_gateway_response.status_code == 200, (
1616
simulation_gateway_response.text
1717
)

tests/unit/test_asgi_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_public_simulation_gateway_health_probe_checks_gateway():
170170
) as simulation_api:
171171
simulation_api.return_value.health_check.return_value = True
172172

173-
response = client.get("/health/simulation-gateway")
173+
response = client.get("/simulation-gateway-check")
174174

175175
assert response.status_code == 200
176176
assert response.json() == {
@@ -189,7 +189,7 @@ def test_public_simulation_gateway_health_probe_reports_failure():
189189
) as simulation_api:
190190
simulation_api.return_value.health_check.return_value = False
191191

192-
response = client.get("/health/simulation-gateway")
192+
response = client.get("/simulation-gateway-check")
193193

194194
assert response.status_code == 503
195195

tests/unit/test_migration_flags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_invalid_migration_flag_raises(monkeypatch):
5858
[
5959
("/", "home"),
6060
("/health", "health"),
61-
("/health/simulation-gateway", "health"),
61+
("/simulation-gateway-check", "health"),
6262
("/readiness-check", "health"),
6363
("/us/metadata", "metadata"),
6464
("/us/policy/1", "policy"),

0 commit comments

Comments
 (0)