When using OOTB CFN Test is broken with 'Tags' attribute on generated class
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start with python/rpdk/python/templates/models.py and reproduce the failure with cfn test -- -k contract_create_delete, using the workaround described in issue 247. Compare the corresponding set_or_none implementations in hook_models.py and target_model.py. Done means generated classes can deserialize the default Tags array without the reported TypeError.
Written by the indexing model from the issue text.
Description
Assuming same steps in https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/issues/247, using the workaround to get by the current cryptography issue.
After trying to run one test cfn test -- -k contract_create_delete, it fails with:
Traceback (most recent call last):
File "/var/task/cloudformation_cli_python_lib/resource.py", line 165, in _cast_resource_request
return UnmodelledRequest(
File "/var/task/cloudformation_cli_python_lib/utils.py", line 156, in to_modelled
desiredResourceState=model_cls._deserialize(self.desiredResourceState),
File "/var/task/dd_dd_dd/models.py", line 74, in _deserialize
Tags=set_or_none(json_data.get("Tags")),
File "/var/task/dd_dd_dd/models.py", line 30, in set_or_none
return set(value)
TypeError: unhashable type: 'dict'
Root cause and fix:
- Dominant language
- Python
- Stars
- 107
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-cloudformation/cloudformation-cli-python-plugin
-
Support UV Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Repo alive? Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
aws-cloudformation/cloudformation-cli-python-plugin#270 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-cloudformation/cloudformation-cli-python-plugin#268 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-cloudformation/cloudformation-cli-python-plugin#264 · 1 comment ·
All issues in aws-cloudformation/cloudformation-cli-python-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/skills#1811 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
datalayer/mcp-compose#42 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
UKGovernmentBEIS/inspect_evals#2523 ·