aws / serverless-application-model

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
https://aws.amazon.com/serverless/sam
Apache License 2.0
9.29k stars 2.37k forks source link

fix: new pydantic version causing errors with unit tests #3618

Closed aaythapa closed 1 week ago

aaythapa commented 1 week ago

Issue #, if available

3617

Description of changes

pydantic's new version has an issue where the error_wrappers attribute isn't included so the exception can't be caught, this causes a couple of tests to fail. Catching all exceptions for now until pydantic fixes their issue (opened a ticket with them here: https://github.com/pydantic/pydantic/issues/9742).

This PR should be reverted once pydantic releases a fix.

Description of how you validated changes

make pr passed after the change

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

aaythapa commented 1 week ago

Talked offline with the team, we won't change anything on our end since pydantic released a breaking change. We'll wait on pydantic to fix on their side, for now customers should avoid using pydantic version 1.10.15 and 1.10.17 as the unit tests will fail.