When using OOTB CFN Test is broken with 'Tags' attribute on generated class
还没有人认领这个 Issue。
评估
调研方向
从 python/rpdk/python/templates/models.py 开始,使用 issue 247 中描述的变通方案,通过 cfn test -- -k contract_create_delete 重现失败。比较 hook_models.py 和 target_model.py 中对应的 set_or_none 实现。完成的标准是生成的类能够在不出现所报告的 TypeError 的情况下反序列化默认的 Tags 数组。
由索引模型根据 Issue 内容生成。
描述
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:
- 主要语言
- Python
- 星标
- 107
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws-cloudformation/cloudformation-cli-python-plugin 的其他 Issue
-
Support UV 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
Repo alive? 未关闭
难度 5/5 一周以上 新手友好度 20/100
aws-cloudformation/cloudformation-cli-python-plugin#270 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 35/100
aws-cloudformation/cloudformation-cli-python-plugin#268 · 1 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
aws-cloudformation/cloudformation-cli-python-plugin#264 · 1 条评论 ·
查看 aws-cloudformation/cloudformation-cli-python-plugin 的全部 Issue
相似的 Issue
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
难度 1/5 1 小时以内 新手友好度 92/100
NousResearch/hermes-agent#118866 ·
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100