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/04/23 04:59:15 UTC

[GitHub] [airflow] tirkarthi commented on a diff in pull request #23079: Don't clear downstream tasks when marked status is failure and downstream is True

tirkarthi commented on code in PR #23079:
URL: https://github.com/apache/airflow/pull/23079#discussion_r856843680


##########
tests/www/views/test_views.py:
##########
@@ -296,6 +297,173 @@ def get_task_instance(session, task):
         assert dagrun.get_state() == State.QUEUED
 
 
+@pytest.mark.parametrize(
+    "downstream, set_state, end_state",
+    [
+        (
+            True,
+            [
+                ("task_1", State.SUCCESS),
+                ("task_2", State.SUCCESS),
+                ("task_3", State.SUCCESS),
+            ],
+            [
+                ("task_1", State.FAILED),
+                ("task_2", State.FAILED),
+                ("task_3", State.FAILED),
+            ],
+        ),
+        (
+            True,
+            [
+                ("task_1", State.SUCCESS),
+                ("task_2", State.SUCCESS),
+                ("task_3", State.FAILED),
+            ],
+            [
+                ("task_1", State.FAILED),
+                ("task_2", State.FAILED),
+                ("task_3", State.FAILED),
+            ],
+        ),
+        (
+            False,
+            [
+                ("task_1", State.SUCCESS),
+                ("task_2", State.SUCCESS),
+                ("task_3", State.FAILED),
+            ],
+            [
+                ("task_1", State.FAILED),
+                ("task_2", State.SUCCESS),
+                ("task_3", State.NONE),

Review Comment:
   This is to ensure the behavior in https://github.com/apache/airflow/pull/13037 is kept in place. I also find it slightly counter intuitive since downstream is not selected and marking a task as failure shouldn't clear the state of downstream tasks that are failed already for re-run. Should we change it so that failed state is preserved?



-- 
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