[Buildbot-commits] [Buildbot] #739: HTML logs are included in pickles

Buildbot trac trac at buildbot.net
Sat Aug 24 02:45:39 UTC 2013


#739: HTML logs are included in pickles
---------------------+--------------------
Reporter:  marcusl   |       Owner:
    Type:  defect    |      Status:  new
Priority:  critical  |   Milestone:  0.8.+
 Version:  0.7.12    |  Resolution:
Keywords:  sprint    |
---------------------+--------------------

Comment (by dcoshea):

 I'm running from git master commit ID 9cd7f9a (around 6 weeks ago).  I
 have a build where the web status shows the following due to some error in
 my config (a doStepIf lambda that took the wrong number of parameters, I
 think).  I assume this is basically a reproduction of this bug, unless
 there is some threshold below which the log content is ''meant'' to be
 stored inside the pickle:

 {{{
 [...] Build #3
 [...]
 Steps and Logfiles:
 [...]
 4. <step name> <step name> exception ( 0 secs )
     err.text
     err.html
 }}}

 In the builder's directory on the master, the file 3-log-<step
 name>-err.text exists but there is no corresponding .html file.

 {{{
 >>> o = pickle.load(open("3"))
 >>> o.steps[3].logs
 [<buildbot.status.logfile.LogFile instance at 0x22626c8>,
 <buildbot.status.logfile.HTMLLogFile instance at 0x2262710>]
 >>> o.steps[3].logs[1].filename
 '3-log-<step name>-err.html'
 }}}

 No such file exists, though.  There seem to be two ways to get the content
 of the log from the object:

 {{{
 >>> o.steps[3].logs[1].html
 '<div>\n  <style type="text/css">\n[...]\n</div>'
 >>> o.steps[3].logs[1].getText()
 '<div>\n  <style type="text/css">\n[...]\n</div>'
 }}}

 For the err.text log, though, I can't get the content from the pickle,
 which I assume is to be expected since it isn't stored in there:

 {{{
 >>> o.steps[3].logs[0].getText()
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "[...]/buildbot/master/buildbot/status/logfile.py", line 321, in
 getText
     return "".join(self.getChunks([STDOUT, STDERR], onlyText=True))
   File "[...]/buildbot/master/buildbot/status/logfile.py", line 339, in
 getChunks
     f = self.getFile()
   File "[...]/buildbot/master/buildbot/status/logfile.py", line 310, in
 getFile
     return BZ2File(self.getFilename() + ".bz2", "r")
   File "[...]/buildbot/master/buildbot/status/logfile.py", line 241, in
 getFilename
     return os.path.join(self.step.build.builder.basedir, self.filename)
 AttributeError: LogFile instance has no attribute 'step'
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/739#comment:10>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list