You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/20 19:00:49 UTC

[airflow] 07/19: fixup! fixup! fixup! fixup! fixup! fixup! Allow marking/clearing mapped taskinstances from the UI

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

bbovenzi pushed a commit to branch mapped-instance-actions
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 5bbcb9f17f92e763a35a08c6522a2031506dd91c
Author: Ephraim Anierobi <sp...@gmail.com>
AuthorDate: Wed Apr 13 21:42:09 2022 +0100

    fixup! fixup! fixup! fixup! fixup! fixup! Allow marking/clearing mapped taskinstances from the UI
---
 airflow/www/views.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/airflow/www/views.py b/airflow/www/views.py
index 7b0f81af80..2a3ad1e913 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2293,7 +2293,6 @@ class Airflow(AirflowBaseView):
         self,
         dag_id,
         task_id,
-        map_indexes,
         origin,
         dag_run_id,
         upstream,
@@ -2301,6 +2300,7 @@ class Airflow(AirflowBaseView):
         future,
         past,
         state,
+        map_indexes=None,
     ):
         dag = current_app.dag_bag.get_dag(dag_id)
         latest_execution_date = dag.get_latest_execution_date()
@@ -2381,7 +2381,6 @@ class Airflow(AirflowBaseView):
 
         to_be_altered = set_state(
             tasks=[(task, map_index) for map_index in map_indexes],
-            map_indexes=map_indexes,
             run_id=dag_run_id,
             upstream=upstream,
             downstream=downstream,
@@ -2436,7 +2435,6 @@ class Airflow(AirflowBaseView):
         return self._mark_task_instance_state(
             dag_id,
             task_id,
-            map_indexes,
             origin,
             dag_run_id,
             upstream,
@@ -2444,6 +2442,7 @@ class Airflow(AirflowBaseView):
             future,
             past,
             State.FAILED,
+            map_indexes=map_indexes,
         )
 
     @expose('/success', methods=['POST'])
@@ -2476,7 +2475,6 @@ class Airflow(AirflowBaseView):
         return self._mark_task_instance_state(
             dag_id,
             task_id,
-            map_indexes,
             origin,
             dag_run_id,
             upstream,
@@ -2484,6 +2482,7 @@ class Airflow(AirflowBaseView):
             future,
             past,
             State.SUCCESS,
+            map_indexes=map_indexes,
         )
 
     @expose('/dags/<string:dag_id>')