Skip to content

Commit d4b542b

Browse files
Fix test_roundtrip_provider_example_dags (#49647)
1 parent 348eb45 commit d4b542b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

airflow-core/tests/unit/serialization/test_dag_serialization.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,10 +685,14 @@ def validate_deserialized_dag(self, serialized_dag: DAG, dag: DAG):
685685
for field in fields_to_check:
686686
actual = getattr(serialized_dag, field)
687687
expected = getattr(dag, field, None)
688+
689+
if field == "max_consecutive_failed_dag_runs":
690+
# TaskSDK sets -1 default to max_consecutive_failed_dag_runs
691+
assert actual in [expected, 0], f"{dag.dag_id}.{field} does not match"
692+
continue
688693
assert actual == expected, f"{dag.dag_id}.{field} does not match"
689694
# _processor_dags_folder is only populated at serialization time
690695
# it's only used when relying on serialized dag to determine a dag's relative path
691-
assert dag._processor_dags_folder is None
692696
assert (
693697
serialized_dag._processor_dags_folder
694698
== (AIRFLOW_REPO_ROOT_PATH / "airflow-core" / "tests" / "unit" / "dags").as_posix()

0 commit comments

Comments
 (0)