Open enpatrik opened 5 months ago
I'll take this.
@lmammino I wanted to loop you in here as it's related to https://github.com/aws/aws-cdk/pull/28414. It looks like we're still seeing this.
FYI, I created a ticket which slightly related to this one: https://github.com/aws/aws-cdk/issues/29887
I got the same [object Object] warning on aws-cdk and aws-cdk-lib version 2.114.1 up to 2.143.0 (currently latest version). The warnings only appear since version 2.112.0 in my case. It's the exact same issue as the OP. Somehow the string interpolation turns into [object Object], because if I replace the two ` with regular " quotes I do see the message.
I get a similar output from a CloudWatch Alarm resource: [Warning at /path/to/my/cloudwatch/alarm] [object Object]
. Would be great to be able to see what the actual warning is.
Describe the bug
Warning message is expected to be shown, but the message is not correctly presented.
Expected Behavior
Warning message to be presented correctly.
Warning message was added in: https://github.com/aws/aws-cdk/commit/2c21ea06adc629d177db0114f16800d5f5f60c48#diff-527ac1e9edceb6fd9abb75249884fa31415393bbfed87ef28a2faa8a6a39b416R347 CDK v2.112.0
Current Behavior
CDK synth warning message:
Reproduction Steps
Run:
By following the advice from the warning message (that was supposed to be shown) and changing the code to use:
The warning is no longer shown (as expected).
Possible Solution
No response
Additional Information/Context
The warning message is still shown when setting
skipPermissions = true
:And the permissions are still added to the function, which was unexpected. Let me know if you consider this a bug and if you want me to create a separate ticket for that.
CDK CLI Version
CDK 2.124.0 (build 4b6724c)
Framework Version
No response
Node.js Version
v20.11.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
cdk synth verbose log:
Warning message was added in PR: https://github.com/aws/aws-cdk/pull/27861