2021-11-12 11:12:42 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
import logging
|
2024-06-02 16:25:14 +00:00
|
|
|
import random
|
2024-05-16 11:06:13 +00:00
|
|
|
import re
|
2023-11-08 11:52:19 +00:00
|
|
|
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
|
2024-04-17 13:11:42 +00:00
|
|
|
from copy import deepcopy
|
2023-12-18 08:07:22 +00:00
|
|
|
from dataclasses import dataclass, field
|
|
|
|
from pathlib import Path
|
|
|
|
from typing import Callable, Dict, Iterable, List, Literal, Optional, Union
|
|
|
|
|
2024-06-02 16:25:14 +00:00
|
|
|
from ci_utils import WithIter, normalize_string
|
2024-01-30 17:29:55 +00:00
|
|
|
from integration_test_images import IMAGES
|
2024-01-04 15:35:09 +00:00
|
|
|
|
|
|
|
|
2024-03-09 13:43:37 +00:00
|
|
|
class WorkFlows(metaclass=WithIter):
|
|
|
|
PULL_REQUEST = "PULL_REQUEST"
|
|
|
|
MASTER = "MASTER"
|
|
|
|
BACKPORT = "BACKPORT"
|
|
|
|
RELEASE = "RELEASE"
|
|
|
|
SYNC = "SYNC"
|
|
|
|
|
|
|
|
|
2024-03-06 16:30:47 +00:00
|
|
|
class CIStages(metaclass=WithIter):
|
2024-02-26 14:52:05 +00:00
|
|
|
NA = "UNKNOWN"
|
|
|
|
BUILDS_1 = "Builds_1"
|
|
|
|
BUILDS_2 = "Builds_2"
|
|
|
|
TESTS_1 = "Tests_1"
|
|
|
|
TESTS_2 = "Tests_2"
|
2024-05-18 16:00:32 +00:00
|
|
|
TESTS_3 = "Tests_3"
|
2024-02-26 14:52:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Runners(metaclass=WithIter):
|
|
|
|
BUILDER = "builder"
|
|
|
|
STYLE_CHECKER = "style-checker"
|
|
|
|
STYLE_CHECKER_ARM = "style-checker-aarch64"
|
|
|
|
FUNC_TESTER = "func-tester"
|
|
|
|
FUNC_TESTER_ARM = "func-tester-aarch64"
|
|
|
|
STRESS_TESTER = "stress-tester"
|
|
|
|
FUZZER_UNIT_TESTER = "fuzzer-unit-tester"
|
|
|
|
|
|
|
|
|
2024-04-24 15:28:48 +00:00
|
|
|
class CILabels(metaclass=WithIter):
|
2024-02-02 17:10:47 +00:00
|
|
|
"""
|
|
|
|
Label names or commit tokens in normalized form
|
|
|
|
"""
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
DO_NOT_TEST_LABEL = "do_not_test"
|
|
|
|
NO_MERGE_COMMIT = "no_merge_commit"
|
|
|
|
NO_CI_CACHE = "no_ci_cache"
|
2024-05-30 19:52:33 +00:00
|
|
|
# to upload all binaries from build jobs
|
|
|
|
UPLOAD_ALL_ARTIFACTS = "upload_all"
|
2024-06-02 16:25:14 +00:00
|
|
|
CI_SET_SYNC = "ci_set_sync"
|
2024-01-25 19:46:57 +00:00
|
|
|
CI_SET_ARM = "ci_set_arm"
|
2024-05-31 10:01:16 +00:00
|
|
|
CI_SET_REQUIRED = "ci_set_required"
|
|
|
|
CI_SET_NON_REQUIRED = "ci_set_non_required"
|
2024-04-27 08:33:21 +00:00
|
|
|
CI_SET_OLD_ANALYZER = "ci_set_old_analyzer"
|
2024-01-04 15:35:09 +00:00
|
|
|
|
2024-02-04 19:12:37 +00:00
|
|
|
libFuzzer = "libFuzzer"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
|
2024-01-19 17:21:01 +00:00
|
|
|
class Build(metaclass=WithIter):
|
|
|
|
PACKAGE_RELEASE = "package_release"
|
|
|
|
PACKAGE_AARCH64 = "package_aarch64"
|
|
|
|
PACKAGE_ASAN = "package_asan"
|
|
|
|
PACKAGE_UBSAN = "package_ubsan"
|
|
|
|
PACKAGE_TSAN = "package_tsan"
|
|
|
|
PACKAGE_MSAN = "package_msan"
|
|
|
|
PACKAGE_DEBUG = "package_debug"
|
2024-01-28 21:24:26 +00:00
|
|
|
PACKAGE_RELEASE_COVERAGE = "package_release_coverage"
|
2024-01-19 17:21:01 +00:00
|
|
|
BINARY_RELEASE = "binary_release"
|
|
|
|
BINARY_TIDY = "binary_tidy"
|
|
|
|
BINARY_DARWIN = "binary_darwin"
|
|
|
|
BINARY_AARCH64 = "binary_aarch64"
|
|
|
|
BINARY_AARCH64_V80COMPAT = "binary_aarch64_v80compat"
|
|
|
|
BINARY_FREEBSD = "binary_freebsd"
|
|
|
|
BINARY_DARWIN_AARCH64 = "binary_darwin_aarch64"
|
|
|
|
BINARY_PPC64LE = "binary_ppc64le"
|
|
|
|
BINARY_AMD64_COMPAT = "binary_amd64_compat"
|
|
|
|
BINARY_AMD64_MUSL = "binary_amd64_musl"
|
|
|
|
BINARY_RISCV64 = "binary_riscv64"
|
2024-04-30 10:02:19 +00:00
|
|
|
BINARY_S390X = "binary_s390x"
|
2024-05-14 08:03:32 +00:00
|
|
|
BINARY_LOONGARCH64 = "binary_loongarch64"
|
2024-01-19 17:21:01 +00:00
|
|
|
FUZZERS = "fuzzers"
|
|
|
|
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
class JobNames(metaclass=WithIter):
|
|
|
|
STYLE_CHECK = "Style check"
|
2024-01-30 17:29:55 +00:00
|
|
|
FAST_TEST = "Fast test"
|
2024-01-30 17:56:49 +00:00
|
|
|
DOCKER_SERVER = "Docker server image"
|
|
|
|
DOCKER_KEEPER = "Docker keeper image"
|
2024-01-04 15:35:09 +00:00
|
|
|
INSTALL_TEST_AMD = "Install packages (amd64)"
|
|
|
|
INSTALL_TEST_ARM = "Install packages (arm64)"
|
2024-01-19 17:21:01 +00:00
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
STATELESS_TEST_DEBUG = "Stateless tests (debug)"
|
2024-01-19 17:21:01 +00:00
|
|
|
STATELESS_TEST_RELEASE = "Stateless tests (release)"
|
2024-01-28 21:27:21 +00:00
|
|
|
STATELESS_TEST_RELEASE_COVERAGE = "Stateless tests (coverage)"
|
2024-01-19 17:21:01 +00:00
|
|
|
STATELESS_TEST_AARCH64 = "Stateless tests (aarch64)"
|
|
|
|
STATELESS_TEST_ASAN = "Stateless tests (asan)"
|
|
|
|
STATELESS_TEST_TSAN = "Stateless tests (tsan)"
|
|
|
|
STATELESS_TEST_MSAN = "Stateless tests (msan)"
|
|
|
|
STATELESS_TEST_UBSAN = "Stateless tests (ubsan)"
|
2024-04-27 08:33:21 +00:00
|
|
|
STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE = (
|
2024-03-21 15:18:49 +00:00
|
|
|
"Stateless tests (release, old analyzer, s3, DatabaseReplicated)"
|
2024-02-21 13:18:02 +00:00
|
|
|
)
|
2024-04-27 08:33:21 +00:00
|
|
|
# merged into STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE:
|
|
|
|
# STATELESS_TEST_OLD_ANALYZER_RELEASE = "Stateless tests (release, analyzer)"
|
2024-02-21 13:18:02 +00:00
|
|
|
# STATELESS_TEST_DB_REPL_RELEASE = "Stateless tests (release, DatabaseReplicated)"
|
|
|
|
# STATELESS_TEST_S3_RELEASE = "Stateless tests (release, s3 storage)"
|
2024-01-19 17:21:01 +00:00
|
|
|
STATELESS_TEST_S3_DEBUG = "Stateless tests (debug, s3 storage)"
|
|
|
|
STATELESS_TEST_S3_TSAN = "Stateless tests (tsan, s3 storage)"
|
2024-04-24 20:28:43 +00:00
|
|
|
STATELESS_TEST_AZURE_ASAN = "Stateless tests (azure, asan)"
|
2024-01-19 17:21:01 +00:00
|
|
|
STATELESS_TEST_FLAKY_ASAN = "Stateless tests flaky check (asan)"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
STATEFUL_TEST_DEBUG = "Stateful tests (debug)"
|
2024-01-19 17:21:01 +00:00
|
|
|
STATEFUL_TEST_RELEASE = "Stateful tests (release)"
|
2024-01-28 21:27:21 +00:00
|
|
|
STATEFUL_TEST_RELEASE_COVERAGE = "Stateful tests (coverage)"
|
2024-01-19 17:21:01 +00:00
|
|
|
STATEFUL_TEST_AARCH64 = "Stateful tests (aarch64)"
|
|
|
|
STATEFUL_TEST_ASAN = "Stateful tests (asan)"
|
|
|
|
STATEFUL_TEST_TSAN = "Stateful tests (tsan)"
|
|
|
|
STATEFUL_TEST_MSAN = "Stateful tests (msan)"
|
|
|
|
STATEFUL_TEST_UBSAN = "Stateful tests (ubsan)"
|
|
|
|
STATEFUL_TEST_PARALLEL_REPL_RELEASE = "Stateful tests (release, ParallelReplicas)"
|
|
|
|
STATEFUL_TEST_PARALLEL_REPL_DEBUG = "Stateful tests (debug, ParallelReplicas)"
|
|
|
|
STATEFUL_TEST_PARALLEL_REPL_ASAN = "Stateful tests (asan, ParallelReplicas)"
|
|
|
|
STATEFUL_TEST_PARALLEL_REPL_MSAN = "Stateful tests (msan, ParallelReplicas)"
|
|
|
|
STATEFUL_TEST_PARALLEL_REPL_UBSAN = "Stateful tests (ubsan, ParallelReplicas)"
|
|
|
|
STATEFUL_TEST_PARALLEL_REPL_TSAN = "Stateful tests (tsan, ParallelReplicas)"
|
|
|
|
|
|
|
|
STRESS_TEST_ASAN = "Stress test (asan)"
|
|
|
|
STRESS_TEST_TSAN = "Stress test (tsan)"
|
|
|
|
STRESS_TEST_UBSAN = "Stress test (ubsan)"
|
|
|
|
STRESS_TEST_MSAN = "Stress test (msan)"
|
|
|
|
STRESS_TEST_DEBUG = "Stress test (debug)"
|
2024-04-11 14:50:18 +00:00
|
|
|
STRESS_TEST_AZURE_TSAN = "Stress test (azure, tsan)"
|
2024-05-01 13:03:52 +00:00
|
|
|
STRESS_TEST_AZURE_MSAN = "Stress test (azure, msan)"
|
2024-01-19 17:21:01 +00:00
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
INTEGRATION_TEST = "Integration tests (release)"
|
2024-01-19 17:21:01 +00:00
|
|
|
INTEGRATION_TEST_ASAN = "Integration tests (asan)"
|
2024-04-27 08:33:21 +00:00
|
|
|
INTEGRATION_TEST_ASAN_OLD_ANALYZER = "Integration tests (asan, old analyzer)"
|
2024-01-19 17:21:01 +00:00
|
|
|
INTEGRATION_TEST_TSAN = "Integration tests (tsan)"
|
2024-01-25 19:46:57 +00:00
|
|
|
INTEGRATION_TEST_ARM = "Integration tests (aarch64)"
|
2024-01-19 17:21:01 +00:00
|
|
|
INTEGRATION_TEST_FLAKY = "Integration tests flaky check (asan)"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
UPGRADE_TEST_DEBUG = "Upgrade check (debug)"
|
2024-01-19 17:21:01 +00:00
|
|
|
UPGRADE_TEST_ASAN = "Upgrade check (asan)"
|
|
|
|
UPGRADE_TEST_TSAN = "Upgrade check (tsan)"
|
|
|
|
UPGRADE_TEST_MSAN = "Upgrade check (msan)"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
UNIT_TEST = "Unit tests (release)"
|
2024-01-19 17:21:01 +00:00
|
|
|
UNIT_TEST_ASAN = "Unit tests (asan)"
|
|
|
|
UNIT_TEST_MSAN = "Unit tests (msan)"
|
|
|
|
UNIT_TEST_TSAN = "Unit tests (tsan)"
|
|
|
|
UNIT_TEST_UBSAN = "Unit tests (ubsan)"
|
|
|
|
|
|
|
|
AST_FUZZER_TEST_DEBUG = "AST fuzzer (debug)"
|
|
|
|
AST_FUZZER_TEST_ASAN = "AST fuzzer (asan)"
|
|
|
|
AST_FUZZER_TEST_MSAN = "AST fuzzer (msan)"
|
|
|
|
AST_FUZZER_TEST_TSAN = "AST fuzzer (tsan)"
|
|
|
|
AST_FUZZER_TEST_UBSAN = "AST fuzzer (ubsan)"
|
|
|
|
|
|
|
|
JEPSEN_KEEPER = "ClickHouse Keeper Jepsen"
|
|
|
|
JEPSEN_SERVER = "ClickHouse Server Jepsen"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
PERFORMANCE_TEST_AMD64 = "Performance Comparison"
|
2024-01-19 17:21:01 +00:00
|
|
|
PERFORMANCE_TEST_ARM64 = "Performance Comparison Aarch64"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
SQL_LOGIC_TEST = "Sqllogic test (release)"
|
2024-01-19 17:21:01 +00:00
|
|
|
|
|
|
|
SQLANCER = "SQLancer (release)"
|
|
|
|
SQLANCER_DEBUG = "SQLancer (debug)"
|
|
|
|
SQLTEST = "SQLTest"
|
|
|
|
|
|
|
|
COMPATIBILITY_TEST = "Compatibility check (amd64)"
|
|
|
|
COMPATIBILITY_TEST_ARM = "Compatibility check (aarch64)"
|
|
|
|
|
2024-05-17 13:28:37 +00:00
|
|
|
CLICKBENCH_TEST = "ClickBench (amd64)"
|
|
|
|
CLICKBENCH_TEST_ARM = "ClickBench (aarch64)"
|
2024-01-19 17:21:01 +00:00
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
LIBFUZZER_TEST = "libFuzzer tests"
|
2024-01-19 17:21:01 +00:00
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
BUILD_CHECK = "ClickHouse build check"
|
2024-01-19 17:21:01 +00:00
|
|
|
BUILD_CHECK_SPECIAL = "ClickHouse special build check"
|
|
|
|
|
2024-01-04 15:35:09 +00:00
|
|
|
DOCS_CHECK = "Docs check"
|
2024-01-29 17:13:32 +00:00
|
|
|
BUGFIX_VALIDATE = "Bugfix validation"
|
2024-01-19 17:21:01 +00:00
|
|
|
|
|
|
|
|
2024-04-17 13:11:42 +00:00
|
|
|
class StatusNames(metaclass=WithIter):
|
|
|
|
"Class with statuses that aren't related to particular jobs"
|
|
|
|
CI = "CI running"
|
|
|
|
MERGEABLE = "Mergeable Check"
|
|
|
|
SYNC = "A Sync"
|
|
|
|
|
|
|
|
|
2024-01-19 17:21:01 +00:00
|
|
|
# dynamically update JobName with Build jobs
|
|
|
|
for attr_name in dir(Build):
|
|
|
|
if not attr_name.startswith("__") and not callable(getattr(Build, attr_name)):
|
|
|
|
setattr(JobNames, attr_name, getattr(Build, attr_name))
|
2023-12-21 17:08:25 +00:00
|
|
|
|
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
@dataclass
|
|
|
|
class DigestConfig:
|
|
|
|
# all files, dirs to include into digest, glob supported
|
|
|
|
include_paths: List[Union[str, Path]] = field(default_factory=list)
|
|
|
|
# file suffixes to exclude from digest
|
|
|
|
exclude_files: List[str] = field(default_factory=list)
|
2024-05-16 11:58:19 +00:00
|
|
|
# directories to exclude from digest
|
2023-12-18 08:07:22 +00:00
|
|
|
exclude_dirs: List[Union[str, Path]] = field(default_factory=list)
|
|
|
|
# docker names to include into digest
|
|
|
|
docker: List[str] = field(default_factory=list)
|
|
|
|
# git submodules digest
|
|
|
|
git_submodules: bool = False
|
|
|
|
|
|
|
|
|
2023-12-21 17:08:25 +00:00
|
|
|
@dataclass
|
|
|
|
class LabelConfig:
|
|
|
|
"""
|
2024-05-16 11:58:19 +00:00
|
|
|
configures different CI scenarios per GH label
|
2023-12-21 17:08:25 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
run_jobs: Iterable[str] = frozenset()
|
|
|
|
|
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
@dataclass
|
|
|
|
class JobConfig:
|
|
|
|
"""
|
2024-02-02 17:10:47 +00:00
|
|
|
contains config parameters for job execution in CI workflow
|
2023-12-18 08:07:22 +00:00
|
|
|
"""
|
|
|
|
|
2024-02-02 17:10:47 +00:00
|
|
|
# configures digest calculation for the job
|
2024-01-08 22:05:49 +00:00
|
|
|
digest: DigestConfig = field(default_factory=DigestConfig)
|
2024-05-16 11:58:19 +00:00
|
|
|
# will be triggered for the job if omitted in CI workflow yml
|
2023-12-18 08:07:22 +00:00
|
|
|
run_command: str = ""
|
2024-03-25 16:39:50 +00:00
|
|
|
# job timeout, seconds
|
2023-12-18 08:07:22 +00:00
|
|
|
timeout: Optional[int] = None
|
2024-06-02 16:25:14 +00:00
|
|
|
# sets number of batches for a multi-batch job
|
2023-12-18 08:07:22 +00:00
|
|
|
num_batches: int = 1
|
2024-06-02 16:25:14 +00:00
|
|
|
# label that enables job in CI, if set digest isn't used
|
2023-12-18 08:07:22 +00:00
|
|
|
run_by_label: str = ""
|
2024-02-02 17:10:47 +00:00
|
|
|
# to run always regardless of the job digest or/and label
|
2023-12-19 19:14:47 +00:00
|
|
|
run_always: bool = False
|
2024-06-02 16:25:14 +00:00
|
|
|
# if the job needs to be run on the release branch, including master (building packages, docker server).
|
2024-05-16 11:58:19 +00:00
|
|
|
# NOTE: Subsequent runs on the same branch with the similar digest are still considered skip-able.
|
2024-02-02 17:10:47 +00:00
|
|
|
required_on_release_branch: bool = False
|
|
|
|
# job is for pr workflow only
|
|
|
|
pr_only: bool = False
|
2024-02-04 19:12:37 +00:00
|
|
|
# job is for release/master branches only
|
|
|
|
release_only: bool = False
|
2024-06-02 16:25:14 +00:00
|
|
|
# to randomly pick and run one job among jobs in the same @random_bucket (PR branches only).
|
2024-02-21 14:55:48 +00:00
|
|
|
random_bucket: str = ""
|
2024-06-02 16:25:14 +00:00
|
|
|
# Do not set it. A list of batches to run. It will be set in runtime in accordance with ci cache and ci settings
|
|
|
|
batches: Optional[List[int]] = None
|
|
|
|
# Do not set it. A list of batches to await. It will be set in runtime in accordance with ci cache and ci settings
|
|
|
|
pending_batches: Optional[List[int]] = None
|
2023-08-02 16:27:14 +00:00
|
|
|
|
|
|
|
|
2024-02-26 14:52:05 +00:00
|
|
|
builds_job_config = JobConfig(
|
|
|
|
required_on_release_branch=True,
|
|
|
|
digest=DigestConfig(
|
|
|
|
include_paths=[
|
|
|
|
"./src",
|
|
|
|
"./contrib/*-cmake",
|
|
|
|
"./contrib/consistent-hashing",
|
|
|
|
"./contrib/murmurhash",
|
|
|
|
"./contrib/libfarmhash",
|
|
|
|
"./contrib/pdqsort",
|
|
|
|
"./contrib/cityhash102",
|
|
|
|
"./contrib/sparse-checkout",
|
|
|
|
"./contrib/libmetrohash",
|
|
|
|
"./contrib/update-submodules.sh",
|
|
|
|
"./contrib/CMakeLists.txt",
|
|
|
|
"./CMakeLists.txt",
|
|
|
|
"./PreLoad.cmake",
|
|
|
|
"./cmake",
|
|
|
|
"./base",
|
|
|
|
"./programs",
|
|
|
|
"./packages",
|
|
|
|
"./docker/packager/packager",
|
|
|
|
"./rust",
|
|
|
|
# FIXME: This is a WA to rebuild the CH and recreate the Performance.tar.zst artifact
|
|
|
|
# when there are changes in performance test scripts.
|
|
|
|
# Due to the current design of the perf test we need to rebuild CH when the performance test changes,
|
|
|
|
# otherwise the changes will not be visible in the PerformanceTest job in CI
|
|
|
|
"./tests/performance",
|
|
|
|
],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/binary-builder"],
|
|
|
|
git_submodules=True,
|
|
|
|
),
|
|
|
|
run_command="build_check.py $BUILD_NAME",
|
|
|
|
)
|
|
|
|
fuzzer_build_job_config = deepcopy(builds_job_config)
|
2024-04-24 15:28:48 +00:00
|
|
|
fuzzer_build_job_config.run_by_label = CILabels.libFuzzer
|
2024-02-26 14:52:05 +00:00
|
|
|
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
@dataclass
|
|
|
|
class BuildConfig:
|
2023-11-08 11:52:19 +00:00
|
|
|
name: str
|
2023-08-02 16:27:14 +00:00
|
|
|
compiler: str
|
2023-09-03 18:05:54 +00:00
|
|
|
package_type: Literal["deb", "binary", "fuzzers"]
|
2023-08-02 16:27:14 +00:00
|
|
|
additional_pkgs: bool = False
|
|
|
|
debug_build: bool = False
|
2024-01-14 02:45:42 +00:00
|
|
|
coverage: bool = False
|
2023-08-02 16:27:14 +00:00
|
|
|
sanitizer: str = ""
|
|
|
|
tidy: bool = False
|
2024-02-09 17:32:54 +00:00
|
|
|
# sparse_checkout is needed only to test the option itself.
|
|
|
|
# No particular sense to use it in every build, since it slows down the job.
|
2023-11-08 11:52:19 +00:00
|
|
|
sparse_checkout: bool = False
|
2023-08-02 16:27:14 +00:00
|
|
|
comment: str = ""
|
|
|
|
static_binary_name: str = ""
|
2024-02-26 14:52:05 +00:00
|
|
|
job_config: JobConfig = field(default_factory=lambda: deepcopy(builds_job_config))
|
2023-08-02 16:27:14 +00:00
|
|
|
|
2023-11-08 11:52:19 +00:00
|
|
|
def export_env(self, export: bool = False) -> str:
|
|
|
|
def process(field_name: str, field: Union[bool, str]) -> str:
|
|
|
|
if isinstance(field, bool):
|
|
|
|
field = str(field).lower()
|
2024-03-04 19:01:26 +00:00
|
|
|
elif not isinstance(field, str):
|
|
|
|
field = ""
|
2023-11-08 11:52:19 +00:00
|
|
|
if export:
|
|
|
|
return f"export BUILD_{field_name.upper()}={repr(field)}"
|
|
|
|
return f"BUILD_{field_name.upper()}={field}"
|
|
|
|
|
|
|
|
return "\n".join(process(k, v) for k, v in self.__dict__.items())
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
@dataclass
|
|
|
|
class BuildReportConfig:
|
|
|
|
builds: List[str]
|
2024-01-04 15:35:09 +00:00
|
|
|
job_config: JobConfig = field(
|
|
|
|
default_factory=lambda: JobConfig(
|
2024-03-01 00:48:31 +00:00
|
|
|
run_command='build_report_check.py "$CHECK_NAME"',
|
2024-01-04 15:35:09 +00:00
|
|
|
digest=DigestConfig(
|
|
|
|
include_paths=[
|
|
|
|
"./tests/ci/build_report_check.py",
|
|
|
|
"./tests/ci/upload_result_helper.py",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
2023-12-18 08:07:22 +00:00
|
|
|
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
@dataclass
|
|
|
|
class TestConfig:
|
|
|
|
required_build: str
|
2024-01-08 22:05:49 +00:00
|
|
|
job_config: JobConfig = field(default_factory=JobConfig)
|
2023-08-02 16:27:14 +00:00
|
|
|
|
2022-01-12 12:14:31 +00:00
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
BuildConfigs = Dict[str, BuildConfig]
|
2023-12-18 08:07:22 +00:00
|
|
|
BuildsReportConfig = Dict[str, BuildReportConfig]
|
2023-08-02 16:27:14 +00:00
|
|
|
TestConfigs = Dict[str, TestConfig]
|
2023-12-21 17:08:25 +00:00
|
|
|
LabelConfigs = Dict[str, LabelConfig]
|
2023-08-02 16:27:14 +00:00
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
# common digests configs
|
|
|
|
compatibility_check_digest = DigestConfig(
|
|
|
|
include_paths=["./tests/ci/compatibility_check.py"],
|
|
|
|
docker=["clickhouse/test-old-ubuntu", "clickhouse/test-old-centos"],
|
|
|
|
)
|
|
|
|
install_check_digest = DigestConfig(
|
|
|
|
include_paths=["./tests/ci/install_check.py"],
|
|
|
|
docker=["clickhouse/install-deb-test", "clickhouse/install-rpm-test"],
|
|
|
|
)
|
2024-01-18 12:25:36 +00:00
|
|
|
stateless_check_digest = DigestConfig(
|
|
|
|
include_paths=[
|
2024-01-29 17:13:32 +00:00
|
|
|
"./tests/ci/functional_test_check.py",
|
2024-01-18 12:25:36 +00:00
|
|
|
"./tests/queries/0_stateless/",
|
|
|
|
"./tests/clickhouse-test",
|
2024-02-05 17:09:43 +00:00
|
|
|
"./tests/config",
|
2024-01-18 12:25:36 +00:00
|
|
|
"./tests/*.txt",
|
|
|
|
],
|
2023-12-18 08:07:22 +00:00
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/stateless-test"],
|
|
|
|
)
|
|
|
|
stateful_check_digest = DigestConfig(
|
2024-01-18 12:25:36 +00:00
|
|
|
include_paths=[
|
2024-01-29 17:13:32 +00:00
|
|
|
"./tests/ci/functional_test_check.py",
|
2024-01-18 12:25:36 +00:00
|
|
|
"./tests/queries/1_stateful/",
|
|
|
|
"./tests/clickhouse-test",
|
2024-02-05 17:09:43 +00:00
|
|
|
"./tests/config",
|
2024-01-18 12:25:36 +00:00
|
|
|
"./tests/*.txt",
|
|
|
|
],
|
2023-12-18 08:07:22 +00:00
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/stateful-test"],
|
|
|
|
)
|
2024-01-18 12:25:36 +00:00
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
stress_check_digest = DigestConfig(
|
2024-01-18 12:25:36 +00:00
|
|
|
include_paths=[
|
|
|
|
"./tests/queries/0_stateless/",
|
|
|
|
"./tests/queries/1_stateful/",
|
|
|
|
"./tests/clickhouse-test",
|
2024-02-05 17:09:43 +00:00
|
|
|
"./tests/config",
|
2024-01-18 12:25:36 +00:00
|
|
|
"./tests/*.txt",
|
|
|
|
],
|
2023-12-18 08:07:22 +00:00
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/stress-test"],
|
|
|
|
)
|
|
|
|
# FIXME: which tests are upgrade? just python?
|
|
|
|
upgrade_check_digest = DigestConfig(
|
|
|
|
include_paths=["./tests/ci/upgrade_check.py"],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/upgrade-check"],
|
|
|
|
)
|
|
|
|
integration_check_digest = DigestConfig(
|
2024-03-20 15:34:09 +00:00
|
|
|
include_paths=[
|
|
|
|
"./tests/ci/integration_test_check.py",
|
2024-03-21 13:44:08 +00:00
|
|
|
"./tests/ci/integration_tests_runner.py",
|
|
|
|
"./tests/integration/",
|
2024-03-20 15:34:09 +00:00
|
|
|
],
|
2023-12-18 08:07:22 +00:00
|
|
|
exclude_files=[".md"],
|
2023-12-21 15:09:56 +00:00
|
|
|
docker=IMAGES.copy(),
|
2023-12-18 08:07:22 +00:00
|
|
|
)
|
2023-12-19 19:14:47 +00:00
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
ast_fuzzer_check_digest = DigestConfig(
|
2023-12-19 19:14:47 +00:00
|
|
|
# include_paths=["./tests/ci/ast_fuzzer_check.py"],
|
|
|
|
# exclude_files=[".md"],
|
|
|
|
# docker=["clickhouse/fuzzer"],
|
2023-12-18 08:07:22 +00:00
|
|
|
)
|
|
|
|
unit_check_digest = DigestConfig(
|
|
|
|
include_paths=["./tests/ci/unit_tests_check.py"],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/unit-test"],
|
|
|
|
)
|
|
|
|
perf_check_digest = DigestConfig(
|
|
|
|
include_paths=[
|
|
|
|
"./tests/ci/performance_comparison_check.py",
|
|
|
|
"./tests/performance/",
|
|
|
|
],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/performance-comparison"],
|
|
|
|
)
|
|
|
|
sqllancer_check_digest = DigestConfig(
|
2023-12-19 19:14:47 +00:00
|
|
|
# include_paths=["./tests/ci/sqlancer_check.py"],
|
|
|
|
# exclude_files=[".md"],
|
|
|
|
# docker=["clickhouse/sqlancer-test"],
|
2023-12-18 08:07:22 +00:00
|
|
|
)
|
|
|
|
sqllogic_check_digest = DigestConfig(
|
|
|
|
include_paths=["./tests/ci/sqllogic_test.py"],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/sqllogic-test"],
|
|
|
|
)
|
|
|
|
sqltest_check_digest = DigestConfig(
|
|
|
|
include_paths=["./tests/ci/sqltest.py"],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/sqltest"],
|
|
|
|
)
|
|
|
|
bugfix_validate_check = DigestConfig(
|
|
|
|
include_paths=[
|
|
|
|
"./tests/queries/0_stateless/",
|
|
|
|
"./tests/ci/integration_test_check.py",
|
|
|
|
"./tests/ci/functional_test_check.py",
|
|
|
|
"./tests/ci/bugfix_validate_check.py",
|
|
|
|
],
|
|
|
|
exclude_files=[".md"],
|
2023-12-21 15:09:56 +00:00
|
|
|
docker=IMAGES.copy()
|
2024-05-16 11:58:19 +00:00
|
|
|
+ [
|
|
|
|
"clickhouse/stateless-test",
|
|
|
|
],
|
2023-12-18 08:07:22 +00:00
|
|
|
)
|
|
|
|
# common test params
|
2024-02-29 19:40:33 +00:00
|
|
|
docker_server_job_config = JobConfig(
|
|
|
|
required_on_release_branch=True,
|
2024-03-01 17:16:35 +00:00
|
|
|
run_command='docker_server.py --check-name "$CHECK_NAME" --release-type head --allow-build-reuse',
|
2024-02-29 19:40:33 +00:00
|
|
|
digest=DigestConfig(
|
|
|
|
include_paths=[
|
|
|
|
"tests/ci/docker_server.py",
|
|
|
|
"./docker/server",
|
|
|
|
]
|
|
|
|
),
|
|
|
|
)
|
2024-02-27 15:42:02 +00:00
|
|
|
compatibility_test_common_params = {
|
|
|
|
"digest": compatibility_check_digest,
|
|
|
|
"run_command": "compatibility_check.py",
|
|
|
|
}
|
2024-05-16 11:58:19 +00:00
|
|
|
stateless_test_common_params = {
|
2024-01-18 12:25:36 +00:00
|
|
|
"digest": stateless_check_digest,
|
2024-05-16 16:23:35 +00:00
|
|
|
"run_command": 'functional_test_check.py "$CHECK_NAME"',
|
2023-12-18 08:07:22 +00:00
|
|
|
"timeout": 10800,
|
|
|
|
}
|
|
|
|
stateful_test_common_params = {
|
|
|
|
"digest": stateful_check_digest,
|
2024-05-16 16:23:35 +00:00
|
|
|
"run_command": 'functional_test_check.py "$CHECK_NAME"',
|
2023-12-18 08:07:22 +00:00
|
|
|
"timeout": 3600,
|
|
|
|
}
|
|
|
|
stress_test_common_params = {
|
|
|
|
"digest": stress_check_digest,
|
|
|
|
"run_command": "stress_check.py",
|
2024-05-16 18:13:56 +00:00
|
|
|
"timeout": 9000,
|
2023-12-18 08:07:22 +00:00
|
|
|
}
|
|
|
|
upgrade_test_common_params = {
|
|
|
|
"digest": upgrade_check_digest,
|
|
|
|
"run_command": "upgrade_check.py",
|
|
|
|
}
|
|
|
|
astfuzzer_test_common_params = {
|
|
|
|
"digest": ast_fuzzer_check_digest,
|
|
|
|
"run_command": "ast_fuzzer_check.py",
|
2023-12-19 19:14:47 +00:00
|
|
|
"run_always": True,
|
2023-12-18 08:07:22 +00:00
|
|
|
}
|
|
|
|
integration_test_common_params = {
|
|
|
|
"digest": integration_check_digest,
|
|
|
|
"run_command": 'integration_test_check.py "$CHECK_NAME"',
|
|
|
|
}
|
|
|
|
unit_test_common_params = {
|
|
|
|
"digest": unit_check_digest,
|
|
|
|
"run_command": "unit_tests_check.py",
|
|
|
|
}
|
|
|
|
perf_test_common_params = {
|
|
|
|
"digest": perf_check_digest,
|
|
|
|
"run_command": "performance_comparison_check.py",
|
|
|
|
}
|
2024-03-06 17:55:04 +00:00
|
|
|
sqllancer_test_common_params = JobConfig(
|
|
|
|
digest=sqllancer_check_digest,
|
|
|
|
run_command="sqlancer_check.py",
|
|
|
|
release_only=True,
|
|
|
|
run_always=True,
|
|
|
|
)
|
|
|
|
sqllogic_test_params = JobConfig(
|
|
|
|
digest=sqllogic_check_digest,
|
|
|
|
run_command="sqllogic_test.py",
|
|
|
|
timeout=10800,
|
|
|
|
release_only=True,
|
|
|
|
)
|
|
|
|
sql_test_params = JobConfig(
|
|
|
|
digest=sqltest_check_digest,
|
|
|
|
run_command="sqltest.py",
|
|
|
|
timeout=10800,
|
|
|
|
release_only=True,
|
|
|
|
)
|
2024-02-26 14:52:05 +00:00
|
|
|
clickbench_test_params = {
|
|
|
|
"digest": DigestConfig(
|
|
|
|
include_paths=[
|
|
|
|
"tests/ci/clickbench.py",
|
|
|
|
],
|
|
|
|
docker=["clickhouse/clickbench"],
|
|
|
|
),
|
|
|
|
"run_command": 'clickbench.py "$CHECK_NAME"',
|
2024-05-17 13:29:35 +00:00
|
|
|
"timeout": 900,
|
2023-12-18 08:07:22 +00:00
|
|
|
}
|
2024-03-25 16:39:50 +00:00
|
|
|
install_test_params = JobConfig(
|
|
|
|
digest=install_check_digest,
|
|
|
|
run_command='install_check.py "$CHECK_NAME"',
|
|
|
|
timeout=900,
|
|
|
|
)
|
2023-12-18 08:07:22 +00:00
|
|
|
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
@dataclass
|
2024-01-19 16:02:17 +00:00
|
|
|
class CIConfig:
|
2023-12-18 08:07:22 +00:00
|
|
|
"""
|
2024-01-19 16:02:17 +00:00
|
|
|
Contains configs for all jobs in the CI pipeline
|
2023-12-18 08:07:22 +00:00
|
|
|
each config item in the below dicts should be an instance of JobConfig class or inherited from it
|
|
|
|
"""
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
build_config: BuildConfigs
|
|
|
|
builds_report_config: BuildsReportConfig
|
|
|
|
test_configs: TestConfigs
|
2023-12-18 08:07:22 +00:00
|
|
|
other_jobs_configs: TestConfigs
|
2023-12-21 17:08:25 +00:00
|
|
|
label_configs: LabelConfigs
|
|
|
|
|
2024-06-02 16:25:14 +00:00
|
|
|
# Jobs that run for doc related updates
|
|
|
|
_DOCS_CHECK_JOBS = [JobNames.DOCS_CHECK, JobNames.STYLE_CHECK]
|
|
|
|
|
|
|
|
# Jobs that run in Merge Queue if it's enabled
|
|
|
|
_MQ_JOBS = [
|
|
|
|
JobNames.STYLE_CHECK,
|
|
|
|
JobNames.FAST_TEST,
|
|
|
|
Build.BINARY_RELEASE,
|
|
|
|
JobNames.UNIT_TEST,
|
|
|
|
]
|
|
|
|
|
2023-12-21 17:08:25 +00:00
|
|
|
def get_label_config(self, label_name: str) -> Optional[LabelConfig]:
|
|
|
|
for label, config in self.label_configs.items():
|
2024-06-02 16:25:14 +00:00
|
|
|
if normalize_string(label_name) == normalize_string(label):
|
2023-12-21 17:08:25 +00:00
|
|
|
return config
|
|
|
|
return None
|
2023-12-18 08:07:22 +00:00
|
|
|
|
2024-02-26 14:52:05 +00:00
|
|
|
def get_job_ci_stage(self, job_name: str) -> str:
|
|
|
|
if job_name in [
|
|
|
|
JobNames.STYLE_CHECK,
|
|
|
|
JobNames.FAST_TEST,
|
|
|
|
JobNames.JEPSEN_KEEPER,
|
|
|
|
JobNames.BUILD_CHECK,
|
|
|
|
JobNames.BUILD_CHECK_SPECIAL,
|
|
|
|
]:
|
|
|
|
# FIXME: we can't currently handle Jepsen in the Stage as it's job has concurrency directive
|
|
|
|
# BUILD_CHECK and BUILD_CHECK_SPECIAL runs not in stage because we need them even if Builds stage failed
|
|
|
|
return CIStages.NA
|
|
|
|
stage_type = None
|
|
|
|
if self.is_build_job(job_name):
|
|
|
|
stage_type = CIStages.BUILDS_1
|
|
|
|
if job_name in CI_CONFIG.get_builds_for_report(
|
2024-05-16 11:58:19 +00:00
|
|
|
JobNames.BUILD_CHECK_SPECIAL
|
2024-02-26 14:52:05 +00:00
|
|
|
):
|
|
|
|
# special builds go to Build_2 stage to not delay Builds_1/Test_1
|
|
|
|
stage_type = CIStages.BUILDS_2
|
|
|
|
elif self.is_docs_job(job_name):
|
|
|
|
stage_type = CIStages.TESTS_1
|
|
|
|
elif self.is_test_job(job_name):
|
2024-03-06 16:30:47 +00:00
|
|
|
if job_name in CI_CONFIG.test_configs:
|
|
|
|
required_build = CI_CONFIG.test_configs[job_name].required_build
|
|
|
|
assert required_build
|
|
|
|
if required_build in CI_CONFIG.get_builds_for_report(
|
2024-05-16 11:58:19 +00:00
|
|
|
JobNames.BUILD_CHECK
|
2024-03-06 16:30:47 +00:00
|
|
|
):
|
|
|
|
stage_type = CIStages.TESTS_1
|
|
|
|
else:
|
|
|
|
stage_type = CIStages.TESTS_2
|
|
|
|
else:
|
|
|
|
stage_type = CIStages.TESTS_1
|
2024-05-18 16:00:32 +00:00
|
|
|
if job_name not in REQUIRED_CHECKS:
|
|
|
|
stage_type = CIStages.TESTS_3
|
2024-02-26 14:52:05 +00:00
|
|
|
assert stage_type, f"BUG [{job_name}]"
|
|
|
|
return stage_type
|
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
def get_job_config(self, check_name: str) -> JobConfig:
|
|
|
|
res = None
|
|
|
|
for config in (
|
2024-05-16 11:58:19 +00:00
|
|
|
self.build_config,
|
|
|
|
self.builds_report_config,
|
|
|
|
self.test_configs,
|
|
|
|
self.other_jobs_configs,
|
2023-12-18 08:07:22 +00:00
|
|
|
):
|
|
|
|
if check_name in config: # type: ignore
|
|
|
|
res = config[check_name].job_config # type: ignore
|
|
|
|
break
|
|
|
|
return res # type: ignore
|
|
|
|
|
2024-02-26 14:52:05 +00:00
|
|
|
def get_runner_type(self, check_name: str) -> str:
|
|
|
|
result = None
|
|
|
|
if self.is_build_job(check_name) or check_name == JobNames.FAST_TEST:
|
|
|
|
result = Runners.BUILDER
|
|
|
|
elif any(
|
2024-05-16 11:58:19 +00:00
|
|
|
words in check_name.lower()
|
|
|
|
for words in [
|
|
|
|
"install packages",
|
|
|
|
"compatibility check",
|
|
|
|
"docker",
|
|
|
|
"build check",
|
|
|
|
"jepsen",
|
|
|
|
"style check",
|
|
|
|
]
|
2024-02-26 14:52:05 +00:00
|
|
|
):
|
|
|
|
result = Runners.STYLE_CHECKER
|
|
|
|
elif check_name == JobNames.DOCS_CHECK:
|
|
|
|
# docs job is demanding
|
|
|
|
result = Runners.FUNC_TESTER_ARM
|
|
|
|
elif any(
|
2024-05-16 11:58:19 +00:00
|
|
|
words in check_name.lower()
|
|
|
|
for words in [
|
|
|
|
"stateless",
|
|
|
|
"stateful",
|
|
|
|
"clickbench",
|
|
|
|
"sqllogic test",
|
|
|
|
"libfuzzer",
|
|
|
|
"bugfix validation",
|
|
|
|
]
|
2024-02-26 14:52:05 +00:00
|
|
|
):
|
|
|
|
result = Runners.FUNC_TESTER
|
|
|
|
elif any(
|
2024-05-16 11:58:19 +00:00
|
|
|
words in check_name.lower()
|
|
|
|
for words in ["stress", "upgrade", "integration", "performance comparison"]
|
2024-02-26 14:52:05 +00:00
|
|
|
):
|
|
|
|
result = Runners.STRESS_TESTER
|
|
|
|
elif any(
|
2024-05-16 11:58:19 +00:00
|
|
|
words in check_name.lower()
|
|
|
|
for words in ["ast fuzzer", "unit tests", "sqlancer", "sqltest"]
|
2024-02-26 14:52:05 +00:00
|
|
|
):
|
|
|
|
result = Runners.FUZZER_UNIT_TESTER
|
|
|
|
|
|
|
|
assert result, f"BUG, no runner for [{check_name}]"
|
|
|
|
|
2024-03-12 09:12:25 +00:00
|
|
|
if (
|
2024-05-16 11:58:19 +00:00
|
|
|
"aarch" in check_name.lower() or "arm64" in check_name.lower()
|
2024-03-12 09:12:25 +00:00
|
|
|
) and "aarch" not in result:
|
2024-02-26 14:52:05 +00:00
|
|
|
if result == Runners.STRESS_TESTER:
|
|
|
|
# FIXME: no arm stress tester group atm
|
|
|
|
result = Runners.FUNC_TESTER_ARM
|
|
|
|
elif result == Runners.BUILDER:
|
|
|
|
# crosscompile - no arm required
|
|
|
|
pass
|
|
|
|
else:
|
2024-05-16 11:58:19 +00:00
|
|
|
# switch to aarch64 runner
|
2024-02-26 14:52:05 +00:00
|
|
|
result += "-aarch64"
|
|
|
|
|
|
|
|
return result
|
|
|
|
|
2024-06-02 16:25:14 +00:00
|
|
|
def get_job_parents(self, check_name: str) -> List[str]:
|
2023-12-18 08:07:22 +00:00
|
|
|
res = []
|
2024-06-02 16:25:14 +00:00
|
|
|
check_name = normalize_string(check_name)
|
2023-12-18 08:07:22 +00:00
|
|
|
|
|
|
|
for config in (
|
2024-05-16 11:58:19 +00:00
|
|
|
self.build_config,
|
|
|
|
self.builds_report_config,
|
|
|
|
self.test_configs,
|
|
|
|
self.other_jobs_configs,
|
2023-12-18 08:07:22 +00:00
|
|
|
):
|
|
|
|
for job_name in config: # type: ignore
|
2024-06-02 16:25:14 +00:00
|
|
|
if check_name == normalize_string(job_name):
|
2023-12-18 08:07:22 +00:00
|
|
|
if isinstance(config[job_name], TestConfig): # type: ignore
|
2024-01-04 15:35:09 +00:00
|
|
|
if config[job_name].required_build: # type: ignore
|
|
|
|
res.append(config[job_name].required_build) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
return res
|
|
|
|
|
|
|
|
def get_digest_config(self, check_name: str) -> DigestConfig:
|
|
|
|
res = None
|
|
|
|
for config in (
|
2024-05-16 11:58:19 +00:00
|
|
|
self.other_jobs_configs,
|
|
|
|
self.build_config,
|
|
|
|
self.builds_report_config,
|
|
|
|
self.test_configs,
|
2023-12-18 08:07:22 +00:00
|
|
|
):
|
|
|
|
if check_name in config: # type: ignore
|
|
|
|
res = config[check_name].job_config.digest # type: ignore
|
|
|
|
assert (
|
|
|
|
res
|
|
|
|
), f"Invalid check_name or CI_CONFIG outdated, config not found for [{check_name}]"
|
|
|
|
return res # type: ignore
|
|
|
|
|
2024-06-02 16:25:14 +00:00
|
|
|
def get_workflow_jobs_with_configs(
|
|
|
|
self, is_mq: bool, is_docs_only: bool, is_master: bool
|
|
|
|
) -> Dict[str, JobConfig]:
|
2023-12-18 08:07:22 +00:00
|
|
|
"""
|
2024-06-02 16:25:14 +00:00
|
|
|
get a list of all jobs for a workflow with configs
|
2023-12-18 08:07:22 +00:00
|
|
|
"""
|
2024-06-02 16:25:14 +00:00
|
|
|
jobs = []
|
|
|
|
if is_mq:
|
|
|
|
jobs = self._MQ_JOBS
|
|
|
|
elif is_docs_only:
|
|
|
|
jobs = self._DOCS_CHECK_JOBS
|
|
|
|
else:
|
|
|
|
for config in (
|
|
|
|
self.other_jobs_configs,
|
|
|
|
self.build_config,
|
|
|
|
self.builds_report_config,
|
|
|
|
self.test_configs,
|
|
|
|
):
|
|
|
|
jobs += list(config) # type:ignore
|
|
|
|
if is_master:
|
|
|
|
for job in self._MQ_JOBS:
|
|
|
|
jobs.remove(job)
|
|
|
|
|
|
|
|
randomization_bucket_jobs = {} # type: Dict[str, Dict[str, JobConfig]]
|
|
|
|
res = {} # type: Dict[str, JobConfig]
|
|
|
|
for job in jobs:
|
|
|
|
job_config = self.get_job_config(job)
|
|
|
|
|
|
|
|
if job_config.random_bucket:
|
|
|
|
if job_config.random_bucket not in randomization_bucket_jobs:
|
|
|
|
randomization_bucket_jobs[job_config.random_bucket] = {}
|
|
|
|
randomization_bucket_jobs[job_config.random_bucket][job] = job_config
|
|
|
|
continue
|
|
|
|
|
|
|
|
res[job] = job_config
|
|
|
|
|
|
|
|
# add to the result a random job from each random bucket, if any
|
|
|
|
for bucket, jobs_configs in randomization_bucket_jobs.items():
|
|
|
|
job = random.choice(list(jobs_configs))
|
|
|
|
print(f"Pick job [{job}] from randomization bucket [{bucket}]")
|
|
|
|
res[job] = jobs_configs[job]
|
|
|
|
|
|
|
|
return res
|
2023-12-18 08:07:22 +00:00
|
|
|
|
2024-03-01 00:48:31 +00:00
|
|
|
def get_builds_for_report(
|
2024-05-16 11:58:19 +00:00
|
|
|
self, report_name: str, release: bool = False, backport: bool = False
|
2024-03-01 00:48:31 +00:00
|
|
|
) -> List[str]:
|
|
|
|
# hack to modify build list for release and bp wf
|
|
|
|
assert not (release and backport), "Invalid input"
|
|
|
|
if backport and report_name == JobNames.BUILD_CHECK:
|
|
|
|
return [
|
|
|
|
Build.PACKAGE_RELEASE,
|
|
|
|
Build.PACKAGE_AARCH64,
|
|
|
|
Build.PACKAGE_ASAN,
|
|
|
|
Build.PACKAGE_TSAN,
|
|
|
|
Build.PACKAGE_DEBUG,
|
|
|
|
]
|
2024-03-05 10:09:17 +00:00
|
|
|
if (release or backport) and report_name == JobNames.BUILD_CHECK_SPECIAL:
|
2024-03-01 00:48:31 +00:00
|
|
|
return [
|
|
|
|
Build.BINARY_DARWIN,
|
|
|
|
Build.BINARY_DARWIN_AARCH64,
|
|
|
|
]
|
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
return self.builds_report_config[report_name].builds
|
2023-08-02 16:27:14 +00:00
|
|
|
|
2024-01-19 17:21:01 +00:00
|
|
|
@classmethod
|
|
|
|
def is_build_job(cls, job: str) -> bool:
|
|
|
|
return job in Build
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def is_test_job(cls, job: str) -> bool:
|
2024-02-26 14:52:05 +00:00
|
|
|
return not cls.is_build_job(job) and job != JobNames.STYLE_CHECK
|
2024-01-19 17:21:01 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def is_docs_job(cls, job: str) -> bool:
|
2024-01-22 19:19:22 +00:00
|
|
|
return job == JobNames.DOCS_CHECK
|
2024-01-19 17:21:01 +00:00
|
|
|
|
2024-06-02 16:25:14 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_required(check_name: str) -> bool:
|
|
|
|
"""Checks if a check_name is in REQUIRED_CHECKS, including batched jobs"""
|
|
|
|
_BATCH_REGEXP = re.compile(r"\s+\[[0-9/]+\]$")
|
|
|
|
if check_name in REQUIRED_CHECKS:
|
|
|
|
return True
|
|
|
|
if batch := _BATCH_REGEXP.search(check_name):
|
|
|
|
return check_name[: batch.start()] in REQUIRED_CHECKS
|
|
|
|
return False
|
|
|
|
|
2023-08-02 16:27:14 +00:00
|
|
|
def validate(self) -> None:
|
|
|
|
errors = []
|
2023-11-10 13:29:24 +00:00
|
|
|
for name, build_config in self.build_config.items():
|
2023-08-02 16:27:14 +00:00
|
|
|
build_in_reports = False
|
2023-12-18 08:07:22 +00:00
|
|
|
for _, report_config in self.builds_report_config.items():
|
|
|
|
if name in report_config.builds:
|
2023-08-02 16:27:14 +00:00
|
|
|
build_in_reports = True
|
|
|
|
break
|
2023-11-10 13:29:24 +00:00
|
|
|
# All build configs must belong to build_report_config
|
2023-08-02 16:27:14 +00:00
|
|
|
if not build_in_reports:
|
2023-11-10 13:29:24 +00:00
|
|
|
logging.error("Build name %s does not belong to build reports", name)
|
|
|
|
errors.append(f"Build name {name} does not belong to build reports")
|
|
|
|
# The name should be the same as build_config.name
|
|
|
|
if not build_config.name == name:
|
2023-08-02 16:27:14 +00:00
|
|
|
logging.error(
|
2023-11-10 13:29:24 +00:00
|
|
|
"Build name '%s' does not match the config 'name' value '%s'",
|
|
|
|
name,
|
|
|
|
build_config.name,
|
2023-08-02 16:27:14 +00:00
|
|
|
)
|
|
|
|
errors.append(
|
2023-11-10 13:29:24 +00:00
|
|
|
f"Build name {name} does not match 'name' value '{build_config.name}'"
|
2023-08-02 16:27:14 +00:00
|
|
|
)
|
2023-11-10 13:29:24 +00:00
|
|
|
# All build_report_config values should be in build_config.keys()
|
2023-12-18 08:07:22 +00:00
|
|
|
for build_report_name, build_report_config in self.builds_report_config.items():
|
|
|
|
build_names = build_report_config.builds
|
2023-08-02 16:27:14 +00:00
|
|
|
missed_names = [
|
|
|
|
name for name in build_names if name not in self.build_config.keys()
|
|
|
|
]
|
|
|
|
if missed_names:
|
|
|
|
logging.error(
|
|
|
|
"The following names of the build report '%s' "
|
|
|
|
"are missed in build_config: %s",
|
|
|
|
build_report_name,
|
|
|
|
missed_names,
|
|
|
|
)
|
|
|
|
errors.append(
|
|
|
|
f"The following names of the build report '{build_report_name}' "
|
|
|
|
f"are missed in build_config: {missed_names}",
|
|
|
|
)
|
2024-05-16 11:58:19 +00:00
|
|
|
# And finally, all tests' requirements must be in the builds
|
2023-08-02 16:27:14 +00:00
|
|
|
for test_name, test_config in self.test_configs.items():
|
|
|
|
if test_config.required_build not in self.build_config.keys():
|
|
|
|
logging.error(
|
2024-05-16 11:58:19 +00:00
|
|
|
"The requirement '%s' for '%s' is not found in builds",
|
2023-08-02 16:27:14 +00:00
|
|
|
test_config,
|
|
|
|
test_name,
|
|
|
|
)
|
|
|
|
errors.append(
|
2024-05-16 11:58:19 +00:00
|
|
|
f"The requirement '{test_config}' for "
|
2023-08-02 16:27:14 +00:00
|
|
|
f"'{test_name}' is not found in builds"
|
|
|
|
)
|
2024-06-05 07:34:31 +00:00
|
|
|
if (
|
|
|
|
test_config.required_build
|
|
|
|
and test_config.required_build
|
|
|
|
not in self.builds_report_config[JobNames.BUILD_CHECK].builds
|
|
|
|
):
|
|
|
|
errors.append(
|
|
|
|
f"Test job' required build must be from [{JobNames.BUILD_CHECK}] list"
|
|
|
|
)
|
2023-08-02 16:27:14 +00:00
|
|
|
|
|
|
|
if errors:
|
|
|
|
raise KeyError("config contains errors", errors)
|
|
|
|
|
|
|
|
|
2024-05-31 10:01:16 +00:00
|
|
|
# checks required by Mergeable Check
|
|
|
|
REQUIRED_CHECKS = [
|
|
|
|
"PR Check",
|
|
|
|
StatusNames.SYNC,
|
|
|
|
JobNames.BUILD_CHECK,
|
|
|
|
JobNames.BUILD_CHECK_SPECIAL,
|
|
|
|
JobNames.DOCS_CHECK,
|
|
|
|
JobNames.FAST_TEST,
|
|
|
|
JobNames.STATEFUL_TEST_RELEASE,
|
|
|
|
JobNames.STATELESS_TEST_RELEASE,
|
|
|
|
JobNames.STATELESS_TEST_ASAN,
|
|
|
|
JobNames.STATELESS_TEST_FLAKY_ASAN,
|
|
|
|
JobNames.STATEFUL_TEST_ASAN,
|
|
|
|
JobNames.STYLE_CHECK,
|
|
|
|
JobNames.UNIT_TEST_ASAN,
|
|
|
|
JobNames.UNIT_TEST_MSAN,
|
|
|
|
JobNames.UNIT_TEST,
|
|
|
|
JobNames.UNIT_TEST_TSAN,
|
|
|
|
JobNames.UNIT_TEST_UBSAN,
|
|
|
|
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER,
|
|
|
|
JobNames.STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE,
|
|
|
|
]
|
|
|
|
|
2024-01-19 16:02:17 +00:00
|
|
|
CI_CONFIG = CIConfig(
|
2023-12-21 17:08:25 +00:00
|
|
|
label_configs={
|
2024-04-24 15:28:48 +00:00
|
|
|
CILabels.DO_NOT_TEST_LABEL: LabelConfig(run_jobs=[JobNames.STYLE_CHECK]),
|
|
|
|
CILabels.CI_SET_ARM: LabelConfig(
|
2024-01-25 19:46:57 +00:00
|
|
|
run_jobs=[
|
2024-03-21 22:20:33 +00:00
|
|
|
JobNames.STYLE_CHECK,
|
2024-01-25 19:46:57 +00:00
|
|
|
Build.PACKAGE_AARCH64,
|
|
|
|
JobNames.INTEGRATION_TEST_ARM,
|
|
|
|
]
|
|
|
|
),
|
2024-05-31 10:01:16 +00:00
|
|
|
CILabels.CI_SET_REQUIRED: LabelConfig(run_jobs=REQUIRED_CHECKS),
|
|
|
|
CILabels.CI_SET_NON_REQUIRED: LabelConfig(
|
|
|
|
run_jobs=[job for job in JobNames if job not in REQUIRED_CHECKS]
|
2024-01-25 19:46:57 +00:00
|
|
|
),
|
2024-04-27 08:33:21 +00:00
|
|
|
CILabels.CI_SET_OLD_ANALYZER: LabelConfig(
|
2024-02-29 12:44:55 +00:00
|
|
|
run_jobs=[
|
|
|
|
JobNames.STYLE_CHECK,
|
|
|
|
JobNames.FAST_TEST,
|
|
|
|
Build.PACKAGE_RELEASE,
|
|
|
|
Build.PACKAGE_ASAN,
|
2024-04-27 08:33:21 +00:00
|
|
|
JobNames.STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE,
|
|
|
|
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER,
|
2024-02-29 12:44:55 +00:00
|
|
|
]
|
|
|
|
),
|
2024-06-02 16:25:14 +00:00
|
|
|
CILabels.CI_SET_SYNC: LabelConfig(
|
2024-01-04 15:35:09 +00:00
|
|
|
run_jobs=[
|
2024-06-02 16:25:14 +00:00
|
|
|
Build.PACKAGE_ASAN,
|
|
|
|
JobNames.STYLE_CHECK,
|
|
|
|
JobNames.BUILD_CHECK,
|
|
|
|
JobNames.UNIT_TEST_ASAN,
|
|
|
|
JobNames.STATEFUL_TEST_ASAN,
|
2024-01-04 15:35:09 +00:00
|
|
|
]
|
|
|
|
),
|
2023-12-21 17:08:25 +00:00
|
|
|
},
|
2023-08-02 16:27:14 +00:00
|
|
|
build_config={
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_RELEASE: BuildConfig(
|
|
|
|
name=Build.PACKAGE_RELEASE,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="deb",
|
|
|
|
static_binary_name="amd64",
|
|
|
|
additional_pkgs=True,
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_AARCH64: BuildConfig(
|
|
|
|
name=Build.PACKAGE_AARCH64,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-aarch64",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="deb",
|
|
|
|
static_binary_name="aarch64",
|
|
|
|
additional_pkgs=True,
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_ASAN: BuildConfig(
|
|
|
|
name=Build.PACKAGE_ASAN,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
sanitizer="address",
|
|
|
|
package_type="deb",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_UBSAN: BuildConfig(
|
|
|
|
name=Build.PACKAGE_UBSAN,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
sanitizer="undefined",
|
|
|
|
package_type="deb",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_TSAN: BuildConfig(
|
|
|
|
name=Build.PACKAGE_TSAN,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
sanitizer="thread",
|
|
|
|
package_type="deb",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_MSAN: BuildConfig(
|
|
|
|
name=Build.PACKAGE_MSAN,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
sanitizer="memory",
|
|
|
|
package_type="deb",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_DEBUG: BuildConfig(
|
|
|
|
name=Build.PACKAGE_DEBUG,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
debug_build=True,
|
|
|
|
package_type="deb",
|
2024-01-18 18:34:10 +00:00
|
|
|
sparse_checkout=True, # Check that it works with at least one build, see also update-submodules.sh
|
2023-08-02 16:27:14 +00:00
|
|
|
),
|
2024-01-28 21:24:26 +00:00
|
|
|
Build.PACKAGE_RELEASE_COVERAGE: BuildConfig(
|
|
|
|
name=Build.PACKAGE_RELEASE_COVERAGE,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2024-01-14 02:45:42 +00:00
|
|
|
coverage=True,
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="deb",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_RELEASE: BuildConfig(
|
|
|
|
name=Build.BINARY_RELEASE,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_TIDY: BuildConfig(
|
|
|
|
name=Build.BINARY_TIDY,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-08-02 16:27:14 +00:00
|
|
|
debug_build=True,
|
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="debug-amd64",
|
|
|
|
tidy=True,
|
|
|
|
comment="clang-tidy is used for static analysis",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_DARWIN: BuildConfig(
|
|
|
|
name=Build.BINARY_DARWIN,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-darwin",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="macos",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_AARCH64: BuildConfig(
|
|
|
|
name=Build.BINARY_AARCH64,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-aarch64",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_AARCH64_V80COMPAT: BuildConfig(
|
|
|
|
name=Build.BINARY_AARCH64_V80COMPAT,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-aarch64-v80compat",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="aarch64v80compat",
|
|
|
|
comment="For ARMv8.1 and older",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_FREEBSD: BuildConfig(
|
|
|
|
name=Build.BINARY_FREEBSD,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-freebsd",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="freebsd",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_DARWIN_AARCH64: BuildConfig(
|
|
|
|
name=Build.BINARY_DARWIN_AARCH64,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-darwin-aarch64",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="macos-aarch64",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_PPC64LE: BuildConfig(
|
|
|
|
name=Build.BINARY_PPC64LE,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-ppc64le",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="powerpc64le",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_AMD64_COMPAT: BuildConfig(
|
|
|
|
name=Build.BINARY_AMD64_COMPAT,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-amd64-compat",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="amd64compat",
|
|
|
|
comment="SSE2-only build",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_AMD64_MUSL: BuildConfig(
|
|
|
|
name=Build.BINARY_AMD64_MUSL,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-amd64-musl",
|
2023-11-25 22:25:39 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="amd64musl",
|
|
|
|
comment="Build with Musl",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_RISCV64: BuildConfig(
|
|
|
|
name=Build.BINARY_RISCV64,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18-riscv64",
|
2023-08-02 16:27:14 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="riscv64",
|
|
|
|
),
|
2024-04-30 10:02:19 +00:00
|
|
|
Build.BINARY_S390X: BuildConfig(
|
|
|
|
name=Build.BINARY_S390X,
|
2024-05-06 00:51:58 +00:00
|
|
|
compiler="clang-18-s390x",
|
2024-04-30 10:02:19 +00:00
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="s390x",
|
|
|
|
),
|
2024-05-14 08:03:32 +00:00
|
|
|
Build.BINARY_LOONGARCH64: BuildConfig(
|
|
|
|
name=Build.BINARY_LOONGARCH64,
|
|
|
|
compiler="clang-18-loongarch64",
|
|
|
|
package_type="binary",
|
|
|
|
static_binary_name="loongarch64",
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.FUZZERS: BuildConfig(
|
|
|
|
name=Build.FUZZERS,
|
2024-02-27 22:17:11 +00:00
|
|
|
compiler="clang-18",
|
2023-09-03 17:28:44 +00:00
|
|
|
package_type="fuzzers",
|
2024-02-26 14:52:05 +00:00
|
|
|
job_config=fuzzer_build_job_config,
|
2023-09-03 17:28:44 +00:00
|
|
|
),
|
2021-11-26 10:57:36 +00:00
|
|
|
},
|
2023-08-02 16:27:14 +00:00
|
|
|
builds_report_config={
|
2024-01-04 15:35:09 +00:00
|
|
|
JobNames.BUILD_CHECK: BuildReportConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
builds=[
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_RELEASE,
|
|
|
|
Build.PACKAGE_AARCH64,
|
|
|
|
Build.PACKAGE_ASAN,
|
|
|
|
Build.PACKAGE_UBSAN,
|
|
|
|
Build.PACKAGE_TSAN,
|
|
|
|
Build.PACKAGE_MSAN,
|
|
|
|
Build.PACKAGE_DEBUG,
|
2024-05-29 19:13:00 +00:00
|
|
|
Build.BINARY_RELEASE,
|
2024-06-05 07:34:31 +00:00
|
|
|
Build.PACKAGE_RELEASE_COVERAGE,
|
|
|
|
Build.FUZZERS,
|
2024-01-19 17:21:01 +00:00
|
|
|
]
|
|
|
|
),
|
|
|
|
JobNames.BUILD_CHECK_SPECIAL: BuildReportConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
builds=[
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_TIDY,
|
|
|
|
Build.BINARY_DARWIN,
|
|
|
|
Build.BINARY_AARCH64,
|
|
|
|
Build.BINARY_AARCH64_V80COMPAT,
|
|
|
|
Build.BINARY_FREEBSD,
|
|
|
|
Build.BINARY_DARWIN_AARCH64,
|
|
|
|
Build.BINARY_PPC64LE,
|
|
|
|
Build.BINARY_RISCV64,
|
2024-04-30 10:02:19 +00:00
|
|
|
Build.BINARY_S390X,
|
2024-05-14 08:03:32 +00:00
|
|
|
Build.BINARY_LOONGARCH64,
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_AMD64_COMPAT,
|
|
|
|
Build.BINARY_AMD64_MUSL,
|
|
|
|
]
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
|
|
|
},
|
|
|
|
other_jobs_configs={
|
2024-02-29 19:40:33 +00:00
|
|
|
JobNames.DOCKER_SERVER: TestConfig("", job_config=docker_server_job_config),
|
|
|
|
JobNames.DOCKER_KEEPER: TestConfig("", job_config=docker_server_job_config),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.DOCS_CHECK: TestConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
"",
|
|
|
|
job_config=JobConfig(
|
|
|
|
digest=DigestConfig(
|
|
|
|
include_paths=["**/*.md", "./docs", "tests/ci/docs_check.py"],
|
|
|
|
docker=["clickhouse/docs-builder"],
|
|
|
|
),
|
2024-02-26 14:52:05 +00:00
|
|
|
run_command="docs_check.py",
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
|
|
|
),
|
2024-01-04 15:35:09 +00:00
|
|
|
JobNames.FAST_TEST: TestConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
"",
|
|
|
|
job_config=JobConfig(
|
2024-02-02 17:10:47 +00:00
|
|
|
pr_only=True,
|
2023-12-18 08:07:22 +00:00
|
|
|
digest=DigestConfig(
|
|
|
|
include_paths=["./tests/queries/0_stateless/"],
|
|
|
|
exclude_files=[".md"],
|
|
|
|
docker=["clickhouse/fasttest"],
|
2024-02-02 17:10:47 +00:00
|
|
|
),
|
2024-05-16 18:06:03 +00:00
|
|
|
timeout=2400,
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
|
|
|
),
|
2024-01-04 15:35:09 +00:00
|
|
|
JobNames.STYLE_CHECK: TestConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
"",
|
|
|
|
job_config=JobConfig(
|
2023-12-19 19:14:47 +00:00
|
|
|
run_always=True,
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.BUGFIX_VALIDATE: TestConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
"",
|
|
|
|
# we run this check by label - no digest required
|
2024-01-29 17:13:32 +00:00
|
|
|
job_config=JobConfig(
|
2024-05-16 17:17:52 +00:00
|
|
|
run_by_label="pr-bugfix",
|
|
|
|
run_command="bugfix_validate_check.py",
|
|
|
|
timeout=900,
|
2024-01-29 17:13:32 +00:00
|
|
|
),
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2023-12-15 14:48:01 +00:00
|
|
|
},
|
|
|
|
test_configs={
|
2024-01-04 15:35:09 +00:00
|
|
|
JobNames.INSTALL_TEST_AMD: TestConfig(
|
2024-03-25 16:39:50 +00:00
|
|
|
Build.PACKAGE_RELEASE, job_config=install_test_params
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-04 15:35:09 +00:00
|
|
|
JobNames.INSTALL_TEST_ARM: TestConfig(
|
2024-03-25 16:39:50 +00:00
|
|
|
Build.PACKAGE_AARCH64, job_config=install_test_params
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_ASAN: TestConfig(
|
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_TSAN: TestConfig(
|
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_MSAN: TestConfig(
|
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_UBSAN: TestConfig(
|
|
|
|
Build.PACKAGE_UBSAN, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_DEBUG: TestConfig(
|
|
|
|
Build.PACKAGE_DEBUG, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_RELEASE: TestConfig(
|
|
|
|
Build.PACKAGE_RELEASE, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-28 21:27:21 +00:00
|
|
|
JobNames.STATEFUL_TEST_RELEASE_COVERAGE: TestConfig(
|
|
|
|
Build.PACKAGE_RELEASE_COVERAGE, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2024-01-18 00:16:50 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_AARCH64: TestConfig(
|
|
|
|
Build.PACKAGE_AARCH64, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2023-12-15 14:48:01 +00:00
|
|
|
# Stateful tests for parallel replicas
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_PARALLEL_REPL_RELEASE: TestConfig(
|
|
|
|
Build.PACKAGE_RELEASE, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_PARALLEL_REPL_DEBUG: TestConfig(
|
|
|
|
Build.PACKAGE_DEBUG, job_config=JobConfig(**stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_PARALLEL_REPL_ASAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(random_bucket="parrepl_with_sanitizer", **stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_PARALLEL_REPL_MSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(random_bucket="parrepl_with_sanitizer", **stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_PARALLEL_REPL_UBSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_UBSAN, job_config=JobConfig(random_bucket="parrepl_with_sanitizer", **stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATEFUL_TEST_PARALLEL_REPL_TSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(random_bucket="parrepl_with_sanitizer", **stateful_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2023-12-15 14:48:01 +00:00
|
|
|
# End stateful tests for parallel replicas
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_ASAN: TestConfig(
|
|
|
|
Build.PACKAGE_ASAN,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=4, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_TSAN: TestConfig(
|
|
|
|
Build.PACKAGE_TSAN,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=5, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_MSAN: TestConfig(
|
|
|
|
Build.PACKAGE_MSAN,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=6, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_UBSAN: TestConfig(
|
|
|
|
Build.PACKAGE_UBSAN,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=2, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_DEBUG: TestConfig(
|
|
|
|
Build.PACKAGE_DEBUG,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=5, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_RELEASE: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_RELEASE, job_config=JobConfig(**stateless_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-28 21:27:21 +00:00
|
|
|
JobNames.STATELESS_TEST_RELEASE_COVERAGE: TestConfig(
|
2024-01-28 21:28:09 +00:00
|
|
|
Build.PACKAGE_RELEASE_COVERAGE,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=6, **stateless_test_common_params), # type: ignore
|
2024-01-18 00:16:50 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_AARCH64: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_AARCH64, job_config=JobConfig(**stateless_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-04-27 08:33:21 +00:00
|
|
|
JobNames.STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE: TestConfig(
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_RELEASE,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=4, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_S3_DEBUG: TestConfig(
|
|
|
|
Build.PACKAGE_DEBUG,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=6, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-04-24 20:28:43 +00:00
|
|
|
JobNames.STATELESS_TEST_AZURE_ASAN: TestConfig(
|
|
|
|
Build.PACKAGE_ASAN,
|
2024-06-02 16:25:14 +00:00
|
|
|
job_config=JobConfig(num_batches=4, **stateless_test_common_params, release_only=True), # type: ignore
|
2024-04-11 14:50:18 +00:00
|
|
|
),
|
2024-01-30 17:56:49 +00:00
|
|
|
JobNames.STATELESS_TEST_S3_TSAN: TestConfig(
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_TSAN,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=5, **stateless_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-02-21 14:55:48 +00:00
|
|
|
JobNames.STRESS_TEST_DEBUG: TestConfig(
|
|
|
|
Build.PACKAGE_DEBUG, job_config=JobConfig(**stress_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STRESS_TEST_TSAN: TestConfig(
|
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(**stress_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-02-21 14:55:48 +00:00
|
|
|
JobNames.STRESS_TEST_ASAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(random_bucket="stress_with_sanitizer", **stress_test_common_params) # type: ignore
|
2024-02-21 14:55:48 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STRESS_TEST_UBSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_UBSAN, job_config=JobConfig(random_bucket="stress_with_sanitizer", **stress_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STRESS_TEST_MSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(random_bucket="stress_with_sanitizer", **stress_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UPGRADE_TEST_ASAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(pr_only=True, random_bucket="upgrade_with_sanitizer", **upgrade_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-04-11 15:15:47 +00:00
|
|
|
JobNames.STRESS_TEST_AZURE_TSAN: TestConfig(
|
2024-06-02 16:25:14 +00:00
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(**stress_test_common_params, release_only=True) # type: ignore
|
2024-04-11 14:50:18 +00:00
|
|
|
),
|
2024-05-01 13:03:52 +00:00
|
|
|
JobNames.STRESS_TEST_AZURE_MSAN: TestConfig(
|
2024-06-02 16:25:14 +00:00
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(**stress_test_common_params, release_only=True) # type: ignore
|
2024-05-01 13:03:52 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UPGRADE_TEST_TSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(pr_only=True, random_bucket="upgrade_with_sanitizer", **upgrade_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UPGRADE_TEST_MSAN: TestConfig(
|
2024-05-16 11:58:19 +00:00
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(pr_only=True, random_bucket="upgrade_with_sanitizer", **upgrade_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UPGRADE_TEST_DEBUG: TestConfig(
|
2024-02-04 19:12:37 +00:00
|
|
|
Build.PACKAGE_DEBUG, job_config=JobConfig(pr_only=True, **upgrade_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.INTEGRATION_TEST_ASAN: TestConfig(
|
|
|
|
Build.PACKAGE_ASAN,
|
2024-02-22 18:34:51 +00:00
|
|
|
job_config=JobConfig(num_batches=4, **integration_test_common_params, release_only=True), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-04-27 08:33:21 +00:00
|
|
|
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER: TestConfig(
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_ASAN,
|
2023-12-18 08:07:22 +00:00
|
|
|
job_config=JobConfig(num_batches=6, **integration_test_common_params), # type: ignore
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.INTEGRATION_TEST_TSAN: TestConfig(
|
|
|
|
Build.PACKAGE_TSAN,
|
2023-12-18 08:07:22 +00:00
|
|
|
job_config=JobConfig(num_batches=6, **integration_test_common_params), # type: ignore
|
|
|
|
),
|
2024-01-25 19:46:57 +00:00
|
|
|
JobNames.INTEGRATION_TEST_ARM: TestConfig(
|
|
|
|
Build.PACKAGE_AARCH64,
|
2024-05-16 14:43:54 +00:00
|
|
|
job_config=JobConfig(num_batches=6, **integration_test_common_params), # type: ignore
|
2024-01-25 19:46:57 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.INTEGRATION_TEST: TestConfig(
|
|
|
|
Build.PACKAGE_RELEASE,
|
2024-02-22 18:34:51 +00:00
|
|
|
job_config=JobConfig(num_batches=4, **integration_test_common_params, release_only=True), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.INTEGRATION_TEST_FLAKY: TestConfig(
|
2024-02-04 19:12:37 +00:00
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(pr_only=True, **integration_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.COMPATIBILITY_TEST: TestConfig(
|
|
|
|
Build.PACKAGE_RELEASE,
|
2024-02-02 17:10:47 +00:00
|
|
|
job_config=JobConfig(
|
2024-02-27 15:42:02 +00:00
|
|
|
required_on_release_branch=True, **compatibility_test_common_params # type: ignore
|
2024-02-02 17:10:47 +00:00
|
|
|
),
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.COMPATIBILITY_TEST_ARM: TestConfig(
|
|
|
|
Build.PACKAGE_AARCH64,
|
2024-02-02 17:10:47 +00:00
|
|
|
job_config=JobConfig(
|
2024-02-27 15:42:02 +00:00
|
|
|
required_on_release_branch=True, **compatibility_test_common_params # type: ignore
|
2024-02-02 17:10:47 +00:00
|
|
|
),
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-04 15:35:09 +00:00
|
|
|
JobNames.UNIT_TEST: TestConfig(
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.BINARY_RELEASE, job_config=JobConfig(**unit_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UNIT_TEST_ASAN: TestConfig(
|
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(**unit_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UNIT_TEST_MSAN: TestConfig(
|
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(**unit_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UNIT_TEST_TSAN: TestConfig(
|
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(**unit_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.UNIT_TEST_UBSAN: TestConfig(
|
|
|
|
Build.PACKAGE_UBSAN, job_config=JobConfig(**unit_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.AST_FUZZER_TEST_DEBUG: TestConfig(
|
|
|
|
Build.PACKAGE_DEBUG, job_config=JobConfig(**astfuzzer_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.AST_FUZZER_TEST_ASAN: TestConfig(
|
|
|
|
Build.PACKAGE_ASAN, job_config=JobConfig(**astfuzzer_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.AST_FUZZER_TEST_MSAN: TestConfig(
|
|
|
|
Build.PACKAGE_MSAN, job_config=JobConfig(**astfuzzer_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.AST_FUZZER_TEST_TSAN: TestConfig(
|
|
|
|
Build.PACKAGE_TSAN, job_config=JobConfig(**astfuzzer_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.AST_FUZZER_TEST_UBSAN: TestConfig(
|
|
|
|
Build.PACKAGE_UBSAN, job_config=JobConfig(**astfuzzer_test_common_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.STATELESS_TEST_FLAKY_ASAN: TestConfig(
|
2023-12-18 08:07:22 +00:00
|
|
|
# replace to non-default
|
2024-01-19 17:21:01 +00:00
|
|
|
Build.PACKAGE_ASAN,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(pr_only=True, **{**stateless_test_common_params, "timeout": 3600}), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.JEPSEN_KEEPER: TestConfig(
|
|
|
|
Build.BINARY_RELEASE,
|
2024-01-16 18:12:09 +00:00
|
|
|
job_config=JobConfig(
|
|
|
|
run_by_label="jepsen-test", run_command="jepsen_check.py keeper"
|
|
|
|
),
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.JEPSEN_SERVER: TestConfig(
|
|
|
|
Build.BINARY_RELEASE,
|
2024-01-16 18:12:09 +00:00
|
|
|
job_config=JobConfig(
|
|
|
|
run_by_label="jepsen-test", run_command="jepsen_check.py server"
|
|
|
|
),
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.PERFORMANCE_TEST_AMD64: TestConfig(
|
|
|
|
Build.PACKAGE_RELEASE,
|
2023-12-18 08:07:22 +00:00
|
|
|
job_config=JobConfig(num_batches=4, **perf_test_common_params), # type: ignore
|
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.PERFORMANCE_TEST_ARM64: TestConfig(
|
|
|
|
Build.PACKAGE_AARCH64,
|
2024-05-16 11:58:19 +00:00
|
|
|
job_config=JobConfig(num_batches=4, run_by_label="pr-performance", **perf_test_common_params), # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.SQLANCER: TestConfig(
|
2024-03-06 17:55:04 +00:00
|
|
|
Build.PACKAGE_RELEASE, job_config=sqllancer_test_common_params
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.SQLANCER_DEBUG: TestConfig(
|
2024-03-06 17:55:04 +00:00
|
|
|
Build.PACKAGE_DEBUG, job_config=sqllancer_test_common_params
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-01-19 17:21:01 +00:00
|
|
|
JobNames.SQL_LOGIC_TEST: TestConfig(
|
2024-03-06 17:55:04 +00:00
|
|
|
Build.PACKAGE_RELEASE, job_config=sqllogic_test_params
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-03-06 17:55:04 +00:00
|
|
|
JobNames.SQLTEST: TestConfig(Build.PACKAGE_RELEASE, job_config=sql_test_params),
|
2024-05-17 13:28:37 +00:00
|
|
|
JobNames.CLICKBENCH_TEST: TestConfig(
|
2024-02-26 14:52:05 +00:00
|
|
|
Build.PACKAGE_RELEASE, job_config=JobConfig(**clickbench_test_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-05-17 13:28:37 +00:00
|
|
|
JobNames.CLICKBENCH_TEST_ARM: TestConfig(
|
2024-02-26 14:52:05 +00:00
|
|
|
Build.PACKAGE_AARCH64, job_config=JobConfig(**clickbench_test_params) # type: ignore
|
2023-12-18 08:07:22 +00:00
|
|
|
),
|
2024-02-26 14:52:05 +00:00
|
|
|
JobNames.LIBFUZZER_TEST: TestConfig(
|
|
|
|
Build.FUZZERS,
|
|
|
|
job_config=JobConfig(
|
2024-04-24 15:28:48 +00:00
|
|
|
run_by_label=CILabels.libFuzzer,
|
2024-02-26 14:52:05 +00:00
|
|
|
timeout=10800,
|
2024-05-16 18:15:49 +00:00
|
|
|
run_command='libfuzzer_test_check.py "$CHECK_NAME"',
|
2024-02-26 14:52:05 +00:00
|
|
|
),
|
|
|
|
), # type: ignore
|
2021-12-14 17:47:45 +00:00
|
|
|
},
|
2023-08-02 16:27:14 +00:00
|
|
|
)
|
|
|
|
CI_CONFIG.validate()
|
|
|
|
|
2024-05-16 11:58:19 +00:00
|
|
|
|
2023-04-12 19:07:12 +00:00
|
|
|
@dataclass
|
|
|
|
class CheckDescription:
|
|
|
|
name: str
|
|
|
|
description: str # the check descriptions, will be put into the status table
|
|
|
|
match_func: Callable[[str], bool] # the function to check vs the commit status
|
|
|
|
|
2023-04-25 15:02:41 +00:00
|
|
|
def __hash__(self) -> int:
|
|
|
|
return hash(self.name + self.description)
|
|
|
|
|
2023-04-12 19:07:12 +00:00
|
|
|
|
|
|
|
CHECK_DESCRIPTIONS = [
|
2024-06-02 16:25:14 +00:00
|
|
|
CheckDescription(
|
|
|
|
"PR Check",
|
|
|
|
"Checks correctness of the PR's body",
|
|
|
|
lambda x: x == "PR Check",
|
|
|
|
),
|
2024-05-29 19:13:00 +00:00
|
|
|
CheckDescription(
|
|
|
|
StatusNames.SYNC,
|
|
|
|
"If it fails, ask a maintainer for help",
|
2024-05-29 19:40:22 +00:00
|
|
|
lambda x: x == StatusNames.SYNC,
|
2024-05-29 19:13:00 +00:00
|
|
|
),
|
2023-04-12 19:07:12 +00:00
|
|
|
CheckDescription(
|
|
|
|
"AST fuzzer",
|
|
|
|
"Runs randomly generated queries to catch program errors. "
|
|
|
|
"The build type is optionally given in parenthesis. "
|
2023-05-02 10:42:26 +00:00
|
|
|
"If it fails, ask a maintainer for help",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("AST fuzzer"),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
2024-01-29 17:13:32 +00:00
|
|
|
JobNames.BUGFIX_VALIDATE,
|
2023-04-12 19:07:12 +00:00
|
|
|
"Checks that either a new test (functional or integration) or there "
|
|
|
|
"some changed tests that fail with the binary built on master branch",
|
2024-01-29 17:13:32 +00:00
|
|
|
lambda x: x == JobNames.BUGFIX_VALIDATE,
|
2023-04-12 19:07:12 +00:00
|
|
|
),
|
2023-04-20 11:55:33 +00:00
|
|
|
CheckDescription(
|
|
|
|
"CI running",
|
2023-04-26 18:08:09 +00:00
|
|
|
"A meta-check that indicates the running CI. Normally, it's in <b>success</b> or "
|
|
|
|
"<b>pending</b> state. The failed status indicates some problems with the PR",
|
2023-04-20 11:55:33 +00:00
|
|
|
lambda x: x == "CI running",
|
|
|
|
),
|
2023-04-12 19:07:12 +00:00
|
|
|
CheckDescription(
|
|
|
|
"ClickHouse build check",
|
|
|
|
"Builds ClickHouse in various configurations for use in further steps. "
|
|
|
|
"You have to fix the builds that fail. Build logs often has enough "
|
|
|
|
"information to fix the error, but you might have to reproduce the failure "
|
2023-04-26 18:08:09 +00:00
|
|
|
"locally. The <b>cmake</b> options can be found in the build log, grepping for "
|
|
|
|
'<b>cmake</b>. Use these options and follow the <a href="'
|
2023-05-02 10:42:26 +00:00
|
|
|
'https://clickhouse.com/docs/en/development/build">general build process</a>',
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("ClickHouse") and x.endswith("build check"),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Compatibility check",
|
2023-04-26 18:08:09 +00:00
|
|
|
"Checks that <b>clickhouse</b> binary runs on distributions with old libc "
|
2023-05-02 10:42:26 +00:00
|
|
|
"versions. If it fails, ask a maintainer for help",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("Compatibility check"),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
2024-01-30 17:56:49 +00:00
|
|
|
JobNames.DOCKER_SERVER,
|
|
|
|
"The check to build and optionally push the mentioned image to docker hub",
|
2024-01-30 18:34:56 +00:00
|
|
|
lambda x: x.startswith("Docker server"),
|
2024-01-30 17:56:49 +00:00
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
JobNames.DOCKER_KEEPER,
|
2023-04-12 19:07:12 +00:00
|
|
|
"The check to build and optionally push the mentioned image to docker hub",
|
2024-01-30 18:34:56 +00:00
|
|
|
lambda x: x.startswith("Docker keeper"),
|
2023-04-12 19:07:12 +00:00
|
|
|
),
|
|
|
|
CheckDescription(
|
2024-01-30 17:44:52 +00:00
|
|
|
JobNames.DOCS_CHECK,
|
|
|
|
"Builds and tests the documentation",
|
|
|
|
lambda x: x == JobNames.DOCS_CHECK,
|
2023-04-12 19:07:12 +00:00
|
|
|
),
|
|
|
|
CheckDescription(
|
2024-01-30 17:29:55 +00:00
|
|
|
JobNames.FAST_TEST,
|
2023-04-12 19:07:12 +00:00
|
|
|
"Normally this is the first check that is ran for a PR. It builds ClickHouse "
|
2023-04-26 18:08:09 +00:00
|
|
|
'and runs most of <a href="https://clickhouse.com/docs/en/development/tests'
|
|
|
|
'#functional-tests">stateless functional tests</a>, '
|
2023-04-12 19:07:12 +00:00
|
|
|
"omitting some. If it fails, further checks are not started until it is fixed. "
|
|
|
|
"Look at the report to see which tests fail, then reproduce the failure "
|
2023-04-26 18:08:09 +00:00
|
|
|
'locally as described <a href="https://clickhouse.com/docs/en/development/'
|
2023-05-02 10:42:26 +00:00
|
|
|
'tests#functional-test-locally">here</a>',
|
2024-01-30 17:29:55 +00:00
|
|
|
lambda x: x == JobNames.FAST_TEST,
|
2023-04-12 19:07:12 +00:00
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Flaky tests",
|
2023-05-02 10:42:26 +00:00
|
|
|
"Checks if new added or modified tests are flaky by running them repeatedly, "
|
|
|
|
"in parallel, with more randomization. Functional tests are run 100 times "
|
|
|
|
"with address sanitizer, and additional randomization of thread scheduling. "
|
2024-05-16 11:58:19 +00:00
|
|
|
"Integration tests are run up to 10 times. If at least once a new test has "
|
2023-05-02 10:42:26 +00:00
|
|
|
"failed, or was too long, this check will be red. We don't allow flaky tests, "
|
|
|
|
'read <a href="https://clickhouse.com/blog/decorating-a-christmas-tree-with-'
|
|
|
|
'the-help-of-flaky-tests/">the doc</a>',
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: "tests flaky check" in x,
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Install packages",
|
|
|
|
"Checks that the built packages are installable in a clear environment",
|
|
|
|
lambda x: x.startswith("Install packages ("),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Integration tests",
|
|
|
|
"The integration tests report. In parenthesis the package type is given, "
|
|
|
|
"and in square brackets are the optional part/total tests",
|
|
|
|
lambda x: x.startswith("Integration tests ("),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
2024-04-17 13:11:42 +00:00
|
|
|
StatusNames.MERGEABLE,
|
2023-04-12 19:07:12 +00:00
|
|
|
"Checks if all other necessary checks are successful",
|
2024-04-17 13:11:42 +00:00
|
|
|
lambda x: x == StatusNames.MERGEABLE,
|
2023-04-12 19:07:12 +00:00
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Performance Comparison",
|
|
|
|
"Measure changes in query performance. The performance test report is "
|
2023-04-26 18:08:09 +00:00
|
|
|
'described in detail <a href="https://github.com/ClickHouse/ClickHouse/tree'
|
|
|
|
'/master/docker/test/performance-comparison#how-to-read-the-report">here</a>. '
|
2023-04-12 19:07:12 +00:00
|
|
|
"In square brackets are the optional part/total tests",
|
|
|
|
lambda x: x.startswith("Performance Comparison"),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Push to Dockerhub",
|
|
|
|
"The check for building and pushing the CI related docker images to docker hub",
|
|
|
|
lambda x: x.startswith("Push") and "to Dockerhub" in x,
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Sqllogic",
|
2023-04-26 18:08:09 +00:00
|
|
|
"Run clickhouse on the "
|
|
|
|
'<a href="https://www.sqlite.org/sqllogictest">sqllogic</a> '
|
2023-05-02 10:42:26 +00:00
|
|
|
"test set against sqlite and checks that all statements are passed",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("Sqllogic test"),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"SQLancer",
|
|
|
|
"Fuzzing tests that detect logical bugs with "
|
2023-05-02 10:42:26 +00:00
|
|
|
'<a href="https://github.com/sqlancer/sqlancer">SQLancer</a> tool',
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("SQLancer"),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Stateful tests",
|
|
|
|
"Runs stateful functional tests for ClickHouse binaries built in various "
|
2023-05-02 10:42:26 +00:00
|
|
|
"configurations -- release, debug, with sanitizers, etc",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("Stateful tests ("),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Stateless tests",
|
|
|
|
"Runs stateless functional tests for ClickHouse binaries built in various "
|
2023-05-02 10:42:26 +00:00
|
|
|
"configurations -- release, debug, with sanitizers, etc",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("Stateless tests ("),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Stress test",
|
|
|
|
"Runs stateless functional tests concurrently from several clients to detect "
|
2023-05-02 10:42:26 +00:00
|
|
|
"concurrency-related errors",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("Stress test ("),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
2024-01-30 17:46:53 +00:00
|
|
|
JobNames.STYLE_CHECK,
|
2023-04-12 19:07:12 +00:00
|
|
|
"Runs a set of checks to keep the code style clean. If some of tests failed, "
|
2023-05-02 10:42:26 +00:00
|
|
|
"see the related log from the report",
|
2024-01-30 17:46:53 +00:00
|
|
|
lambda x: x == JobNames.STYLE_CHECK,
|
2023-04-12 19:07:12 +00:00
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Unit tests",
|
|
|
|
"Runs the unit tests for different release types",
|
|
|
|
lambda x: x.startswith("Unit tests ("),
|
|
|
|
),
|
|
|
|
CheckDescription(
|
|
|
|
"Upgrade check",
|
|
|
|
"Runs stress tests on server version from last release and then tries to "
|
|
|
|
"upgrade it to the version from the PR. It checks if the new server can "
|
2023-05-02 10:42:26 +00:00
|
|
|
"successfully startup without any errors, crashes or sanitizer asserts",
|
2023-04-12 19:07:12 +00:00
|
|
|
lambda x: x.startswith("Upgrade check ("),
|
|
|
|
),
|
2023-12-10 21:02:05 +00:00
|
|
|
CheckDescription(
|
|
|
|
"ClickBench",
|
|
|
|
"Runs [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table",
|
2023-12-12 13:12:10 +00:00
|
|
|
lambda x: x.startswith("ClickBench"),
|
2023-12-10 21:02:05 +00:00
|
|
|
),
|
2023-04-12 19:07:12 +00:00
|
|
|
CheckDescription(
|
2024-05-16 11:58:19 +00:00
|
|
|
"Fallback for unknown",
|
2023-04-12 19:07:12 +00:00
|
|
|
"There's no description for the check yet, please add it to "
|
|
|
|
"tests/ci/ci_config.py:CHECK_DESCRIPTIONS",
|
|
|
|
lambda x: True,
|
|
|
|
),
|
|
|
|
]
|
2023-11-08 11:52:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
def main() -> None:
|
|
|
|
parser = ArgumentParser(
|
|
|
|
formatter_class=ArgumentDefaultsHelpFormatter,
|
|
|
|
description="The script provides build config for GITHUB_ENV or shell export",
|
|
|
|
)
|
|
|
|
parser.add_argument("--build-name", help="the build config to export")
|
|
|
|
parser.add_argument(
|
|
|
|
"--export",
|
|
|
|
action="store_true",
|
|
|
|
help="if set, the ENV parameters are provided for shell export",
|
|
|
|
)
|
|
|
|
args = parser.parse_args()
|
|
|
|
build_config = CI_CONFIG.build_config.get(args.build_name)
|
|
|
|
if build_config:
|
|
|
|
print(build_config.export_env(args.export))
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|