Cannot store non primitives in callback context - CFN Test and likely cloudformation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia confrontando l’implementazione Java StdCallbackContext collegata con il modo in cui callbackContext viene serializzato e deserializzato nel plugin Python e durante i test del contratto cfn test. Riproduci l’esempio datetime, quindi verifica che i valori di callback non primitivi sopravvivano a un round trip del callback senza richiedere agli autori degli handler di effettuare personalmente il marshalling.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 107
- Fork
- 46
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws-cloudformation/cloudformation-cli-python-plugin
-
Support UV Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Repo alive? Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
aws-cloudformation/cloudformation-cli-python-plugin#270 · 1 commento · 1 reazione ·
-
Improve docstrings for Hooks Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
aws-cloudformation/cloudformation-cli-python-plugin#268 · 1 commento · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
aws-cloudformation/cloudformation-cli-python-plugin#264 · 1 commento ·
Tutte le issue di aws-cloudformation/cloudformation-cli-python-plugin
Issue simili
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 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 Apertaarea: ci bug perceived difficulty: 3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/clickhouse-connect#1057 ·