Skip to content

Commit c47f45c

Browse files
Revert "[CI] Support using blob prefix for downloading"
This reverts commit 4f6032f. This reverts commit dff8788. These are already using platform specific buckets so do not need to be prefixed by the platform.
1 parent e358d24 commit c47f45c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.ci/cache_lit_timing_files.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@
1414
import logging
1515
import multiprocessing.pool
1616
import pathlib
17-
import platform
1817
import glob
1918

2019
from google.cloud import storage
2120

2221
GCS_PARALLELISM = 100
2322

2423

25-
def _get_blob_prefix():
26-
return f"lit_timing_{platform.system().lower()}"
27-
28-
2924
def _maybe_upload_timing_file(bucket, timing_file_path):
3025
if os.path.exists(timing_file_path):
31-
timing_file_blob = bucket.blob(_get_blob_prefix() + "/" + timing_file_path)
26+
timing_file_blob = bucket.blob("lit_timing/" + timing_file_path)
3227
timing_file_blob.upload_from_filename(timing_file_path)
3328

3429

@@ -48,14 +43,14 @@ def upload_timing_files(storage_client, bucket_name: str):
4843

4944

5045
def _maybe_download_timing_file(blob):
51-
file_name = blob.name.removeprefix(_get_blob_prefix() + "/")
46+
file_name = blob.name.removeprefix("lit_timing/")
5247
pathlib.Path(os.path.dirname(file_name)).mkdir(parents=True, exist_ok=True)
5348
blob.download_to_filename(file_name)
5449

5550

5651
def download_timing_files(storage_client, bucket_name: str):
5752
bucket = storage_client.bucket(bucket_name)
58-
blobs = bucket.list_blobs(prefix=_get_blob_prefix())
53+
blobs = bucket.list_blobs(prefix="lit_timing")
5954
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
6055
futures = []
6156
for timing_file_blob in blobs:

0 commit comments

Comments
 (0)