Skip to content

Commit

Permalink
Fix leftovers of enabling new analyzer
Browse files Browse the repository at this point in the history
Signed-off-by: Azat Khuzhin <[email protected]>
  • Loading branch information
azat committed Apr 27, 2024
1 parent 03d52e7 commit 5209191
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitmessage
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ci_set_reduced
#ci_set_arm
#ci_set_integration
#ci_set_analyzer
#ci_set_old_analyzer

## To run specified job in CI:
#job_<JOB NAME>
Expand Down
24 changes: 12 additions & 12 deletions tests/ci/ci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CILabels(metaclass=WithIter):
CI_SET_FAST = "ci_set_fast"
CI_SET_ARM = "ci_set_arm"
CI_SET_INTEGRATION = "ci_set_integration"
CI_SET_ANALYZER = "ci_set_analyzer"
CI_SET_OLD_ANALYZER = "ci_set_old_analyzer"
CI_SET_STATLESS = "ci_set_stateless"
CI_SET_STATEFUL = "ci_set_stateful"
CI_SET_STATLESS_ASAN = "ci_set_stateless_asan"
Expand Down Expand Up @@ -98,11 +98,11 @@ class JobNames(metaclass=WithIter):
STATELESS_TEST_TSAN = "Stateless tests (tsan)"
STATELESS_TEST_MSAN = "Stateless tests (msan)"
STATELESS_TEST_UBSAN = "Stateless tests (ubsan)"
STATELESS_TEST_ANALYZER_S3_REPLICATED_RELEASE = (
STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE = (
"Stateless tests (release, old analyzer, s3, DatabaseReplicated)"
)
# merged into STATELESS_TEST_ANALYZER_S3_REPLICATED_RELEASE:
# STATELESS_TEST_ANALYZER_RELEASE = "Stateless tests (release, analyzer)"
# merged into STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE:
# STATELESS_TEST_OLD_ANALYZER_RELEASE = "Stateless tests (release, analyzer)"
# STATELESS_TEST_DB_REPL_RELEASE = "Stateless tests (release, DatabaseReplicated)"
# STATELESS_TEST_S3_RELEASE = "Stateless tests (release, s3 storage)"
STATELESS_TEST_S3_DEBUG = "Stateless tests (debug, s3 storage)"
Expand Down Expand Up @@ -132,7 +132,7 @@ class JobNames(metaclass=WithIter):

INTEGRATION_TEST = "Integration tests (release)"
INTEGRATION_TEST_ASAN = "Integration tests (asan)"
INTEGRATION_TEST_ASAN_ANALYZER = "Integration tests (asan, old analyzer)"
INTEGRATION_TEST_ASAN_OLD_ANALYZER = "Integration tests (asan, old analyzer)"
INTEGRATION_TEST_TSAN = "Integration tests (tsan)"
INTEGRATION_TEST_ARM = "Integration tests (aarch64)"
INTEGRATION_TEST_FLAKY = "Integration tests flaky check (asan)"
Expand Down Expand Up @@ -846,14 +846,14 @@ def validate(self) -> None:
JobNames.INTEGRATION_TEST,
]
),
CILabels.CI_SET_ANALYZER: LabelConfig(
CILabels.CI_SET_OLD_ANALYZER: LabelConfig(
run_jobs=[
JobNames.STYLE_CHECK,
JobNames.FAST_TEST,
Build.PACKAGE_RELEASE,
Build.PACKAGE_ASAN,
JobNames.STATELESS_TEST_ANALYZER_S3_REPLICATED_RELEASE,
JobNames.INTEGRATION_TEST_ASAN_ANALYZER,
JobNames.STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE,
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER,
]
),
CILabels.CI_SET_STATLESS: LabelConfig(
Expand Down Expand Up @@ -1193,7 +1193,7 @@ def validate(self) -> None:
JobNames.STATELESS_TEST_AARCH64: TestConfig(
Build.PACKAGE_AARCH64, job_config=JobConfig(**statless_test_common_params) # type: ignore
),
JobNames.STATELESS_TEST_ANALYZER_S3_REPLICATED_RELEASE: TestConfig(
JobNames.STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE: TestConfig(
Build.PACKAGE_RELEASE,
job_config=JobConfig(num_batches=4, **statless_test_common_params), # type: ignore
),
Expand Down Expand Up @@ -1236,7 +1236,7 @@ def validate(self) -> None:
Build.PACKAGE_ASAN,
job_config=JobConfig(num_batches=4, **integration_test_common_params, release_only=True), # type: ignore
),
JobNames.INTEGRATION_TEST_ASAN_ANALYZER: TestConfig(
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER: TestConfig(
Build.PACKAGE_ASAN,
job_config=JobConfig(num_batches=6, **integration_test_common_params), # type: ignore
),
Expand Down Expand Up @@ -1368,8 +1368,8 @@ def validate(self) -> None:
JobNames.UNIT_TEST,
JobNames.UNIT_TEST_TSAN,
JobNames.UNIT_TEST_UBSAN,
JobNames.INTEGRATION_TEST_ASAN_ANALYZER,
JobNames.STATELESS_TEST_ANALYZER_S3_REPLICATED_RELEASE,
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER,
JobNames.STATELESS_TEST_OLD_ANALYZER_S3_REPLICATED_RELEASE,
]


Expand Down
8 changes: 5 additions & 3 deletions tests/ci/integration_tests_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def __init__(self, result_path, params):
self.start_time = time.time()
self.soft_deadline_time = self.start_time + (TASK_TIMEOUT - MAX_TIME_IN_SANDBOX)

self.use_analyzer = os.environ.get("CLICKHOUSE_USE_OLD_ANALYZER") is not None
self.use_old_analyzer = (
os.environ.get("CLICKHOUSE_USE_OLD_ANALYZER") is not None
)

if "run_by_hash_total" in self.params:
self.run_by_hash_total = self.params["run_by_hash_total"]
Expand Down Expand Up @@ -414,8 +416,8 @@ def _get_runner_opts(self):
result.append("--tmpfs")
if self.disable_net_host:
result.append("--disable-net-host")
if self.use_analyzer:
result.append("--analyzer")
if self.use_old_analyzer:
result.append("--old-analyzer")

return " ".join(result)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/helpers/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4411,7 +4411,7 @@ def write_embedded_config(name, dest_dir, fix_log_level=False):
if self.use_old_analyzer is not None:
use_old_analyzer = self.use_old_analyzer
if use_old_analyzer:
write_embedded_config("0_common_enable_analyzer.xml", users_d_dir)
write_embedded_config("0_common_enable_old_analyzer.xml", users_d_dir)

if len(self.custom_dictionaries_paths):
write_embedded_config("0_common_enable_dictionaries.xml", self.config_d_dir)
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/runner
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ if __name__ == "__main__":
)

parser.add_argument(
"--analyzer",
"--old-analyzer",
action="store_true",
default=False,
dest="analyzer",
help="Use new analyzer infrastructure",
dest="old_analyzer",
help="Use old analyzer infrastructure",
)

parser.add_argument(
Expand Down Expand Up @@ -385,9 +385,9 @@ if __name__ == "__main__":
if args.keyword_expression:
args.pytest_args += ["-k", args.keyword_expression]

use_analyzer = ""
if args.analyzer:
use_analyzer = "-e CLICKHOUSE_USE_OLD_ANALYZER=1"
use_old_analyzer = ""
if args.old_analyzer:
use_old_analyzer = "-e CLICKHOUSE_USE_OLD_ANALYZER=1"

# NOTE: since pytest options is in the argument value already we need to additionally escape '"'
pytest_opts = " ".join(
Expand All @@ -408,7 +408,7 @@ if __name__ == "__main__":
f"--volume={args.utils_dir}/backupview:/ClickHouse/utils/backupview "
f"--volume={args.utils_dir}/grpc-client/pb2:/ClickHouse/utils/grpc-client/pb2 "
f"--volume=/run:/run/host:ro {dockerd_internal_volume} {env_tags} {env_cleanup} "
f"-e DOCKER_CLIENT_TIMEOUT=300 -e COMPOSE_HTTP_TIMEOUT=600 {use_analyzer} -e PYTHONUNBUFFERED=1 "
f"-e DOCKER_CLIENT_TIMEOUT=300 -e COMPOSE_HTTP_TIMEOUT=600 {use_old_analyzer} -e PYTHONUNBUFFERED=1 "
f'-e PYTEST_ADDOPTS="{parallel_args} {pytest_opts} {tests_list} {rand_args} -vvv"'
f" {DIND_INTEGRATION_TESTS_IMAGE_NAME}:{args.docker_image_version}"
)
Expand Down

0 comments on commit 5209191

Please sign in to comment.