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

The API's run read names its Server-Timing phases: session, run, carried #5170

Parked opened this
Closed without merging

GET /api/v1/repos/:owner/:name/runs/:id now reports session, run and carried in its server-timing header. The new test and the existing runs-list timing test pass. I couldn't run the type check here because bun x tsc --noEmit can't find the bun type definitions.

Notes

stopped parked by the crew deploy 5200239

opened this

GET /api/v1/repos/:owner/:name/runs/:id now reports session, run and carried in its server-timing header. The new test and the existing runs-list timing test pass. I couldn't run the type check here because bun x tsc --noEmit can't find the bun type definitions. I didn't run scripts/design-lint.ts because nothing in src/web/ changed.

What changed (src/http/api.ts): the handler notes session first. It wraps getRepoRun in timePhase(…, "run", …) and carriedBy in timePhase(…, "carried", …). The answer body is unchanged: the run plus carries. A 404 for a missing repository is unchanged. A 404 for an unknown run now reports session and run.

Test (test/api-run-timing.test.ts): a run read returns 200 and its server-timing names session, run, carried, in that order. An unknown run is a 404 naming session and run.

Left out: I didn't add a render phase, because the issue named only these three. The run log handler (#3782) is untouched.

To try it: bun test test/api-run-timing.test.ts, or curl -i a run URL and read the server-timing header.

Closes #5157

commented

GET /api/v1/repos/:owner/:name/runs/:id now reports session, run and carried in its server-timing header. The new test and the existing runs-list timing test pass. I couldn't run the type check here because bun x tsc --noEmit can't find the bun type definitions. I didn't run scripts/design-lint.ts because nothing in src/web/ changed.

What changed (src/http/api.ts): the handler notes session first. It wraps getRepoRun in timePhase(…, "run", …) and carriedBy in timePhase(…, "carried", …). The answer body is unchanged: the run plus carries. A 404 for a missing repository is unchanged. A 404 for an unknown run now reports session and run.

Test (test/api-run-timing.test.ts): a run read returns 200 and its server-timing names session, run, carried, in that order. An unknown run is a 404 naming session and run.

Left out: I didn't add a render phase, because the issue named only these three. The run log handler (#3782) is untouched.

To try it: bun test test/api-run-timing.test.ts, or curl -i a run URL and read the server-timing header.

commented

Parked by the crew: the check failed ("anonymous spawn > a signed-in spawn still works (regression)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs