Browse Source

Merge "Add item UUID to MQTT reporter"

changes/74/802674/1 4.7.0
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
8e4af0ce5e
  1. 6
      doc/source/reference/drivers/mqtt.rst
  2. 1
      tests/unit/test_connection.py
  3. 1
      zuul/driver/mqtt/mqttreporter.py

6
doc/source/reference/drivers/mqtt.rst

@ -13,6 +13,12 @@ An MQTT report uses this schema:
.. attr:: <mqtt schema>
.. attr:: uuid
The item UUID. Each item enqueued into a Zuul pipeline is
assigned a UUID which remains the same even as Zuul's
speculative execution algorithm re-orders pipeline contents.
.. attr:: action
The reporter action name, e.g.: 'start', 'success', 'failure',

1
tests/unit/test_connection.py

@ -645,6 +645,7 @@ class TestMQTTConnection(ZuulTestCase):
self.assertIn('enqueue_time', mqtt_payload)
self.assertIn('trigger_time', mqtt_payload)
self.assertIn('zuul_event_id', mqtt_payload)
self.assertIn('uuid', mqtt_payload)
self.assertEquals(dependent_test_job['dependencies'], ['test'])
def test_mqtt_invalid_topic(self):

1
zuul/driver/mqtt/mqttreporter.py

@ -48,6 +48,7 @@ class MQTTReporter(BaseReporter):
item, with_jobs=False),
'trigger_time': item.event.timestamp,
'enqueue_time': item.enqueue_time,
'uuid': item.uuid,
'buildset': {
'uuid': item.current_build_set.uuid,
'result': item.current_build_set.result,

Loading…
Cancel
Save