-
Notifications
You must be signed in to change notification settings - Fork 28
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
Initial update to CDKv2 #1
Initial update to CDKv2 #1
Conversation
jgreenbow-userful
commented
Jun 16, 2022
- updated requirements files
- replacement of aws_cdk.core with explicit imports
- use of constructs module
- removal of pylint useless option values
Issue: does not pass tests due to incompatibilities between cdk-chalice (CDKv1 only) and chalice[cdkv2] implementation. Someone with experience in chalice could take it from here, or we could drop the test for now. |
EDIT: snipped error log to file
|
Hi @jgreenbow-userful, thanks for the work and submitting the pull request! Since this code supports an already published blog post, I sadly can't merge these changes, as it will require changes to the blog post itself. Mentioning just in case - cdk-chalice and chalice[cdk]/chalice[cdkv2] are two different implementations, and replace each other. For the blog post this code supports, it doesn't matter much which one to use, as it doesn't affect the recommendation on project structure. When I bumped pylint version in another project of mine, I also suddenly saw the first two options becoming a no-op, although they worked before. Please let me know if you have any thoughts on that, and again, thank you for submitting the pull request! |
P.S.: I am looking into supporting CDK v2 in cdk-chalice: alexpulver/cdk-chalice#93 |
@alexpulver That all makes sense, and I should add that I appreciate your original recommendations and project structure. That being said, this repo is quite a bit less useful if it needs significant modification to update before it can be used. How can users get access to a CDKv2 version? A new repo in aws-samples? A branch in this repo and remark in the blog post or README? Just wondering what options exist to make this project useful to future CDKers. Thank you again, it has been a great launch point! |
I also suppose the answer may have to wait until cdk2-chalice gets merged. Would you consider merging this pull request into a branch other than main? Or shall we close it? |
Thank you for the kind words 🤗. I liked your idea of a separate branch - created |
👍 Updated the commit description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have a few comments which are mostly cosmetic - can you please take a look?
Imports adjusted - updated requirements files - replacement of aws_cdk.core with aws_cdk - import new constructs module Cleared cdk context values Updated aws-cdk CLI to compatible version
As cdk-chalice has not been updated for cdkv2 yet, chalice[cdkv2] provides an alternative implementation for these constructs. However, this breaks the current tests. Bumped pip-tools for requirements resolution
flake8>=4.0 pins importlib-metadata<4.3 as a dependency. This is incompatible with other packages requiring importlib-metadata>=4.12.
Hi @jgreenbow-userful, thanks for submitting the changes! I am on vacation until September, hence didn't look into the review yet. I will go over that when I return. |
No worries @alexpulver , I have been enjoying some vacation time myself. This submission is not in any critical path, so no reason for urgency. Make the most of your time away! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment and we are done 😃
@jgreenbow-userful thanks a lot for your work on this! We further discussed internally, and want to update the blog post and the trunk branch implementation to AWS CDK v2 using your commit. I anyway wanted to update the blog post and this project with some changes to recommended project structure and internal implementation, so it is a great opportunity to do both together. |
@alexpulver Thanks so much, that's great to hear! |
* Initial update to CDKv2 Imports adjusted - updated requirements files - replacement of aws_cdk.core with aws_cdk - import new constructs module Cleared cdk context values Updated aws-cdk CLI to compatible version * Removed ignored pylint options * Replaced cdk-chalice with chalice[cdkv2] As cdk-chalice has not been updated for cdkv2 yet, chalice[cdkv2] provides an alternative implementation for these constructs. However, this breaks the current tests. Bumped pip-tools for requirements resolution * Pinned flake8 to prevent dependency conflict flake8>=4.0 pins importlib-metadata<4.3 as a dependency. This is incompatible with other packages requiring importlib-metadata>=4.12. * Resolved pylint W1514: unspecified encoding * Updated token values in chalice config
@jgreenbow-userful FYI I updated the mainline and the blog post with AWS CDK v2 + some additional changes to project structure and the component we wanted to do. Thanks again for your contribution! |