Skip to content

Commit

Permalink
Correctly deserialize dagrun_timeout field on DAGs (#8735)
Browse files Browse the repository at this point in the history
We weren't deserializing this correctly (it was left as a float) but
nothing _was_ using it, and we hadn't explicitly tested it.

We already have example dags with this field, so we just need to check
for this field.

(cherry picked from commit 336aa27)
  • Loading branch information
ashb authored and potiuk committed Jun 29, 2020
1 parent dbb65c4 commit 165aeba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/serialization/serialized_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def deserialize_dag(cls, encoded_dag):
k = "task_dict"
elif k == "timezone":
v = cls._deserialize_timezone(v)
elif k in {"retry_delay", "execution_timeout"}:
elif k in {"dagrun_timeout"}:
v = cls._deserialize_timedelta(v)
elif k.endswith("_date"):
v = cls._deserialize_datetime(v)
Expand Down
2 changes: 1 addition & 1 deletion tests/serialization/test_dag_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def validate_deserialized_dag(self, serialized_dag, dag):
"params", "fileloc", "max_active_runs", "concurrency",
"is_paused_upon_creation", "doc_md", "safe_dag_id", "is_subdag",
"catchup", "description", "start_date", "end_date", "parent_dag",
"template_searchpath", "_access_control"
"template_searchpath", "_access_control", "dagrun_timeout"
]

# fields_to_check = dag.get_serialized_fields()
Expand Down

0 comments on commit 165aeba

Please sign in to comment.