amoghrajesh commented on code in PR #59711:
URL: https://github.com/apache/airflow/pull/59711#discussion_r2644994770
##########
task-sdk/tests/task_sdk/execution_time/test_supervisor.py:
##########
@@ -674,13 +674,22 @@ def test_supervise_handles_deferred_task(
classpath="airflow.providers.standard.triggers.temporal.DateTimeTrigger",
next_method="execute_complete",
trigger_kwargs={
- "__type": "dict",
- "__var": {
- "moment": {"__type": "datetime", "__var":
1730982899.0},
- "end_from_trigger": False,
+ "moment": {
+ "__classname__": "pendulum.datetime.DateTime",
+ "__version__": 2,
+ "__data__": {
+ "timestamp": 1730982899.0,
+ "tz": {
+ "__classname__": "builtins.tuple",
+ "__version__": 1,
+ "__data__": ["UTC",
"pendulum.tz.timezone.Timezone", 1, True],
+ },
+ },
},
+ "end_from_trigger": False,
},
- next_kwargs={"__type": "dict", "__var": {}},
+ trigger_timeout=None,
+ next_kwargs={},
Review Comment:
Not really, no. Let me explain with your scenario of older client + new
server.
1. Older client would send a `BaseSerialization` serialised value to API
server for `trigger_kwargs`
2. That value would be stored in database
3. Now the server is upgraded
4. Both old and new server returned DB value without any changes (worker
handles ser/deser earlier and now)
5. Now when trigger is reached, trigger tries to resume with "old" format of
serialization (BaseSer) and the except part of
https://github.com/apache/airflow/pull/59711/changes#diff-cc71b015b78743f3ad2cd5cee785b792e20f352814d34b0c2baef12733f5edb1R168-R177
handles it
I have tested a situation of this in the PR desc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]