Package buildbot :: Package process :: Module base :: Class BuildRequest
[frames] | no frames]

Class BuildRequest

source code

I represent a request to a specific Builder to run a single build.

I have a SourceStamp which specifies what sources I will build. This may specify a specific revision of the source tree (so source.branch, source.revision, and source.patch are used). The .patch attribute is either None or a tuple of (patchlevel, diff), consisting of a number to use in 'patch -pN', and a unified-format context diff.

Alternatively, the SourceStamp may specify a set of Changes to be built, contained in source.changes. In this case, I may be mergeable with other BuildRequests on the same branch.

I may be part of a BuildSet, in which case I will report status results to it.

I am paired with a BuildRequestStatus object, to which I feed status information.

Instance Methods
 
__init__(self, reason, source, builderName, properties=None) source code
 
canBeMergedWith(self, other) source code
 
mergeWith(self, others) source code
 
mergeReasons(self, others)
Return a reason for the merged build request.
source code
 
waitUntilFinished(self)
Get a Deferred that will fire (with a buildbot.interfaces.IBuildStatus instance when the build finishes.
source code
 
requestSubmitted(self, builder) source code
 
buildStarted(self, build, buildstatus)
This is called by the Builder when a Build has been started in the hopes of satifying this BuildRequest.
source code
 
finished(self, buildstatus)
This is called by the Builder when the BuildRequest has been retired.
source code
 
subscribe(self, observer) source code
 
unsubscribe(self, observer) source code
 
cancel(self)
Cancel this request.
source code
 
setSubmitTime(self, t) source code
 
getSubmitTime(self) source code
 
__providedBy__(...)
Object Specification Descriptor
source code
Class Variables
  builder = None
hash(x)
  startCount = 0
  __implemented__ = <implementedBy buildbot.process.base.BuildRe...
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Instance Variables
a buildbot.sourcestamp.SourceStamp instance. source = None
the source code that this BuildRequest use
  submittedAt = None
a timestamp (seconds since epoch) when this request was submitted to the Builder.
Properties object properties
properties that should be applied to this build 'owner' property is used by Build objects to collect the list returned by getInterestedUsers
string reason
the reason this Build is being requested.
  status
the IBuildStatus object which tracks our status
Method Details

buildStarted(self, build, buildstatus)

source code 

This is called by the Builder when a Build has been started in the hopes of satifying this BuildRequest. It may be called multiple times, since interrupted builds and lost buildslaves may force multiple Builds to be run until the fate of the BuildRequest is known for certain.

finished(self, buildstatus)

source code 

This is called by the Builder when the BuildRequest has been retired. This happens when its Build has either succeeded (yay!) or failed (boo!). TODO: If it is halted due to an exception (oops!), or some other retryable error, finished will not be called yet.

cancel(self)

source code 

Cancel this request. This can only be successful if the Build has not yet been started.

Returns:
a boolean indicating if the cancel was successful.

Class Variable Details

__implemented__

Value:
<implementedBy buildbot.process.base.BuildRequest>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0xf95e50>

Instance Variable Details

submittedAt

a timestamp (seconds since epoch) when this request was submitted to the Builder. This is used by the CVS step to compute a checkout timestamp, as well as the master to prioritize build requests from oldest to newest.
Value:
None

reason

the reason this Build is being requested. Schedulers provide this, but for forced builds the user requesting the build will provide a string.
Type:
string