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
commit 1d89ecaf4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
if tgzfile is not None:
tarfiles.append(tgzfile)
if not ship(tgzfile):
slice_succeeded, succeeded = False, False
break
if collection_type != 'dry-run':
if not ship(tgzfile):
slice_succeeded, succeeded = False, False
break
if slice_succeeded and collection_type != 'dry-run':
with disable_activity_stream():