Fix namespaced active run recovery#2888
Conversation
Signed-off-by: Casey Gowrie <ctgowrie@gmail.com>
🦋 Changeset detectedLatest commit: ce557b1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@vercel/workflow This is ready for review. The changeset and DCO sign-off are included, and the affected world suites pass 540/540 tests. |
📊 Workflow Benchmarkscommit Backend:
Avg deltas compare against the most recent benchmark run on Metrics — TTFS: time to first step body execution · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (time outside step bodies, client start → last step body exit) · SL: stream latency (first chunk write → visible to the reader) Scenarios — stream: one step that streams chunks back to the client; no hooks, so the run stays in turbo mode · hook + stream: registers a hook before the same streaming step, which exits turbo mode · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges 🟢/🔴 mark percentiles within/above target. Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120 TTFS/WO compare client vs deployment clocks and SL compares the step runner’s clock vs the client’s (NTP-synced in CI). WO ends at the last step body exit, the closest observable proxy for the final step-completion request. |
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
|
Signed-off-by: Casey Gowrie <ctgowrie@gmail.com> Signed-off-by: Casey Gowrie <casey.gowrie@vercel.com>
|
Backport PR opened against |
Description
Fix startup recovery for active workflow runs when a queue namespace is configured.
reenqueueActiveRunsnow constructs workflow queue names with the shared namespace helpers instead of hardcoding__wkf_workflow_. It falls back toWORKFLOW_QUEUE_NAMESPACE, accepts an explicit namespace override, and the Postgres World passes its configured namespace through.The local-world regression test restarts a persisted pending run with
WORKFLOW_QUEUE_NAMESPACE=custom, routes it through the real namespacedcreateQueueHandler, and traps any accidental delivery to the unnamespaced prefix.How did you test your changes?
pnpm exec vitest run packages/world/src packages/world-local/src packages/world-postgres/src— 540 tests passedpnpm exec vitest run packages/world/src/recovery.test.ts packages/world-local/src/reenqueue.test.ts packages/world-postgres/src/reenqueue.test.ts— 15 focused tests passedpnpm --filter @workflow/world buildpnpm --filter @workflow/world-local buildpnpm --filter @workflow/world-postgres buildgit diff --checkpnpm changeset status --since=mainPR Checklist - Required to merge
pnpm changesetwas run to create a changelog for this PRSigned-off-byincluded in the commit)@vercel/workflowin a comment once the PR is ready