From 7daa3a37ff6d5b2ac5f0fd75442367d2f8fb0161 Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Fri, 29 Apr 2022 13:43:32 -0400 Subject: [PATCH] Fix broken task instance link in xcom list (#23367) * Fix broken task instance link in xcom list Add execution date back to the xcom list to be able to pass to the `task_instance_link()` function. Long term, we should swap out the execution_date param for run_id * Make execution date a search column (cherry picked from commit 3920e6019347f70807252b3163ed017084ce2a92) --- airflow/www/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airflow/www/views.py b/airflow/www/views.py index 9bdd761022cd2..7292f79787420 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -3767,8 +3767,8 @@ class XComModelView(AirflowModelView): permissions.ACTION_CAN_ACCESS_MENU, ] - search_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id'] - list_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id', 'map_index'] + search_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id', 'execution_date'] + list_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id', 'map_index', 'execution_date'] base_order = ('dag_run_id', 'desc') base_filters = [['dag_id', DagFilter, lambda: []]] @@ -3778,6 +3778,7 @@ class XComModelView(AirflowModelView): 'timestamp': wwwutils.datetime_f('timestamp'), 'dag_id': wwwutils.dag_link, 'map_index': wwwutils.format_map_index, + 'execution_date': wwwutils.datetime_f('execution_date'), } @action('muldelete', 'Delete', "Are you sure you want to delete selected records?", single=False)