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

Class BuildRequest

source code

object --+
         |
        BuildRequest

A rolled-up encapsulation of all of the data relevant to a build request.

This class is used by the nextBuild and mergeRequests configuration parameters, as well as in starting a build. Construction of a BuildRequest object is a heavyweight process involving a lot of database queries, so it should be avoided where possible. See bug #1894.

Build requests have a SourceStamp which specifies what sources to 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, the requeset may be mergeable with other BuildRequests on the same branch.

Instance Methods
 
canBeMergedWith(self, other) source code
 
mergeWith(self, others) source code
 
mergeReasons(self, others)
Return a reason for the merged build request.
source code
 
getSubmitTime(self) source code
 
cancelBuildRequest(*args, **kwargs) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
fromBrdict(cls, master, brdict)
Construct a new BuildRequest from a dictionary as returned by BuildRequestsConnectorComponent.getBuildRequest.
source code
Class Variables
  sources = None
hash(x)
Instance Variables
buildbot.sourcestamp.SourceStamp source = None
the source stamp that this BuildRequest use
  submittedAt = None
a timestamp (seconds since epoch) when this request was submitted to the Builder.
  bsid
ID of the parent buildset
  buildername
name of the requested builder
  id
build request ID
  priority
request priority
properties.Properties properties
properties that should be applied to this build, taken from the buildset containing this build request
string reason
the reason this Build is being requested.
Properties

Inherited from object: __class__

Method Details

fromBrdict(cls, master, brdict)
Class Method

source code 

Construct a new BuildRequest from a dictionary as returned by BuildRequestsConnectorComponent.getBuildRequest.

This method uses a cache, which may result in return of stale objects; for the most up-to-date information, use the database connector methods.

Parameters:
  • master - current build master
  • brdict - build request dictionary
Returns:
BuildRequest, via Deferred

cancelBuildRequest(*args, **kwargs)

source code 
Decorators:
  • @defer.deferredGenerator

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 by 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. It comes from the buildsets table.
Type:
string