utkarsharma2 commented on code in PR #31866:
URL: https://github.com/apache/airflow/pull/31866#discussion_r1237173782
##########
airflow/serialization/serde.py:
##########
@@ -276,7 +276,11 @@ def deserialize(o: T | None, full=True, type_hint: Any =
None) -> object:
def _convert(old: dict) -> dict:
"""Converts an old style serialization to new style."""
if OLD_TYPE in old and OLD_DATA in old:
- return {CLASSNAME: old[OLD_TYPE], VERSION: DEFAULT_VERSION, DATA:
old[OLD_DATA][OLD_DATA]}
+ # Added to handle for handling xcom data from airflow 2.5.2
Review Comment:
Also, I was able to replicate the issue for airflow 2.4.3 as running example
dag `dataset_produces_1` produces data - `[{“__type":
"airflow.datasets.Dataset", "__source": "dataset_produces_1.producing_task_1",
"__var": {"__var": {"uri": "s3://dag1/output_1.txt", "extra": {"__var": {"hi":
"bye"}, "__type": "dict"}}, "__type": "dict"}}]` and the issue was not caught
by testcase -
https://github.com/apache/airflow/blob/main/tests/serialization/test_serde.py#L259-L273
as it doesn't have more than two levels of nested `__var`
--
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]