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
 
 
[email protected](
+    "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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to