Skip to content

Commit 64d84db

Browse files
committed
chore(scripts): document type=custom queue lookup contract in UAT seed script
Confirmed QueueRetrievePresenter's type=custom lookup matches TaskQueue.name exactly (no prefix, unlike type=task). Seeded queue names already satisfy this; the earlier 404 was the wrong-env queue, now fixed. Documents the contract so future scenarios don't regress it.
1 parent 55f0211 commit 64d84db

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/seed-dashboard-agent-uat.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ async function resolveTarget(prisma: PrismaClient, redis: Redis, userEmail: stri
192192
// Postgres upsert helpers
193193
// ---------------------------------------------------------------------------
194194

195+
// GET /api/v1/queues/:queueParam?type=custom (QueueRetrievePresenter.getQueue,
196+
// apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts) resolves a "custom" queue
197+
// by an EXACT match on TaskQueue.name within the env - no prefix, unlike type=task which
198+
// prepends "task/". So every uat-* queue name here must be the literal :queueParam value the
199+
// agent/tester will query with, and `type` must be NAMED (-> QueueItem.type "custom") to
200+
// report correctly. Getting either wrong 404s the queue-info route even though the sibling
201+
// metrics route (api.v1.queues.$queueParam.metrics.ts) stays 200 - it never touches Postgres
202+
// and returns zeroed metrics for an unknown queue instead of 404ing.
195203
async function upsertQueue(
196204
ctx: Ctx,
197205
env: RuntimeEnvironment,

0 commit comments

Comments
 (0)