Skip to content

Commit

Permalink
Fix broken task instance link in xcom list (#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

(cherry picked from commit 3920e60)
  • Loading branch information
bbovenzi authored and ephraimbuddy committed May 8, 2022
1 parent f50ef22 commit 7daa3a3
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 @@ -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: []]]
Expand All @@ -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)
Expand Down

0 comments on commit 7daa3a3

Please sign in to comment.