Fix Postgres step lifecycle event ordering#2714
Conversation
🦋 Changeset detectedLatest commit: 766e059 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (319 failed)astro (22 failed):
example (22 failed):
express (17 failed):
fastify (36 failed):
hono (28 failed):
nextjs-turbopack (41 failed):
nextjs-webpack (26 failed):
nitro (28 failed):
nuxt (33 failed):
sveltekit (32 failed):
vite (34 failed):
📋 Other (30 failed)e2e-vercel-prod-tanstack-start (30 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
📊 Benchmark Results
workflow with no steps💻 Local Development
workflow with 1 step💻 Local Development
workflow with 10 sequential steps💻 Local Development
workflow with 25 sequential steps💻 Local Development
workflow with 50 sequential steps💻 Local Development
Promise.all with 10 concurrent steps💻 Local Development
Promise.all with 25 concurrent steps💻 Local Development
Promise.all with 50 concurrent steps💻 Local Development
Promise.race with 10 concurrent steps💻 Local Development
Promise.race with 25 concurrent steps💻 Local Development
Promise.race with 50 concurrent steps💻 Local Development
workflow with 10 sequential data payload steps (10KB)💻 Local Development
workflow with 25 sequential data payload steps (10KB)💻 Local Development
workflow with 50 sequential data payload steps (10KB)💻 Local Development
workflow with 10 concurrent data payload steps (10KB)💻 Local Development
workflow with 25 concurrent data payload steps (10KB)💻 Local Development
workflow with 50 concurrent data payload steps (10KB)💻 Local Development
Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
stream pipeline with 5 transform steps (1MB)💻 Local Development
10 parallel streams (1MB each)💻 Local Development
fan-out fan-in 10 streams (1MB each)💻 Local Development
SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
❌ Some benchmark jobs failed:
Check the workflow run for details. |
98f5ea8 to
1ed5483
Compare
Summary
Fixes #2331 by writing Postgres step lifecycle entity updates and their event-log entries in the same transaction, so the step row lock serializes concurrent lifecycle writers until the log entry is durable.
Also allocates Postgres-backed event ids inside the protected lifecycle path and re-enables the previously skipped Postgres e2e regression coverage.
Testing
node_modules/.bin/tsc --noEmit -p packages/world-postgres/tsconfig.jsonnode_modules/.bin/biome check --diagnostic-level=error packages/world-postgres/src/storage.ts packages/world-postgres/test/storage.test.ts packages/core/e2e/e2e.test.ts packages/world-postgres/src/drizzle/migrations/0015_add_workflow_events_order_sequence.sql packages/world-postgres/src/drizzle/migrations/meta/_journal.json .changeset/step-lifecycle-pg-transaction.md../../node_modules/.bin/vitest run test/storage.test.ts src/reenqueue.test.ts src/util.test.ts src/queue.test.tspnpm --filter @workflow/world-postgres build