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

Issue 667853002: Add gclient hook to download prebuilt mojo_shell (Closed)

Created:
6 years, 2 months ago by jamesr
Modified:
6 years, 2 months ago
Reviewers:
yurys, abarth-chromium
CC:
abarth-chromium, Aaron Boodman, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add gclient hook to download prebuilt mojo_shell This adds a gclient hook that downloads prebuilt mojo_shell binaries from google storage (linux only for now) and gyp/gn flags to toggle using these prebuilt binaries instead of ones built from source. This also adds a helper script that uploads a locally built mojo_shell binary to the appropriate place in google storage. The versioning scheme is: *) mojo/public/VERSION contains an identifier (committish currently) for the mojo public SDK. The mojo_shell binary must match the interfaces defined in this version of mojo/public/. *) gs://mojo/shell/$VERSION/$PLATFORM.zip contains a prebuilt mojo_shell binary for a particular version. $PLATFORM for now must be linux-x64, but we can add more later as needed. gclient runhooks downloads the shell binary referred to by mojo/public/VERSION if it is available for the host platform to mojo/public/tools/prebuilt/ and updates mojo/public/tools/prebuilt/VERSION to tag the version downloaded if successful. On subsequent runs the hook will check this against mojo/public/VERSION and avoid downloading again if the binary is up to date. This also adds variables to the GYP and GN builds that control if building 'mojo' builds a mojo_shell binary from source or copies the prebuilt binary into the outdir. They both default to false for now. R=abarth@chromium.org Committed: https://crrev.com/e098527822f3e25fb5b86c1441f7ce6e4c2cfdc8 Cr-Commit-Position: refs/heads/master@{#300600}

Patch Set 1 #

Total comments: 1

Patch Set 2 : find gsutil in depot_tools #

Patch Set 3 : more diagnostics in tools/find_depot_tools.py #

Patch Set 4 : look for gclient.py #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -26 lines) Patch
M .gitignore View 1 chunk +1 line, -0 lines 0 comments Download
M DEPS View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M mojo/BUILD.gn View 2 chunks +7 lines, -1 line 0 comments Download
M mojo/mojo.gyp View 1 2 3 chunks +42 lines, -21 lines 0 comments Download
A mojo/public/VERSION View 1 chunk +1 line, -0 lines 0 comments Download
A + mojo/public/mojo.gni View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
A mojo/public/tools/BUILD.gn View 1 chunk +16 lines, -0 lines 0 comments Download
A mojo/public/tools/download_shell_binary.py View 1 1 chunk +53 lines, -0 lines 0 comments Download
M mojo/shell/BUILD.gn View 1 2 2 chunks +7 lines, -1 line 0 comments Download
A mojo/tools/upload_shell_binary.py View 1 1 chunk +39 lines, -0 lines 0 comments Download
M tools/find_depot_tools.py View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (2 generated)
jamesr
Still working out some of the kinks but PTAL https://codereview.chromium.org/667853002/diff/1/mojo/public/tools/download_shell_binary.py File mojo/public/tools/download_shell_binary.py (right): https://codereview.chromium.org/667853002/diff/1/mojo/public/tools/download_shell_binary.py#newcode35 mojo/public/tools/download_shell_binary.py:35: ...
6 years, 2 months ago (2014-10-20 22:49:03 UTC) #1
jamesr
OK, think it's using the correct gsutil binary now.
6 years, 2 months ago (2014-10-20 23:07:59 UTC) #2
jamesr
Hmm, apparently that doesn't work. Something somewhere must be mucking with the python path to ...
6 years, 2 months ago (2014-10-20 23:14:30 UTC) #3
jamesr
OK, looking for 'gclient.py' is the ticket since many bots have a non-depot_tools directory in ...
6 years, 2 months ago (2014-10-21 21:03:00 UTC) #4
abarth-chromium
LGTM https://codereview.chromium.org/667853002/diff/100001/mojo/public/tools/download_shell_binary.py File mojo/public/tools/download_shell_binary.py (right): https://codereview.chromium.org/667853002/diff/100001/mojo/public/tools/download_shell_binary.py#newcode19 mojo/public/tools/download_shell_binary.py:19: sys.exit(0) exit(1) ? https://codereview.chromium.org/667853002/diff/100001/tools/find_depot_tools.py File tools/find_depot_tools.py (right): https://codereview.chromium.org/667853002/diff/100001/tools/find_depot_tools.py#newcode24 ...
6 years, 2 months ago (2014-10-21 21:24:29 UTC) #5
jamesr
https://codereview.chromium.org/667853002/diff/100001/mojo/public/tools/download_shell_binary.py File mojo/public/tools/download_shell_binary.py (right): https://codereview.chromium.org/667853002/diff/100001/mojo/public/tools/download_shell_binary.py#newcode19 mojo/public/tools/download_shell_binary.py:19: sys.exit(0) On 2014/10/21 21:24:29, abarth wrote: > exit(1) ? ...
6 years, 2 months ago (2014-10-21 22:10:15 UTC) #6
abarth-chromium
ok
6 years, 2 months ago (2014-10-21 22:12:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/667853002/120001
6 years, 2 months ago (2014-10-21 22:17:04 UTC) #9
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years, 2 months ago (2014-10-22 01:19:24 UTC) #10
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/e098527822f3e25fb5b86c1441f7ce6e4c2cfdc8 Cr-Commit-Position: refs/heads/master@{#300600}
6 years, 2 months ago (2014-10-22 04:04:46 UTC) #11
yurys
I'm getting the following error when running gclient sync. It's unclear from the message which ...
6 years, 2 months ago (2014-10-22 05:09:17 UTC) #13
jamesr
Something's amiss - disabling the hook in https://codereview.chromium.org/669023002/ until I can investigate.
6 years, 2 months ago (2014-10-22 05:22:45 UTC) #14
loislo
On 2014/10/22 05:09:17, yurys wrote: > I'm getting the following error when running gclient sync. ...
6 years, 2 months ago (2014-10-22 05:22:50 UTC) #15
yurys
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/670073002/ by yurys@chromium.org. ...
6 years, 2 months ago (2014-10-22 05:23:02 UTC) #16
jamesr
The thing that's downloaded isn't being used yet, so you can safely ignore the error ...
6 years, 2 months ago (2014-10-22 05:23:24 UTC) #17
viettrungluu
On 2014/10/22 05:22:45, jamesr wrote: > Something's amiss - disabling the hook in > https://codereview.chromium.org/669023002/ ...
6 years, 2 months ago (2014-10-22 05:50:31 UTC) #18
jamesr
6 years, 2 months ago (2014-10-22 23:08:02 UTC) #19
Message was sent while issue was closed.
The ACLs are right, the issue is that the gsutil wrapper we have in gsutil
attempts to authenticate before trying to hit the actual bucket and
authentication fails.  --bypass_prodaccess convinces our wrapper to do the right
thing.  Will land this script in the mojo repo and roll it in as part of the SDK

Powered by Google App Engine
This is Rietveld 408576698