Эх сурвалжийг харах

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 <gavinmak@google.com>
Commit-Queue: Rakib Hasan <rmhasan@google.com>
Rakib Hasan 3 жил өмнө
parent
commit
dc3baaa0b9

+ 2 - 0
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: