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

Issue 17590010: Adds --config option to download_from_google_storage.py (Closed)

Created:
7 years, 6 months ago by hinoka
Modified:
7 years, 5 months ago
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org
Visibility:
Public.

Description

Adds --config option to download_from_google_storage.py In order to support both developer workflow and not breaking bots, if the script fails on a 403 in a bucket, it'll print a message asking developers to run "download_from_google_storage --config" in order to create a new boto file. This is not done automatically because it would break bots (Imagine hitting a 403, and then gsutil wiping the .boto file, waiting for input, then dying). BUG=231699, 176331 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=208806

Patch Set 1 #

Patch Set 2 : Changed 403 message #

Total comments: 4

Patch Set 3 : changed help message #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -13 lines) Patch
M download_from_google_storage.py View 1 2 3 chunks +21 lines, -13 lines 1 comment Download

Messages

Total messages: 15 (0 generated)
Ryan Tseng
PTAL - Robbie and Maruel for review, Maruel for approval. I'm also going to send ...
7 years, 6 months ago (2013-06-24 21:41:38 UTC) #1
iannucci
On 2013/06/24 21:41:38, Ryan T. wrote: > PTAL - Robbie and Maruel for review, Maruel ...
7 years, 6 months ago (2013-06-25 20:48:26 UTC) #2
iannucci
comments... https://chromiumcodereview.appspot.com/17590010/diff/2001/download_from_google_storage.py File download_from_google_storage.py (right): https://chromiumcodereview.appspot.com/17590010/diff/2001/download_from_google_storage.py#newcode277 download_from_google_storage.py:277: 'current have Google Storage credentials stored.') Run this ...
7 years, 6 months ago (2013-06-25 20:48:34 UTC) #3
Ryan Tseng
https://chromiumcodereview.appspot.com/17590010/diff/2001/download_from_google_storage.py File download_from_google_storage.py (right): https://chromiumcodereview.appspot.com/17590010/diff/2001/download_from_google_storage.py#newcode277 download_from_google_storage.py:277: 'current have Google Storage credentials stored.') On 2013/06/25 20:48:34, ...
7 years, 6 months ago (2013-06-25 21:02:36 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/17590010/7002
7 years, 6 months ago (2013-06-25 21:03:16 UTC) #5
commit-bot: I haz the power
Presubmit check for 17590010-7002 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 6 months ago (2013-06-25 21:04:54 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/17590010/7002
7 years, 6 months ago (2013-06-25 21:34:36 UTC) #7
commit-bot: I haz the power
Presubmit check for 17590010-7002 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 6 months ago (2013-06-25 21:36:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/17590010/7002
7 years, 6 months ago (2013-06-25 21:46:37 UTC) #9
commit-bot: I haz the power
Presubmit check for 17590010-7002 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 6 months ago (2013-06-25 21:48:21 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/17590010/7002
7 years, 6 months ago (2013-06-26 22:15:04 UTC) #11
commit-bot: I haz the power
Presubmit check for 17590010-7002 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 6 months ago (2013-06-26 22:16:54 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/17590010/7002
7 years, 6 months ago (2013-06-26 22:21:47 UTC) #13
commit-bot: I haz the power
Change committed as 208806
7 years, 6 months ago (2013-06-26 22:23:57 UTC) #14
M-A Ruel
7 years, 5 months ago (2013-07-09 15:20:19 UTC) #15
Message was sent while issue was closed.
Small nit, the rest is fine.

https://chromiumcodereview.appspot.com/17590010/diff/7002/download_from_googl...
File download_from_google_storage.py (right):

https://chromiumcodereview.appspot.com/17590010/diff/7002/download_from_googl...
download_from_google_storage.py:288: gsutil = Gsutil(os.path.join(path,
'gsutil'), boto_path=options.boto)
Add a "break" statement after, no need to continue searching.

You could also use for/else instead, removing the need for line 285. E.g.
for path in os.environ["PATH"].split(os.pathsep):
  if os.path.exists(path) and 'gsutil' in os.listdir(path):
    gsutil = Gsutil(os.path.join(path, 'gsutil'), boto_path=options.boto)
    break
else:
  parser.error(...)

Powered by Google App Engine
This is Rietveld 408576698