Repository navigation
feat: remove the dashboard-api dependency - #545
Conversation
The dashboard no longer calls any dashboard-api route, so drop the client, its URL settings, contract types and spec, and point /api/health at api's GET /health. E2B_DASHBOARD_API_URL and NEXT_PUBLIC_DASHBOARD_API_URL are now ignored instead of validated, so existing deployments that still set them keep starting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🟣
src/app/api/health/route.ts— Operators can see/api/healthanswer 200okwhile infra-api is failing, whenever infra-api or its proxy sends a non-2xx with an empty body. The probe treats!erroras healthy (src/app/api/health/route.ts:10). openapi-fetch setserrortoundefinedfor a non-okContent-Length: 0reply, and to""for other empty error bodies. Fix: decide health from the HTTP status, e.g.const { response } = await infra.GET('/health', {}); if (response.ok) return true, and logresponse.statuson failure. Pre-existing: the base probe had the same check, and this change carries it over to infra-api.Why this was flagged
Trigger: infra-api, or a load balancer or ingress in front of it, answers
GET /healthwith a 5xx/4xx and an empty body, for example a proxy 502/503 withContent-Length: 0. The spec declares/healthbodiless (204,content?: neverin infra-api.types.ts:28-32), so empty bodies are the native shape for this endpoint. openapi-fetch ^0.14 (package.json:93) returns{ error: undefined, response }for a non-okContent-Length: 0response. For other non-ok replies it setserrortoawait response.text(), which is""for an empty body. checkInfraApi in route.ts:247-250 then sees!erroras true and returns true. GET then sends 200{ status: 'ok', checks: { infraApi: true } }and logs nohealth_check:infra_api_error. Monitoring that switches tochecks.infraApi, as the rollout notes ask, therefore misses this outage. Pre-existing: the baseapi.GET('/health')probe made the same!errorcheck.Verification: Pre-existing. The check in src/app/api/health/route.ts (around lines 8-11, not line 250) is
const { error } = await infra.GET('/health', {}); if (!error) { return true }, so health is decided only by whethererroris truthy. Network errors throw, get caught and return false, so only empty-body non-2xx replies slip through.
🤖 I have created a release *beep* *boop* --- ## [0.5.0](v0.4.0...v0.5.0) (2026-11-05) ### Features * remove the dashboard-api dependency ([#545](#545)) ([a327227](a327227)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: e2b-generated-code-auto-fixer[bot] <257264331+e2b-generated-code-auto-fixer[bot]@users.noreply.github.com>
Why
The templates (#539) and builds (#541) reads moved to api, so the dashboard no longer calls any dashboard-api route. What was left was a client, URL settings, a health probe and generated types. Removing them lets dashboard-api be retired without breaking the dashboard.
Changes
src/core/shared/clients/api.tsexports only theinfraclient. The dashboard-apiapiclient is gone.GET /api/healthprobes api'sGET /health(unauthenticated, 204) instead of dashboard-api's. The response key changes fromchecks.dashboardApitochecks.infraApi, and the log key fromhealth_check:dashboard_api_errortohealth_check:infra_api_error.E2B_DASHBOARD_API_URL,NEXT_PUBLIC_DASHBOARD_API_URLandresolveDashboardApiUrlare removed. Leftover values are ignored rather than rejected, so existing deployments keep starting after the upgrade (onmain, a leftoverNEXT_PUBLIC_DASHBOARD_API_URLfails validation). A unit test covers unknown variables being ignored.database-recordsource that wrapped dashboard-api'sSandboxRecord. It was never produced (the repository always returned 404), and its mappermapApiSandboxRecordToModeland the router branch are gone too. The'infra'source and the rest of the sandbox details flow are unchanged.spec/openapi.dashboard-api.yaml,dashboard-api.types.ts, thegenerate:dashboard-apiscript, the tsconfig path and.gitattributes(it held only those two entries). The spec sync workflow now syncs only the infra spec..env.example,scripts/container-smoke.shand a cookie comment no longer mention dashboard-api.Verification
All through bun 1.4.4:
bun run check: clean (same 130 warnings asmain).bun run knip: no new findings.tsc --noEmit(afternext typegen): 0 errors.bun run test:unit: 31 files, 315 tests pass.vitest run tests/integration/withPUBLIC_E2B_DOMAIN=example.dev: 5 files, 19 tests pass.bun run buildwithPUBLIC_E2B_DOMAIN=example.dev: succeeds.main.scripts/container-smoke.shwas not run (needs Docker).Rollout
checks.dashboardApifrom/api/healthneeds to readchecks.infraApiinstead./api/healthnow answers 503 when api is unreachable, rather than when dashboard-api is.