ClickHouseVersion.is_supported property, create images for them exclusively

This commit is contained in:
Mikhail f. Shiryaev 2024-11-07 14:34:31 +01:00
parent dcd0d1acac
commit 20717d1bbe
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4
2 changed files with 7 additions and 3 deletions

View File

@ -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:

View File

@ -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: