-
Notifications
You must be signed in to change notification settings - Fork 403
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
Feature request: Pydantic v2 managed layer #2939
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hello @lmmx! Thank you for opening this issue. I am currently reading this to respond to your points properly. |
Hi @lmmx , thank you so much for bringing this issue to discussion, this is an important point. Here in Powertools we do our best to make clear customer communication in every release we make and new features we add. We follow semantic versioning and therefore breaking changes are scheduled for major releases and even then with early and clear communication to our customers. That said, we've kept our layer with Pydanticv1 so that our users can upgrade to Pydanticv2 as often as they like, without forcing it and causing supply chain problems, as we experienced during the transition. We are looking to add Pydantic V2 as our default in Powertools v3 - tentatively end of the year (https://docs.powertools.aws.dev/lambda/python/latest/roadmap/). Creating a new layer at this moment with unique support for Pydantic v2 adds more complexity to our process for maintaining and updating that layer. At this time, we are working hard to implement new features such as external observability providers and sensitive data masking. To keep our eyes on the needs of the community, I added the Thanks. |
Hey Leandro that's cool, I built a layer myself (it didn't take much effort) so this isn't urgent. I found a link to an AWS repo which linked to another one which had a Dockerfile, and I got a general idea of how to use rustup which is needed for Pydantic v2. I suspect I actually end up installing Rust twice but it works so it's all good. Python 3.10 layer Dockerfile is below, with apologies for any mess, in case it helps anyone else but I know you have your own superior CDK approach 😺 Click to show Dockerfile
Of course there are features in Powertools including Pydantic integration which go beyond Pydantic's base library, so I'm still looking forward to the managed layer. |
Hello @lmmx! Wow, this Dockfile is priceless!! I'm going to copy and save it because I might need it soon to create some tests. Thank you so much for sharing this. Yes, we are working to merge the existing PR and start working on the V3 plan as next steps. I'll update this issue in case of news, ok? Thanks |
Hello @lmmx! We are working on Powertools V3 and in the v3 branch we have already made Pydantic v2 our default version. We expect to release v3 somewhere in August and we'll publish a complete Upgrade guide to help customers to update this. I'm closing this issue because there's nothing to do other than wait for V3 to be released. Thanks and please reopen if you need anything else. |
|
Use case
I saw that there was support coming for Pydantic v2 in lambda powertools:
but it seems like it is only support, not incorporation into the library dependencies (i.e. the library is not bumping to v2). This conflicts with the desired workflow of using new versions of the layer in combination with up to date Pydantic models.
Solution/User Experience
Will you consider publishing managed layers with v2 of Pydantic as the dependency?
This seems in line with the linked 'Tenet' of adopting best practices:
It could also be done in a backward compatible way if it was published with a separate ARN
It also relates to 'following language idioms and community common practices':
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: