Skip to content

Commit ca5b435

Browse files
committed
Merge branch 'backports/24.8/remote-roles-push' of github.com:Altinity/ClickHouse into backports/24.8/remote-roles-push
2 parents b0cbccb + 237858a commit ca5b435

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

docker/test/integration/base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ RUN apt-get update \
2929
python3-pip \
3030
libcurl4-openssl-dev \
3131
libssl-dev \
32+
iptables \
3233
&& apt-get clean \
3334
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
3435

docker/test/integration/runner/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,5 @@ wadllib~=1.3.6
112112
websocket-client~=0.59.0
113113
wheel~=0.37.1
114114
zipp~=1.0.0
115-
deltalake~=0.16.0
115+
deltalake==0.16.0
116116

tests/ci/version_helper.py

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
SET(VERSION_MINOR {minor})
3030
SET(VERSION_PATCH {patch})
3131
SET(VERSION_GITHASH {githash})
32+
SET(VERSION_TWEAK {tweak})
3233
SET(VERSION_DESCRIBE {describe})
3334
SET(VERSION_STRING {string})
3435
# end of autochange
@@ -302,18 +303,29 @@ def get_version_from_repo(
302303
)
303304

304305
# if this commit is tagged, use tag's version instead of something stored in cmake
305-
if git is not None and git.latest_tag and git.commits_since_latest == 0:
306+
if git is not None and git.latest_tag:
306307
version_from_tag = get_version_from_tag(git.latest_tag)
307-
# Tag has a priority over the version written in CMake.
308-
# Version must match (except tweak, flavour, description, etc.) to avoid accidental mess.
309-
if not (version_from_tag.major == cmake_version.major \
310-
and version_from_tag.minor == cmake_version.minor \
311-
and version_from_tag.patch == cmake_version.patch):
312-
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})")
313-
314-
# Don't need to reset version completely, mostly because revision part is not set in tag, but must be preserved
315-
cmake_version._flavour = version_from_tag._flavour
316-
cmake_version.tweak = version_from_tag.tweak
308+
logging.debug(f'Git latest tag: {git.latest_tag} ({git.commits_since_latest} commits ago)\n'
309+
f'"new" tag: {git.new_tag} ({git.commits_since_new})\n'
310+
f'current commit: {git.sha}\n'
311+
f'current brach: {git.branch}'
312+
)
313+
if git.commits_since_latest == 0:
314+
# Tag has a priority over the version written in CMake.
315+
# Version must match (except tweak, flavour, description, etc.) to avoid accidental mess.
316+
if not (version_from_tag.major == cmake_version.major \
317+
and version_from_tag.minor == cmake_version.minor \
318+
and version_from_tag.patch == cmake_version.patch):
319+
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})")
320+
321+
# Don't need to reset version completely, mostly because revision part is not set in tag, but must be preserved
322+
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}")
323+
cmake_version._flavour = version_from_tag._flavour
324+
cmake_version.tweak = version_from_tag.tweak
325+
else:
326+
# We've had some number of commits since the latest tag.
327+
logging.debug(f"Bumping the TWEAK of version from cmake {cmake_version} by {git.commits_since_latest}")
328+
cmake_version.tweak = cmake_version.tweak + git.commits_since_latest
317329

318330
return cmake_version
319331

0 commit comments

Comments
 (0)