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

Class BuildRequest


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.
Method Summary
  __init__(self, reason, source, builderName)
  buildStarted(self, build, buildstatus)
This is called by the Builder when a Build has been started in the hopes of satifying this BuildRequest.
  canBeMergedWith(self, other)
  cancel(self)
Cancel this request.
  finished(self, buildstatus)
This is called by the Builder when the BuildRequest has been retired.
  mergeReasons(self, others)
Return a reason for the merged build request.
  mergeWith(self, others)
  requestSubmitted(self, builder)
  subscribe(self, observer)
  unsubscribe(self, observer)
  waitUntilFinished(self)
Get a Deferred that will fire (with a buildbot.interfaces.IBuildStatus instance when the build finishes.

Instance Variable Summary
string reason: the reason this Build is being requested.
a buildbot.sourcestamp.SourceStamp instance. source: the source code that this BuildRequest use
  status: the IBuildStatus object which tracks our status
  submittedAt: a timestamp (seconds since epoch) when this request was submitted to the Builder.

Class Variable Summary
Implements __implemented__ = <implementedBy buildbot.process.base.B...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
NoneType builder = None                                                                  
int startCount = 0                                                                     

Method Details

buildStarted(self, build, buildstatus)

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.

cancel(self)

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.

finished(self, buildstatus)

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.

mergeReasons(self, others)

Return a reason for the merged build request.

waitUntilFinished(self)

Get a Deferred that will fire (with a buildbot.interfaces.IBuildStatus instance when the build finishes.

Instance Variable Details

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

source

the source code that this BuildRequest use
Type:
a buildbot.sourcestamp.SourceStamp instance.
Value:
None                                                                  

status

the IBuildStatus object which tracks our status

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.

Class Variable Details

__implemented__

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

__providedBy__

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

__provides__

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

builder

Type:
NoneType
Value:
None                                                                  

startCount

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.1 on Sun Dec 10 22:04:45 2006 http://epydoc.sf.net