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

Issue 148613003: Pull toolchain isos from gs:// when on bots (Closed)

Created:
6 years, 11 months ago by scottmg
Modified:
6 years, 10 months ago
Reviewers:
Ryan Tseng, iannucci, hinoka
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org
Visibility:
Public.

Description

Pull toolchain isos from gs:// when on bots VS2013 isos are mirrored to gs://chrome-wintoolchain/ (which is googler- only accessible). This is used to isolate bots from external dependency as detected by CHROME_HEADLESS=1 in the environment. TBR=iannucci@chromium.org R=hinoka@chromium.org BUG=324987 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=247398

Patch Set 1 #

Total comments: 2

Patch Set 2 : use download_from_google_storage instead #

Total comments: 2

Patch Set 3 : boto_path=None #

Patch Set 4 : switch to call so that there's output during download #

Total comments: 1

Patch Set 5 : fix return of call #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M win_toolchain/toolchain2013.py View 1 2 3 4 4 chunks +35 lines, -2 lines 6 comments Download

Messages

Total messages: 16 (0 generated)
scottmg
6 years, 11 months ago (2014-01-27 23:51:26 UTC) #1
Ryan Tseng
https://codereview.chromium.org/148613003/diff/1/win_toolchain/toolchain2013.py File win_toolchain/toolchain2013.py (right): https://codereview.chromium.org/148613003/diff/1/win_toolchain/toolchain2013.py#newcode163 win_toolchain/toolchain2013.py:163: RunOrDie([ can use import download_from_google_storage ... gsutil = download_from_google_storage.Gsutil( ...
6 years, 11 months ago (2014-01-28 00:19:43 UTC) #2
scottmg
https://codereview.chromium.org/148613003/diff/1/win_toolchain/toolchain2013.py File win_toolchain/toolchain2013.py (right): https://codereview.chromium.org/148613003/diff/1/win_toolchain/toolchain2013.py#newcode163 win_toolchain/toolchain2013.py:163: RunOrDie([ On 2014/01/28 00:19:43, Ryan T. wrote: > can ...
6 years, 11 months ago (2014-01-28 00:38:28 UTC) #3
Ryan Tseng
Yeah, call and check_call should probably be renamed to call_interactive and call_and_get_output (Not related to ...
6 years, 11 months ago (2014-01-28 00:55:58 UTC) #4
scottmg
https://codereview.chromium.org/148613003/diff/40001/win_toolchain/toolchain2013.py File win_toolchain/toolchain2013.py (right): https://codereview.chromium.org/148613003/diff/40001/win_toolchain/toolchain2013.py#newcode168 win_toolchain/toolchain2013.py:168: download_from_google_storage.GSUTIL_DEFAULT_PATH, os.devnull) On 2014/01/28 00:55:58, Ryan T. wrote: > ...
6 years, 11 months ago (2014-01-28 01:11:43 UTC) #5
scottmg
On 2014/01/28 01:11:43, scottmg wrote: > https://codereview.chromium.org/148613003/diff/40001/win_toolchain/toolchain2013.py > File win_toolchain/toolchain2013.py (right): > > https://codereview.chromium.org/148613003/diff/40001/win_toolchain/toolchain2013.py#newcode168 > ...
6 years, 11 months ago (2014-01-28 01:16:02 UTC) #6
Ryan Tseng
call() works. https://codereview.chromium.org/148613003/diff/80001/win_toolchain/toolchain2013.py File win_toolchain/toolchain2013.py (right): https://codereview.chromium.org/148613003/diff/80001/win_toolchain/toolchain2013.py#newcode169 win_toolchain/toolchain2013.py:169: code, _, err = gsutil.call( call() just ...
6 years, 11 months ago (2014-01-28 01:31:07 UTC) #7
scottmg
On 2014/01/28 01:31:07, Ryan T. wrote: > call() works. > > https://codereview.chromium.org/148613003/diff/80001/win_toolchain/toolchain2013.py > File win_toolchain/toolchain2013.py ...
6 years, 11 months ago (2014-01-28 01:58:01 UTC) #8
Ryan Tseng
I don't have a windows box to test on, but it looks right and I'll ...
6 years, 11 months ago (2014-01-28 02:10:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/148613003/100001
6 years, 11 months ago (2014-01-28 03:04:48 UTC) #10
commit-bot: I haz the power
Presubmit check for 148613003-100001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 11 months ago (2014-01-28 03:06:53 UTC) #11
scottmg
Bah. TBR=iannucci
6 years, 11 months ago (2014-01-28 03:16:02 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/148613003/100001
6 years, 11 months ago (2014-01-28 03:16:15 UTC) #13
commit-bot: I haz the power
Change committed as 247398
6 years, 11 months ago (2014-01-28 03:17:55 UTC) #14
iannucci
Cool TBR, bro :P https://codereview.chromium.org/148613003/diff/100001/win_toolchain/toolchain2013.py File win_toolchain/toolchain2013.py (right): https://codereview.chromium.org/148613003/diff/100001/win_toolchain/toolchain2013.py#newcode23 win_toolchain/toolchain2013.py:23: sys.path.append(os.path.join(BASEDIR, '..')) ARGH! THE PAIN! ...
6 years, 10 months ago (2014-01-28 16:38:32 UTC) #15
scottmg
6 years, 10 months ago (2014-01-28 17:36:34 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/148613003/diff/100001/win_toolchain/toolchain...
File win_toolchain/toolchain2013.py (right):

https://codereview.chromium.org/148613003/diff/100001/win_toolchain/toolchain...
win_toolchain/toolchain2013.py:23: sys.path.append(os.path.join(BASEDIR, '..'))
On 2014/01/28 16:38:33, iannucci wrote:
> ARGH! THE PAIN!
> 
> (no there's not a better alternative, but that doesn't make it less painful
> :((((()

Our 'environment' could use "some work". :(

https://codereview.chromium.org/148613003/diff/100001/win_toolchain/toolchain...
win_toolchain/toolchain2013.py:164: temp_dir = TempDir()
On 2014/01/28 16:38:33, iannucci wrote:
> I really wish that TempDir was a contextlib.contextmanager that deleted the
> directory... Right now this dir will always leak (especially b/c of the exit
> later in this function).

Could you explain why it will leak? Any finally blocks (main) will still
execute, surely?

> 
> Another way to do it would be to do:
> 
> TEMP_DIR = None
> 
> def TempDir():
>   if TEMP_DIR is None:
>     TEMP_DIR = mkdtemp
>     atexit.register(nuke_it_dead, TEMP_DIR)
>   return os.path.join(TEMP_DIR, <random junk>)

https://codereview.chromium.org/148613003/diff/100001/win_toolchain/toolchain...
win_toolchain/toolchain2013.py:171: raise SystemExit('gsutil failed')
On 2014/01/28 16:38:33, iannucci wrote:
> sys.exit('gsutil failed')

I guess? https://codereview.chromium.org/148523009

http://hg.python.org/cpython/file/ca5431a434d6/Python/sysmodule.c#l207

http://docs.python.org/2/library/sys.html#sys.exit

Powered by Google App Engine
This is Rietveld 408576698