From 20717d1bbe6a234cf823a8f014f8348efcb789bd Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 7 Nov 2024 14:34:31 +0100 Subject: [PATCH] ClickHouseVersion.is_supported property, create images for them exclusively --- tests/ci/official_docker.py | 3 +-- tests/ci/version_helper.py | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/ci/official_docker.py b/tests/ci/official_docker.py index 5bdd317cd1e..ad1f6a6d6d2 100644 --- a/tests/ci/official_docker.py +++ b/tests/ci/official_docker.py @@ -21,7 +21,6 @@ from env_helper import GITHUB_REPOSITORY, IS_CI from git_helper import GIT_PREFIX, Git, git_runner from version_helper import ( ClickHouseVersion, - VersionType, get_supported_versions, get_tagged_versions, get_version_from_string, @@ -148,7 +147,7 @@ def get_versions_greater(minimal: ClickHouseVersion) -> Set[ClickHouseVersion]: supported = {} # type: Dict[str, ClickHouseVersion] versions = get_tagged_versions() for v in versions: - if v < minimal: + if v < minimal or not v.is_supported: continue txt = f"{v.major}.{v.minor}" if txt in supported: diff --git a/tests/ci/version_helper.py b/tests/ci/version_helper.py index bf48f3f53dd..0fce2f920d1 100755 --- a/tests/ci/version_helper.py +++ b/tests/ci/version_helper.py @@ -164,6 +164,11 @@ class ClickHouseVersion: """our X.3 and X.8 are LTS""" return self.minor % 5 == 3 + @property + def is_supported(self) -> bool: + "we can support only versions with VersionType STABLE or LTS" + return self.description in (VersionType.STABLE, VersionType.LTS) + def get_stable_release_type(self) -> str: if self.is_lts: return VersionType.LTS @@ -365,7 +370,7 @@ def get_supported_versions( versions = list(versions) else: # checks that repo is not shallow in background - versions = get_tagged_versions() + versions = [v for v in get_tagged_versions() if v.is_supported] versions.sort() versions.reverse() for version in versions: