Ticket #1705 (new enhancement)
Provide a better way of working with resources utilized by builds
|Reported by:||ayust||Owned by:|
Many build processes involve some kind of instantiated resources (web servers, ssh tunnels, mock databases, et cetera). Currently, Buildbot has no concept of these resources - starting/stopping them generally has to be accomplished by a pair of buildsteps, maybe with a build property or two so that the 'start' step can tell the 'stop' step what process it should target or the like. This also means that Buildbot has no good way to deal with resources that could be shared between multiple builders, because each builder's steps have no way of knowing if they should shut the resource down when they're done with it or not.
Thus, the idea: create a concept of resources in Buildbot. Builds could request that a resource be available, and either an existing resource would be used, or the resource would start itself up and pass any necessary information back to the build.
- Resources could potentially be shared, shutting themselves down when the # of builds using them goes to 0 (or some other condition is met)
- Because resources would be in charge of shutting themselves down, there'd be less case of forgetting a 'alwaysRun' and leaving zombie services running after failed builds
- Less reliance on build properties for resource state
- Easier to work with for resources that aren't already daemonized (resources could signal buildbot that they're "ready" without having to wait for a process like start-stop-daemon to exit, and just keep the resource open in a subprocess).