Open tomwwright opened 3 years ago
cloudformation_cli_python_lib.exceptions.InternalFailure: __init__() got an unexpected keyword argument 'region/awsPartition/awsAccountId' (TypeError)
Caused by changes to the contract test request format upstream https://github.com/aws-cloudformation/cloudformation-cli/pull/502
Partial fix applied here https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/pull/107/files, but cloudformation-cli-python-lib hasn't released as v2.1.0 on pypi yet
cloudformation-cli-python-lib
v2.1.0
pypi
Solution for now is to monkey patch dataclass in build/cloudformation_cli_python_lib/utils.py to expect the extra fields:
build/cloudformation_cli_python_lib/utils.py
@dataclass class UnmodelledRequest: clientRequestToken: str desiredResourceState: Optional[Mapping[str, Any]] = None previousResourceState: Optional[Mapping[str, Any]] = None logicalResourceIdentifier: Optional[str] = None nextToken: Optional[str] = None region: Optional[str] = None # <--- add these awsAccountId: Optional[str] = None # <--- awsPartition: Optional[str] = None # <---
Caused by changes to the contract test request format upstream https://github.com/aws-cloudformation/cloudformation-cli/pull/502
Partial fix applied here https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/pull/107/files, but
cloudformation-cli-python-lib
hasn't released asv2.1.0
onpypi
yetSolution for now is to monkey patch dataclass in
build/cloudformation_cli_python_lib/utils.py
to expect the extra fields: