Support external cross-project dependencies in ui
When a cross project dependency includes a change from a project
that is not known to zuul, the zuul ui stops updating and the following
stack trace is seen in the zuul logs on every ui update.
2015-06-12 12:42:50,079 ERROR zuul.WebApp: Exception formatting status:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/zuul/webapp.py", line 104, in app
self.cache = self.scheduler.formatStatusJSON()
File "/usr/local/lib/python2.7/dist-packages/zuul/scheduler.py", line 974, in formatStatusJSON
pipelines.append(pipeline.formatStatusJSON())
File "/usr/local/lib/python2.7/dist-packages/zuul/model.py", line 276, in formatStatusJSON
j_changes.append(e.formatJSON())
File "/usr/local/lib/python2.7/dist-packages/zuul/model.py", line 738, in formatJSON
ret['project'] = changeish.project.name
AttributeError: 'NoneType' object has no attribute 'name'
Quick fix to stop the bleeding is to mark the project as "unknown".
An alternative is to simply leave it blank.
A more permanent fix is still needed (e.g. look up name of project).
Change-Id: I97299ed2089ad005afaf7494168f4ee74f799e82
1 file changed