Merge pull request #9954 from jbradberry/missing-dry-run-check

Add in the missing dry-run check for csv analytics collectors

SUMMARY
Follow on bug fix for the analytics gathering feature.  @chrismeyersfsu noticed that dry-run gathers of sufficiently large data was breaking out of the loop after the first csv chunk was packaged.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION
awx: 19.0.0

Reviewed-by: Chris Meyers <None>
Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Julen Landa Alustiza <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
This commit is contained in:
softwarefactory-project-zuul[bot]
2021-04-20 15:10:43 +00:00
committed by GitHub

View File

@@ -259,9 +259,10 @@ def gather(dest=None, module=None, subset=None, since=None, until=None, collecti
tgzfile = package(dest.parent, payload, until) tgzfile = package(dest.parent, payload, until)
if tgzfile is not None: if tgzfile is not None:
tarfiles.append(tgzfile) tarfiles.append(tgzfile)
if not ship(tgzfile): if collection_type != 'dry-run':
slice_succeeded, succeeded = False, False if not ship(tgzfile):
break slice_succeeded, succeeded = False, False
break
if slice_succeeded and collection_type != 'dry-run': if slice_succeeded and collection_type != 'dry-run':
with disable_activity_stream(): with disable_activity_stream():