aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.6k stars 3.9k forks source link

Tracking: [Library] Deployment Failure Due to Typeguard Version Update #31749

Open Eva9260 opened 5 days ago

Eva9260 commented 5 days ago

Overview

We encountered a deployment failure during our recent deployment caused by an unexpected version change in the typeguard library. Previously, we were using the following set of libraries:

aws-cdk-lib==2.161.1
aws-cdk.aws_scheduler_alpha==2.161.1a0
aws-cdk.aws_scheduler_targets_alpha==2.161.1a0
aws_cdk.aws_glue_alpha==2.161.1a0
aws_cdk.aws_lambda_python_alpha==2.161.1a0
constructs
yamldataclassconfig
yjrtr

This configuration worked fine in previous deployments. However, in the latest deployment, the typeguard version was unexpectedly updated to 4.3.0, causing the following error:

typeguard.TypeCheckError: list did not match any element in the union:
  Sequence[aws_cdk.aws_iam.IManagedPolicy]: item 0 is not compatible with the IManagedPolicy protocol because it has no method named '__jsii_proxy_class__'
  NoneType: is not an instance of NoneType

Link to the service’s CDK Construct Library API reference page.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam-readme.html

Maturity: CloudFormation Resources Only

Stable

Implementation

The issue was traced back to the version bump of typeguard from 2.13.3 to 4.3.0. We had to manually lock the typeguard version back to 2.13.3 to resolve the issue and successfully complete the deployment.

Action Needed: Update the requirements to lock typeguard to 2.13.3 or ensure compatibility with the latest version of typeguard to prevent future issues.

Issue list

ashishdhingra commented 5 days ago

Internal ticket: P161022461

khushail commented 5 days ago

we got similar issue reported last week- https://github.com/aws/jsii/issues/4667 Moving the corresponding issue to JSII Repo.

medley56 commented 5 days ago

aws/jsii#4657 is also related

mrgrain commented 4 days ago

In jsii, we are mainly tracking this in https://github.com/aws/jsii/issues/4658