mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
Merge pull request #3244 from jangsutsr/3199_ignored_task_result_inconsistent
Prevent ignored task from being displayed as failing.
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Copyright (c) 2015 Ansible, Inc.
|
# Copyright (c) 2015 Ansible, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
|
|
||||||
@@ -2987,7 +2986,7 @@ class JobJobTasksList(BaseJobEventsList):
|
|||||||
# need stats on grandchildren, sorted by child.
|
# need stats on grandchildren, sorted by child.
|
||||||
queryset = (JobEvent.objects.filter(parent__parent=parent_task,
|
queryset = (JobEvent.objects.filter(parent__parent=parent_task,
|
||||||
parent__event__in=STARTING_EVENTS)
|
parent__event__in=STARTING_EVENTS)
|
||||||
.values('parent__id', 'event', 'changed')
|
.values('parent__id', 'event', 'changed', 'failed')
|
||||||
.annotate(num=Count('event'))
|
.annotate(num=Count('event'))
|
||||||
.order_by('parent__id'))
|
.order_by('parent__id'))
|
||||||
|
|
||||||
@@ -3048,10 +3047,13 @@ class JobJobTasksList(BaseJobEventsList):
|
|||||||
# make appropriate changes to the task data.
|
# make appropriate changes to the task data.
|
||||||
for child_data in data.get(task_start_event.id, []):
|
for child_data in data.get(task_start_event.id, []):
|
||||||
if child_data['event'] == 'runner_on_failed':
|
if child_data['event'] == 'runner_on_failed':
|
||||||
task_data['failed'] = True
|
|
||||||
task_data['host_count'] += child_data['num']
|
task_data['host_count'] += child_data['num']
|
||||||
task_data['reported_hosts'] += child_data['num']
|
task_data['reported_hosts'] += child_data['num']
|
||||||
task_data['failed_count'] += child_data['num']
|
if child_data['failed']:
|
||||||
|
task_data['failed'] = True
|
||||||
|
task_data['failed_count'] += child_data['num']
|
||||||
|
else:
|
||||||
|
task_data['skipped_count'] += child_data['num']
|
||||||
elif child_data['event'] == 'runner_on_ok':
|
elif child_data['event'] == 'runner_on_ok':
|
||||||
task_data['host_count'] += child_data['num']
|
task_data['host_count'] += child_data['num']
|
||||||
task_data['reported_hosts'] += child_data['num']
|
task_data['reported_hosts'] += child_data['num']
|
||||||
|
|||||||
Reference in New Issue
Block a user