Confirmed users
1,927
edits
m (→Go (golang) Pulse client library: Correct section name) |
(→Consuming Buildbot messages: a few edits) |
||
Line 181: | Line 181: | ||
There are two ways to consume messages published by Buildbot. The most direct way, which requires the most knowledge about Buildbot, is using the BuildConsumer in [http://hg.mozilla.org/automation/mozillapulse mozillapulse]. This consumer has access to all the native Buildbot messages, and therefore offers the most flexibility. | There are two ways to consume messages published by Buildbot. The most direct way, which requires the most knowledge about Buildbot, is using the BuildConsumer in [http://hg.mozilla.org/automation/mozillapulse mozillapulse]. This consumer has access to all the native Buildbot messages, and therefore offers the most flexibility. | ||
The disadvantage of using the BuildConsumer is that you need to spend time understanding what messages Buildbot publishes to | The disadvantage of using the BuildConsumer is that you need to spend time understanding what messages Buildbot publishes to Pulse, and how these can vary, and associate particular messages with what you're trying to accomplish. The format of Buildbot messages is undocumented, and can change without warning, which makes services based on the BuildConsumer potentially fragile. | ||
To address some of these disadvantages, a translator is run against the BuildConsumer (the [https://github.com/mozilla/pulsetranslator pulsetranslator]) which re-publishes a subset of Buildbot messages to a NormalizedBuild exchange, which are available using the NormalizedBuildConsumer of mozillapulse. The content of these messages is simplified and normalized, making it easier to consume without the need to have a thorough understanding of how Buildbot publishes messages to | To address some of these disadvantages, a translator is run against the BuildConsumer (the [https://github.com/mozilla/pulsetranslator pulsetranslator]) which re-publishes a subset of Buildbot messages to a NormalizedBuild exchange, which are available using the NormalizedBuildConsumer of mozillapulse. The content of these messages is simplified and normalized, making it easier to consume without the need to have a thorough understanding of how Buildbot publishes messages to Pulse. The re-published messages also protect consumers against some changes to the Pulse stream, although significant enough changes will likely break pulsetranslator as well as direct users of BuildConsumer. | ||
Another advantage of the NormalizedBuildConsumer is that it will only publish messages for a given build or test job after the logs for that job are available; using the BuildConsumer directly can result in the reception of messages for a build before the build artifacts are available, which can cause problems in consumers if they don't explicitly guard against this | Another advantage of the NormalizedBuildConsumer is that it will only publish messages for a given build or test job after the logs for that job are available; using the BuildConsumer directly can result in the reception of messages for a build before the build artifacts are available, which can cause problems in consumers if they don't explicitly guard against this. | ||
Generally speaking, consumers that wish to be notified when specific build or test jobs are completed should use the NormalizedBuildConsumer; consumers that need direct access to the Buildbot pulse stream or are looking for non-specific jobs (such as all jobs belonging to a particular commit) should probably use the BuildConsumer. | Generally speaking, consumers that wish to be notified when specific build or test jobs are completed should use the NormalizedBuildConsumer; consumers that need direct access to the Buildbot pulse stream or are looking for non-specific jobs (such as all jobs belonging to a particular commit) should probably use the BuildConsumer. |