KostyaEsmukov commented on issue #8166: Task Duration Bug: Doesn't respect number of runs URL: https://github.com/apache/airflow/issues/8166#issuecomment-610005896 The following little (but dirty) patch fixes the issue for me: ``` diff --git a/airflow/serialization/serialized_objects.py b/airflow/serialization/serialized_objects.py index 0c73946e7..5602f5c98 100644 --- a/airflow/serialization/serialized_objects.py +++ b/airflow/serialization/serialized_objects.py @@ -541,7 +541,8 @@ class SerializedDAG(DAG, BaseSerialization): """Deserializes a DAG from a JSON object. """ - dag = SerializedDAG(dag_id=encoded_dag['_dag_id']) + schedule_interval = cls._deserialize(encoded_dag['schedule_interval']) + dag = SerializedDAG(dag_id=encoded_dag['_dag_id'], schedule_interval=schedule_interval) for k, v in encoded_dag.items(): if k == "_downstream_task_ids": -- 2.25.0 ``` A thought towards a better fix: maybe instead of calling `setattr` on a `SerializedDAG` instance the `encoded_dag` arguments should be passed as kwargs to the `SerializedDAG` initializer?
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
