From 036b44503d08afd7f1c226019608984667ef0160 Mon Sep 17 00:00:00 2001 From: sluetze <13255307+sluetze@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:22:22 +0100 Subject: [PATCH 1/2] allow versions which provide commit info Signed-off-by: sluetze <13255307+sluetze@users.noreply.github.com> --- Tests/kaas/k8s-version-policy/k8s_version_policy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/kaas/k8s-version-policy/k8s_version_policy.py b/Tests/kaas/k8s-version-policy/k8s_version_policy.py index cef272acd..40933ca70 100755 --- a/Tests/kaas/k8s-version-policy/k8s_version_policy.py +++ b/Tests/kaas/k8s-version-policy/k8s_version_policy.py @@ -171,7 +171,7 @@ def __str__(self): def parse_version(version_str: str) -> K8sVersion: - cleansed = version_str.strip().removeprefix("v") + cleansed = version_str.strip().removeprefix("v").split("+")[0] try: major, minor, patch = cleansed.split(".") return K8sVersion(int(major), int(minor), int(patch)) From a8c43db31af6e4fbd0bc700d6d2727bc5200c3c8 Mon Sep 17 00:00:00 2001 From: sluetze <13255307+sluetze@users.noreply.github.com> Date: Tue, 26 Nov 2024 12:06:35 +0100 Subject: [PATCH 2/2] add comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Büchse Signed-off-by: sluetze <13255307+sluetze@users.noreply.github.com> --- Tests/kaas/k8s-version-policy/k8s_version_policy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/kaas/k8s-version-policy/k8s_version_policy.py b/Tests/kaas/k8s-version-policy/k8s_version_policy.py index 40933ca70..a2acd3cd5 100755 --- a/Tests/kaas/k8s-version-policy/k8s_version_policy.py +++ b/Tests/kaas/k8s-version-policy/k8s_version_policy.py @@ -171,7 +171,7 @@ def __str__(self): def parse_version(version_str: str) -> K8sVersion: - cleansed = version_str.strip().removeprefix("v").split("+")[0] + cleansed = version_str.strip().removeprefix("v").split("+")[0] # remove leading v as well as build info try: major, minor, patch = cleansed.split(".") return K8sVersion(int(major), int(minor), int(patch))