From df91412ed6c00716df7f5e143bbd9e173b21a52c Mon Sep 17 00:00:00 2001 From: Mark Burnett Date: Tue, 17 Apr 2018 14:39:05 -0500 Subject: [PATCH] Works around low RELEASE_LIMIT by increasing it We have been deploying in the low 60's of charts in many environments, but the current treasuremap environment is running 68. This led to a situation where tiller would find all 68 charts, but then return only the newest 64 (RELEASE_LIMIT) in its response. That meant that armada did not see those charts when deciding whether to install or upgrade. Change-Id: I5d2a06f806006947ad48cc0e24b3f91baa3f37fd --- armada/handlers/armada.py | 3 +++ armada/handlers/tiller.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/armada/handlers/armada.py b/armada/handlers/armada.py index 97b819d9..4f1cfbce 100644 --- a/armada/handlers/armada.py +++ b/armada/handlers/armada.py @@ -301,6 +301,9 @@ class Armada(object): deployed_releases = [x[0] for x in known_releases] prefix_chart = release_prefix(prefix, release) + # TODO(mark-burnett): It may be more robust to directly call + # tiller status to decide whether to install/upgrade rather + # than checking for list membership. if prefix_chart in deployed_releases: # indicate to the end user what path we are taking diff --git a/armada/handlers/tiller.py b/armada/handlers/tiller.py index 85b7df9e..6a02f3e9 100644 --- a/armada/handlers/tiller.py +++ b/armada/handlers/tiller.py @@ -37,7 +37,7 @@ from armada.utils.release import label_selectors TILLER_VERSION = b'2.7.2' TILLER_TIMEOUT = 300 GRPC_EPSILON = 60 -RELEASE_LIMIT = 64 +RELEASE_LIMIT = 128 # TODO(mark-burnett): There may be a better page size. RUNTEST_SUCCESS = 9 # the standard gRPC max message size is 4MB @@ -166,6 +166,8 @@ class Tiller(object): ''' releases = [] stub = ReleaseServiceStub(self.channel) + # TODO(mark-burnett): Since we're limiting page size, we need to + # iterate through all the pages when collecting this list. req = ListReleasesRequest(limit=RELEASE_LIMIT, status_codes=[STATUS_DEPLOYED, STATUS_FAILED],