Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Issue 923473002: [download_from_google_storage] Don't list ALL objects to check for ACLs (Closed)

Created:
5 years, 10 months ago by Primiano Tucci (use gerrit)
Modified:
5 years, 7 months ago
Reviewers:
hinoka, Sami, angiegvalg, szager1
CC:
chromium-reviews, cmp-cc_chromium.org, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org, picksi1
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Project:
tools
Visibility:
Public.

Description

[download_from_google_storage] Don't list ALL objects to check for ACLs Currently check_bucket_permissions() in download_from_google_storage.py performs a gsutil ls gs://bucket to determine whether the user has access to the bucket or not. This can be an EXTREMELY expensive operation (~minutes) if the bucket in question has a lot of objects in the root (real case: chrome-telemetry). It is worth noting that check_bucket_permissions() is not called just for uploads but also for downloads, hence this is slowing down all invocations of gclient sync on users and bots machine. Removing the check_bucket_permissions() and let gsutil fail with an Unauthorized error message if ACLs are not met. BUG=458059 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=294083

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove check_bucket_permission entirelly #

Total comments: 2

Patch Set 3 : Remove spurious sha1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -24 lines) Patch
M download_from_google_storage.py View 1 2 chunks +0 lines, -18 lines 0 comments Download
M upload_to_google_storage.py View 1 2 chunks +0 lines, -6 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
Primiano Tucci (use gerrit)
PTAL to this minutes-saving 3 characters CL :)
5 years, 10 months ago (2015-02-12 11:46:26 UTC) #2
Sami
On 2015/02/12 at 11:46:26, primiano wrote: > PTAL to this minutes-saving 3 characters CL :) ...
5 years, 10 months ago (2015-02-12 11:50:53 UTC) #3
picksi
for what its worth gsutil.py ls gs://chrome-telemetry works fine, but: gsutil.py ls gs://chrome-telemetry/.. Doesn't, it ...
5 years, 10 months ago (2015-02-12 13:52:09 UTC) #4
Primiano Tucci (use gerrit)
Actually self NOT LGTM This doesn't seem to work with all buckets. We need to ...
5 years, 10 months ago (2015-02-12 13:59:50 UTC) #5
Primiano Tucci (use gerrit)
On 2015/02/12 13:59:50, Primiano Tucci wrote: > Actually self NOT LGTM > This doesn't seem ...
5 years, 10 months ago (2015-02-12 14:09:45 UTC) #6
Michael Moss
https://codereview.chromium.org/923473002/diff/1/download_from_google_storage.py File download_from_google_storage.py (right): https://codereview.chromium.org/923473002/diff/1/download_from_google_storage.py#newcode109 download_from_google_storage.py:109: code, _, ls_err = gsutil.check_call('ls', base_url + '/..') Based ...
5 years, 10 months ago (2015-02-12 16:39:22 UTC) #7
Primiano Tucci (use gerrit)
On 2015/02/12 16:39:22, Michael Moss wrote: > https://codereview.chromium.org/923473002/diff/1/download_from_google_storage.py > File download_from_google_storage.py (right): > > https://codereview.chromium.org/923473002/diff/1/download_from_google_storage.py#newcode109 ...
5 years, 10 months ago (2015-02-12 17:25:39 UTC) #8
hinoka
fwiw this script uses gsutil 4.7. The incantation is "gsutil.py --force-version 4.7 ls ..." https://codereview.chromium.org/923473002/diff/1/download_from_google_storage.py ...
5 years, 10 months ago (2015-02-12 18:03:54 UTC) #9
Primiano Tucci (use gerrit)
Thanks. Agree with you, removing the check comletely. PTAL to the new patchset. P.S. While ...
5 years, 10 months ago (2015-02-13 10:47:31 UTC) #11
hinoka
lgtm https://codereview.chromium.org/923473002/diff/20001/gcl.sha1 File gcl.sha1 (right): https://codereview.chromium.org/923473002/diff/20001/gcl.sha1#newcode1 gcl.sha1:1: a77e5cab00cef6aac88e16f4e7889c796a0eeb3a This supposed to be here?
5 years, 10 months ago (2015-02-13 21:17:47 UTC) #12
Primiano Tucci (use gerrit)
https://codereview.chromium.org/923473002/diff/20001/gcl.sha1 File gcl.sha1 (right): https://codereview.chromium.org/923473002/diff/20001/gcl.sha1#newcode1 gcl.sha1:1: a77e5cab00cef6aac88e16f4e7889c796a0eeb3a On 2015/02/13 21:17:47, hinoka wrote: > This supposed ...
5 years, 10 months ago (2015-02-16 15:50:09 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/923473002/40001
5 years, 10 months ago (2015-02-16 15:59:43 UTC) #16
commit-bot: I haz the power
Presubmit check for 923473002-40001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 10 months ago (2015-02-16 16:02:35 UTC) #18
Primiano Tucci (use gerrit)
+szager for OWNERS stamp.
5 years, 10 months ago (2015-02-17 09:00:55 UTC) #20
szager1
lgtm
5 years, 10 months ago (2015-02-17 11:53:39 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/923473002/40001
5 years, 10 months ago (2015-02-17 12:30:34 UTC) #23
commit-bot: I haz the power
Committed patchset #3 (id:40001) as http://src.chromium.org/viewvc/chrome?view=rev&revision=294083
5 years, 10 months ago (2015-02-17 12:33:37 UTC) #24
angiegvalg
5 years, 7 months ago (2015-04-30 00:28:53 UTC) #26
Message was sent while issue was closed.

          

Powered by Google App Engine
This is Rietveld 408576698