Skip to content

Support dynamic retry delays for Workflow steps in local dev#14535

Open
Naapperas wants to merge 1 commit into
cloudflare:mainfrom
Naapperas:nunopereira/wor-1293-workflow-step-delay-fn
Open

Support dynamic retry delays for Workflow steps in local dev#14535
Naapperas wants to merge 1 commit into
cloudflare:mainfrom
Naapperas:nunopereira/wor-1293-workflow-step-delay-fn

Conversation

@Naapperas

@Naapperas Naapperas commented Jul 3, 2026

Copy link
Copy Markdown

Bump @cloudflare/workers-types to 5.x for the published WorkflowDelayFunction and WorkflowDynamicDelayContext types, and implement dynamic step-retry delays in the workflows-shared engine: retries.delay may be a function that computes the delay per failed attempt (invoked with { ctx, error }, 5s timeout), fed into the configured backoff. Invalid/throwing/timed-out functions fail the step without further retries.


A picture of a cute animal (not mandatory, but encouraged)

No cute animal pictures on hand so stock photo:
image


Open in Devin Review

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 04f589c

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

This PR includes changesets to release 6 packages
Name Type
wrangler Minor
miniflare Minor
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared 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

@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team July 3, 2026 11:37
@workers-devprod

workers-devprod commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
  • ✅ @cloudflare/workflows
Show detailed file reviewers
  • .changeset/workflow-step-dynamic-delay.md: [@cloudflare/wrangler]
  • packages/workflows-shared/src/context.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/src/lib/delay.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/src/lib/errors.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/src/lib/retries.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/src/lib/validators.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/tests/engine.test.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/tests/lib/delay.test.ts: [@cloudflare/wrangler]
  • packages/workflows-shared/tests/validators.test.ts: [@cloudflare/wrangler]
  • pnpm-lock.yaml: [@cloudflare/wrangler]
  • pnpm-workspace.yaml: [@cloudflare/wrangler]

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread .changeset/workflow-step-dynamic-delay.md Outdated
Comment thread packages/workflows-shared/src/lib/delay.ts
Comment thread packages/workflows-shared/src/lib/retries.ts Outdated
@Naapperas Naapperas force-pushed the nunopereira/wor-1293-workflow-step-delay-fn branch 2 times, most recently from feb4bf4 to 30eb4fe Compare July 3, 2026 18:42
devin-ai-integration[bot]

This comment was marked as resolved.

@Naapperas Naapperas force-pushed the nunopereira/wor-1293-workflow-step-delay-fn branch from cd56048 to 694c054 Compare July 3, 2026 19:52
@Naapperas Naapperas requested a review from pombosilva July 6, 2026 09:30
@Naapperas Naapperas force-pushed the nunopereira/wor-1293-workflow-step-delay-fn branch from 694c054 to 599f28e Compare July 6, 2026 13:38
Bump @cloudflare/workers-types to 5.x for the published WorkflowDelayFunction
and WorkflowDynamicDelayContext types, and implement dynamic step-retry delays
in the workflows-shared engine: retries.delay may be a function that computes
the delay per failed attempt (invoked with { ctx, error }, 5s timeout), fed
into the configured backoff. Invalid/throwing/timed-out functions fail the step
without further retries.
@Naapperas Naapperas force-pushed the nunopereira/wor-1293-workflow-step-delay-fn branch from 599f28e to 04f589c Compare July 6, 2026 17:36
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.

3 participants