Skip to content

Commit

Permalink
Fix broken task instance link in xcom list (apache#23367)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bbovenzi committed Apr 29, 2022
1 parent c83d0bf commit 3920e60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3759,8 +3759,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: []]]
Expand All @@ -3770,6 +3770,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)
Expand Down

0 comments on commit 3920e60

Please sign in to comment.