Skip to content

(cli): hotswap not always working for step functions machine update #20794

@fab-mindflow

Description

@fab-mindflow

Describe the bug

When using CDK to deploy step function in --hotswap mode, it looks like a change to the state machine is not always hotswapped. Hotswap only happens when a state type is already in use in the state machine.

It also happens with all other states like Choice or Map. When using CDK to build step functions machine, it makes the process long each time a new state type is added.

Workaround: as of today, I'm using an ignore branch in my state definition with all possible states so that hotswap happens every time.

Expected Behavior

State machine is always hotswapped.

Current Behavior

State machine is not always hotswapped.

Reproduction Steps

Ex 1:

  • you have a state machine previously deployed not using a lambda
  • you deploy with --hotswap
  • it falls back to a full deployment - KO

Ex 2:

  • you have a state machine previously deployed already using a lambda
  • you deploy with --hotswap
  • it optimizes deployment - OK

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.28.1

Framework Version

No response

Node.js Version

14

OS

macOS

Language

Typescript

Language Version

4.4.3

Other information

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.needs-triageThis issue or PR still needs to be triaged.package/toolsRelated to AWS CDK Tools or CLIresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions