CI: Cache AST fuzzers (run always) jobs in CI

This commit is contained in:
Max K 2024-07-13 12:48:48 +02:00
parent 90142b73ad
commit 11f3e406c6
3 changed files with 12 additions and 5 deletions

View File

@ -325,8 +325,8 @@ def _mark_success_action(
# do nothing, exit without failure # do nothing, exit without failure
print(f"ERROR: no status file for job [{job}]") print(f"ERROR: no status file for job [{job}]")
if job_config.run_always or job_config.run_by_label: if job_config.run_by_label or not job_config.has_digest():
print(f"Job [{job}] runs always or by label in CI - do not cache") print(f"Job [{job}] has no digest or run by label in CI - do not cache")
else: else:
if pr_info.is_master: if pr_info.is_master:
pass pass

View File

@ -609,7 +609,7 @@ class CiCache:
pushes pending records for all jobs that supposed to be run pushes pending records for all jobs that supposed to be run
""" """
for job, job_config in self.jobs_to_do.items(): for job, job_config in self.jobs_to_do.items():
if job_config.run_always: if not job_config.has_digest():
continue continue
pending_state = PendingState(time.time(), run_url=GITHUB_RUN_URL) pending_state = PendingState(time.time(), run_url=GITHUB_RUN_URL)
assert job_config.batches assert job_config.batches
@ -680,7 +680,7 @@ class CiCache:
It removes jobs from @jobs_to_do if it is a: It removes jobs from @jobs_to_do if it is a:
1. test job and it is in @jobs_to_wait (no need to wait not affected jobs in PRs) 1. test job and it is in @jobs_to_wait (no need to wait not affected jobs in PRs)
2. test job and it has finished on release branch (even if failed) 2. test job and it has finished on release branch (even if failed)
2. build job which is not required by any test job that is left in @jobs_to_do 3. build job which is not required by any test job that is left in @jobs_to_do
:return: :return:
""" """

View File

@ -327,6 +327,9 @@ class JobConfig:
assert self.required_builds assert self.required_builds
return self.required_builds[0] return self.required_builds[0]
def has_digest(self) -> bool:
return self.digest != DigestConfig()
class CommonJobConfigs: class CommonJobConfigs:
""" """
@ -440,7 +443,11 @@ class CommonJobConfigs:
) )
ASTFUZZER_TEST = JobConfig( ASTFUZZER_TEST = JobConfig(
job_name_keyword="ast", job_name_keyword="ast",
digest=DigestConfig(), digest=DigestConfig(
include_paths=[
"./tests/ci/ast_fuzzer_check.py",
],
docker=["clickhouse/fuzzer"]),
run_command="ast_fuzzer_check.py", run_command="ast_fuzzer_check.py",
run_always=True, run_always=True,
runner_type=Runners.FUZZER_UNIT_TESTER, runner_type=Runners.FUZZER_UNIT_TESTER,