From 0aa3c0f98d1b1765741afa4eceef6356fbfff163 Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Fri, 29 Apr 2022 12:43:16 -0400 Subject: [PATCH 1/2] 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 --- airflow/www/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow/www/views.py b/airflow/www/views.py index d6103b1bc34b9..2a6f2018d2926 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -3748,7 +3748,7 @@ class XComModelView(AirflowModelView): ] search_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id'] - list_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id', 'map_index'] + 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: []]] @@ -3758,6 +3758,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) From 2d6b40595a7558ec54d492e4c4ccc172c92321b5 Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Fri, 29 Apr 2022 12:53:29 -0400 Subject: [PATCH 2/2] Make execution date a search column --- airflow/www/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/views.py b/airflow/www/views.py index 2a6f2018d2926..25300a80d960f 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -3747,7 +3747,7 @@ class XComModelView(AirflowModelView): permissions.ACTION_CAN_ACCESS_MENU, ] - search_columns = ['key', 'value', 'timestamp', 'dag_id', 'task_id', 'run_id'] + 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')