Skip to content

(workflows): update rollback context types#6807

Merged
kentonv merged 4 commits into
mainfrom
vaish/workflows-rollback-context-types
Jun 16, 2026
Merged

(workflows): update rollback context types#6807
kentonv merged 4 commits into
mainfrom
vaish/workflows-rollback-context-types

Conversation

@vaishnav-mk

@vaishnav-mk vaishnav-mk commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

adds ctx: WorkflowStepContext and deprecated legacy stepName to WorkflowRollbackContext. Makes rollback required when rollback options are provided, narrows rollbackConfig to retries and timeout, and updates generated type snapshots plus RPC type tests

@vaishnav-mk vaishnav-mk requested review from a team as code owners June 12, 2026 13:25
@vaishnav-mk vaishnav-mk requested a review from james-elicx June 12, 2026 13:25
@ask-bonk

ask-bonk Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

All snapshots are consistent with the source definition. The changes are straightforward and correct:

  1. stepName: string removed from WorkflowRollbackContext
  2. ctx: WorkflowStepContext added to WorkflowRollbackContext
  3. Generated snapshots updated consistently
  4. Type tests updated to verify the new shape

The WorkflowStepContext type already contains step.name (as part of step: { name: string; count: number }) along with attempt and config, so users still have access to the step name via ctx.step.name - strictly more information than the old stepName string. The type tests cover both overloads of workflowStep.do().

This is a clean, well-scoped type change with no issues.

LGTM

github run

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this horse has already left the stable, but won't removing this property break users of Workflows?

Comment thread types/defines/rpc.d.ts
@petebacondarwin petebacondarwin removed the request for review from james-elicx June 15, 2026 08:17
@vaishnav-mk vaishnav-mk force-pushed the vaish/workflows-rollback-context-types branch from 1835b67 to db11339 Compare June 16, 2026 07:18
@vaishnav-mk

Copy link
Copy Markdown
Contributor Author

/bonk

@ask-bonk

ask-bonk Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Thread Summary

PR #6807 updates the WorkflowRollbackContext type for Workflows:

  • Removes stepName: string from WorkflowRollbackContext
  • Adds ctx: WorkflowStepContext to WorkflowRollbackContext
  • Updates all generated type snapshots and RPC type tests accordingly

Discussion:

  1. ask-bonk (bot) confirmed the changes are clean and consistent. Noted that WorkflowStepContext already contains the step name via ctx.step.name (plus attempt and config), so users still have access to the same info and more.

  2. ryanking13 left an approval.

  3. petebacondarwin raised a concern: removing stepName is a breaking change for existing Workflows users.

  4. vaishnav-mk (PR author) acknowledged it's intentional. The plan is to:

    • Remove stepName from the public types to discourage its use
    • Continue supporting it internally for a while for identified users who still rely on it
    • Steer users toward ctx instead, which offers better compatibility with other features
    • Asked Pete for his thoughts and cc'd @avenceslau

Current status: Pete's concern about the breaking change is the open question. The author has explained the rationale but hasn't yet received a follow-up response from Pete or avenceslau.

github run

@vaishnav-mk vaishnav-mk force-pushed the vaish/workflows-rollback-context-types branch from db11339 to 387757a Compare June 16, 2026 09:53
@kentonv kentonv merged commit 046855d into main Jun 16, 2026
21 of 22 checks passed
@kentonv kentonv deleted the vaish/workflows-rollback-context-types branch June 16, 2026 17:16
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.

4 participants