Skip to content

[Workflows] Add step context with attempt count#11970

Merged
pombosilva merged 2 commits intomainfrom
osilva/add-step-context
Mar 4, 2026
Merged

[Workflows] Add step context with attempt count#11970
pombosilva merged 2 commits intomainfrom
osilva/add-step-context

Conversation

@pombosilva
Copy link
Contributor

@pombosilva pombosilva commented Jan 19, 2026

Fixes WOR-1054.

Adds step context with attempt count for step.do() callbacks. This allows to access the current step attempt number within their step (this is 1-indexed).

This change is backward compatible with JS workflows, however it would break Python workflows - here is the PR to prevent that.

Types will be added in a follow-up PR to workerd.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: We will add after all changes get released (internal + workerd)

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


Open with Devin

@pombosilva pombosilva requested review from a team as code owners January 19, 2026 15:01
@changeset-bot
Copy link

changeset-bot bot commented Jan 19, 2026

🦋 Changeset detected

Latest commit: 45138e0

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

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11970

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11970

miniflare

npm i https://pkg.pr.new/miniflare@11970

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11970

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11970

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11970

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11970

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11970

wrangler

npm i https://pkg.pr.new/wrangler@11970

commit: bc797cc

@pombosilva pombosilva force-pushed the osilva/add-step-context branch 2 times, most recently from d4c5984 to dde1dd2 Compare January 19, 2026 15:16
@Caio-Nogueira
Copy link
Contributor

Looks good, but we need to wait until this additional argument is passed in workflows production as well

@edmundhung edmundhung marked this pull request as draft January 23, 2026 15:09
@pombosilva pombosilva force-pushed the osilva/add-step-context branch from dde1dd2 to c8c55f2 Compare March 2, 2026 14:09
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

✅ All changesets look good

@pombosilva pombosilva marked this pull request as ready for review March 2, 2026 14:10
devin-ai-integration[bot]

This comment was marked as resolved.

@pombosilva pombosilva force-pushed the osilva/add-step-context branch from c8c55f2 to 060f94b Compare March 4, 2026 14:43
@workers-devprod
Copy link
Contributor

workers-devprod commented Mar 4, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/workflows
  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@pombosilva pombosilva force-pushed the osilva/add-step-context branch 2 times, most recently from 130d544 to da770b1 Compare March 4, 2026 14:57
@pombosilva pombosilva changed the title (DO NOT MERGE YET) [Workflows] Add step context with attempt count [Workflows] Add step context with attempt count Mar 4, 2026
@pombosilva pombosilva requested a review from avenceslau March 4, 2026 15:08
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 4, 2026
@pombosilva pombosilva force-pushed the osilva/add-step-context branch from da770b1 to 45138e0 Compare March 4, 2026 15:44
@pombosilva pombosilva merged commit f235827 into main Mar 4, 2026
39 of 43 checks passed
@pombosilva pombosilva deleted the osilva/add-step-context branch March 4, 2026 16:45
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants