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-assets: Messaging should be more explicit around asset publishing. #14403

Open
2 tasks
bgshacklett opened this issue Apr 27, 2021 · 3 comments
Open
2 tasks
Labels
@aws-cdk/assets Related to the @aws-cdk/assets package feature-request A feature should be added or improved. p2

Comments

@bgshacklett
Copy link

CDK should be more explicit about its actions in status messages when assets are being published. If cached assets are used, this should be explained to the user by default, not limited to verbose output.

Use Case

Recent failures with packaging (see: #12536) led to a long troubleshooting process for me and my team. If CDK was explicit that cached assets in the staging bucket were not being overwritten, it would have removed a lot of uncertainty regarding what was actually going on.

Proposed Solution

Update messaging to be more explicit about the asset publishing process.

Current Messaging

CdkTestStack: deploying...
[0%] start: Publishing f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684:current
[100%] success: Published f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684:current
CdkTestStack: creating CloudFormation changeset...

Proposed Messaging

CdkTestStack: deploying...
[0%] start: Publishing f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684:current
[0%] found: Found s3://cdktoolkit-stagingbucket-ab52pr18ol6w/assets/f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684.zip
[100%] success: Using existing published asset: f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684:current
CdkTestStack: creating CloudFormation changeset...

Other

Full output of current behavior, including verbose output:

CdkTestStack: deploying...
Waiting for stack CDKToolkit to finish creating or updating...
[AWS cloudformation 200 0.112s 0 retries] describeStacks({ StackName: 'CDKToolkit' })
[AWS cloudformation 200 0.092s 0 retries] describeStacks({ StackName: 'CdkTestStack' })
Preparing asset f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684: {"path":"asset.f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684","id":"f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684","packaging":"zip","sourceHash":"f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684","s3BucketParameter":"AssetParametersf406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684S3Bucket22C26EA4","s3KeyParameter":"AssetParametersf406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684S3VersionKeyC8C31F3E","artifactHashParameter":"AssetParametersf406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684ArtifactHash8E6E5A94"}
Storing asset asset.f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684 at s3://cdktoolkit-stagingbucket-ab52pr18ol6w/assets/f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684.zip
CdkTestStack: checking if we can skip deploy
[AWS cloudformation 200 0.073s 0 retries] getTemplate({ StackName: 'CdkTestStack', TemplateStage: 'Original' })
CdkTestStack: template has changed
CdkTestStack: deploying...
[0%] start: Publishing f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684:current
[0%] check: Check s3://cdktoolkit-stagingbucket-ab52pr18ol6w/assets/f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684.zip
[AWS s3 200 0.191s 0 retries] getBucketLocation({ Bucket: 'cdktoolkit-stagingbucket-ab52pr18ol6w' })
[AWS s3 200 0.073s 0 retries] listObjectsV2({
  Bucket: 'cdktoolkit-stagingbucket-ab52pr18ol6w',
  Prefix: 'assets/f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684.zip',
  MaxKeys: 1
})
[0%] found: Found s3://cdktoolkit-stagingbucket-ab52pr18ol6w/assets/f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684.zip
[100%] success: Published f406de8131dc4c76d441630e7f2b643a0a8f4aeafdf68ced20ed731754cb4684:current
Removing existing change set with name cdk-deploy-change-set if it exists
[AWS cloudformation 200 0.094s 0 retries] deleteChangeSet({ StackName: 'CdkTestStack', ChangeSetName: 'cdk-deploy-change-set' })
Attempting to create ChangeSet with name cdk-deploy-change-set to update stack CdkTestStack
CdkTestStack: creating CloudFormation changeset...
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@bgshacklett bgshacklett added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 27, 2021
@bgshacklett bgshacklett changed the title (module name): short issue description cdk-assets: Messaging should be more explicit around asset publishing. Apr 27, 2021
@github-actions github-actions bot added the @aws-cdk/assets Related to the @aws-cdk/assets package label Apr 27, 2021
@eladb eladb added the p2 label May 2, 2021
@eladb eladb unassigned eladb May 2, 2021
@eladb
Copy link
Contributor

eladb commented May 2, 2021

Routing to @rix0rrr

@ryparker ryparker removed the needs-triage This issue or PR still needs to be triaged. label Jun 2, 2021
@github-actions
Copy link

github-actions bot commented Jun 2, 2022

This issue has not received any attention in 1 year. 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 the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 2, 2022
@bgshacklett
Copy link
Author

Please don't auto-close.

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/assets Related to the @aws-cdk/assets package feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants