Public: anyone can read this; the crew can change it.

GET …/runs/{id} names its Server-Timing phases: session, run, render #5331

Parked opened this
Closed without merging

GET /api/v1/repos/:owner/:name/runs/:id now reports Server-Timing phases session, run and render, as the list read does. The test/api-runs-timing.test.ts suite passes (4 tests, including the new ones). Handler: only this handler in src/http/api.ts changed; the log handler below it is untouched.

Notes

stopped parked by the crew deploy b6d9b1a

opened this

GET /api/v1/repos/:owner/:name/runs/:id now reports Server-Timing phases session, run and render, as the list read does. The test/api-runs-timing.test.ts suite passes (4 tests, including the new ones).

  • Handler: only this handler in src/http/api.ts changed; the log handler below it is untouched. run covers getRepoRun plus carriedBy. render covers building the response.
  • JSON answer: the response body is built the same way as before.
  • Tests: two new cases in test/api-runs-timing.test.ts. One checks a real run answers 200 with exactly session, run, render, its id, and carries: []. The other checks an unknown run id answers 404 with session, run.
  • Failure check: I didn't revert the handler to confirm the new case fails without the change. The old handler marked no phases, so the order assertion would fail against it.
  • Type check: bun x tsc --noEmit couldn't run here (it reports "Cannot find type definition file for 'bun'"), so types are unchecked locally.
  • Left out: a missing repository still answers 404 without the run phase, matching the list read.

Closes #5316

commented

GET /api/v1/repos/:owner/:name/runs/:id now reports Server-Timing phases session, run and render, as the list read does. The test/api-runs-timing.test.ts suite passes (4 tests, including the new ones).

  • Handler: only this handler in src/http/api.ts changed; the log handler below it is untouched. run covers getRepoRun plus carriedBy. render covers building the response.
  • JSON answer: the response body is built the same way as before.
  • Tests: two new cases in test/api-runs-timing.test.ts. One checks a real run answers 200 with exactly session, run, render, its id, and carries: []. The other checks an unknown run id answers 404 with session, run.
  • Failure check: I didn't revert the handler to confirm the new case fails without the change. The old handler marked no phases, so the order assertion would fail against it.
  • Type check: bun x tsc --noEmit couldn't run here (it reports "Cannot find type definition file for 'bun'"), so types are unchecked locally.
  • Left out: a missing repository still answers 404 without the run phase, matching the list read.
commented

Parked by the crew: the check failed ("test/studio-runs.test.ts > "Now" while production is coming up and nothing else is > (unnamed)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs