From 722f51ade8bf3990b8f93a9116d78bb806ff51bc Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Wed, 24 Jan 2024 12:02:06 +0200 Subject: [PATCH] fix(k8s): make 'latest' tag parsing logic work correctly The most recent dev versions of the scylla operator started looking like the following: 'v1.12.0-alpha.1-78-ge5a1c9b-latest' Before it was like following: 'v1.12.0-alpha.0-144-g60f7824' We were depending on the number of the '-' symbols and it now leads to the filtering out of the new kind of chart versions. So, fix it by properly checking helm chart versions. --- sdcm/cluster_k8s/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdcm/cluster_k8s/__init__.py b/sdcm/cluster_k8s/__init__.py index f86fe25ca3..d32b165a0f 100644 --- a/sdcm/cluster_k8s/__init__.py +++ b/sdcm/cluster_k8s/__init__.py @@ -552,7 +552,7 @@ def get_latest_chart_version(self, local_chart_path: str) -> str: # in each 'minor' family. current_newest_version, current_newest_version_str = None, '' for version_object in all_versions: - if version_object["version"].count('-') not in (0, 3): + if version_object["version"].count('-') == 1: continue if ComparableScyllaOperatorVersion(version_object["version"]) > ( current_newest_version or '0.0.0'):