This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d4b542b6caf Fix test_roundtrip_provider_example_dags (#49647)
d4b542b6caf is described below

commit d4b542b6caf5b7b043de9ac8b9a0de910aaaa70a
Author: GPK <[email protected]>
AuthorDate: Wed Apr 23 20:24:15 2025 +0100

    Fix test_roundtrip_provider_example_dags (#49647)
---
 airflow-core/tests/unit/serialization/test_dag_serialization.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/airflow-core/tests/unit/serialization/test_dag_serialization.py 
b/airflow-core/tests/unit/serialization/test_dag_serialization.py
index 69570392158..5c7e9d3f5ab 100644
--- a/airflow-core/tests/unit/serialization/test_dag_serialization.py
+++ b/airflow-core/tests/unit/serialization/test_dag_serialization.py
@@ -685,10 +685,14 @@ class TestStringifiedDAGs:
         for field in fields_to_check:
             actual = getattr(serialized_dag, field)
             expected = getattr(dag, field, None)
+
+            if field == "max_consecutive_failed_dag_runs":
+                # TaskSDK sets -1 default to max_consecutive_failed_dag_runs
+                assert actual in [expected, 0], f"{dag.dag_id}.{field} does 
not match"
+                continue
             assert actual == expected, f"{dag.dag_id}.{field} does not match"
         # _processor_dags_folder is only populated at serialization time
         # it's only used when relying on serialized dag to determine a dag's 
relative path
-        assert dag._processor_dags_folder is None
         assert (
             serialized_dag._processor_dags_folder
             == (AIRFLOW_REPO_ROOT_PATH / "airflow-core" / "tests" / "unit" / 
"dags").as_posix()

Reply via email to