From dc3baaa0b95b6a5df5f574e2d3c0d134836281ba Mon Sep 17 00:00:00 2001 From: Rakib Hasan Date: Mon, 15 Nov 2021 20:10:46 +0000 Subject: [PATCH] WebView: Add logging for files that already exist in the GCS bucket These logs can be used by the pin-component-crx recipe to check if a file url already exists in a GCS bucket. Bug:1225491 Bug:b/191630810 Change-Id: If9c5f5d2a6aa89c336e44de33ad9ad140608a0bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3279352 Reviewed-by: Gavin Mak Commit-Queue: Rakib Hasan --- upload_to_google_storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upload_to_google_storage.py b/upload_to_google_storage.py index 9b1933d14..864fce9d8 100755 --- a/upload_to_google_storage.py +++ b/upload_to_google_storage.py @@ -86,6 +86,8 @@ def _upload_worker( _, out, _ = gsutil.check_call_with_retries('ls', '-L', file_url) etag_match = re.search(r'ETag:\s+([a-z0-9]{32})', out) if etag_match: + stdout_queue.put( + '%d> File with url %s already exists' % (thread_num, file_url)) remote_md5 = etag_match.group(1) # Calculate the MD5 checksum to match it to Google Storage's ETag. with md5_lock: