Closed raksiv closed 2 years ago
This might be environment specific, it does not happen with Nitric Deploy, and it does not happen on my Windows machine. Just Mac - using M1 chipset.
Looks like a race condition - the repository deletion is starting before the image deletion finishes, which means the repo isn't empty and fails.
- nitric:Image hello deleting # <<< starts deleting image here.
- aws:iam:Role helloLambdaRole deleted
- nitric:api:AwsApiGateway main deleting
- nitric:func:AWSLambda hello deleting
- aws:resourcegroups:Group jj-abc deleting
- aws:ecr:Repository jj-hello deleting # <<< starts deleting the image repository (too soon)
- aws:ecr:Repository jj-hello deleting error: deleting urn:pulumi:jj-abc::jj::aws:ecr/repository:Repository::jj-hello: 1 error occurred:
- aws:ecr:Repository jj-hello **deleting failed** error: deleting urn:pulumi:jj-abc::jj::aws:ecr/repository:Repository::jj-hello: 1 error occurred:
- aws:resourcegroups:Group jj-abc deleted
pulumi:pulumi:Stack jj-jj-abc error: update failed
pulumi:pulumi:Stack jj-jj-abc **failed** 1 error
- nitric:Image hello deleted # <<< finishes deleting the image, the repo deletion would have worked after this
A temporary workaround is to run the down
command again - the repository should be the only lingering resource and get pulled down on the second attempt.
The problem is we need to update pulumi-aws to v5 to get ForceDelete
.
PR on the way..
:tada: This issue has been resolved in version 1.12.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
This is a starter template - typescript which fails to come down cleanly from the CLI
Log -
? Warning - This operation will destroy your stack, all deployed resources will be removed. Are you sure you want to proceed? Yes ⠽ Refreshing the Pulumi stack (2s)
ERROR : failed to destroy stack: exit status 255
code: 255 stdout: Destroying (jj-abc):