Ticket #278 (closed enhancement: fixed)
enhanced /buildslaves page
| Reported by: | bhearsum | Owned by: | bhearsum |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7.9 |
| Version: | 0.7.7 | Keywords: | |
| Cc: | dustin, Pike |
Description
This is a short patch I wrote to make the /buildslaves WebStatus? page a little more useful. It does do things: 1) bolds the 'slave is NOT connected' line to make it more visible 2) shows whether each slave is busy (building) or not
Also included is my attempt at a unit test for it. The test fails, but everything works as intended during manual testing. I suspect runutils.py needs a bit of modification to work like I need it to, but I couldn't manage to get it working myself.
Attachments
Change History
Changed 5 years ago by bhearsum
-
attachment
enhancedBuildSlavesPage.diff
added
comment:1 Changed 5 years ago by bhearsum
- Status changed from new to assigned
I find the 'is the slave busy' part to be especially useful when you have many builders that share a pool of slaves -- afaict there isn't another way to quickly tell 'what slaves are doing things right now'.
comment:3 Changed 5 years ago by dustin
Problem is, a buildslave can be running more than one build at a given time -- thats what the canStartBuild stuff in buildbot/buildslave.py is all about. The patch will also get confused if slaves connect or disconnect, I think.
It might be easiest to add an updateSlaveStatus method to BuildSlave, which records in the SlaveStatus? object the number of builds (or maybe a list of the BuildStatus? objects, or BuilderStatus? objects) that are currently running on the slave.
Changed 5 years ago by bhearsum
-
attachment
enhancedBuildSlavesPage-v2.diff
added
again, with tests + working
comment:5 Changed 5 years ago by bhearsum
Thanks for the suggestions Dustin, they helped a lot. I added an updateSlaveStatus to BuildSlave which gets called in Build.startBuild() and _release_slave(). I'm not sure if Build talking directly to BuildSlave is a good idea or not, I'm happy to add an intermediate method to SlaveBuilder? if that's the right way to do it.
All tests + the new ones in this patch are passing, and I've done manual testing with different numbers of builders, slaves while running/stopping builds, disconnecting slaves, etc.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
enhanced /buildslaves page