Skip to content

Commit d16da86

Browse files
committed
Merge branch 'master' of github.com:ClickHouse/ClickHouse into subcolumns-in-default
2 parents 3957788 + 1d7953f commit d16da86

File tree

300 files changed

+6132
-3076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+6132
-3076
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ NamespaceIndentation: None
8383
ObjCBlockIndentWidth: 4
8484
ObjCSpaceAfterProperty: true
8585
ObjCSpaceBeforeProtocolList: true
86+
PackConstructorInitializers: Never
8687
PenaltyBreakBeforeFirstCallParameter: 19
8788
PenaltyBreakComment: 300
8889
PenaltyBreakFirstLessLess: 120

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: ./.github/workflows/docker_test_images.yml
4444
with:
4545
data: "${{ needs.RunConfig.outputs.data }}"
46-
set_latest: true
46+
set_latest: ${{ github.ref == 'refs/heads/master' }}
4747

4848
Builds_1:
4949
needs: [RunConfig]

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
data: ${{ needs.RunConfig.outputs.data }}
133133
# stage for running non-required checks without being blocked by required checks (Test_1) if corresponding settings is selected
134134
Tests_2_ww:
135-
needs: [RunConfig, Builds_1]
135+
needs: [RunConfig, Builds_1, Builds_0]
136136
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_2_ww') }}
137137
uses: ./.github/workflows/reusable_test_stage.yml
138138
with:

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,28 @@ Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com.
4747
You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc.
4848

4949
Upcoming meetups
50-
51-
* [Zagreb Meetup](https://www.meetup.com/clickhouse-croatia-user-group/events/305455877/) - Jan 30, 2025
52-
* [FOSDEM 2025](https://www.fosdem.org/2025/schedule/event/fosdem-2025-6351-how-we-built-a-new-powerful-json-data-type-for-clickhouse/) - Feb 1 & 2, 2025
53-
* [Mumbai Meetup](https://www.meetup.com/clickhouse-mumbai-user-group/events/305497320/) - Feb 1, 2025
5450
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/305146729/) - Feb 5, 2025
5551
* [Bangalore Meetup](https://www.meetup.com/clickhouse-bangalore-user-group/events/305497951/) - Feb 8, 2025
5652
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - Feb 10, 2025
53+
* [Auckland Meetup](https://www.meetup.com/clickhouse-auckland-meetup-group/events/305666103/) - Feb 19, 2025
54+
* [Wellington Meetup](https://www.meetup.com/clickhouse-wellington-user-group/events/305666164/) - Feb 20, 2025
55+
* [LA Meetup](https://www.meetup.com/clickhouse-los-angeles-user-group/events/305952193) - Feb 20, 2025
56+
* [Singapore Meetup](https://www.meetup.com/clickhouse-singapore-meetup-group/events/305917892/) - Feb 25, 2025
57+
* [Seattle Meetup](https://www.meetup.com/clickhouse-seattle-user-group/events/305916325) - March 5, 2025
58+
* [Boston Meetup](https://www.meetup.com/clickhouse-boston-user-group/events/305882607) - March 25, 2025
59+
* [New York Meetup](https://www.meetup.com/clickhouse-new-york-user-group/events/305916369) - March 26, 2025
5760

5861
Recent meetups
59-
62+
* [FOSDEM Dinner](https://clickhouse.com/company/events/202502-emea-brussels-fosdem-dinner) - Feb 1st 2025
63+
* [Mumbai Meetup](https://www.meetup.com/clickhouse-mumbai-user-group/events/305497320/) - Feb 1, 2025
64+
* [Zagreb Meetup](https://www.meetup.com/clickhouse-croatia-user-group/events/305455877/) - Jan 30, 2025
6065
* [Tokyo Meetup](https://www.meetup.com/clickhouse-tokyo-user-group/events/305126993/) - Jan 23, 2025
6166
* [San Francisco Meetup](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/304286951/) - Dec 12, 2024
6267
* [Kuala Lampur Meetup](https://www.meetup.com/clickhouse-malaysia-meetup-group/events/304576472/) - Dec 11, 2024
6368
* [Stockholm Meetup](https://www.meetup.com/clickhouse-stockholm-user-group/events/304382411) - Dec 9, 2024
6469
* [New York Meetup](https://www.meetup.com/clickhouse-new-york-user-group/events/304268174) - Dec 9, 2024
6570
* [Amsterdam Meetup](https://www.meetup.com/clickhouse-netherlands-user-group/events/303638814) - Dec 3, 2024
66-
* [Paris Meetup](https://www.meetup.com/clickhouse-france-user-group/events/303096434) - Nov 26, 2024
67-
* [Ghent Meetup](https://www.meetup.com/clickhouse-belgium-user-group/events/303049405/) - Nov 19, 2024
68-
* [Barcelona Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096876/) - Nov 12, 2024
69-
* [Madrid Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096564/) - Oct 22, 2024
70-
* [Singapore Meetup](https://www.meetup.com/clickhouse-singapore-meetup-group/events/303212064/) - Oct 3, 2024
71-
* [Jakarta Meetup](https://www.meetup.com/clickhouse-indonesia-user-group/events/303191359/) - Oct 1, 2024
71+
7272

7373
## Recent Recordings
7474

base/base/EnumReflection.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pragma once
22

3+
/// To cover ZooKeeperConstants -> See contrib/magic_enum/doc/limitations.md#enum-range
4+
#define MAGIC_ENUM_RANGE_MIN (-100)
5+
#define MAGIC_ENUM_RANGE_MAX 1000
36
#include <magic_enum.hpp>
47
#include <fmt/format.h>
58

ci/jobs/build_clickhouse.py

Lines changed: 36 additions & 32 deletions
Large diffs are not rendered by default.

ci/jobs/scripts/clickhouse_version.py

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CHVersion:
2323
"""
2424

2525
@classmethod
26-
def get_version_as_dict(cls):
26+
def get_release_version_as_dict(cls):
2727
versions = {}
2828
for line in (
2929
Path(cls.FILE_WITH_VERSION_PATH).read_text(encoding="utf-8").splitlines()
@@ -34,11 +34,24 @@ def get_version_as_dict(cls):
3434

3535
name, value = line[4:-1].split(maxsplit=1)
3636
name = name.removeprefix("VERSION_").lower()
37-
if name not in ("major", "minor", "patch"):
38-
continue
39-
value = int(value)
37+
if name in ("major", "minor", "patch"):
38+
value = int(value)
4039
versions[name] = value
4140

41+
result = {
42+
"major": versions["major"],
43+
"minor": versions["minor"],
44+
"patch": versions["patch"],
45+
"revision": versions["revision"],
46+
"githash": versions["githash"],
47+
"describe": versions["describe"],
48+
"string": versions["string"],
49+
}
50+
return result
51+
52+
@classmethod
53+
def get_curent_version_as_dict(cls):
54+
version = cls.get_release_version_as_dict()
4255
info = Info()
4356
version_sha = info.sha
4457
if info.pr_number == 0:
@@ -53,32 +66,31 @@ def get_version_as_dict(cls):
5366
if info.pr_number == 0 and bool(
5467
re.match(r"^\d{2}\.\d+$", info.git_branch.removeprefix("release/"))
5568
):
56-
if versions["minor"] % 5 == 3:
69+
if version["minor"] % 5 == 3:
5770
version_type = "lts"
5871
else:
5972
version_type = "stable"
6073
version_string = (
61-
f'{versions["major"]}.{versions["minor"]}.{versions["patch"]}.{tweak}'
74+
f'{version["major"]}.{version["minor"]}.{version["patch"]}.{tweak}'
6275
)
6376
version_description = f"v{version_string}-{version_type}"
64-
result = {
65-
"major": versions["major"],
66-
"minor": versions["minor"],
67-
"patch": versions["patch"],
68-
"revision": tweak,
69-
"githash": Info().sha,
70-
"describe": version_description,
71-
"string": version_string,
72-
}
73-
return result
77+
version["githash"] = info.sha
78+
version["tweak"] = tweak
79+
version["describe"] = version_description
80+
version["string"] = version_string
81+
return version
7482

7583
@classmethod
7684
def get_version(cls):
77-
return cls.get_version_as_dict()["string"]
85+
return cls.get_curent_version_as_dict()["string"]
86+
87+
@classmethod
88+
def get_release_sha(cls):
89+
return cls.get_release_version_as_dict()["githash"]
7890

7991
@classmethod
8092
def store_version_data_in_ci_pipeline(cls):
81-
Info().store_custom_data("clickhouse_version", cls.get_version_as_dict())
93+
Info().store_custom_data("clickhouse_version", cls.get_curent_version_as_dict())
8294

8395
@classmethod
8496
def set_build_version(cls):
@@ -92,5 +104,5 @@ def set_build_version(cls):
92104

93105
@classmethod
94106
def get_latest_release_major_minor_sha(cls):
95-
version_dict = cls.get_version_as_dict()
107+
version_dict = cls.get_curent_version_as_dict()
96108
return version_dict["major"], version_dict["minor"], version_dict["githash"]
File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import sys
2+
3+
from praktika.info import Info
4+
5+
from ci.jobs.scripts.workflow_hooks.pr_description import Labels
6+
7+
8+
def check_docs():
9+
info = Info()
10+
if Labels.PR_FEATURE in info.pr_labels:
11+
changed_files = info.get_custom_data("changed_files")
12+
if not any(file.startswith("docs/") for file in changed_files):
13+
print("No changes in docs for new feature")
14+
return False
15+
return True
16+
17+
18+
if __name__ == "__main__":
19+
if not check_docs():
20+
sys.exit(1)

ci/jobs/scripts/prechecks/pr_description.py renamed to ci/jobs/scripts/workflow_hooks/pr_description.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,29 +171,39 @@ def check_labels(category, info):
171171
pr_labels_to_remove.append(label)
172172

173173
if info.pr_number:
174-
changed_files = Shell.get_output(
175-
"git diff --name-only $(git merge-base HEAD master) --cached"
174+
changed_files_str = Shell.get_output(
175+
"git diff --name-only $(git merge-base HEAD origin/master) --cached",
176+
strict=True,
176177
)
177-
if "contrib/" in changed_files:
178+
if "contrib/" in changed_files_str:
178179
pr_labels_to_add.append(Labels.SUBMODULE_CHANGED)
180+
changed_files = changed_files_str.split("\n")
181+
info.store_custom_data("changed_files", changed_files)
179182

180183
if any(label in Labels.AUTO_BACKPORT for label in pr_labels_to_add):
181184
backport_labels = [Labels.MUST_BACKPORT, Labels.MUST_BACKPORT_CLOUD]
182185
pr_labels_to_add += [label for label in backport_labels if label not in labels]
183186
print(f"Add backport labels [{backport_labels}] for PR category [{category}]")
184187

185-
cmd = f"pr edit {info.pr_number}"
188+
cmd = f"gh pr edit {info.pr_number}"
186189
if pr_labels_to_add:
187190
print(f"Add labels [{pr_labels_to_add}]")
188191
for label in pr_labels_to_add:
189192
cmd += f" --add-label {label}"
193+
if label in info.pr_labels:
194+
info.pr_labels.append(label)
195+
info.dump()
190196

191197
if pr_labels_to_remove:
192198
print(f"Remove labels [{pr_labels_to_remove}]")
193199
for label in pr_labels_to_add:
194200
cmd += f" --remove-label {label}"
201+
if label in info.pr_labels:
202+
info.pr_labels.remove(label)
203+
info.dump()
195204

196-
Shell.check(cmd, verbose=True, strict=True)
205+
if pr_labels_to_remove or pr_labels_to_add:
206+
Shell.check(cmd, verbose=True, strict=True)
197207

198208

199209
if __name__ == "__main__":

0 commit comments

Comments
 (0)