Commit dc3baaa0 authored by Rakib Hasan's avatar Rakib Hasan Committed by LUCI CQ

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/+/3279352Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Commit-Queue: Rakib Hasan <rmhasan@google.com>
parent f7b8f8f3
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment