mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
Merge pull request #61172 from ClickHouse/ci_fix_sync_issue_with_builds
CI: fix sync build issue with reuse
This commit is contained in:
commit
90a5143b8d
@ -140,7 +140,7 @@ class CiCache:
|
|||||||
self.s3 = s3
|
self.s3 = s3
|
||||||
self.job_digests = job_digests
|
self.job_digests = job_digests
|
||||||
self.cache_s3_paths = {
|
self.cache_s3_paths = {
|
||||||
job_type: f"{self._S3_CACHE_PREFIX}/{job_type.value}-{self.job_digests[self._get_reference_job_name(job_type)]}/"
|
job_type: f"{self._S3_CACHE_PREFIX}/{job_type.value}-{self._get_digest_for_job_type(self.job_digests, job_type)}/"
|
||||||
for job_type in self.JobType
|
for job_type in self.JobType
|
||||||
}
|
}
|
||||||
self.s3_record_prefixes = {
|
self.s3_record_prefixes = {
|
||||||
@ -155,14 +155,23 @@ class CiCache:
|
|||||||
if not self._LOCAL_CACHE_PATH.exists():
|
if not self._LOCAL_CACHE_PATH.exists():
|
||||||
self._LOCAL_CACHE_PATH.mkdir(parents=True, exist_ok=True)
|
self._LOCAL_CACHE_PATH.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
def _get_reference_job_name(self, job_type: JobType) -> str:
|
def _get_digest_for_job_type(
|
||||||
res = Build.PACKAGE_RELEASE
|
self, job_digests: Dict[str, str], job_type: JobType
|
||||||
|
) -> str:
|
||||||
if job_type == self.JobType.DOCS:
|
if job_type == self.JobType.DOCS:
|
||||||
res = JobNames.DOCS_CHECK
|
res = job_digests[JobNames.DOCS_CHECK]
|
||||||
elif job_type == self.JobType.SRCS:
|
elif job_type == self.JobType.SRCS:
|
||||||
res = Build.PACKAGE_RELEASE
|
# any build type job has the same digest - pick up Build.PACKAGE_RELEASE or Build.PACKAGE_ASAN as a failover
|
||||||
|
# Build.PACKAGE_RELEASE may not exist in the list if we have reduced CI pipeline
|
||||||
|
if Build.PACKAGE_RELEASE in job_digests:
|
||||||
|
res = job_digests[Build.PACKAGE_RELEASE]
|
||||||
|
elif Build.PACKAGE_ASAN in job_digests:
|
||||||
|
# failover, if failover does not work - fix it!
|
||||||
|
res = job_digests[Build.PACKAGE_ASAN]
|
||||||
|
else:
|
||||||
|
assert False, "BUG, no build job in digest' list"
|
||||||
else:
|
else:
|
||||||
assert False
|
assert False, "BUG, New JobType? - please update func"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _get_record_file_name(
|
def _get_record_file_name(
|
||||||
|
Loading…
Reference in New Issue
Block a user