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

Issue 709663002: Add gclient hook to download SDK extras on bots. (Closed)

Created:
6 years, 1 month ago by navabi
Modified:
5 years, 11 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add gclient hook to download SDK extras on bots. BUG=350151 TBR=cjhopman@chromium.org Committed: https://crrev.com/6f0bb7619afcdd28daba7e763dacd7035504be4c Cr-Commit-Position: refs/heads/master@{#309763}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove GSUTIL_PATH for local testing. #

Total comments: 4

Patch Set 3 : Use gclient rsync and introduce versioning. #

Total comments: 3

Patch Set 4 : Fix assignment to rc and check for android_tools/sdk/extras dir. #

Total comments: 14

Patch Set 5 : Add '-d' to rysnc and corresponding changes. #

Patch Set 6 : Use depot_tools/gsutil.py --force-version 4.6 for rsync. #

Patch Set 7 : Remove -m option. At the moment gsutil.py does not properly support it. #

Patch Set 8 : Add -m option back. hinoka fixed it quick. #

Patch Set 9 : Create directory to rsync. #

Patch Set 10 : Only make directory if it does not exist. #

Total comments: 6

Patch Set 11 : Nits and comments explaining. #

Patch Set 12 : is_buildbot_checkout -> is_android_buildbot_checkout #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -0 lines) Patch
M DEPS View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
A build/download_sdk_extras.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +65 lines, -0 lines 5 comments Download

Messages

Total messages: 43 (7 generated)
navabi
https://codereview.chromium.org/709663002/diff/1/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/1/build/download_sdk_extras.py#newcode19 build/download_sdk_extras.py:19: GSUTIL_PATH = '/usr/local/google/code/gsutil/gsutil' oops. i put this in to ...
6 years, 1 month ago (2014-11-07 04:16:02 UTC) #1
navabi
https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py#newcode35 build/download_sdk_extras.py:35: cmd_lst = [GSUTIL_PATH, 'cp', '-r', SDK_EXTRAS_BUCKET, SDK_EXTRAS_PATH] The idea ...
6 years, 1 month ago (2014-11-07 04:21:23 UTC) #3
navabi
PTAL. Discussed comment from latest patch offline with nquist.
6 years, 1 month ago (2014-11-10 19:48:07 UTC) #4
nyquist
the premise of this CL looks reasonable to me. https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py#newcode15 build/download_sdk_extras.py:15: ...
6 years, 1 month ago (2014-11-11 19:50:31 UTC) #5
navabi
https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py#newcode15 build/download_sdk_extras.py:15: GSUTIL_PATH = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, On 2014/11/11 19:50:31, nyquist ...
6 years, 1 month ago (2014-11-11 19:53:23 UTC) #6
nyquist
lgtm https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py#newcode15 build/download_sdk_extras.py:15: GSUTIL_PATH = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, On 2014/11/11 19:50:31, ...
6 years, 1 month ago (2014-11-11 19:56:53 UTC) #7
navabi
On 2014/11/11 19:56:53, nyquist wrote: > lgtm > > https://codereview.chromium.org/709663002/diff/20001/build/download_sdk_extras.py > File build/download_sdk_extras.py (right): > ...
6 years, 1 month ago (2014-11-11 20:02:42 UTC) #8
navabi
PTAL nyquist: Thanks for the pointer to rsync. It requires gsutil 4.0, which we will ...
6 years, 1 month ago (2014-11-21 09:40:29 UTC) #9
Ryan Tseng
re updating gsutil: we've absolutely had trouble upgrading gsutil in the past. The issue is ...
6 years, 1 month ago (2014-11-21 16:51:15 UTC) #11
navabi
Thanks Ryan for the info about using gsutil 4.0. What you suggest should work. Adding ...
6 years, 1 month ago (2014-11-21 23:00:13 UTC) #13
aurimas (slooooooooow)
On 2014/11/21 23:00:13, navabi wrote: > Thanks Ryan for the info about using gsutil 4.0. ...
6 years ago (2014-11-25 17:46:40 UTC) #14
navabi
On 2014/11/25 17:46:40, aurimas wrote: > On 2014/11/21 23:00:13, navabi wrote: > > Thanks Ryan ...
6 years ago (2014-11-25 17:50:43 UTC) #15
nyquist
aurimas: would we need to tweak the google play services jar a bit? or should ...
6 years ago (2014-11-25 19:58:31 UTC) #16
nyquist
https://codereview.chromium.org/709663002/diff/60001/DEPS File DEPS (right): https://codereview.chromium.org/709663002/diff/60001/DEPS#newcode558 DEPS:558: 'action': ['python', 'src/build/download_sdk_extras.py', Would this overwrite what's already in ...
6 years ago (2014-11-25 20:08:26 UTC) #17
navabi
thanks for the reviews Tommy and Aurimas. https://codereview.chromium.org/709663002/diff/60001/DEPS File DEPS (right): https://codereview.chromium.org/709663002/diff/60001/DEPS#newcode558 DEPS:558: 'action': ['python', ...
6 years ago (2014-11-25 20:40:49 UTC) #18
nyquist
https://codereview.chromium.org/709663002/diff/60001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/60001/build/download_sdk_extras.py#newcode18 build/download_sdk_extras.py:18: SDK_EXTRAS_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'extras') On 2014/11/25 20:40:49, navabi wrote: ...
6 years ago (2014-11-26 03:17:29 UTC) #19
navabi
> So you also cleaned out that folder? Or are you saying there's a > ...
6 years ago (2014-11-26 04:02:16 UTC) #20
nyquist
https://codereview.chromium.org/709663002/diff/60001/DEPS File DEPS (right): https://codereview.chromium.org/709663002/diff/60001/DEPS#newcode559 DEPS:559: 'google_google_play_services_21.0.0'], does this directory structure have to be flattened? ...
6 years ago (2014-11-26 04:34:51 UTC) #21
navabi
Looking for some clarification. https://codereview.chromium.org/709663002/diff/60001/DEPS File DEPS (right): https://codereview.chromium.org/709663002/diff/60001/DEPS#newcode559 DEPS:559: 'google_google_play_services_21.0.0'], On 2014/11/26 04:34:51, nyquist ...
6 years ago (2014-11-26 18:52:35 UTC) #22
nyquist
https://codereview.chromium.org/709663002/diff/60001/DEPS File DEPS (right): https://codereview.chromium.org/709663002/diff/60001/DEPS#newcode559 DEPS:559: 'google_google_play_services_21.0.0'], On 2014/11/26 18:52:35, navabi wrote: > On 2014/11/26 ...
6 years ago (2014-11-26 19:15:51 UTC) #23
navabi
> One thing comes up then though; if you 'roll' google play services to some ...
6 years ago (2014-11-26 19:29:20 UTC) #24
nyquist
On 2014/11/26 19:29:20, navabi wrote: > That's a good point. WDYT about using the name ...
6 years ago (2014-11-26 19:37:59 UTC) #25
navabi
> I don't think it's necessary now though. I also don't think it is necessary ...
6 years ago (2014-12-01 20:00:01 UTC) #26
navabi
On 2014/12/01 20:00:01, navabi wrote: > > I don't think it's necessary now though. > ...
6 years ago (2014-12-01 20:03:21 UTC) #27
Feng Qian
On 2014/12/01 20:03:21, navabi wrote: > On 2014/12/01 20:00:01, navabi wrote: > > > I ...
6 years ago (2014-12-17 18:37:13 UTC) #28
navabi
> Looks like both blocking CLs were committed. This is ready to go. Now we ...
6 years ago (2014-12-18 01:00:37 UTC) #29
nyquist
https://codereview.chromium.org/709663002/diff/180001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/180001/build/download_sdk_extras.py#newcode2 build/download_sdk_extras.py:2: # Copyright (c) 2014 The Chromium Authors. All rights ...
6 years ago (2014-12-19 16:19:17 UTC) #30
navabi
Thanks Tommy. Done. https://codereview.chromium.org/709663002/diff/180001/build/download_sdk_extras.py File build/download_sdk_extras.py (right): https://codereview.chromium.org/709663002/diff/180001/build/download_sdk_extras.py#newcode2 build/download_sdk_extras.py:2: # Copyright (c) 2014 The Chromium ...
6 years ago (2014-12-19 19:14:28 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/709663002/220001
5 years, 11 months ago (2014-12-30 00:00:15 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/32740)
5 years, 11 months ago (2014-12-30 00:05:53 UTC) #35
navabi
Adding cjhopman@ for OWNERS.
5 years, 11 months ago (2014-12-30 02:46:53 UTC) #37
navabi
We have talked about this a while, and I'd like to land it today so ...
5 years, 11 months ago (2014-12-30 19:14:06 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/709663002/220001
5 years, 11 months ago (2014-12-30 19:15:04 UTC) #40
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 11 months ago (2014-12-30 19:22:10 UTC) #41
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/6f0bb7619afcdd28daba7e763dacd7035504be4c Cr-Commit-Position: refs/heads/master@{#309763}
5 years, 11 months ago (2014-12-30 19:22:56 UTC) #42
cjhopman
5 years, 11 months ago (2014-12-30 19:32:53 UTC) #43
Message was sent while issue was closed.
https://codereview.chromium.org/709663002/diff/220001/build/download_sdk_extr...
File build/download_sdk_extras.py (right):

https://codereview.chromium.org/709663002/diff/220001/build/download_sdk_extr...
build/download_sdk_extras.py:9: format:
<dir_in_sdk_extras>_<package_name>_<version>. There will be a
this comment implies that I can have underscores in dir_in_sdk_extras, but
that's not actually the case.

https://codereview.chromium.org/709663002/diff/220001/build/download_sdk_extr...
build/download_sdk_extras.py:10: correpsonding bucket in google storage with
that name, and it will be downloaded
nit: correpsonding/corresponding

https://codereview.chromium.org/709663002/diff/220001/build/download_sdk_extr...
build/download_sdk_extras.py:44: first_underscore = arg.find('_')
should this use a different separator that wouldn't be used in any of the three
parts?

google:google_play_services:1.0.0

https://codereview.chromium.org/709663002/diff/220001/build/download_sdk_extr...
build/download_sdk_extras.py:50: package_bucket = '%s/%s/%s/%s' %
(SDK_EXTRAS_BUCKET, arg, folder, package)
This with the comment above is a little confusing because the value for
package_bucket doesn't match what the comment says "Package bucket" is, instead
it it that with the folder appended.

maybe do:

package_bucket = '%s/%s' % (SDK_EXTRAS_BUCKET, arg)
package_dir = '%s/%s' % (folder, package)
bucket_dir = '%s/%s' % (package_bucket, package_dir)
local_dir = '%s/%s' % (SDK_EXTRAS_PATH, package_dir)

https://codereview.chromium.org/709663002/diff/220001/build/download_sdk_extr...
build/download_sdk_extras.py:57: stdout, rc = GetCmdOutputAndStatus(cmd_lst)
how about just:

stdout = subprocess.check_output(cmd_lst)

?

and since stdout isn't used (unless you intentionally are suppressing it):

subprocess.check_call(cmd_lst)

Powered by Google App Engine
This is Rietveld 408576698