Skip to content

[stable] Backport: Retry e2e tests once in CI, keeping retried tests visible (#3530) - #3555

Draft
alangenfeld wants to merge 1 commit into
stablefrom
alangenfeld/backport-e2e-ci-retry-stable
Draft

[stable] Backport: Retry e2e tests once in CI, keeping retried tests visible (#3530)#3555
alangenfeld wants to merge 1 commit into
stablefrom
alangenfeld/backport-e2e-ci-retry-stable

Conversation

@alangenfeld

Copy link
Copy Markdown
Collaborator

Summary & Motivation

Backport of #3530 to stable — its e2e matrix hits the same single-test timing races, where one lost race fails a 20+ minute job.

Test Plan

Existing e2e coverage runs in CI; the aggregation script's flaky section was checked against synthetic artifact directories.

Backport notes

Manual backport of c041d3d (#3530). The automated backport job (run) recommended backporting but failed at the push step: the workflow's GITHUB_TOKEN cannot push commits that modify .github/workflows/ files (Resource not accessible by integration).

Conflict resolutions, worth reviewing carefully:

  • vitest.config.ts — retry block merged onto stable's config (which keeps its benchmark.include section and has no configDefaults exclude)
  • .github/scripts/aggregate-e2e-results.jsrenderFlakySection call placed before stable's "Details by Category" section (stable predates main's "E2E Test Summary" layout)
  • .github/workflows/tests.yml — took stable's version wholesale and re-applied the e2e-flaky-*.json upload paths by hand against stable's five upload blocks (stable's artifact names use canary/stable suffixes, not artifactSuffix)
  • packages/core/e2e/benchmark.test.ts — hunk dropped; file does not exist on stable

* [ci] Retry e2e tests once in CI, keeping retried tests visible

Over the last 10 days ~93 Tests runs were manually re-run until green,
some taking 6 attempts: the e2e suites drive real deployments, and a
single test losing a timing race fails a whole 20+ minute matrix job.
A CI-only vitest retry (retry: 1) absorbs those single-test races.
beforeEach/afterEach hooks run per attempt, so suites with file-restore
hooks (dev.test.ts) retry cleanly.

Retries must not hide real races, so a retried-then-passed test stays
visible everywhere a failure would have been: the github-reporter emits
::warning annotations and an e2e-flaky-*.json sidecar, every e2e job
uploads it, and aggregate-e2e-results.js renders a 'Flaky E2E Tests
(passed on retry)' section in both the per-job step summary and the PR
comment, with per-app occurrence counts.

Harnesses whose failures are themselves the signal pin retry: 0:
event-log-race-repro (a pass runs the full configured budget) and
benchmarks (a regression should not be papered over by a luckier
second sample). Local runs keep retry at 0 so races reproduce while
debugging.

* Add changeset

---------
(cherry picked from commit c041d3d)
Signed-off-by: Alex Langenfeld <alex.langenfeld@vercel.com>
@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 423e7e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

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

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Aug 14, 2026 5:25pm
example-nextjs-workflow-webpack Ready Ready Preview Aug 14, 2026 5:25pm
example-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-astro-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-express-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-fastify-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-hono-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-nestjs-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-nitro-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-nuxt-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-python-workflow Error Error Aug 14, 2026 5:25pm
workbench-sveltekit-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-tanstack-start-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workbench-vite-workflow Ready Ready Preview Aug 14, 2026 5:25pm
workflow-docs Ready Ready Preview, v0 Aug 14, 2026 5:25pm
workflow-swc-playground Ready Ready Preview Aug 14, 2026 5:25pm
workflow-tarballs Ready Ready Preview Aug 14, 2026 5:25pm
workflow-web Ready Ready Preview Aug 14, 2026 5:25pm

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1077 0 78 1155
✅ 💻 Local Development 1174 0 86 1260
✅ 📦 Local Production 1174 0 86 1260
✅ 🐘 Local Postgres 1174 0 86 1260
✅ 🪟 Windows 105 0 0 105
❌ 🌍 Community Worlds 15 83 9 107
✅ 📋 Other 594 0 36 630
Total 5313 83 381 5777

❌ Failed Tests

🌍 Community Worlds (83 failed)

turso (83 failed):

  • addTenWorkflow | wrun_01M00MSHEFKJEK2KDVXM4P42W1
  • addTenWorkflow | wrun_01M00MSHEFKJEK2KDVXM4P42W1
  • deploymentId: 'latest' is a no-op in non-Vercel worlds
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01M00MV7249WTBG1ZFW43ZC0WE
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01M00MST6EN59212D4N4A8K4GS
  • promiseRaceWorkflow | wrun_01M00MT0ZYADCV5VET0D9Z0Y21
  • promiseAnyWorkflow | wrun_01M00MT2YRYQ3VG7J723GQNRH8
  • importedStepOnlyWorkflow | wrun_01M00MVHP7WFHYYHH8B07MW1TD
  • readableStreamWorkflow | wrun_01M00MT4ZCTB71Y7FJH80PZRGH
  • hookWorkflow | wrun_01M00MTHYZDY50GQ0GRM5PXYSH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M00MTRE6AKAJE38TSTBK7EDG
  • webhookWorkflow | wrun_01M00MTWREX5AZ3Q4NG5B44C2M
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M00MVA7DFYN2YBMHC6WMNBP5
  • sleepingWorkflow | wrun_01M00MZ892SX42QH5BZ80V8S2F
  • parallelSleepWorkflow | wrun_01M00MZQWZ13PQ51V17H19M4M2
  • sleepWinsRaceWorkflow | wrun_01M00MZVR50DQPTVSYM26GKD6A
  • stepWinsRaceWorkflow | wrun_01M00MZZCDT065EH141CV26EBK
  • nullByteWorkflow | wrun_01M00N02HE0TJ29TCTK3BQG5MH
  • workflowAndStepMetadataWorkflow | wrun_01M00N04T7F7VKPY9CSTJHRAPR
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01M00N2DQNA5BGTJPQR8V3ND5T
  • writableForwardedFromWorkflowWorkflow | wrun_01M00N2TTM8ZGMG0Q077S54NJT
  • writableForwardedFromStepWorkflow | wrun_01M00N2YVG4ZK78CKBVG2FBV17
  • fetchWorkflow | wrun_01M00N323CDCZ1ZNQ165YE744G
  • promiseRaceStressTestWorkflow | wrun_01M00N358NR1JG6HR2XPFS60MB
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01M00N6DZPKGH0FS1TK0ACJS2A
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01M00N6SQN704B3S5TT5KWPN5C
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M00N74ZJPM2H6G35TK7FNWHX
  • 'hookGetConflictWithPriorStepWorkflow' - hook.getConflict() does not block step execution | wrun_01M00N77KX28R5JV986EAYN09F
  • 'hookGetConflictWithParallelStepWorkfl…' - hook.getConflict() does not block step execution | wrun_01M00N79X4VMSD5GX6TPPPV6ZD
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M00N7C6Y52TFXNK4A1R09N60
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M00N7SYMW56VD2Y3NPMXHFNG
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M00N8KJ6TV2Y31Z9QV4Y5N2A
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M00N8Q70Y2X9N59BN5RTZB78
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M00N8WDYYNNWARJ7N28Z1FB1
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M00N91B19Y5A8EPJ74137VYP
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M00N99S2Y3FATWN4W2XZSZSH
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01M00N9G68NKPQC08MRJK4TV4A
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01M00N9YNKZJH8MNXEV9H6XZ7R
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01M00NA77N4BWH5SAJ03476T2Y
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01M00NACSS9TG6M9SNTNYD9PCK
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01M00NAEWB4JEPN862QVJX99CN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01M00NAXTZR74H0CGEC6Q1KT3R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01M00NB333AHB0Z7AS4BY8GYFF
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01M00NB9CT25FGD1AXVSBYQSDZ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01M00NBFRZWAJE2NMJZS14SSBP
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01M00NBP3KQTK436C9BKDPR4D4
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01M00NBWHJPXF7CNS3EMGA2PNW
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01M00NC2X81NY8Q26Q0GWS3BJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01M00NCEHW9371ZMX5W4RQAAMW
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01M00NCP34R7CQBAK271NA0D30
  • cancelRun - cancelling a running workflow | wrun_01M00NCWTKD2D48TE4EXWQPD8R
  • cancelRun via CLI - cancelling a running workflow | wrun_01M00ND1DC1F5PT7JGG4YX0WHC
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01M00ND8GQG0HY2N7YXW3HQ7M6
  • hookWithSleepFinalStepWorkflow - step only on final payload | wrun_01M00NDKHBNAA7859MS2GMSQZ0
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01M00NDX3B064JT5CMCR169EQN
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01M00NE7K6XCE7Z1MG0XTGABC7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01M00NEDXZ8H7NQX45JBDMH8N2
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01M00NEG3NVFBH092C2Z3KJG4C
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M00NEJDBEJQSSM20QHA0N91P

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 97 0 8
✅ example 97 0 8
✅ express 97 0 8
✅ fastify 97 0 8
✅ hono 97 0 8
✅ nextjs-turbopack 102 0 3
✅ nextjs-webpack 102 0 3
✅ nitro 97 0 8
✅ nuxt 97 0 8
✅ sveltekit 97 0 8
✅ vite 97 0 8
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 99 0 6
✅ express-stable 99 0 6
✅ fastify-stable 99 0 6
✅ hono-stable 99 0 6
✅ nextjs-turbopack-canary 86 0 19
✅ nextjs-turbopack-stable 105 0 0
✅ nextjs-webpack-canary 86 0 19
✅ nextjs-webpack-stable 105 0 0
✅ nitro-stable 99 0 6
✅ nuxt-stable 99 0 6
✅ sveltekit-stable 99 0 6
✅ vite-stable 99 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 99 0 6
✅ express-stable 99 0 6
✅ fastify-stable 99 0 6
✅ hono-stable 99 0 6
✅ nextjs-turbopack-canary 86 0 19
✅ nextjs-turbopack-stable 105 0 0
✅ nextjs-webpack-canary 86 0 19
✅ nextjs-webpack-stable 105 0 0
✅ nitro-stable 99 0 6
✅ nuxt-stable 99 0 6
✅ sveltekit-stable 99 0 6
✅ vite-stable 99 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 99 0 6
✅ express-stable 99 0 6
✅ fastify-stable 99 0 6
✅ hono-stable 99 0 6
✅ nextjs-turbopack-canary 86 0 19
✅ nextjs-turbopack-stable 105 0 0
✅ nextjs-webpack-canary 86 0 19
✅ nextjs-webpack-stable 105 0 0
✅ nitro-stable 99 0 6
✅ nuxt-stable 99 0 6
✅ sveltekit-stable 99 0 6
✅ vite-stable 99 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 105 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 4 0 3
✅ redis-dev 4 0 3
✅ turso-dev 4 0 3
❌ turso 3 83 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 99 0 6
✅ e2e-local-dev-tanstack-start-stable 99 0 6
✅ e2e-local-postgres-nest-stable 99 0 6
✅ e2e-local-postgres-tanstack-start-stable 99 0 6
✅ e2e-local-prod-nest-stable 99 0 6
✅ e2e-local-prod-tanstack-start-stable 99 0 6

📋 View full workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant