Provide zuul_event_id in MQTT Report Message
When trying to trace logs of builds it is often useful to search for log messages via the event id of a specific build. The event id is printed in (nearly) all log messages but is not provided by the MQTT reporter, so one has to look it up first based on the build id. To circumvent this extra step and make searching the logs more straight forward, this patch makes sure the event id is provided in the JSON message by the MQTT reporter. Change-Id: I908dd7eca250825eed97bf8261fd33b69cc5f543
This commit is contained in:
parent
9741018ff6
commit
25ac3feb28
@ -492,6 +492,7 @@ class TestMQTTConnection(ZuulTestCase):
|
|||||||
self.assertIn('timestamp', mqtt_payload)
|
self.assertIn('timestamp', mqtt_payload)
|
||||||
self.assertIn('enqueue_time', mqtt_payload)
|
self.assertIn('enqueue_time', mqtt_payload)
|
||||||
self.assertIn('trigger_time', mqtt_payload)
|
self.assertIn('trigger_time', mqtt_payload)
|
||||||
|
self.assertIn('zuul_event_id', mqtt_payload)
|
||||||
self.assertEquals(dependent_test_job['dependencies'], ['test'])
|
self.assertEquals(dependent_test_job['dependencies'], ['test'])
|
||||||
|
|
||||||
def test_mqtt_invalid_topic(self):
|
def test_mqtt_invalid_topic(self):
|
||||||
|
@ -49,6 +49,7 @@ class MQTTReporter(BaseReporter):
|
|||||||
'uuid': item.current_build_set.uuid,
|
'uuid': item.current_build_set.uuid,
|
||||||
'builds': []
|
'builds': []
|
||||||
},
|
},
|
||||||
|
'zuul_event_id': item.event.zuul_event_id,
|
||||||
}
|
}
|
||||||
for job in item.getJobs():
|
for job in item.getJobs():
|
||||||
job_informations = {
|
job_informations = {
|
||||||
|
Loading…
Reference in New Issue
Block a user