Cannot store non primitives in callback context - CFN Test and likely cloudformation
還沒有人認領這個 Issue。
評估
研究方向
首先,將連結的 Java StdCallbackContext 實作與 Python 外掛程式中以及 cfn test 合約測試期間 callbackContext 的序列化和反序列化方式進行比較。重現 datetime 範例,然後驗證非原始 callback 值能夠在 callback 往返過程中保留下來,而不要求 handler 作者自行對其進行封送。
由索引模型根據 Issue 內容生成。
描述
Java plugin supports serializing/deserializing class information in callback context , this plugin doesnt support that today.
Use case, related to #243. Say I want to store a datetime.datetime object. Right now it gets returned as a string, so the next time I use it when I am called back, it comes across as a string not as an original datetime object.
I confirmed this on the handler side by printing out a ProgressEvent post serialization.
{'message': '', 'callbackContext': {'resource_entry_end_time': datetime.datetime(2023, 1, 19, 16, 25, 19, 5602), 'handler_entry_time': datetime.datetime(2023, 1, 19, 16, 23, 19, 5606), 'working_model': ResourceModel(...), 'create_action1_completed': True, 'create_action1_request_id': '1234'}, 'callbackDelaySeconds': 1, 'resourceModel': {...}, 'status': 'IN_PROGRESS'}
Received on the cfn test side for contract testing:
{'message': '', 'callbackContext': {'resource_entry_end_time': '2023-01-19T16:25:19.005602', 'handler_entry_time': '2023-01-19T16:23:19.005606', 'working_model': {...}, 'create_action1_completed': True, 'create_action1_request_id': '1234'}, 'callbackDelaySeconds': 1, 'resourceModel': {....}, 'status': 'IN_PROGRESS'}
So if we attempt to store any non-primitive type its replaced with a string representation and no way to get back to it. This requires handler authors, if they want to use complex types, to do their own marshalling.
- 主要語言
- 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
-
難度 2/5 1-3 小時 新手友好度 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main 未關閉area: ci bug perceived difficulty: 3
難度 2/5 1-3 小時 新手友好度 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
難度 1/5 1 小時以內 新手友好度 92/100
-
難度 2/5 1-3 小時 新手友好度 78/100
ClickHouse/clickhouse-connect#1057 ·