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

Issue 2037253002: run_isolated.py: install CIPD packages (Closed)

Created:
4 years, 6 months ago by nodir
Modified:
4 years, 6 months ago
Reviewers:
Vadim Sh., M-A Ruel
CC:
chromium-reviews, infra-reviews+luci-py_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Target Ref:
refs/heads/master
Project:
luci-py
Visibility:
Public.

Description

run_isolated.py: install CIPD packages add cipd options to run_isolated.py: --cipd-package: package name and version, both required. Can be specified multiple times --cipd-server: URL of CIPD server --cipd-client-package: CIPD client package to install --cipd-cache: cache dir for CIPD clients, client versions and packages expand ${platform} and ${os_ver} parameters in package name with values read from current machine. expand ${CIPD_PACKAGE} and ${EXECUTABLE_SUFFIX} parameters on command line with path to CIPD package installation dir and (.exe|) suffix. cipd client installation: - lookup client version (typically a git_revision tag) in version cache (typically DiskCache) - on cache miss, resolve version to instance id using CIPD backend API - lookup client instance id in client cache (DiskCache) - on cache miss, fetch it from cipd backend / GS, put to disk cache and make executable package installation: - put list of packages to a file - use cipd-ensure to install packages - pass -verbose and log all cipd-ensure output: stdout->INFO, stderr->DEBUGpass -verbose and log all cipd-ensure output: stdout->INFO, stderr->DEBUG. Typically there is only stderr - set -cache-dir flag to "<cipd-cache flag value>/packages" R=maruel@chromium.org, vadimsh@chromium.org BUG=601022 Committed: https://github.com/luci/luci-py/commit/45eab10a17a55f1978f3bfa02c35457dee1c64e4

Patch Set 1 #

Total comments: 49

Patch Set 2 : addressed comments #

Total comments: 27

Patch Set 3 : addressed comments #

Total comments: 6

Patch Set 4 : get_client is a context manager #

Total comments: 6

Patch Set 5 : simplified closing of list file #

Total comments: 9

Patch Set 6 : nits #

Patch Set 7 : fix client fetching #

Unified diffs Side-by-side diffs Delta from patch set Stats (+872 lines, -122 lines) Patch
M appengine/swarming/cipd.py View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M appengine/swarming/server/bot_archive.py View 1 chunk +1 line, -0 lines 0 comments Download
A client/cipd.py View 1 2 3 4 5 6 1 chunk +401 lines, -0 lines 0 comments Download
M client/isolateserver.py View 1 2 3 3 chunks +11 lines, -0 lines 0 comments Download
M client/run_isolated.py View 1 2 3 4 5 15 chunks +173 lines, -39 lines 0 comments Download
M client/swarming.py View 1 chunk +2 lines, -1 line 0 comments Download
A client/tests/cipdserver_mock.py View 1 chunk +45 lines, -0 lines 0 comments Download
A client/tests/httpserver_mock.py View 1 chunk +74 lines, -0 lines 0 comments Download
M client/tests/isolateserver_mock.py View 3 chunks +4 lines, -72 lines 0 comments Download
M client/tests/run_isolated_test.py View 1 2 3 4 5 6 10 chunks +59 lines, -3 lines 0 comments Download
M client/tests/subprocess42_test.py View 1 1 chunk +30 lines, -0 lines 0 comments Download
M client/tests/swarming_test.py View 3 chunks +3 lines, -2 lines 0 comments Download
M client/utils/file_path.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/utils/subprocess42.py View 1 5 chunks +55 lines, -3 lines 0 comments Download
M client/utils/tools.py View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (10 generated)
nodir
PTAL ./run_isolated.py -vvv --cipd-package 'infra/tools/authutil/${platform}:latest' '${CIPD_PATH}/authutil' prints 90238 2016-06-04 07:29:40.849 D: make_tree_read_only(/Users/nodir/gh/luci/luci-py/client/isolate_cache) 90238 2016-06-04 07:29:40.850 ...
4 years, 6 months ago (2016-06-04 07:29:52 UTC) #1
Vadim Sh.
left some comments https://codereview.chromium.org/2037253002/diff/1/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/1/client/cipd.py#newcode118 client/cipd.py:118: with tempfile.NamedTemporaryFile(prefix='cipd-ensure-list-') as list_file: keep it ...
4 years, 6 months ago (2016-06-06 21:32:14 UTC) #2
M-A Ruel
https://codereview.chromium.org/2037253002/diff/1/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/1/client/cipd.py#newcode1 client/cipd.py:1: # Copyright 2012 The LUCI Authors. All rights reserved. ...
4 years, 6 months ago (2016-06-06 23:34:51 UTC) #3
M-A Ruel
I'm not excited about --cipd-client-package. The same way one cannot specify run_isolated version. I wish ...
4 years, 6 months ago (2016-06-06 23:53:57 UTC) #4
nodir
On 2016/06/06 23:53:57, M-A Ruel wrote: > I'm not excited about --cipd-client-package. The same way ...
4 years, 6 months ago (2016-06-07 18:01:22 UTC) #5
nodir
https://codereview.chromium.org/2037253002/diff/1/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/1/client/cipd.py#newcode1 client/cipd.py:1: # Copyright 2012 The LUCI Authors. All rights reserved. ...
4 years, 6 months ago (2016-06-07 18:46:36 UTC) #8
M-A Ruel
https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py#newcode42 client/cipd.py:42: default='https://chrome-infra-packages.appspot.com') Please remove. We do not reference the chromium ...
4 years, 6 months ago (2016-06-07 20:43:40 UTC) #9
Vadim Sh.
https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py#newcode200 client/cipd.py:200: platform_arch = 'amd64' if sys.maxsize > 2**32 else '386' ...
4 years, 6 months ago (2016-06-07 20:59:42 UTC) #10
nodir
https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py#newcode42 client/cipd.py:42: default='https://chrome-infra-packages.appspot.com') On 2016/06/07 20:43:39, M-A Ruel wrote: > Please ...
4 years, 6 months ago (2016-06-07 21:51:38 UTC) #12
M-A Ruel
https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py#newcode381 client/cipd.py:381: instance_cache = isolateserver.DiskCache( On 2016/06/07 21:51:37, nodir wrote: > ...
4 years, 6 months ago (2016-06-08 20:37:41 UTC) #13
nodir
https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/60001/client/cipd.py#newcode381 client/cipd.py:381: instance_cache = isolateserver.DiskCache( On 2016/06/08 20:37:39, M-A Ruel wrote: ...
4 years, 6 months ago (2016-06-08 22:35:33 UTC) #14
nodir
ping? the CL is being dragged for almost a week
4 years, 6 months ago (2016-06-09 16:05:38 UTC) #15
M-A Ruel
looks like I had unsent changes :/ Fixed CL description for EXECUTABLE_SUFFIX. https://codereview.chromium.org/2037253002/diff/120001/client/cipd.py File client/cipd.py ...
4 years, 6 months ago (2016-06-09 16:21:04 UTC) #17
nodir
https://codereview.chromium.org/2037253002/diff/120001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/120001/client/cipd.py#newcode126 client/cipd.py:126: list_file_closed = False On 2016/06/09 16:21:04, M-A Ruel wrote: ...
4 years, 6 months ago (2016-06-09 16:36:46 UTC) #18
M-A Ruel
lgtm with nits https://codereview.chromium.org/2037253002/diff/140001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/140001/client/cipd.py#newcode391 client/cipd.py:391: # A single host can run ...
4 years, 6 months ago (2016-06-09 18:31:11 UTC) #19
M-A Ruel
lgtm with nits
4 years, 6 months ago (2016-06-09 18:31:18 UTC) #20
nodir
https://codereview.chromium.org/2037253002/diff/140001/client/run_isolated.py File client/run_isolated.py (right): https://codereview.chromium.org/2037253002/diff/140001/client/run_isolated.py#newcode360 client/run_isolated.py:360: # 'duration': 0., On 2016/06/09 18:31:11, M-A Ruel wrote: ...
4 years, 6 months ago (2016-06-09 18:49:05 UTC) #21
M-A Ruel
https://codereview.chromium.org/2037253002/diff/140001/client/run_isolated.py File client/run_isolated.py (right): https://codereview.chromium.org/2037253002/diff/140001/client/run_isolated.py#newcode360 client/run_isolated.py:360: # 'duration': 0., On 2016/06/09 18:49:05, nodir wrote: > ...
4 years, 6 months ago (2016-06-09 18:52:56 UTC) #22
nodir
https://codereview.chromium.org/2037253002/diff/140001/client/run_isolated.py File client/run_isolated.py (right): https://codereview.chromium.org/2037253002/diff/140001/client/run_isolated.py#newcode360 client/run_isolated.py:360: # 'duration': 0., On 2016/06/09 18:52:55, M-A Ruel wrote: ...
4 years, 6 months ago (2016-06-09 18:57:06 UTC) #23
M-A Ruel
On 2016/06/09 18:57:06, nodir wrote: > > No, I just mean adding it here since ...
4 years, 6 months ago (2016-06-09 21:16:57 UTC) #24
nodir
https://codereview.chromium.org/2037253002/diff/140001/client/cipd.py File client/cipd.py (right): https://codereview.chromium.org/2037253002/diff/140001/client/cipd.py#newcode391 client/cipd.py:391: # A single host can run multiple swarming bots, ...
4 years, 6 months ago (2016-06-09 21:36:11 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037253002/160001
4 years, 6 months ago (2016-06-09 21:37:36 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: Luci-py Presubmit on master.tryserver.infra (JOB_FAILED, https://build.chromium.org/p/tryserver.infra/builders/Luci-py%20Presubmit/builds/968)
4 years, 6 months ago (2016-06-09 21:44:26 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037253002/180001
4 years, 6 months ago (2016-06-09 22:48:30 UTC) #33
commit-bot: I haz the power
4 years, 6 months ago (2016-06-09 22:51:54 UTC) #35
Message was sent while issue was closed.
Committed patchset #7 (id:180001) as
https://github.com/luci/luci-py/commit/45eab10a17a55f1978f3bfa02c35457dee1c64e4

Powered by Google App Engine
This is Rietveld 408576698