aws-cdk-project-structure-python icon indicating copy to clipboard operation
aws-cdk-project-structure-python copied to clipboard

Initial update to CDKv2

Open jgreenbow-userful opened this issue 3 years ago • 10 comments

  • updated requirements files
  • replacement of aws_cdk.core with explicit imports
  • use of constructs module
  • removal of pylint useless option values

jgreenbow-userful avatar Jun 16 '22 04:06 jgreenbow-userful

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.

jgreenbow-userful avatar Jun 16 '22 04:06 jgreenbow-userful

EDIT: snipped error log to file

$ ./scripts/run-tests.sh

aws-cdk-project-structure-python_run-tests_01.log

jgreenbow-userful avatar Jun 16 '22 04:06 jgreenbow-userful

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!

alexpulver avatar Jun 16 '22 19:06 alexpulver

P.S.: I am looking into supporting CDK v2 in cdk-chalice: https://github.com/alexpulver/cdk-chalice/issues/93

alexpulver avatar Jun 16 '22 19:06 alexpulver

@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!

jgreenbow-userful avatar Jun 16 '22 22:06 jgreenbow-userful

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?

jgreenbow-userful avatar Jun 17 '22 15:06 jgreenbow-userful

Thank you for the kind words 🤗. I liked your idea of a separate branch - created chalice-cdkv2 branch and made it to be the base branch for the pull request. Once I merge the pull request, I'll add a note about the new branch in the README.md file on the main branch. Can you please add the fact of migrating from cdk-chalice library to chalice[cdkv2] in the commit description?

alexpulver avatar Jun 17 '22 19:06 alexpulver

👍 Updated the commit description.

jgreenbow-userful avatar Jun 17 '22 21:06 jgreenbow-userful

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.

alexpulver avatar Aug 20 '22 05:08 alexpulver

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!

jgreenbow-userful avatar Aug 23 '22 18:08 jgreenbow-userful

@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 avatar Sep 16 '22 19:09 alexpulver

@alexpulver Thanks so much, that's great to hear!

jgreenbow-userful avatar Sep 16 '22 20:09 jgreenbow-userful

@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!

alexpulver avatar Sep 22 '22 12:09 alexpulver