log exception on invalid jenkins notifications
I have been playing with zuul on port 8001 using curl: curl http://127.0.0.1:8001/jenkins_endpoint Had to `strace -f` the process to find out what was going wrong. Logging the exception will simply make it easier to track possible issues coming from the Jenkins Notification plugin.. Change-Id: I461146d0a6e7d63a0d8bedc3d4a6ad19e22548d6 Reviewed-on: https://review.openstack.org/13817 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
bb480fd092
commit
1e1a1552af
|
@ -64,7 +64,11 @@ class JenkinsCallback(threading.Thread):
|
|||
return ['Zuul good.']
|
||||
|
||||
def jenkins_endpoint(self, request):
|
||||
try:
|
||||
data = json.loads(request.body)
|
||||
except:
|
||||
self.log.exception("Exception handling Jenkins notification:")
|
||||
raise # let wsgi handler process the issue
|
||||
if data:
|
||||
self.log.debug("Received data from Jenkins: \n%s" %
|
||||
(pprint.pformat(data)))
|
||||
|
|
Loading…
Reference in New Issue