Open anentropic opened 5 months ago
Some more info...
By making other changes to my stack I was able to get one of these panels, with a confirmation prompt:
IAM Statement Changes
┌───┬───────────────────────────────────┬────────┬─────────────────┬───────────────────────────────────┬─────────────────────────────────────┐
│ │ Resource │ Effect │ Action │ Principal │ Condition │
├───┼───────────────────────────────────┼────────┼─────────────────┼───────────────────────────────────┼─────────────────────────────────────┤
│ + │ ${LogsBucket.Arn} │ Allow │ s3:GetBucketAcl │ Service:delivery.logs.amazonaws.c │ │
│ │ │ │ │ om │ │
└───┴───────────────────────────────────┴────────┴─────────────────┴───────────────────────────────────┴─────────────────────────────────────┘
(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)
Do you wish to deploy these changes (y/n)?
After confirming I do then see a meaningful error displayed briefly, while the deployment is still in progress.
But, after it finishes, the progress text is cleared away and all I see is the generic message from my original post.
I think this is the root of the problem behaviour - it is unhelpful that these "in progress" error messages (which are the ones that contain the actual error info) get cleared away after the deploy finishes failing - so you have to watch the deploy like a hawk to spot an error that is only displayed for a few seconds.
And also they are not displayed at all in the case that there is no "IAM Statement Changes" confirmation prompt.
Are you able to scroll up and see the deploy error messages?
You may also try cdk deploy -R
or cdk deploy --no-rollback
and you should see everything stops on the failed deployment for your troubleshooting.
Are you able to scroll up and see the deploy error messages?
No, that's what I'm saying - there's nothing to scroll up to, they get overwritten in the terminal during the deploy process. They are only shown as sort of progress message for individual steps of the deployment, but when it finishes that gets wiped away and just a generic summary is displayed.
Here is a video demonstrating the problem in action...
https://github.com/aws/aws-cdk/assets/147840/f8ee6b56-cfcd-4f38-a447-3c43a27cdcb4
The real error ("Export with name ifm-ssa-loadbalancer-dns-name-qa-eu is already exported by stack") is only displayed briefly before it disappears and is replaced by a generic stack trace. In fact I had to capture the screen recording to get a good look at the error.
Does CFN show an error? I'm assuming the ask is that you shouldn't have to look at CFN in the first place, but wondering if there is an error or not because if not maybe it's not CDK at fault.
Does CFN show an error? I'm assuming the ask is that you shouldn't have to look at CFN in the first place, but wondering if there is an error or not because if not maybe it's not CDK at fault.
Unfortunately I've since destroyed and redeployed the stack so it's hard to know
But I would assume that cdk deploy is making cloud formation apt requests under the hood, rather than shelling out to another tool?
Seems to me the issue is with how error output is printed to the terminal rather than source of the error
Describe the bug
When I try to deploy my stack I get the following error:
Expected Behavior
It either just works (better) or, if it fails, it returns some information about what went wrong (acceptable)
Current Behavior
Notably the message contains no information about what went wrong. Only that the tool may have also left some crap lying around that I have to clean up manually.
Reproduction Steps
I doubt it is possible to make a minimal reproduction, I certainly don't have the time or resources to whittle down my stack in a separate environment, sorry 😢
Possible Solution
presumably somewhere in the region of the code in the traceback cdk is swallowing the actual error and replacing it with this generic message
so maybe don't do that
Additional Information/Context
No response
CDK CLI Version
2.131.0 (build 92b912d)
Framework Version
No response
Node.js Version
v18.18.0
OS
macOS 14.3.1
Language
Python
Language Version
3.11.5
Other information
No response