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/12 18:56:04 UTC

[airflow] 02/06: 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 0f0dac6f1a00447b21e0e792913aedde74f6e596
Author: Ephraim Anierobi <sp...@gmail.com>
AuthorDate: Tue Apr 12 16:56:11 2022 +0100

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

diff --git a/airflow/www/views.py b/airflow/www/views.py
index ad9378f462..44eb56f7b2 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2356,6 +2356,9 @@ class Airflow(AirflowBaseView):
         dag_run_id = args.get('dag_run_id')
         state = args.get('state')
         origin = args.get('origin')
+        map_indexes = args.get('map_indexes')
+        if map_indexes and not isinstance(map_indexes, list):
+            map_indexes = list(map_indexes)
 
         upstream = to_boolean(args.get('upstream'))
         downstream = to_boolean(args.get('downstream'))
@@ -2392,6 +2395,7 @@ class Airflow(AirflowBaseView):
 
         to_be_altered = set_state(
             tasks=[task],
+            map_indexes=map_indexes,
             run_id=dag_run_id,
             upstream=upstream,
             downstream=downstream,