From 5f93f1b9d7c587f350be4407d76df0a4d4ccaf8d Mon Sep 17 00:00:00 2001 From: MyroTk Date: Fri, 26 Dec 2025 10:24:43 -0500 Subject: [PATCH 1/4] remove version updating --- ci/jobs/scripts/clickhouse_version.py | 23 ++--------------------- tests/ci/version_helper.py | 25 ------------------------- 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/ci/jobs/scripts/clickhouse_version.py b/ci/jobs/scripts/clickhouse_version.py index 9b68d687e4a3..7062d7cb67e7 100644 --- a/ci/jobs/scripts/clickhouse_version.py +++ b/ci/jobs/scripts/clickhouse_version.py @@ -38,29 +38,10 @@ def get_release_version_as_dict(cls): @classmethod def get_current_version_as_dict(cls): - version_from_file = read_versions() - try: - version = version_from_file - tweak = int( - Shell.get_output( - f"git rev-list --count {version['githash']}..HEAD", verbose=True - ) - ) - except ValueError: - # Shallow checkout - tweak = 0 - + # Return version as-is from the cmake file, without any git-based modifications version = get_version_from_repo() - version.tweak += tweak - - # relying on ClickHouseVersion to generate proper `description` and `string` with updated `tweak`` value. version = version.with_description(version.flavour) - version_dict = version.as_dict() - - # preserve githash, not sure if that is goign to be usefull, but mimics original implementation - version_dict['githash'] = version_from_file['githash'] - - return version_dict + return version.as_dict() @classmethod def get_version(cls): diff --git a/tests/ci/version_helper.py b/tests/ci/version_helper.py index 1ab9d08092d2..67774608fba1 100755 --- a/tests/ci/version_helper.py +++ b/tests/ci/version_helper.py @@ -316,31 +316,6 @@ def get_version_from_repo( flavour=versions.get("flavour", None) ) - # if this commit is tagged, use tag's version instead of something stored in cmake - if git is not None and git.latest_tag: - version_from_tag = get_version_from_tag(git.latest_tag) - logging.debug(f'Git latest tag: {git.latest_tag} ({git.commits_since_latest} commits ago)\n' - f'"new" tag: {git.new_tag} ({git.commits_since_new})\n' - f'current commit: {git.sha}\n' - f'current brach: {git.branch}' - ) - if git.latest_tag and git.commits_since_latest == 0: - # Tag has a priority over the version written in CMake. - # Version must match (except tweak, flavour, description, etc.) to avoid accidental mess. - if not (version_from_tag.major == cmake_version.major \ - and version_from_tag.minor == cmake_version.minor \ - and version_from_tag.patch == cmake_version.patch): - raise RuntimeError(f"Version generated from tag ({version_from_tag}) should have same major, minor, and patch values as version generated from cmake ({cmake_version})") - - # Don't need to reset version completely, mostly because revision part is not set in tag, but must be preserved - logging.debug(f"Resetting TWEAK and FLAVOUR of version from cmake {cmake_version} to values from tag: {version_from_tag.tweak}.{version_from_tag._flavour}") - cmake_version._flavour = version_from_tag._flavour - cmake_version.tweak = version_from_tag.tweak - else: - # We've had some number of commits since the latest (upstream) tag. - logging.debug(f"Bumping the TWEAK of version from cmake {cmake_version} by {git.commits_since_upstream}") - cmake_version.tweak = cmake_version.tweak + git.commits_since_upstream - return cmake_version From 2d2add4388d67d3bf57170ea0abe77883a3b0591 Mon Sep 17 00:00:00 2001 From: MyroTk Date: Fri, 26 Dec 2025 13:27:03 -0500 Subject: [PATCH 2/4] set to 20001 --- cmake/autogenerated_versions.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/autogenerated_versions.txt b/cmake/autogenerated_versions.txt index ea5027262049..90b3ca912a75 100644 --- a/cmake/autogenerated_versions.txt +++ b/cmake/autogenerated_versions.txt @@ -7,11 +7,11 @@ SET(VERSION_MAJOR 25) SET(VERSION_MINOR 8) SET(VERSION_PATCH 12) SET(VERSION_GITHASH fa393206741c830da77b8f1bcf18c753161932c8) -SET(VERSION_DESCRIBE v25.8.12.20000.altinityantalya) -SET(VERSION_STRING 25.8.12.20000.altinityantalya) +SET(VERSION_DESCRIBE v25.8.12.20001.altinityantalya) +SET(VERSION_STRING 25.8.12.20001.altinityantalya) # end of autochange # This is the 'base' tweak of the version, build scripts will # increment this by number of commits since previous tag. -SET(VERSION_TWEAK 20000) +SET(VERSION_TWEAK 20001) SET(VERSION_FLAVOUR altinityantalya) From 56b7afe4c90edd66ed64cfd00daf33a01d860bca Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Fri, 26 Dec 2025 13:31:50 -0500 Subject: [PATCH 3/4] Update clickhouse_version.py --- ci/jobs/scripts/clickhouse_version.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/jobs/scripts/clickhouse_version.py b/ci/jobs/scripts/clickhouse_version.py index 7062d7cb67e7..917dc3d597fa 100644 --- a/ci/jobs/scripts/clickhouse_version.py +++ b/ci/jobs/scripts/clickhouse_version.py @@ -38,7 +38,6 @@ def get_release_version_as_dict(cls): @classmethod def get_current_version_as_dict(cls): - # Return version as-is from the cmake file, without any git-based modifications version = get_version_from_repo() version = version.with_description(version.flavour) return version.as_dict() From 883ba691c9aaf1872cce6b56f9d4cdd8793a8c2a Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Fri, 26 Dec 2025 13:35:23 -0500 Subject: [PATCH 4/4] Update autogenerated_versions.txt --- cmake/autogenerated_versions.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/autogenerated_versions.txt b/cmake/autogenerated_versions.txt index 90b3ca912a75..8eae9b1de36e 100644 --- a/cmake/autogenerated_versions.txt +++ b/cmake/autogenerated_versions.txt @@ -11,7 +11,5 @@ SET(VERSION_DESCRIBE v25.8.12.20001.altinityantalya) SET(VERSION_STRING 25.8.12.20001.altinityantalya) # end of autochange -# This is the 'base' tweak of the version, build scripts will -# increment this by number of commits since previous tag. SET(VERSION_TWEAK 20001) SET(VERSION_FLAVOUR altinityantalya)