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): no message indicates that a hotswap happened #17778

Closed
2 tasks
eladb opened this issue Nov 30, 2021 · 2 comments · Fixed by #18058
Closed
2 tasks

(cli): no message indicates that a hotswap happened #17778

eladb opened this issue Nov 30, 2021 · 2 comments · Fixed by #18058
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@eladb
Copy link
Contributor

eladb commented Nov 30, 2021

Description

When using watch or --swap and a hotswap occurs, I expect the CLI to tell me that a hotswap actually happened. Otherwise it seems like no-op.

Use Case

Since our deployment process is quite verbose already, and indicates when resources are provisioned, I'd expect a hotswap to also be displayed as a message.

Here's an example output:

Detected file changes during deployment. Invoking 'cdk deploy' again
👾 bundle » bundle:foo.lambda | esbuild --bundle src/foo.lambda.ts --target="node14" --platform="node" --outfile="assets/foo.lambda/index.js" --external:aws-sdk

  assets/foo.lambda/index.js  559b

⚠️ The --hotswap flag deliberately introduces CloudFormation drift to speed up deployments
⚠️ It should only be used for development - never use it for your production Stacks!
my-stack-dev: deploying...
[0%] start: Publishing 258d20bfa0b25ae5baec07ea31bd444fb2ceaadbbc3e210cfbf6c14326d911b9:current
[100%] success: Published 258d20bfa0b25ae5baec07ea31bd444fb2ceaadbbc3e210cfbf6c14326d911b9:current

 ✅  my-stack-dev

Stack ARN:
arn:aws:cloudformation:us-east-1:585695036304:stack/my-stack-dev/9807ac00-5200-11ec-98f7-0e39c015f87d

As you can see, the asset publishing is printed, but then then it just shows the stack name without any indication that the AWS Lambda code was hotswapped.

Proposed Solution

Print something like:

Hotswapping AWS Lambda code bla bla bla

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@eladb eladb added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 30, 2021
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Nov 30, 2021
@skinny85
Copy link
Contributor

skinny85 commented Dec 1, 2021

Great idea!

@skinny85 skinny85 added effort/medium Medium work item – several days of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 1, 2021
@skinny85 skinny85 removed their assignment Dec 1, 2021
@mergify mergify bot closed this as completed in #18058 Dec 17, 2021
mergify bot pushed a commit that referenced this issue Dec 17, 2021
Add additional messages to indicate that a hotswap deployment is
occurring (or not) along with what resources are being hotswapped.

fix #17778


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
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.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
Add additional messages to indicate that a hotswap deployment is
occurring (or not) along with what resources are being hotswapped.

fix aws#17778


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants