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

Issue 1910713002: swarming: add support for cipd on the server side (Closed)

Created:
4 years, 8 months ago by nodir
Modified:
4 years, 7 months ago
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

swarming: add support for cipd on the server side - add CipdPackage ndb and rpc types - add "packages" field to TaskProperties in ndb and rpc - validate packages before putting task properties - if idempotent=true, ensure that package versions are hashes - include packages in bot manifest R=maruel@chromium.org BUG=601022 Committed: https://github.com/luci/luci-py/commit/1c6c3d329a42a889001c88214fc7082e0f60c1d9

Patch Set 1 : swarming: add cipd packages on the server side #

Total comments: 12

Patch Set 2 : address comments, fix validation #

Patch Set 3 : nits #

Total comments: 8

Patch Set 4 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -128 lines) Patch
A appengine/swarming/cipd.py View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
M appengine/swarming/handlers_bot.py View 1 chunk +7 lines, -0 lines 0 comments Download
M appengine/swarming/handlers_bot_test.py View 3 chunks +12 lines, -0 lines 0 comments Download
M appengine/swarming/handlers_endpoints_test.py View 7 chunks +29 lines, -1 line 0 comments Download
M appengine/swarming/message_conversion.py View 2 chunks +8 lines, -2 lines 0 comments Download
M appengine/swarming/server/task_request.py View 1 2 3 6 chunks +55 lines, -1 line 0 comments Download
M appengine/swarming/server/task_request_test.py View 1 12 chunks +114 lines, -123 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/bot_main_test.py View 1 chunk +1 line, -1 line 0 comments Download
M appengine/swarming/swarming_rpcs.py View 1 2 chunks +9 lines, -0 lines 0 comments Download
M appengine/swarming/test_env_handlers.py View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (12 generated)
nodir
PTAL
4 years, 8 months ago (2016-04-25 18:52:54 UTC) #4
M-A Ruel
https://codereview.chromium.org/1910713002/diff/40001/appengine/swarming/cipd.py File appengine/swarming/cipd.py (right): https://codereview.chromium.org/1910713002/diff/40001/appengine/swarming/cipd.py#newcode1 appengine/swarming/cipd.py:1: #!/usr/bin/env python THis file is not executable. https://codereview.chromium.org/1910713002/diff/40001/appengine/swarming/server/task_request.py File ...
4 years, 8 months ago (2016-04-25 19:09:45 UTC) #6
nodir
+vadimsh https://codereview.chromium.org/1910713002/diff/40001/appengine/swarming/cipd.py File appengine/swarming/cipd.py (right): https://codereview.chromium.org/1910713002/diff/40001/appengine/swarming/cipd.py#newcode1 appengine/swarming/cipd.py:1: #!/usr/bin/env python On 2016/04/25 19:09:45, M-A Ruel wrote: ...
4 years, 8 months ago (2016-04-25 20:27:16 UTC) #8
Paweł Hajdan Jr.
Drive-by with some suggestions/questions. Nice work! (you don't need for me to land this btw) ...
4 years, 8 months ago (2016-04-26 08:45:22 UTC) #10
M-A Ruel
lgtm with two questions. https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/server/task_request.py File appengine/swarming/server/task_request.py (right): https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/server/task_request.py#newcode377 appengine/swarming/server/task_request.py:377: # We don't support different ...
4 years, 7 months ago (2016-04-27 17:43:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1910713002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1910713002/120001
4 years, 7 months ago (2016-04-27 19:28:42 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1910713002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1910713002/120001
4 years, 7 months ago (2016-04-27 19:30:41 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:120001) as https://github.com/luci/luci-py/commit/1c6c3d329a42a889001c88214fc7082e0f60c1d9
4 years, 7 months ago (2016-04-27 19:31:53 UTC) #20
nodir
4 years, 7 months ago (2016-04-29 22:28:08 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/cipd.py
File appengine/swarming/cipd.py (right):

https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/cipd...
appengine/swarming/cipd.py:10: #
https://chromium.googlesource.com/infra/infra/+/468bb43/appengine/chrome_infr...
On 2016/04/26 08:45:22, Paweł Hajdan Jr. wrote:
> How about a TODO to move chrome_infra_packages to luci-py and share the
regexes?
> 
> Duplicating things is a smell, and they can get out of sync.
> 
> Another idea might be to rely on CIPD itself to do the validation. I'm not
sure
> if we need to duplicate that here.
> 
> Just my 2c, not blocking this CL and totally up to you. With the high quality
> standards for LUCI though, I thought it'd fit. Does that make sense? :)

I talked to Vadim, he is not planning to move chrome_infra_packages in the near
future and he is fine copying these 20 lines of code

https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/serv...
File appengine/swarming/server/task_request.py (right):

https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/serv...
appengine/swarming/server/task_request.py:377: # We don't support different
versions of the same package yet.
On 2016/04/27 17:43:56, M-A Ruel wrote:
> "yet"? Ever? I don't think this comment is necessary

removed comment

https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/serv...
appengine/swarming/server/task_request.py:381: self.packages =
sorted(self.packages, key=lambda p: p.package_name)
On 2016/04/27 17:43:56, M-A Ruel wrote:
> self.packages.sort(key=lambda p: p.package_name)
> ?

Done.

https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/swar...
File appengine/swarming/swarming_rpcs.py (right):

https://codereview.chromium.org/1910713002/diff/80001/appengine/swarming/swar...
appengine/swarming/swarming_rpcs.py:86: """A CIPD package to install in
$CIPD_PATH and $PATH before task execution."""
On 2016/04/26 08:45:22, Paweł Hajdan Jr. wrote:
> Quick check: if I'll want to use this to make kitchen use logdog, will I be
able
> to reference $CIPD_PATH in the swarming command to execute?
> 
> We'd request CIPD packages for kitchen and logdog binaries, and I can imagine
> the command would look like this:
> 
> $CIPD_PATH/kitchen/kitchen ... -logdog-butler-path
> $CIPD_PATH/logdog_butler/butler
> 
> Does that make sense? I'm also fine with some alternatives, just wanted to
make
> sure the logdog scenario would work.
> 
> This doesn't block the CL of course.

Normally CIPD packages have binaries right in the root, which means that both
kitchen and butler binaries will be present in $PATH, so no need to explicitly
reference $CIPD_PATH

Powered by Google App Engine
This is Rietveld 408576698