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

Issue 2689483004: swarming: Add server-side implementation for supplemental bot_config (Closed)

Created:
3 years, 10 months ago by M-A Ruel
Modified:
3 years, 10 months ago
Reviewers:
Vadim Sh., nodir
CC:
chromium-reviews, infra-reviews+luci-py_chromium.org, Sergey Berezin
Target Ref:
refs/heads/master
Project:
luci-py
Visibility:
Public.

Description

swarming: Add server-side implementation for supplemental bot_config This enable subteams to implement hooks (get_dimensions, on_after_task, etc) that are specific to their groups of bots via bots.cfg, without risking interference with bots from other pools. This is leveraged by fetching the files from luci-config. Only one file can be specified per groups, this is not additive at the moment. Migrate from rebooting the host to restarting the bot when a config change occurs, which is much more efficient. R=vadimsh@chromium.org BUG= Review-Url: https://codereview.chromium.org/2689483004 Committed: https://github.com/luci/luci-py/commit/22b12591c9b7ee36fa8f94570ffc40e547ed7257

Patch Set 1 : rebase #

Total comments: 7

Patch Set 2 : Removed check, it doesn't work #

Patch Set 3 : Bot side fix #

Total comments: 1

Patch Set 4 : Redone to actually work #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : include fix and test case to test the fix #

Total comments: 2

Patch Set 7 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -25 lines) Patch
M appengine/swarming/handlers_bot.py View 1 2 3 4 chunks +21 lines, -5 lines 0 comments Download
M appengine/swarming/handlers_bot_test.py View 1 2 3 4 chunks +22 lines, -4 lines 0 comments Download
M appengine/swarming/server/bot_groups_config.py View 1 2 3 4 5 6 5 chunks +40 lines, -2 lines 0 comments Download
M appengine/swarming/server/bot_groups_config_test.py View 1 2 3 4 5 4 chunks +26 lines, -14 lines 0 comments Download
M appengine/swarming/test_env_handlers.py View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (13 generated)
M-A Ruel
I'll test it live on staging (not done yet) before committing.
3 years, 10 months ago (2017-02-09 22:10:30 UTC) #6
Vadim Sh.
+nodir https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/handlers_bot.py#newcode452 appengine/swarming/handlers_bot.py:452: msg = 'Failed to find %s' % res.bot_group_cfg.bot_config_script ...
3 years, 10 months ago (2017-02-09 22:22:00 UTC) #8
M-A Ruel
https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/server/bot_groups_config.py File appengine/swarming/server/bot_groups_config.py (right): https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/server/bot_groups_config.py#newcode415 appengine/swarming/server/bot_groups_config.py:415: if not config.get_self_config(path)[1]: On 2017/02/09 22:22:00, Vadim Sh. wrote: ...
3 years, 10 months ago (2017-02-09 23:47:02 UTC) #9
M-A Ruel
https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/handlers_bot.py#newcode452 appengine/swarming/handlers_bot.py:452: msg = 'Failed to find %s' % res.bot_group_cfg.bot_config_script On ...
3 years, 10 months ago (2017-02-10 18:33:26 UTC) #10
nodir
https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/server/bot_groups_config.py File appengine/swarming/server/bot_groups_config.py (right): https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/server/bot_groups_config.py#newcode415 appengine/swarming/server/bot_groups_config.py:415: if not config.get_self_config(path)[1]: On 2017/02/10 18:33:26, M-A Ruel wrote: ...
3 years, 10 months ago (2017-02-10 18:41:43 UTC) #11
M-A Ruel
https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/server/bot_groups_config.py File appengine/swarming/server/bot_groups_config.py (right): https://codereview.chromium.org/2689483004/diff/60001/appengine/swarming/server/bot_groups_config.py#newcode415 appengine/swarming/server/bot_groups_config.py:415: if not config.get_self_config(path)[1]: On 2017/02/10 18:41:43, nodir wrote: > ...
3 years, 10 months ago (2017-02-10 19:53:19 UTC) #12
Vadim Sh.
https://codereview.chromium.org/2689483004/diff/100001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2689483004/diff/100001/appengine/swarming/handlers_bot.py#newcode442 appengine/swarming/handlers_bot.py:442: if res.bot_group_cfg.bot_config_script: I've realized there's no mechanism that triggers ...
3 years, 10 months ago (2017-02-10 22:08:00 UTC) #13
Vadim Sh.
https://codereview.chromium.org/2689483004/diff/120001/appengine/swarming/proto/bots.proto File appengine/swarming/proto/bots.proto (right): https://codereview.chromium.org/2689483004/diff/120001/appengine/swarming/proto/bots.proto#newcode121 appengine/swarming/proto/bots.proto:121: optional string bot_config_script = 23; can you extract *.proto ...
3 years, 10 months ago (2017-02-14 22:51:17 UTC) #15
M-A Ruel
https://codereview.chromium.org/2689483004/diff/120001/appengine/swarming/proto/bots.proto File appengine/swarming/proto/bots.proto (right): https://codereview.chromium.org/2689483004/diff/120001/appengine/swarming/proto/bots.proto#newcode121 appengine/swarming/proto/bots.proto:121: optional string bot_config_script = 23; On 2017/02/14 22:51:16, Vadim ...
3 years, 10 months ago (2017-02-15 00:36:32 UTC) #16
M-A Ruel
Started to test it live.
3 years, 10 months ago (2017-02-15 21:40:51 UTC) #17
Vadim Sh.
lgtm https://codereview.chromium.org/2689483004/diff/160001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2689483004/diff/160001/appengine/swarming/handlers_bot.py#newcode530 appengine/swarming/handlers_bot.py:530: bot_event('request_restart') should we use a different event name ...
3 years, 10 months ago (2017-02-16 18:31:17 UTC) #18
M-A Ruel
https://codereview.chromium.org/2689483004/diff/160001/appengine/swarming/handlers_bot.py File appengine/swarming/handlers_bot.py (right): https://codereview.chromium.org/2689483004/diff/160001/appengine/swarming/handlers_bot.py#newcode530 appengine/swarming/handlers_bot.py:530: bot_event('request_restart') On 2017/02/16 18:31:16, Vadim Sh. wrote: > should ...
3 years, 10 months ago (2017-02-16 19:02:31 UTC) #19
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/2689483004/160001
3 years, 10 months ago (2017-02-16 19:07:34 UTC) #21
commit-bot: I haz the power
Failed to apply patch for appengine/swarming/server/bot_groups_config.py: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-16 19:11:30 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/2689483004/180001
3 years, 10 months ago (2017-02-16 19:15:25 UTC) #26
commit-bot: I haz the power
3 years, 10 months ago (2017-02-16 19:19:42 UTC) #29
Message was sent while issue was closed.
Committed patchset #7 (id:180001) as
https://github.com/luci/luci-py/commit/22b12591c9b7ee36fa8f94570ffc40e547ed7257

Powered by Google App Engine
This is Rietveld 408576698