Skip to content

feat(sdk/aws/workflow): Add stepWithRollbackV2 to fix rollback registration and config#6904

Open
anatolzak wants to merge 2 commits into
anomalyco:devfrom
anatolzak:worktree-fix-aws-step-with-rollback-v2
Open

feat(sdk/aws/workflow): Add stepWithRollbackV2 to fix rollback registration and config#6904
anatolzak wants to merge 2 commits into
anomalyco:devfrom
anatolzak:worktree-fix-aws-step-with-rollback-v2

Conversation

@anatolzak

Copy link
Copy Markdown
Contributor

Fixes #6902 and #6903.

Two problems with stepWithRollback today:

To avoid a breaking change, this adds stepWithRollbackV2 that fixes both. we now register the undo before the step runs, passes the result to the undo as TOutput | undefined. this way undo reconciles against real state when the step failed, and takes a separate undoConfig.

The old stepWithRollback is kept and marked @deprecated.

The workflow test file was also broken before this. it stubbed an aws.fetch export that doesn't exist, so the whole file threw on import and none of the tests ran (these SDK tests aren't in CI, so I guess it went unnoticed). The first commit fixes that by mocking awsFetch via mock.module instead, so the suite actually loads before the V2 work builds on it.

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.

sdk(workflow): register a step's undo before running it, not after

1 participant