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

Issue 2267363004: Add CIPD pin reporting to swarming. (Closed)

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

Description

Add CIPD pin reporting to swarming. This will cause run_isolated.py to report the fully resolved versions of the CIPD packages that it actually ended up using. DM will use this information to ensure that all executions of a given Attempt use the same versions. R=maruel@chromium.org, nodir@chromium.org, vadimsh@chromium.org BUG=639975 Committed: https://github.com/luci/luci-py/commit/1200be8efa2bc9543d6404887b6746f58e0de827

Patch Set 1 #

Total comments: 8

Patch Set 2 : comments and some tests #

Total comments: 9

Patch Set 3 : Fix tests and homogenize #

Patch Set 4 : Actually works #

Patch Set 5 : Rename to cipd_pins #

Total comments: 22

Patch Set 6 : Fix run_isolated/cipd #

Total comments: 14

Patch Set 7 : Address comments #

Total comments: 8

Patch Set 8 : fix nits #

Patch Set 9 : Assert package templates at task creation time #

Patch Set 10 : Add function mocking to run_isolated_test.py #

Patch Set 11 : Fix bottest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+544 lines, -56 lines) Patch
M appengine/swarming/cipd.py View 1 2 3 4 5 6 7 8 9 4 chunks +97 lines, -2 lines 0 comments Download
A appengine/swarming/cipd_test.py View 1 2 3 4 5 6 7 8 1 chunk +84 lines, -0 lines 0 comments Download
M appengine/swarming/handlers_bot.py View 1 2 3 4 5 4 chunks +14 lines, -4 lines 0 comments Download
M appengine/swarming/handlers_bot_test.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +22 lines, -0 lines 0 comments Download
M appengine/swarming/handlers_frontend.py View 1 2 3 4 5 6 7 2 chunks +29 lines, -0 lines 0 comments Download
M appengine/swarming/message_conversion.py View 1 2 3 4 2 chunks +15 lines, -1 line 0 comments Download
M appengine/swarming/server/task_request.py View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M appengine/swarming/server/task_result.py View 1 2 3 4 5 6 7 8 6 chunks +41 lines, -0 lines 0 comments Download
M appengine/swarming/server/task_result_test.py View 1 2 3 4 5 chunks +5 lines, -0 lines 0 comments Download
M appengine/swarming/server/task_scheduler.py View 1 2 3 4 5 6 chunks +10 lines, -3 lines 0 comments Download
M appengine/swarming/server/task_scheduler_test.py View 1 2 3 4 5 34 chunks +34 lines, -0 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/task_runner.py View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M appengine/swarming/swarming_rpcs.py View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
M appengine/swarming/templates/user_task.html View 1 2 3 4 5 3 chunks +43 lines, -14 lines 0 comments Download
M client/cipd.py View 1 2 3 4 5 8 chunks +25 lines, -7 lines 0 comments Download
M client/run_isolated.py View 1 2 3 4 5 6 7 7 chunks +64 lines, -12 lines 0 comments Download
M client/tests/run_isolated_test.py View 1 2 3 4 5 6 7 8 9 2 chunks +42 lines, -4 lines 0 comments Download

Messages

Total messages: 43 (13 generated)
iannucci
PTAL; no tests yet, but I want to make sure this is on the right ...
4 years, 4 months ago (2016-08-23 21:35:08 UTC) #1
M-A Ruel
The code looks good. Still I can't help but think that if we forced clients ...
4 years, 4 months ago (2016-08-24 02:13:44 UTC) #3
iannucci
On 2016/08/24 at 02:13:44, maruel wrote: > The code looks good. Still I can't help ...
4 years, 4 months ago (2016-08-24 02:23:31 UTC) #4
iannucci
https://codereview.chromium.org/2267363004/diff/1/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2267363004/diff/1/appengine/swarming/handlers_bot.py#newcode578 appengine/swarming/handlers_bot.py:578: u'output_chunk_start', u'outputs_ref', u'cipd_pins', u'task_id', On 2016/08/24 at 02:13:44, M-A ...
4 years, 4 months ago (2016-08-24 02:31:57 UTC) #5
M-A Ruel
On 2016/08/24 02:23:31, iannucci wrote: > I think, for better or worse, package refs are ...
4 years, 4 months ago (2016-08-24 02:40:23 UTC) #6
iannucci
https://codereview.chromium.org/2267363004/diff/20001/client/run_isolated.py File client/run_isolated.py (right): https://codereview.chromium.org/2267363004/diff/20001/client/run_isolated.py#newcode30 client/run_isolated.py:30: __version__ = '0.8.4' On 2016/08/24 at 02:40:23, M-A Ruel ...
4 years, 4 months ago (2016-08-24 16:01:11 UTC) #7
M-A Ruel
https://codereview.chromium.org/2267363004/diff/20001/appengine/swarming/server/task_request.py File appengine/swarming/server/task_request.py (right): https://codereview.chromium.org/2267363004/diff/20001/appengine/swarming/server/task_request.py#newcode344 appengine/swarming/server/task_request.py:344: that was resolved by the bot at runtime, and ...
4 years, 4 months ago (2016-08-24 19:34:08 UTC) #8
iannucci
I'm reworking this to be more symmetric with the cipd_inputs (e.g. also include the pinned ...
4 years, 4 months ago (2016-08-25 00:14:12 UTC) #9
M-A Ruel
https://codereview.chromium.org/2267363004/diff/20001/appengine/swarming/templates/user_task.html File appengine/swarming/templates/user_task.html (right): https://codereview.chromium.org/2267363004/diff/20001/appengine/swarming/templates/user_task.html#newcode246 appengine/swarming/templates/user_task.html:246: {% for path, pininfos in request.properties.cipd_input.packages_grouped_by_path(result.cipd_pins) %} On 2016/08/25 ...
4 years, 3 months ago (2016-08-25 15:40:26 UTC) #10
iannucci
Finally got back to this, PTAL. This makes cipd_output uniform with cipd_input (includes client_package), and ...
4 years, 3 months ago (2016-08-25 22:49:38 UTC) #11
iannucci
On 2016/08/25 at 22:49:38, iannucci wrote: > Finally got back to this, PTAL. > > ...
4 years, 3 months ago (2016-08-26 00:11:04 UTC) #12
iannucci
Any other comments on this one?
4 years, 3 months ago (2016-08-26 19:02:07 UTC) #13
iannucci
Renamed to CipdPins/cipd_pins per offline conversation.
4 years, 3 months ago (2016-08-26 21:13:25 UTC) #14
M-A Ruel
https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/handlers_bot.py#newcode727 appengine/swarming/handlers_bot.py:727: **cipd_pins['client_package']), arguments aligned at +4 (everywhere) https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/handlers_frontend.py File appengine/swarming/handlers_frontend.py ...
4 years, 3 months ago (2016-08-26 23:19:51 UTC) #16
iannucci
Ok PTA(nother)L https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/handlers_bot.py#newcode727 appengine/swarming/handlers_bot.py:727: **cipd_pins['client_package']), On 2016/08/26 at 23:19:51, M-A Ruel ...
4 years, 3 months ago (2016-08-29 22:08:41 UTC) #17
M-A Ruel
https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/server/task_result.py File appengine/swarming/server/task_result.py (right): https://codereview.chromium.org/2267363004/diff/80001/appengine/swarming/server/task_result.py#newcode321 appengine/swarming/server/task_result.py:321: packages = ndb.LocalStructuredProperty(task_request.CipdPackage, On 2016/08/29 22:08:40, iannucci wrote: > ...
4 years, 3 months ago (2016-08-30 02:18:08 UTC) #18
iannucci
PTAL https://codereview.chromium.org/2267363004/diff/100001/appengine/swarming/cipd.py File appengine/swarming/cipd.py (right): https://codereview.chromium.org/2267363004/diff/100001/appengine/swarming/cipd.py#newcode44 appengine/swarming/cipd.py:44: def check(self, original, expanded): On 2016/08/30 at 02:18:07, ...
4 years, 3 months ago (2016-08-30 09:13:29 UTC) #19
M-A Ruel
https://codereview.chromium.org/2267363004/diff/120001/appengine/swarming/cipd.py File appengine/swarming/cipd.py (right): https://codereview.chromium.org/2267363004/diff/120001/appengine/swarming/cipd.py#newcode40 appengine/swarming/cipd.py:40: def pin_check_fn(platform=None, os_ver=None): I'd prefer no default value. https://codereview.chromium.org/2267363004/diff/120001/appengine/swarming/cipd.py#newcode84 ...
4 years, 3 months ago (2016-08-30 18:54:13 UTC) #20
iannucci
https://chromiumcodereview.appspot.com/2267363004/diff/120001/appengine/swarming/handlers_frontend.py File appengine/swarming/handlers_frontend.py (right): https://chromiumcodereview.appspot.com/2267363004/diff/120001/appengine/swarming/handlers_frontend.py#newcode683 appengine/swarming/handlers_frontend.py:683: request.properties.cipd_input.packages) On 2016/08/30 at 18:54:12, M-A Ruel wrote: > ...
4 years, 3 months ago (2016-08-30 19:09:17 UTC) #21
iannucci
Added assertion re: number of patterns in regex in the pin check as well as ...
4 years, 3 months ago (2016-08-30 19:28:22 UTC) #22
M-A Ruel
lgtm!
4 years, 3 months ago (2016-08-30 19:29:51 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2267363004/160001
4 years, 3 months ago (2016-08-30 19:37:08 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: Luci-py Presubmit on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/30f5c8f8d9afd310)
4 years, 3 months ago (2016-08-30 20:10:56 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2267363004/200001
4 years, 3 months ago (2016-08-30 22:48:28 UTC) #36
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://github.com/luci/luci-py/commit/1200be8efa2bc9543d6404887b6746f58e0de827
4 years, 3 months ago (2016-08-30 22:52:25 UTC) #38
nodir
was this deployed? fwiu I should see cipd pins in "Execution" section of any swarmbucket ...
4 years, 2 months ago (2016-10-20 19:15:26 UTC) #39
Vadim Sh.
On 2016/10/20 19:15:26, nodir wrote: > was this deployed? fwiu I should see cipd pins ...
4 years, 2 months ago (2016-10-20 19:20:58 UTC) #40
Vadim Sh.
On 2016/10/20 19:20:58, Vadim Sh. wrote: > On 2016/10/20 19:15:26, nodir wrote: > > was ...
4 years, 2 months ago (2016-10-20 19:21:55 UTC) #41
iannucci
Right now the pins are only reported when the task completes. It would probably make ...
4 years, 2 months ago (2016-10-20 19:22:35 UTC) #42
kjlubick
4 years, 2 months ago (2016-10-20 19:24:36 UTC) #43
Message was sent while issue was closed.
On 2016/10/20 at 19:22:35, iannucci wrote:
> Right now the pins are only reported when the task completes. It would
> probably make sense to report them as soon as they're known though (I
> wasn't sure how to do that, but I didn't look into it super-closely).
> 
> On Thu, Oct 20, 2016 at 12:20 PM <vadimsh@chromium.org> wrote:
> 
> > On 2016/10/20 19:15:26, nodir wrote:
> > > was this deployed? fwiu I should see cipd pins in "Execution" section of
> > any
> > > swarmbucket task, such as
> > > https://chromium-swarm.appspot.com/user/task/30608d0612512710
> >
> > Odd... Here it works:
> > https://chromium-swarm.appspot.com/user/task/31fc4a19f73d4310
> >
> > Maybe it handles failed tasks differently?
> >
> > https://codereview.chromium.org/2267363004/
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to chromium-reviews+unsubscribe@chromium.org.
> 

FWIW, It's in the new ui, just hidden under more details: 
https://screenshot.googleplex.com/ZVuLXmK5S7A

https://chromium-swarm.appspot.com/task?id=31fc4a19f73d4310&refresh=10&reques...

Powered by Google App Engine
This is Rietveld 408576698