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

cdk bootstrap prints "hotswap deployment skipped" when there is no diff #25736

Closed
rittneje opened this issue May 25, 2023 · 4 comments · Fixed by #29877, rwlxxvii/containers#124 or rwlxxvii/containers#140 · May be fixed by NOUIY/aws-solutions-constructs#98 or NOUIY/aws-solutions-constructs#99
Assignees
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI

Comments

@rittneje
Copy link

rittneje commented May 25, 2023

Describe the bug

This appears to be the same issue as #24602 purported to fix. I guess it fixed it for normal stack deployments but not the bootstrap.

If we run cdk bootstrap and there are no changes, we now get a confusing message:

✨ hotswap deployment skipped - no changes were detected (use --force to override)

Expected Behavior

This message should not be displayed unless a hotswap was requested. (Is that even a thing for cdk bootstrap?)

It should simply say the same thing it used to.

✅ Environment aws://{account}/{region} bootstrapped (no changes).

Current Behavior

See above.

Reproduction Steps

Run cdk bootstrap twice for a given account/region.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.74.0 (build 70e2a33)

Framework Version

No response

Node.js Version

v18.16.0

OS

Alpine 3.17

Language

Python

Language Version

3.11.3

Other information

No response

@rittneje rittneje added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 25, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label May 25, 2023
@pahud pahud self-assigned this May 25, 2023
@pahud
Copy link
Contributor

pahud commented May 25, 2023

Unfortunately I can't reproduce this. Does this issue still exist in the latest CDK version?

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 25, 2023
@pahud pahud removed their assignment May 25, 2023
@pahud pahud added effort/small Small work item – less than a day of effort and removed effort/medium Medium work item – several days of effort labels May 25, 2023
@rittneje
Copy link
Author

@pahud This issue is still happening in v2.85.0.

+ cdk bootstrap --template cdk-bootstrap-template.yaml --profile bootstrap --trust {redacted} --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess --tags '{redacted}' --termination-protection --app cdk.out aws://{redacted}/us-east-1
Using bootstrapping template from cdk-bootstrap-template.yaml
 ⏳  Bootstrapping environment aws://{redacted}/us-east-1...
Trusted accounts for deployment: {redacted}
Trusted accounts for lookup: (none)
Execution policies: arn:aws:iam::aws:policy/AdministratorAccess

 ✨ hotswap deployment skipped - no changes were detected (use --force to override)

 ✅  Environment aws://{redacted}/us-east-1 bootstrapped (no changes).

@rittneje
Copy link
Author

rittneje commented Oct 9, 2023

@pahud This issue is still happening in v2.99.1.

+ cdk bootstrap --template cdk-bootstrap-template.yaml --profile bootstrap --trust {redacted} --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess --tags '{redacted}' --termination-protection --app cdk.out aws://{redacted}/us-east-1
Using bootstrapping template from cdk-bootstrap-template.yaml
 ⏳  Bootstrapping environment aws://{redacted}/us-east-1...
Trusted accounts for deployment: {redacted}
Trusted accounts for lookup: (none)
Execution policies: arn:aws:iam::aws:policy/AdministratorAccess

 ✨ hotswap deployment skipped - no changes were detected (use --force to override)

 ✅  Environment aws://{redacted}/us-east-1 bootstrapped (no changes).

cc @peterwoodworth

@comcalvi comcalvi self-assigned this Apr 19, 2024
@mergify mergify bot closed this as completed in #29877 Apr 19, 2024
mergify bot pushed a commit that referenced this issue Apr 19, 2024
#29877)

### Issue # (if applicable)

Closes #25736.

### Reason for this change

The bootstrap calls `deployStack` without specifying hotswap, and `deployStack` does not correctly default the hotswap mode to `FULL_DEPLOYMENT`.

### Description of changes

Make `deployStack` correctly default `hotswapMode` to `FULL_DEPLOYMENT`.

### Description of how you validated changes

Manual testing. Before this change:

```
 ✨ hotswap deployment skipped - no changes were detected (use --force to override)

 ✅  Environment aws://123456789012/us-east-1 bootstrapped (no changes).

```

After:

```
 ✅  Environment aws://123456789012/us-east-1 bootstrapped (no changes).
```

Unit tests not added because we don't have any unit tests for bootstrap and this is cosmetic.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment