New issue
Advanced search Search tips

Issue 687335 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature



Sign in to add a comment

Display bot pool in builder page

Project Member Reported by no...@chromium.org, Jan 31 2017

Issue description

Add "Bot" column to the table of builds in builder page. The content should be a link to the underlying bot, e.g. Swarming bot or Buildbot slave. The text should be name of the bot.

In future, we may want to have a Milo bot page which has links to milo builds, in contrast to swarming bot page that has links to swarming tasks. When that is implemented, the bot column should navigate to the milo bot page.

This is not necessarily for the current milestone (linux_chromium_rel_ng)
 

Comment 1 by hinoka@chromium.org, Jan 31 2017

This isn't about the bot pool which the builder runs on right?

I think milo could benefit from being able to display the bot pool status (20 free, 1000 available, 790 in use, 50 dead, etc).  That's probably a different but.

Comment 2 by no...@chromium.org, Jan 31 2017

yeah, good idea. Outside of the scope of this bug though

Comment 3 by no...@chromium.org, Mar 10 2017

Status: Available (was: Untriaged)

Comment 4 by no...@chromium.org, Mar 20 2017

Components: Infra>Platform>Milo>LUCI

Comment 5 by no...@chromium.org, Mar 20 2017

Components: -Infra>Platform>Milo
Project Member

Comment 6 by sheriffbot@chromium.org, Apr 6 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: Infra>Platform>Swarming
+swarming component, since it needs some info from swarming.
The API isn't super usable for Milo since it takes like 5-10s though.

I wonder if it can be sped up, or if we can do some clever caching on the Milo side.

Either async JS or pre-cache via cron job every minute.
Components: -Infra>Platform>Swarming
I didn't see a way to speed up count queries in datastore.  Most solutions call for implementing a counter, which requires a decent amount of work.

I like the cron job every minute.  async JS on a 10s latency endpoint introduces a lot of jank.

Proposal (all milo side):
1. Create a new field in BuilderSummary called swarming_dimensions.  It is a JSON list of swarming dimensions for the builder.  It is updated whenever BuilderSummary is updated.
2. Create a new entity, BotCount, child of BuilderSummary.  It contains the bot count information.
3. Create a 1 min cron job that looks for all unique swarming_dimensions in BuilderSummary (w/ dedupe), queries swarming, and updates the BotCount entity.

This'll increase traffic to swarming, but probably not by too much compared to the current traffic (since this endpoint is hit on every task load)
Current QPS: http://shortn/_5vr6glSg8a (Approx 1-2QPS)
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/23541dc56ff843150029d03c1dee3004a198ab6c

commit 23541dc56ff843150029d03c1dee3004a198ab6c
Author: Ryan Tseng <hinoka@google.com>
Date: Fri Apr 06 23:41:39 2018

[cr-buildbucket] Add swarming dimensions to get_builders API

Bug:  687335 
Change-Id: I9c839c592fe5d195fd7e5cd10551bb5fd6875e19
Reviewed-on: https://chromium-review.googlesource.com/1000539
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>

[modify] https://crrev.com/23541dc56ff843150029d03c1dee3004a198ab6c/appengine/cr-buildbucket/swarming/test/swarmbucket_api_test.py
[modify] https://crrev.com/23541dc56ff843150029d03c1dee3004a198ab6c/appengine/cr-buildbucket/swarming/swarmbucket_api.py

Labels: -Pri-3 Pri-1
Owner: hinoka@chromium.org
Status: Assigned (was: Untriaged)
Summary: Display bot pool in builder page (was: Display bot name in builder page)
I'm starting to see people run into friction during migration wrt bot pools and capacity visibility, so I'm bumping the priority of this.
Project Member

Comment 14 by bugdroid1@chromium.org, Apr 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/6494f084385777d58521f81773308b0b1a062489

commit 6494f084385777d58521f81773308b0b1a062489
Author: Ryan Tseng <hinoka@google.com>
Date: Wed Apr 11 23:03:23 2018

[cr-buildbucket] Add swarming_hostname as part of the get_builders API

Bug:  687335 
Change-Id: I2661b4e6b062d708c699f4f37e97586b258285ca
Reviewed-on: https://chromium-review.googlesource.com/1008827
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>

[modify] https://crrev.com/6494f084385777d58521f81773308b0b1a062489/appengine/cr-buildbucket/swarming/test/swarmbucket_api_test.py
[modify] https://crrev.com/6494f084385777d58521f81773308b0b1a062489/appengine/cr-buildbucket/swarming/swarmbucket_api.py

Project Member

Comment 16 by bugdroid1@chromium.org, Apr 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b

commit e49fb6ea30ef5e992d84711d9b837cf40c06ae6b
Author: Ryan Tseng <hinoka@google.com>
Date: Mon Apr 30 23:11:35 2018

[milo] Add cron job to update machine pool for luci builders from swarming

This adds a cron job to update a couple new entities:
* BotPool: Keyed on Swarming Host + Dimensions.  Contains list of bots and statuses.
* BuilderPool: Child of BuilderSummary.  References BotPool via PoolDescriptor.

These combined are enough to display bot information like we do in buildbot.

Bug:  687335 
Change-Id: Ib725c26dad77ebf85c98fe1bb9f17a2123af64aa
Reviewed-on: https://chromium-review.googlesource.com/1009166
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>

[add] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/buildsource/buildbucket/pools.go
[add] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/buildsource/buildbucket/pools_test.go
[add] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/common/model/bots.go
[modify] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/common/model/builder_summary.go
[modify] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/common/model/status.go
[modify] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/common/model/status_string.go
[modify] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/frontend/appengine/cron.yaml
[delete] https://crrev.com/6d14560e12c752e215e4bdce309096b8b4224e5f/milo/frontend/cron_stats.go
[modify] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/frontend/handler_fixdatastore.go
[modify] https://crrev.com/e49fb6ea30ef5e992d84711d9b837cf40c06ae6b/milo/frontend/routes.go

This is live on prod now, but there are still 2 bugs:

* The "builder" dimension is special, and isn't taken into consideration.
* Pools with over 200 bots are limited at 200
Project Member

Comment 18 by bugdroid1@chromium.org, May 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/ec23b13659f70a0656498b52bdebd69183a74610

commit ec23b13659f70a0656498b52bdebd69183a74610
Author: Ryan Tseng <hinoka@google.com>
Date: Thu May 10 18:26:50 2018

[cr-buildbucket] Update dimension calculation in get_builders

So that behavior matches task creation.  I.E. the "builder" dimension is factored in.

Also removes the ability to specify dimensions via task templates,
because all of our dimensions are specified via cr-buildbucket.cfg.

Bug:  687335 
Change-Id: Ib0fa86a152090db1ff4f9074497c22c5350d83b7
Reviewed-on: https://chromium-review.googlesource.com/1050973
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>

[modify] https://crrev.com/ec23b13659f70a0656498b52bdebd69183a74610/appengine/cr-buildbucket/swarming/swarming.py
[modify] https://crrev.com/ec23b13659f70a0656498b52bdebd69183a74610/appengine/cr-buildbucket/swarming/test/swarmbucket_api_test.py
[modify] https://crrev.com/ec23b13659f70a0656498b52bdebd69183a74610/appengine/cr-buildbucket/swarming/test/swarming_test.py
[modify] https://crrev.com/ec23b13659f70a0656498b52bdebd69183a74610/appengine/cr-buildbucket/swarming/swarmbucket_api.py
[modify] https://crrev.com/ec23b13659f70a0656498b52bdebd69183a74610/appengine/cr-buildbucket/swarming/swarmingcfg.py

Project Member

Comment 19 by bugdroid1@chromium.org, May 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/36a8f991102d8b97c0b42c907fffacc457bc253d

commit 36a8f991102d8b97c0b42c907fffacc457bc253d
Author: Ryan Tseng <hinoka@google.com>
Date: Thu May 10 19:18:58 2018

[milo] Page through Swarming botlist call for bot pool info

The botlist call has an implicit limit of 200.
Follow the cursor until all items have been exhausted.

Bug:  687335 
Change-Id: I2970a5f5fd884e92d0659825c3dd1730ba5a2dc1
Reviewed-on: https://chromium-review.googlesource.com/1052497
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>

[modify] https://crrev.com/36a8f991102d8b97c0b42c907fffacc457bc253d/milo/buildsource/buildbucket/pools.go

Status: Fixed (was: Assigned)
Should be fixed now.

Sign in to add a comment