Ticket #278 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

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

enhancedBuildSlavesPage.diff Download (4.6 KB) - added by bhearsum 5 years ago.
enhanced /buildslaves page
enhancedBuildSlavesPage-v2.diff Download (8.4 KB) - added by bhearsum 5 years ago.
again, with tests + working

Change History

Changed 5 years ago by bhearsum

enhanced /buildslaves page

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:2 Changed 5 years ago by dustin

  • Cc dustin added

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.

comment:4 Changed 5 years ago by Pike

  • Cc Pike added

Changed 5 years ago by bhearsum

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.

comment:6 Changed 5 years ago by dustin

Looks great! In the devel tree as #278:enhancedBuildSlavesPage-v2.diff.

It will get pushed to Brian's tree in a bit, unless I hear any problems.

comment:7 Changed 5 years ago by dustin

  • Milestone changed from undecided to 0.7.8

comment:8 Changed 5 years ago by dustin

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.