aws-cdk: Asset publishing failure does not stop stack deployments (which results in a runtime failure in CloudFormation) #26048
Labels
@aws-cdk/aws-cloudformation
Related to AWS CloudFormation
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
needs-review
p1
Describe the bug
Failures encountered while publishing assets (e.g. failures when executing the
source.executable
in aDockerImageAsset
) do not stop the CLI from continuing with the stack deployment.This results in a CloudFormation deployment that eventually fails, due to not being able to find the asset (as it was never published).
Expected Behavior
cdk deploy should not proceed with stack deployments unless all stack assets have published successfully.
Current Behavior
CDK deploy continues normally with the deployment.
For example (these logs are heavily redacted, but hopefully demonstrate the point clearly),
Reproduction Steps
It'd take awhile for me to setup a self-contained replica of the current scenario.
Might be easy to force with a "fake" DockerImageAsset in a simple CDK stack where the asset's source executable just exits immediately with a non-zero exit code.
Possible Solution
Don't continue with the deployment, if any assets fail to publish.
Additional Information/Context
No response
CDK CLI Version
2.83.1 (build 006b542)
Framework Version
No response
Node.js Version
18
OS
Mac OSX
Language
Typescript
Language Version
TypeScript 4.9.5
Other information
No response
The text was updated successfully, but these errors were encountered: