Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fab-mindflow opened this issue Jun 20, 2022 · 2 comments
Closed
Assignees
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@fab-mindflow
Copy link

fab-mindflow commented Jun 20, 2022

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

@fab-mindflow fab-mindflow added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 20, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jun 20, 2022
@rix0rrr
Copy link
Contributor

rix0rrr commented Jul 7, 2022

The code in question lives here:

if (updatedPropName !== 'DefinitionString') {
return ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT;
}

When you make a change that adds a new state type, and you run cdk diff, what is the output?

@rix0rrr rix0rrr added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 7, 2022
@github-actions
Copy link

github-actions bot commented Jul 9, 2022

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants