Skip to content

Commit

Permalink
Fix grid view for mapped tasks (#24059)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6e96f04)
  • Loading branch information
jedcunningham authored and ephraimbuddy committed Jun 1, 2022
1 parent 1555e67 commit c9bba62
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions airflow/www/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ def get_mapped_summary(parent_instance, task_instances):
)

try_count = (
parent_instance.prev_attempted_tries
if parent_instance.prev_attempted_tries != 0
else parent_instance.try_number
parent_instance._try_number
if parent_instance._try_number != 0 or parent_instance.state in State.running
else parent_instance._try_number + 1
)

return {
'task_id': parent_instance.task_id,
'run_id': parent_instance.run_id,
Expand All @@ -130,6 +131,7 @@ def get_mapped_summary(parent_instance, task_instances):

def get_task_summaries(task, dag_runs: List[DagRun], session: Session) -> List[Dict[str, Any]]:
tis = session.query(
TaskInstance.dag_id,
TaskInstance.task_id,
TaskInstance.run_id,
TaskInstance.map_index,
Expand Down

0 comments on commit c9bba62

Please sign in to comment.