mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Fix the downloading of the recent ccache archives
This commit is contained in:
parent
0ff404da9c
commit
b349cda25c
@ -77,10 +77,21 @@ def get_ccache_if_not_exists(
|
||||
for pr_number in prs_to_check:
|
||||
logging.info("Searching cache for pr %s", pr_number)
|
||||
s3_path_prefix = str(pr_number) + "/ccaches"
|
||||
objects = s3_helper.list_prefix(s3_path_prefix)
|
||||
logging.info("Found %s objects for pr", len(objects))
|
||||
for obj in objects:
|
||||
if ccache_name in obj:
|
||||
all_cache_objects = s3_helper.list_prefix(s3_path_prefix)
|
||||
logging.info("Found %s objects for pr %s", len(all_cache_objects), pr_number)
|
||||
objects = [obj for obj in all_cache_objects if ccache_name in obj]
|
||||
if not objects:
|
||||
continue
|
||||
logging.info(
|
||||
"Found ccache archives for pr %s: %s", pr_number, ", ".join(objects)
|
||||
)
|
||||
|
||||
obj = objects[0]
|
||||
# There are multiple possible caches, the newest one ends with .tar.zst
|
||||
zst_cache = [obj for obj in objects if obj.endswith(".tar.zst")]
|
||||
if zst_cache:
|
||||
obj = zst_cache[0]
|
||||
|
||||
logging.info("Found ccache on path %s", obj)
|
||||
url = f"{S3_DOWNLOAD}/{S3_BUILDS_BUCKET}/{obj}"
|
||||
compressed_cache = os.path.join(temp_path, os.path.basename(obj))
|
||||
@ -100,8 +111,6 @@ def get_ccache_if_not_exists(
|
||||
cache_found = True
|
||||
ccache_pr = pr_number
|
||||
break
|
||||
if cache_found:
|
||||
break
|
||||
|
||||
if not cache_found:
|
||||
logging.info("ccache not found anywhere, cannot download anything :(")
|
||||
|
Loading…
Reference in New Issue
Block a user