As part of issue 416072, state: maintenance was added and is now reported in the monitoring pipeline. The problem is that this state is not: - Stored in the DB in BotInfo - Queriable in the bots/count or bots/list APIs - Categorized in the Web UI That's a huge usability problem, as bots "look idle" but they are not. AIs: - DB: update BotInfo.composite to have a new bit for MAINTENANCE = 1<<6 - API: update BotsRequest, BotsCount and BotInfo to have maintenance - Web UI: add selectors and counts and all the support code, including updating client/swarming.py BotInfo: https://cs.chromium.org/chromium/infra/luci/appengine/swarming/server/bot_management.py?q=%22class+BotInfo(_%22 BotsCount: https://cs.chromium.org/chromium/infra/luci/appengine/swarming/swarming_rpcs.py?q=%22class+BotsCount(%22
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/c14663096bbb106dd7f0a6ae65cb5439afb45b68 commit c14663096bbb106dd7f0a6ae65cb5439afb45b68 Author: Marc-Antoine Ruel <maruel@chromium.org> Date: Wed Apr 04 20:48:51 2018 [swarming] Redo bot_management_test.py in preparation of refactor Rename BotInfo.composite constants in preparation to add more. Cleanup the tests a bit in preparation as more states are being added. Bug: 826421 , 817976 Change-Id: I84d4397713f52a5fec4dd392ce5f1f0f7747c70e Reviewed-on: https://chromium-review.googlesource.com/993034 Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org> [modify] https://crrev.com/c14663096bbb106dd7f0a6ae65cb5439afb45b68/appengine/swarming/server/bot_management.py [modify] https://crrev.com/c14663096bbb106dd7f0a6ae65cb5439afb45b68/appengine/swarming/server/bot_management_test.py
I'll assume ownership of the remaining work on this bug.
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/55121137238e138f321a6d8ce6f0614ee5d4ef93 commit 55121137238e138f321a6d8ce6f0614ee5d4ef93 Author: Charlie Andrews <charliea@chromium.org> Date: Thu May 03 20:31:28 2018 Plumb maintenance status from the state dict into the database Work remains to make the database maintenance status filterable through the API and to surface that filter in the UI. Bug: 817976 Change-Id: Ifba962c848185a2b1bb5be24aa2a37190c6b7a69 Reviewed-on: https://chromium-review.googlesource.com/1040953 Commit-Queue: Charlie Andrews <charliea@chromium.org> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org> [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/handlers_bot.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/handlers_bot_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/handlers_endpoints.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/handlers_endpoints_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/handlers_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/bot_management.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/bot_management_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/lease_management.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/lease_management_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/task_queues_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/task_scheduler_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/server/task_to_run_test.py [modify] https://crrev.com/55121137238e138f321a6d8ce6f0614ee5d4ef93/appengine/swarming/swarming_rpcs.py
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/dee907da04d5f60b63e2dd6dcfb4ef389acc3383 commit dee907da04d5f60b63e2dd6dcfb4ef389acc3383 Author: Charlie Andrews <charliea@chromium.org> Date: Fri May 04 15:03:04 2018 Add the ability to bot 'get' and 'count' to filter by "in_maintenance" After this is exposed in the API, we can then expose it in the UI. Bug: 817976 Change-Id: I1727a69d6819e7e8e17cc455a8adbfef1339c658 Reviewed-on: https://chromium-review.googlesource.com/1043429 Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org> [modify] https://crrev.com/dee907da04d5f60b63e2dd6dcfb4ef389acc3383/appengine/swarming/handlers_endpoints.py [modify] https://crrev.com/dee907da04d5f60b63e2dd6dcfb4ef389acc3383/appengine/swarming/handlers_endpoints_test.py [modify] https://crrev.com/dee907da04d5f60b63e2dd6dcfb4ef389acc3383/appengine/swarming/server/bot_management.py [modify] https://crrev.com/dee907da04d5f60b63e2dd6dcfb4ef389acc3383/appengine/swarming/server/bot_management_test.py [modify] https://crrev.com/dee907da04d5f60b63e2dd6dcfb4ef389acc3383/appengine/swarming/server/lease_management.py [modify] https://crrev.com/dee907da04d5f60b63e2dd6dcfb4ef389acc3383/appengine/swarming/swarming_rpcs.py
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/774054c8c6e44c20e035c5b72b1265ddbc284354 commit 774054c8c6e44c20e035c5b72b1265ddbc284354 Author: Marc-Antoine Ruel <maruel@chromium.org> Date: Fri May 04 19:42:49 2018 [swarming] Fix regression in dee907da04d5 There was a unit test, but because ndb.Model ignores invalid property with a None value, the unit test didn't catch it. Tweaked the unit test to reproduce the bug by specifying a non-None value. Grr. Bug: 817976 Change-Id: Ief295dbf7f180ef5093cba7d56a3ce31f734333f Reviewed-on: https://chromium-review.googlesource.com/1044889 Reviewed-by: Charlie Andrews <charliea@chromium.org> Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org> [modify] https://crrev.com/774054c8c6e44c20e035c5b72b1265ddbc284354/appengine/swarming/handlers_endpoints.py [modify] https://crrev.com/774054c8c6e44c20e035c5b72b1265ddbc284354/appengine/swarming/handlers_endpoints_test.py
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/992e206ecd2cdfb5c81649faff45ee8002ace493 commit 992e206ecd2cdfb5c81649faff45ee8002ace493 Author: Charlie Andrews <charliea@chromium.org> Date: Fri May 04 20:29:59 2018 Surface the 'maintenance' status on the bot info page Bug: 817976 Change-Id: I0c6fe1bb4a8fdaa5ec282568a90e118182640426 Reviewed-on: https://chromium-review.googlesource.com/1045066 Reviewed-by: Kevin Lubick <kjlubick@chromium.org> Commit-Queue: Charlie Andrews <charliea@chromium.org> [modify] https://crrev.com/992e206ecd2cdfb5c81649faff45ee8002ace493/appengine/swarming/ui/build/elements.html [modify] https://crrev.com/992e206ecd2cdfb5c81649faff45ee8002ace493/appengine/swarming/ui/res/imp/botpage/bot-page.html [modify] https://crrev.com/992e206ecd2cdfb5c81649faff45ee8002ace493/appengine/swarming/ui/res/imp/common/single-page-style.html
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/f625097fd296626c5f7a8dc0254bf34ed503ecb2 commit f625097fd296626c5f7a8dc0254bf34ed503ecb2 Author: Charlie Andrews <charliea@chromium.org> Date: Mon May 07 19:21:59 2018 Surface the "maintenance" count on the task result page Bug: 817976 Change-Id: Ief181be5b705c889ec32c0a999bec825e4b06d50 Reviewed-on: https://chromium-review.googlesource.com/1045128 Commit-Queue: Charlie Andrews <charliea@chromium.org> Reviewed-by: Kevin Lubick <kjlubick@chromium.org> [modify] https://crrev.com/f625097fd296626c5f7a8dc0254bf34ed503ecb2/appengine/swarming/ui/build/elements.html [modify] https://crrev.com/f625097fd296626c5f7a8dc0254bf34ed503ecb2/appengine/swarming/ui/res/imp/taskpage/task-page-demo.html [modify] https://crrev.com/f625097fd296626c5f7a8dc0254bf34ed503ecb2/appengine/swarming/ui/res/imp/taskpage/task-page.html
Last CL that surfaces the status on the bot list page is in the CQ now. maruel@ and I agreed that we'd wait until this is in production, make sure everything works as expected, and then close this bug as long as it does.
Marking the next action date as tomorrow, as that's when maruel@ expects this will make it into prod for us to check how it's working.
The NextAction date has arrived: 2018-05-08
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8 commit 2262c8fa072ba5cb382dd46b65b02911b7f1d8b8 Author: Charlie Andrews <charliea@chromium.org> Date: Tue May 08 18:00:40 2018 Surface the "maintenance" status in the bot list page Bug: 817976 Change-Id: I6b099d36d6b0195e7c25ab2b34729916c9783cd5 Reviewed-on: https://chromium-review.googlesource.com/1045269 Commit-Queue: Charlie Andrews <charliea@chromium.org> Reviewed-by: Kevin Lubick <kjlubick@chromium.org> [modify] https://crrev.com/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8/appengine/swarming/ui/build/elements.html [modify] https://crrev.com/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8/appengine/swarming/ui/res/imp/botlist/bot-filters.html [modify] https://crrev.com/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8/appengine/swarming/ui/res/imp/botlist/bot-list-data.html [modify] https://crrev.com/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8/appengine/swarming/ui/res/imp/botlist/bot-list-demo.html [modify] https://crrev.com/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8/appengine/swarming/ui/res/imp/botlist/bot-list-summary.html [modify] https://crrev.com/2262c8fa072ba5cb382dd46b65b02911b7f1d8b8/appengine/swarming/ui/res/imp/botlist/bot-list.html
Pushed to prod, looks good!
Comment 1 by bugdroid1@chromium.org
, Apr 4 2018