Avoid bug in tiller when both sorting and paging releases

The tiller list releases command has a bug when using sorting
and paging simultaneously. Armada was passing sorting parameters,
but it doesn't really care about the order, so this removes the
sorting parameters to avoid the tiller issue.

Change-Id: If8349a8093d4b79d5e056d988b710372705eb669
This commit is contained in:
Sean Eagan 2018-10-17 14:47:16 -05:00
parent 501d1e13b3
commit 5e7c36d2a1
2 changed files with 3 additions and 9 deletions

View File

@ -202,9 +202,7 @@ class Tiller(object):
req = ListReleasesRequest(
offset=next_release_expected,
limit=LIST_RELEASES_PAGE_SIZE,
status_codes=[const.STATUS_DEPLOYED, const.STATUS_FAILED],
sort_by='LAST_RELEASED',
sort_order='DESC')
status_codes=[const.STATUS_DEPLOYED, const.STATUS_FAILED])
LOG.debug('Tiller ListReleases() with timeout=%s, request=%s',
self.timeout, req)

View File

@ -203,9 +203,7 @@ class TillerTestCase(base.ArmadaTestCase):
limit=tiller.LIST_RELEASES_PAGE_SIZE,
status_codes=[
tiller.const.STATUS_DEPLOYED, tiller.const.STATUS_FAILED
],
sort_by='LAST_RELEASED',
sort_order='DESC')
])
@mock.patch('armada.handlers.tiller.K8s')
@mock.patch('armada.handlers.tiller.grpc')
@ -255,9 +253,7 @@ class TillerTestCase(base.ArmadaTestCase):
limit=tiller.LIST_RELEASES_PAGE_SIZE,
status_codes=[
tiller.const.STATUS_DEPLOYED, tiller.const.STATUS_FAILED
],
sort_by='LAST_RELEASED',
sort_order='DESC') for i in range(page_count)
]) for i in range(page_count)
]
mock_list_releases_request.assert_has_calls(list_release_request_calls)