Skip to content

Commit c97f745

Browse files
committed
Merge branch 'master' into fix-issue-87656
2 parents c2f5e4a + a2572a3 commit c97f745

File tree

1,078 files changed

+32062
-31632
lines changed

Some content is hidden

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

1,078 files changed

+32062
-31632
lines changed

.github/copilot-instructions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
When creating a PR, use PR body template from `/.github/PULL_REQUEST_TEMPLATE.md`
2+
3+
When performing a code review, ignore `/.github/workflows/*` files.
4+
5+
When performing a code review, suggest a changelog entry for a change in a review comment,
6+
format it as plain text and limit to a maximum of 50 words.

.github/workflows/pull_request.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2374,8 +2374,8 @@ jobs:
23742374
fi
23752375
23762376
bugfix_validation_integration_tests:
2377-
runs-on: [self-hosted, amd-medium]
2378-
needs: [config_workflow, dockers_build_amd, dockers_build_arm, dockers_build_multiplatform_manifest, style_check, fast_test, build_arm_tidy]
2377+
runs-on: [self-hosted, amd-small-mem]
2378+
needs: [config_workflow, dockers_build_amd, dockers_build_arm, dockers_build_multiplatform_manifest, style_check, fast_test, build_arm_tidy, build_amd_debug, build_amd_asan, build_arm_binary, stateless_tests_amd_asan_distributed_plan_parallel_1_2, stateless_tests_amd_asan_distributed_plan_parallel_2_2, stateless_tests_amd_debug_parallel, stateless_tests_arm_binary_parallel]
23792379
if: ${{ !cancelled() && !contains(needs.*.outputs.pipeline_status, 'failure') && !contains(needs.*.outputs.pipeline_status, 'undefined') && !contains(fromJson(needs.config_workflow.outputs.data).workflow_config.cache_success_base64, 'QnVnZml4IHZhbGlkYXRpb24gKGludGVncmF0aW9uIHRlc3RzKQ==') }}
23802380
name: "Bugfix validation (integration tests)"
23812381
outputs:
@@ -3285,11 +3285,11 @@ jobs:
32853285
python3 -m praktika run 'Integration tests (amd_tsan, 6/6)' --workflow "PR" --ci |& tee ./ci/tmp/job.log
32863286
fi
32873287
3288-
integration_tests_amd_asan_flaky_check:
3288+
integration_tests_amd_asan_flaky:
32893289
runs-on: [self-hosted, amd-medium]
32903290
needs: [config_workflow, dockers_build_amd, dockers_build_arm, dockers_build_multiplatform_manifest, style_check, fast_test, build_arm_tidy, build_amd_asan]
3291-
if: ${{ !cancelled() && !contains(needs.*.outputs.pipeline_status, 'failure') && !contains(needs.*.outputs.pipeline_status, 'undefined') && !contains(fromJson(needs.config_workflow.outputs.data).workflow_config.cache_success_base64, 'SW50ZWdyYXRpb24gdGVzdHMgKGFtZF9hc2FuLCBmbGFreSBjaGVjayk=') }}
3292-
name: "Integration tests (amd_asan, flaky check)"
3291+
if: ${{ !cancelled() && !contains(needs.*.outputs.pipeline_status, 'failure') && !contains(needs.*.outputs.pipeline_status, 'undefined') && !contains(fromJson(needs.config_workflow.outputs.data).workflow_config.cache_success_base64, 'SW50ZWdyYXRpb24gdGVzdHMgKGFtZF9hc2FuLCBmbGFreSk=') }}
3292+
name: "Integration tests (amd_asan, flaky)"
32933293
outputs:
32943294
data: ${{ steps.run.outputs.DATA }}
32953295
pipeline_status: ${{ steps.run.outputs.pipeline_status }}
@@ -3318,9 +3318,9 @@ jobs:
33183318
. ./ci/tmp/praktika_setup_env.sh
33193319
set -o pipefail
33203320
if command -v ts &> /dev/null; then
3321-
python3 -m praktika run 'Integration tests (amd_asan, flaky check)' --workflow "PR" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
3321+
python3 -m praktika run 'Integration tests (amd_asan, flaky)' --workflow "PR" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
33223322
else
3323-
python3 -m praktika run 'Integration tests (amd_asan, flaky check)' --workflow "PR" --ci |& tee ./ci/tmp/job.log
3323+
python3 -m praktika run 'Integration tests (amd_asan, flaky)' --workflow "PR" --ci |& tee ./ci/tmp/job.log
33243324
fi
33253325
33263326
docker_server_image:
@@ -4503,7 +4503,7 @@ jobs:
45034503
45044504
finish_workflow:
45054505
runs-on: [self-hosted, style-checker-aarch64]
4506-
needs: [config_workflow, dockers_build_amd, dockers_build_arm, dockers_build_multiplatform_manifest, style_check, docs_check, fast_test, build_arm_tidy, build_amd_debug, build_amd_asan, build_amd_tsan, build_amd_msan, build_amd_ubsan, build_amd_binary, build_arm_asan, build_arm_coverage, build_arm_binary, build_amd_release, build_arm_release, build_amd_darwin, build_arm_darwin, build_arm_v80compat, build_amd_freebsd, build_ppc64le, build_amd_compat, build_amd_musl, build_riscv64, build_s390x, build_loongarch64, build_fuzzers, unit_tests_asan, unit_tests_tsan, unit_tests_msan, unit_tests_ubsan, stateless_tests_amd_asan_distributed_plan_parallel_1_2, stateless_tests_amd_asan_distributed_plan_parallel_2_2, stateless_tests_amd_asan_distributed_plan_sequential, stateless_tests_amd_binary_old_analyzer_s3_storage_databasereplicated_parallel, stateless_tests_amd_binary_old_analyzer_s3_storage_databasereplicated_sequential, stateless_tests_amd_binary_parallelreplicas_s3_storage_parallel, stateless_tests_amd_binary_parallelreplicas_s3_storage_sequential, stateless_tests_amd_debug_asyncinsert_s3_storage_parallel, stateless_tests_amd_debug_asyncinsert_s3_storage_sequential, stateless_tests_amd_debug_parallel, stateless_tests_amd_debug_sequential, stateless_tests_amd_tsan_parallel_1_2, stateless_tests_amd_tsan_parallel_2_2, stateless_tests_amd_tsan_sequential_1_2, stateless_tests_amd_tsan_sequential_2_2, stateless_tests_amd_msan_parallel_1_2, stateless_tests_amd_msan_parallel_2_2, stateless_tests_amd_msan_sequential_1_2, stateless_tests_amd_msan_sequential_2_2, stateless_tests_amd_ubsan_parallel, stateless_tests_amd_ubsan_sequential, stateless_tests_amd_debug_distributed_plan_s3_storage_parallel, stateless_tests_amd_debug_distributed_plan_s3_storage_sequential, stateless_tests_amd_tsan_s3_storage_parallel, stateless_tests_amd_tsan_s3_storage_sequential_1_2, stateless_tests_amd_tsan_s3_storage_sequential_2_2, stateless_tests_arm_binary_parallel, stateless_tests_arm_binary_sequential, bugfix_validation_integration_tests, bugfix_validation_functional_tests, stateless_tests_amd_asan_flaky_check, integration_tests_amd_asan_old_analyzer_1_6, integration_tests_amd_asan_old_analyzer_2_6, integration_tests_amd_asan_old_analyzer_3_6, integration_tests_amd_asan_old_analyzer_4_6, integration_tests_amd_asan_old_analyzer_5_6, integration_tests_amd_asan_old_analyzer_6_6, integration_tests_amd_binary_1_5, integration_tests_amd_binary_2_5, integration_tests_amd_binary_3_5, integration_tests_amd_binary_4_5, integration_tests_amd_binary_5_5, integration_tests_arm_binary_distributed_plan_1_4, integration_tests_arm_binary_distributed_plan_2_4, integration_tests_arm_binary_distributed_plan_3_4, integration_tests_arm_binary_distributed_plan_4_4, integration_tests_amd_tsan_1_6, integration_tests_amd_tsan_2_6, integration_tests_amd_tsan_3_6, integration_tests_amd_tsan_4_6, integration_tests_amd_tsan_5_6, integration_tests_amd_tsan_6_6, integration_tests_amd_asan_flaky_check, docker_server_image, docker_keeper_image, install_packages_amd_debug, compatibility_check_amd_release, compatibility_check_arm_release, stress_test_amd_debug, stress_test_amd_tsan, stress_test_arm_asan, stress_test_arm_asan_s3, stress_test_amd_ubsan, stress_test_amd_msan, upgrade_check_amd_asan, upgrade_check_amd_tsan, upgrade_check_amd_msan, upgrade_check_amd_debug, ast_fuzzer_amd_debug, ast_fuzzer_arm_asan, ast_fuzzer_amd_tsan, ast_fuzzer_amd_msan, ast_fuzzer_amd_ubsan, buzzhouse_amd_debug, buzzhouse_arm_asan, buzzhouse_amd_tsan, buzzhouse_amd_msan, buzzhouse_amd_ubsan, performance_comparison_amd_release_master_head_1_3, performance_comparison_amd_release_master_head_2_3, performance_comparison_amd_release_master_head_3_3, performance_comparison_arm_release_master_head_1_3, performance_comparison_arm_release_master_head_2_3, performance_comparison_arm_release_master_head_3_3]
4506+
needs: [config_workflow, dockers_build_amd, dockers_build_arm, dockers_build_multiplatform_manifest, style_check, docs_check, fast_test, build_arm_tidy, build_amd_debug, build_amd_asan, build_amd_tsan, build_amd_msan, build_amd_ubsan, build_amd_binary, build_arm_asan, build_arm_coverage, build_arm_binary, build_amd_release, build_arm_release, build_amd_darwin, build_arm_darwin, build_arm_v80compat, build_amd_freebsd, build_ppc64le, build_amd_compat, build_amd_musl, build_riscv64, build_s390x, build_loongarch64, build_fuzzers, unit_tests_asan, unit_tests_tsan, unit_tests_msan, unit_tests_ubsan, stateless_tests_amd_asan_distributed_plan_parallel_1_2, stateless_tests_amd_asan_distributed_plan_parallel_2_2, stateless_tests_amd_asan_distributed_plan_sequential, stateless_tests_amd_binary_old_analyzer_s3_storage_databasereplicated_parallel, stateless_tests_amd_binary_old_analyzer_s3_storage_databasereplicated_sequential, stateless_tests_amd_binary_parallelreplicas_s3_storage_parallel, stateless_tests_amd_binary_parallelreplicas_s3_storage_sequential, stateless_tests_amd_debug_asyncinsert_s3_storage_parallel, stateless_tests_amd_debug_asyncinsert_s3_storage_sequential, stateless_tests_amd_debug_parallel, stateless_tests_amd_debug_sequential, stateless_tests_amd_tsan_parallel_1_2, stateless_tests_amd_tsan_parallel_2_2, stateless_tests_amd_tsan_sequential_1_2, stateless_tests_amd_tsan_sequential_2_2, stateless_tests_amd_msan_parallel_1_2, stateless_tests_amd_msan_parallel_2_2, stateless_tests_amd_msan_sequential_1_2, stateless_tests_amd_msan_sequential_2_2, stateless_tests_amd_ubsan_parallel, stateless_tests_amd_ubsan_sequential, stateless_tests_amd_debug_distributed_plan_s3_storage_parallel, stateless_tests_amd_debug_distributed_plan_s3_storage_sequential, stateless_tests_amd_tsan_s3_storage_parallel, stateless_tests_amd_tsan_s3_storage_sequential_1_2, stateless_tests_amd_tsan_s3_storage_sequential_2_2, stateless_tests_arm_binary_parallel, stateless_tests_arm_binary_sequential, bugfix_validation_integration_tests, bugfix_validation_functional_tests, stateless_tests_amd_asan_flaky_check, integration_tests_amd_asan_old_analyzer_1_6, integration_tests_amd_asan_old_analyzer_2_6, integration_tests_amd_asan_old_analyzer_3_6, integration_tests_amd_asan_old_analyzer_4_6, integration_tests_amd_asan_old_analyzer_5_6, integration_tests_amd_asan_old_analyzer_6_6, integration_tests_amd_binary_1_5, integration_tests_amd_binary_2_5, integration_tests_amd_binary_3_5, integration_tests_amd_binary_4_5, integration_tests_amd_binary_5_5, integration_tests_arm_binary_distributed_plan_1_4, integration_tests_arm_binary_distributed_plan_2_4, integration_tests_arm_binary_distributed_plan_3_4, integration_tests_arm_binary_distributed_plan_4_4, integration_tests_amd_tsan_1_6, integration_tests_amd_tsan_2_6, integration_tests_amd_tsan_3_6, integration_tests_amd_tsan_4_6, integration_tests_amd_tsan_5_6, integration_tests_amd_tsan_6_6, integration_tests_amd_asan_flaky, docker_server_image, docker_keeper_image, install_packages_amd_debug, compatibility_check_amd_release, compatibility_check_arm_release, stress_test_amd_debug, stress_test_amd_tsan, stress_test_arm_asan, stress_test_arm_asan_s3, stress_test_amd_ubsan, stress_test_amd_msan, upgrade_check_amd_asan, upgrade_check_amd_tsan, upgrade_check_amd_msan, upgrade_check_amd_debug, ast_fuzzer_amd_debug, ast_fuzzer_arm_asan, ast_fuzzer_amd_tsan, ast_fuzzer_amd_msan, ast_fuzzer_amd_ubsan, buzzhouse_amd_debug, buzzhouse_arm_asan, buzzhouse_amd_tsan, buzzhouse_amd_msan, buzzhouse_amd_ubsan, performance_comparison_amd_release_master_head_1_3, performance_comparison_amd_release_master_head_2_3, performance_comparison_amd_release_master_head_3_3, performance_comparison_arm_release_master_head_1_3, performance_comparison_arm_release_master_head_2_3, performance_comparison_arm_release_master_head_3_3]
45074507
if: ${{ !cancelled() }}
45084508
name: "Finish Workflow"
45094509
outputs:

ci/defs/job_configs.py

Lines changed: 37 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
f"--memory-reservation={Utils.physical_memory() * 9 // 10}"
1212
)
1313

14+
if Utils.is_arm():
15+
docker_sock_mount = "--volume=/var/run:/run/host:ro"
16+
else:
17+
docker_sock_mount = "--volume=/run:/run/host:ro"
18+
1419
build_digest_config = Job.CacheDigestConfig(
1520
include_paths=[
1621
"./src",
@@ -81,6 +86,19 @@
8186
allow_merge_on_failure=True,
8287
timeout=3600 * 2,
8388
)
89+
common_integration_test_job_config = Job.Config(
90+
name=JobNames.INTEGRATION,
91+
runs_on=[], # from parametrize
92+
command="python3 ./ci/jobs/integration_test_job.py --options '{PARAMETER}'",
93+
digest_config=Job.CacheDigestConfig(
94+
include_paths=[
95+
"./ci/jobs/integration_test_job.py",
96+
"./tests/integration/",
97+
"./ci/docker/integration",
98+
],
99+
),
100+
run_in_docker=f"clickhouse/integration-tests-runner+root+--memory={LIMITED_MEM}+--privileged+--dns-search='.'+--security-opt seccomp=unconfined+--cap-add=SYS_PTRACE+{docker_sock_mount}+--volume=clickhouse_integration_tests_volume:/var/lib/docker",
101+
)
84102

85103
BINARY_DOCKER_COMMAND = (
86104
"clickhouse/binary-builder+--network=host+"
@@ -540,11 +558,9 @@ class JobConfigs:
540558
),
541559
)
542560
)
543-
bugfix_validation_it_job = Job.Config(
544-
name=JobNames.BUGFIX_VALIDATE_IT,
545-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
546-
command="python3 ./ci/jobs/integration_test_check.py --validate-bugfix",
547-
)
561+
bugfix_validation_it_job = common_integration_test_job_config.set_name(
562+
JobNames.BUGFIX_VALIDATE_IT
563+
).set_runs_on(RunnerLabels.AMD_SMALL_MEM)
548564
unittest_jobs = Job.Config(
549565
name=JobNames.UNITTEST,
550566
runs_on=[], # from parametrize()
@@ -656,46 +672,22 @@ class JobConfigs:
656672
),
657673
)
658674
# why it's master only?
659-
integration_test_asan_master_jobs = Job.Config(
660-
name=JobNames.INTEGRATION,
661-
runs_on=["from PARAM"],
662-
command="python3 ./ci/jobs/integration_test_check.py",
663-
digest_config=Job.CacheDigestConfig(
664-
include_paths=[
665-
"./ci/jobs/integration_test_check.py",
666-
"./ci/jobs/scripts/integration_tests_runner.py",
667-
"./tests/integration/",
668-
"./ci/docker/integration",
669-
],
670-
),
671-
).parametrize(
675+
integration_test_asan_master_jobs = common_integration_test_job_config.parametrize(
672676
*[
673677
Job.ParamSet(
674678
parameter=f"amd_asan, {batch}/{total_batches}",
675-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
679+
runs_on=RunnerLabels.AMD_MEDIUM,
676680
requires=[ArtifactNames.CH_AMD_ASAN],
677681
)
678682
for total_batches in (4,)
679683
for batch in range(1, total_batches + 1)
680684
]
681685
)
682-
integration_test_jobs_required = Job.Config(
683-
name=JobNames.INTEGRATION,
684-
runs_on=["from PARAM"],
685-
command="python3 ./ci/jobs/integration_test_check.py",
686-
digest_config=Job.CacheDigestConfig(
687-
include_paths=[
688-
"./ci/jobs/integration_test_check.py",
689-
"./ci/jobs/scripts/integration_tests_runner.py",
690-
"./tests/integration/",
691-
"./ci/docker/integration",
692-
],
693-
),
694-
).parametrize(
686+
integration_test_jobs_required = common_integration_test_job_config.parametrize(
695687
*[
696688
Job.ParamSet(
697689
parameter=f"amd_asan, old analyzer, {batch}/{total_batches}",
698-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
690+
runs_on=RunnerLabels.AMD_MEDIUM,
699691
requires=[ArtifactNames.CH_AMD_ASAN],
700692
)
701693
for total_batches in (6,)
@@ -704,7 +696,7 @@ class JobConfigs:
704696
*[
705697
Job.ParamSet(
706698
parameter=f"amd_binary, {batch}/{total_batches}",
707-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
699+
runs_on=RunnerLabels.AMD_MEDIUM,
708700
requires=[ArtifactNames.CH_AMD_BINARY],
709701
)
710702
for total_batches in (5,)
@@ -713,50 +705,32 @@ class JobConfigs:
713705
*[
714706
Job.ParamSet(
715707
parameter=f"arm_binary, distributed plan, {batch}/{total_batches}",
716-
runs_on=RunnerLabels.FUNC_TESTER_ARM,
708+
runs_on=RunnerLabels.ARM_MEDIUM,
717709
requires=[ArtifactNames.CH_ARM_BINARY],
718710
)
719711
for total_batches in (4,)
720712
for batch in range(1, total_batches + 1)
721713
],
722714
)
723-
integration_test_jobs_non_required = Job.Config(
724-
name=JobNames.INTEGRATION,
725-
runs_on=["from PARAM"],
726-
command="python3 ./ci/jobs/integration_test_check.py",
727-
digest_config=Job.CacheDigestConfig(
728-
include_paths=[
729-
"./ci/jobs/integration_test_check.py",
730-
"./ci/jobs/scripts/integration_tests_runner.py",
731-
"./tests/integration/",
732-
"./ci/docker/integration",
733-
],
734-
),
735-
allow_merge_on_failure=True,
736-
).parametrize(
715+
integration_test_jobs_non_required = common_integration_test_job_config.parametrize(
737716
*[
738717
Job.ParamSet(
739718
parameter=f"amd_tsan, {batch}/{total_batches}",
740-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
719+
runs_on=RunnerLabels.AMD_MEDIUM,
741720
requires=[ArtifactNames.CH_AMD_TSAN],
742721
)
743722
for total_batches in (6,)
744723
for batch in range(1, total_batches + 1)
745724
]
746725
)
747-
integration_test_asan_flaky_pr_job = Job.Config(
748-
name=JobNames.INTEGRATION + " (amd_asan, flaky check)",
749-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
750-
command="python3 ./ci/jobs/integration_test_check.py",
751-
digest_config=Job.CacheDigestConfig(
752-
include_paths=[
753-
"./ci/jobs/integration_test_check.py",
754-
"./ci/jobs/scripts/integration_tests_runner.py",
755-
"./tests/integration/",
756-
"./ci/docker/integration",
757-
],
758-
),
759-
requires=[ArtifactNames.CH_AMD_ASAN],
726+
integration_test_asan_flaky_pr_jobs = (
727+
common_integration_test_job_config.parametrize(
728+
Job.ParamSet(
729+
parameter=f"amd_asan, flaky",
730+
runs_on=RunnerLabels.AMD_MEDIUM,
731+
requires=[ArtifactNames.CH_AMD_ASAN],
732+
)
733+
)
760734
)
761735
compatibility_test_jobs = Job.Config(
762736
name=JobNames.COMPATIBILITY,

ci/docker/integration/runner/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ RUN set -x \
8989
&& echo 'dockremap:165536:65536' >> /etc/subgid
9090

9191
COPY modprobe.sh /usr/local/bin/modprobe
92-
COPY dockerd-entrypoint.sh /usr/local/bin/
9392
COPY misc/ /misc/
9493

9594
COPY --from=clickhouse/cctools:859fb360308eb8ac47ad /opt/gdb /opt/gdb
@@ -103,6 +102,7 @@ COPY --from=clickhouse/cctools:859fb360308eb8ac47ad \
103102
/etc/ssl/
104103

105104
EXPOSE 2375
106-
ENTRYPOINT ["dockerd-entrypoint.sh"]
107-
# To pass additional arguments (i.e. list of tests) use PYTEST_ADDOPTS
108-
CMD ["sh", "-c", "pytest"]
105+
106+
ENV SPARK_HOME="/spark-3.5.5-bin-hadoop3" \
107+
PATH="${SPARK_HOME}/bin:${PATH}" \
108+
JAVA_TOOL_OPTIONS="-Djdk.attach.allowAttachSelf=true"

0 commit comments

Comments
 (0)