Fix list releases paging

Fix an issue where release paging failed to break out of the loop when no
releases were found in tiller.

Change-Id: I4a25e58a7f6bdd88941f7f87cba2a0aee261f8be
This commit is contained in:
Sean Eagan 2018-10-15 16:30:35 -05:00
parent e149afdcbe
commit 6a744d77ea
1 changed files with 7 additions and 0 deletions

View File

@ -211,7 +211,9 @@ class Tiller(object):
response = stub.ListReleases(
req, self.timeout, metadata=self.metadata)
found_message = False
for message in response:
found_message = True
page = message.releases
if initial_total:
@ -232,6 +234,11 @@ class Tiller(object):
else:
done = True
# Ensure we break out was no message found which
# is seen if there are no releases in tiller.
if not found_message:
done = True
return releases
for index in range(LIST_RELEASES_ATTEMPTS):