Set log_url for retried builds in MQTT payload correctly
Currently, the log_url for retried builds in the MQTT payload always points to the build result page in Zuul web. As mqtt is meant to be consumed by machines this breaks e.g. log post processing for those builds. To fix this, we do the same as for non-retried builds and provide a dedicated web_url and log_url [1]. [1]: https://review.opendev.org/c/zuul/zuul/+/703983 Change-Id: I139a80d616d59e262a4f21772d7712fda3b5c03b
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The MQTT reporter now sets the log_url for retried builds correctly.
|
||||
The link to the build result page is reported in a dedicated web_url
|
||||
field.
|
||||
@@ -91,7 +91,7 @@ class MQTTReporter(BaseReporter):
|
||||
retry_builds = item.current_build_set.getRetryBuildsForJob(
|
||||
job.name)
|
||||
for build in retry_builds:
|
||||
(result, url) = item.formatJobResult(job, build)
|
||||
(result, web_url) = item.formatJobResult(job, build)
|
||||
retry_build_information = {
|
||||
'job_name': job.name,
|
||||
'voting': job.voting,
|
||||
@@ -99,7 +99,8 @@ class MQTTReporter(BaseReporter):
|
||||
'start_time': build.start_time,
|
||||
'end_time': build.end_time,
|
||||
'execute_time': build.execute_time,
|
||||
'log_url': url,
|
||||
'log_url': build.log_url,
|
||||
'web_url': web_url,
|
||||
'result': result,
|
||||
}
|
||||
message['buildset']['retry_builds'].append(
|
||||
|
||||
Reference in New Issue
Block a user