You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/02 14:35:30 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #25471: Fix Serialization error in TaskCallbackRequest

ashb commented on code in PR #25471:
URL: https://github.com/apache/airflow/pull/25471#discussion_r935676109


##########
airflow/callbacks/callback_requests.py:
##########
@@ -74,8 +75,8 @@ def __init__(
         self.is_failure_callback = is_failure_callback
 
     def to_json(self) -> str:
-        dict_obj = self.__dict__.copy()
-        dict_obj["simple_task_instance"] = dict_obj["simple_task_instance"].__dict__
+        dict_obj = copy.deepcopy(self.__dict__)

Review Comment:
   Was there a reason we changed this to deepcopy? It feels like it shouldn't be required if we are also calling `simple_ti.as_dict()`



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org