Opened 14 years ago
Last modified 11 years ago
#7229 new defect
Buildbot 0.8 breaks buildbot status page.
Reported by: | Owned by: | Etienne PIERRE | |
---|---|---|---|
Priority: | high | Component: | TracBuildbotIntegration |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
I've upgraded my buildbot install to the latest (0.8). I had to make a change on line 87 from:
laststatus=lastbuild[5]
to:
laststatus=lastbuild[6]
This would only work with buildbot 0.8. What might be best is to include a configuration option so that this could be updated more easily. Maybe something like:
def get_status_location(self): status_offset=self.config.get("buildbot", "status_pos") if status_offset: try: return int(status_offset) except ValueError: return 5 else: return 5
and then using this to find the status instead of hard-coding 5 or 6 on line 87.
The buildbot team changed the xmlrpc interface to set the return from:
answer = (builder_name, build.getNumber(), build_end, branch, revision, Results[build.getResults()], build.getText(), )
to:
answer = (builder_name, build.getNumber(), build_start, build_end, branch, revision, Results[build.getResults()], result, reasons, )
By adding the build_start as the new [2] position, it moved the Results from the [5] to the [6] position.
Attachments (0)
Change History (5)
comment:2 Changed 14 years ago by
Priority: | normal → high |
---|
My formatting really got messed up. The first section should look like:
def get_buildbot_version(self): version=self.config.get("buildbot", "version") if version: try: return float(version.strip()[:3]) except ValueError: return 0.7 else: return 0.7
The next section would look like:
if self.get_buildbot_version() > 0.7: laststatus=lastbuild[6] lastbranch=lastbuild[4] else: laststatus=lastbuild[5] lastbranch=lastbuild[3]
Sorry for the extra message.
comment:3 Changed 14 years ago by
I found a similar problem with the individual build status entries. Here is the fix for that. I replaced:
thisbuild = { 'status' : build[5], 'number' : build[1] 'url' : self.get_build_url(builder, build[1]), 'branch' : build[3] }
with:
buildnumber = build[1] buildurl = self.get_build_url(builder, buildnumber) if self.get_buildbot_version() > 0.7: buildstatus = build[6] buildbranch = build[4] else: buildstatus = build[5] buildbranch = build[3] thisbuild = { 'status' : buildstatus, 'number' : buildnumber, 'url' : buildurl, 'branch' : buildbranch }
comment:5 Changed 11 years ago by
Description: | modified (diff) |
---|
Here is another alternative. Add this before the get_xmlrpc_url definition:
Then later this:
becomes:
In the trac.ini file, I added: version = 0.8.0 under the [buildbot] configuration entry.
If the version is 0.8 or higher it assumes the layout is the new layout. If things change in later versions of buildbot, the test above can be altered to handle the new layout and the end user only needs to update the version number in the config file.