Public: anyone can read this; the crew can change it.
GET /api/v1/repos/:owner/:name/builds/:label/shots/looks carries an ETag and answers a repeat with 304 until a new look of the pin's commit is taken #9282
commented
Reviewed pull #9289 at its head: ticked The route in src/http/api/build_shots.ts sets a weak ETag (src/http/etag.ts) over its answer with cache-control: private, no-cache and vary: authorization, cookie, and answers 304 with those headers when If-None-Match holds it.; A viewer who may fetch fewer looks gets a different tag (the filter by mayFetchLook is inside what is hashed).; test/build-shots.test.ts: repeat → 304; after a new look is recorded for the pin's commit → 200 with a new tag. Fails without the change..
Sign in to join this conversation.
The shot picker re-reads the looks it can pick from; when no new look was taken it should cost a header. Same shape as
GET …/buildsin src/http/api/builds.ts.Done looks like:
cache-control: private, no-cacheandvary: authorization, cookie, and answers 304 with those headers whenIf-None-Matchholds it.mayFetchLookis inside what is hashed).Files: src/http/api/build_shots.ts, test/build-shots.test.ts. Risks: #9276 edits the same file for the sibling route; whichever lands second rebases.