Bug 10051

Summary: Error log links (err.html and err.text) in build page show tracebacks from buildsteps.py
Product: [Infrastructure] AutoBuilder Reporter: Joshua Lock <joshuagloe>
Component: autobuilderAssignee: Aníbal Limón <anibal.limon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: infras.ab.watcher, Infras.watcher, pidge, sgw
Version: 2.2   
Target Milestone: 2.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Joshua Lock 2016-07-29 10:17:59 UTC
When trying to make use of the new err.html and err.text links for a failed build I am presented a Python Traceback from the _createBitbakeErrorReport function.

Full traceback is pasted below, the transient link to the autobuilder build in question is:

https://autobuilder.yoctoproject.org/main/builders/nightly-oecore/builds/863

----


Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 290, in addCallbacks
    self._runCallbacks()
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 368, in callback
    self._startRunCallbacks(result)
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 464, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/buildstep.py", line 866, in <lambda>
    d.addCallback(lambda res: self.commandComplete(cmd))
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py", line 145, in commandComplete
    report = self._createBitbakeErrorReport(self.errors['log'])
  File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py", line 122, in _createBitbakeErrorReport
    self.getProperty('got_revision')
exceptions.TypeError: coercing to Unicode: need string or buffer, NoneType found
Comment 1 Joshua Lock 2016-07-29 10:19:16 UTC
Set assignee to alimon, the author of the code in question.
Comment 2 Aníbal Limón 2016-07-29 14:59:44 UTC
(In reply to comment #1)
> Set assignee to alimon, the author of the code in question.

This is a simple bug when i was working in this i didn't notice that got_revision is only available in poky builds for oe-core is got_revision_oecore.

I'll add a validation if got_revision is None try to use got_revision_oecore.