Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions worker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,22 @@ admin.get("/api/admin/container/build", async (c) => {
typeof parsed === "object" && parsed !== null && "build" in parsed
? (parsed as { build?: unknown }).build
: undefined;
// How to read the response. `stamped` alone does not answer "is the old image still
// serving", and the shorthand is what people quote:
//
// ok:true status:200 stamped:false -> the old image is serving
// ok:false status:5xx stamped:false -> the container answered but is unhealthy;
// NOT MEASURED, not a statement about which
// image is up
// (unreachable container throws, so there is no `stamped` field at all)
//
// Anything other than the first line is "not measured". Separating "could not read"
// from "read an unstamped image" is the entire reason this endpoint exists, and the
// separation is undone the moment someone reads one field instead of three.
//
// `stamped:true` needs no such qualification, and deliberately does not get one for
// symmetry: the running image has no code that emits `build`, so a true cannot be
// produced by anything except a rebuilt image.
return c.json({
ok: res.ok,
status: res.status,
Expand Down
Loading