-
Notifications
You must be signed in to change notification settings - Fork 4k
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
❗ NOTICE (diff): cannot read properties of undefined on diff. #30241
Comments
Hey @rmetcalfe-msp, thanks for reporting this. We are looking into it right now. In the meantime, do you have a workaround for this issue? Pinning to v2.141.0 or using the We recently updated our diff logic to pick up some more properties from ChangeSets. I suspect thats where the bug will be. Do you have any general information about your stack that you could share? It looks like you have a severless function. Do you have any number of ssm parameters in the stack? |
@scanlonp Yes I have pinned to 2.141.0 in our deploy pipeline: I've tried expanding a sample application from here which is similar to what we're using minus all of the subnet/vpc details, but still can't repeat the error unfortunately. Sorry I can't be more help. This is the line that it appears to be failing on from the stack trace:
|
We've found the root cause. The Thank you so much for opening this issue! |
@bergjaak awesome, thanks for the prompt response and fix. Great work |
Fixes # [30093](aws/aws-cdk#30093)
I have stopped using Python CDK and migrated to TypeScript one because of "undefined" errors without meaningful info that are hard to debug. Is this Python only issue or also relevant for TS? |
@andreif This was specific to CDK and not language specific. A change was made to diff in CDK v2.142.0 to include changes to properties that are only present in the change set. This introduced cases where the resource type could be undefined which resulted in an error from calling 'includes' on undefined. But, the CDK team has patched it and has been fixed in v2.142.1. |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Please add your +1 👍 to let us know you have encountered this
Status
Resolved
What is the issue?
The latest version of aws-cdk (v2.142.0) has broken our chalice with cdk deployment with the below error:
Cannot read properties of undefined (reading 'includes')
Overview
The
change.resourceType
is typed as being a string, but with this change there are cases whenchange.resourceType
can be undefined.Workaround
The workaround would be to use versions<v2.142.0
Resolution
The issue has been reverted and has been patched as of v2.142.1
Related issues
No response
Expected Behavior
Usual behaviour shows the cloudformation changeset, which is still the case when using v2.141.0
Current Behavior
Result with diff --verbose:
Reproduction Steps
I'm unable to reproduce the issue with a small sample application. I will continue to try reproduce but wanted to raise here in case it might be obvious what the issue is.
CDK CLI Version
2.142.0
Framework Version
No response
Node.js Version
21.2.0
OS
Windows / Linux
Language
Python
Language Version
Python 3.9.13
Other information
No response
The text was updated successfully, but these errors were encountered: