Project: pulselistener

contact:Bastien Abadie, (backup Release Management)

This is a monitoring component that reacts to Pulse messages, like:

It also polls for new things to do:

When it has captured a new event, it triggers tasks:

  • codecoverage/bot: triggered after builds finished, to gather and upload coverage data;
  • staticanalysis/bot: triggered on review requests, to provide linting and static analysis reports through a comment made by a bot.

This project is hosted on Heroku, as a worker dyno. We use several instances of this service for production, staging and testing.

The hooks

The functionality described above is implemented in a few classes defined in pulselistener/

  • HookPhabricator: Taskcluster hook handling the static analysis for Phabricator differentials. This polls the Phabricator API (the endpoint) every minute for new revisions.
  • HookStaticAnalysis: Taskcluster hook handling the static analysis for MozReview. This handles Pulse messages with route mozreview.commits.published by extracting the new commits from the message payload.
  • HookCodeCoverage: Taskcluster hook handling code coverage. This listens for task-group-resolved pulse messages and filters for mozilla-central code coverage build tasks. When one suitable task is found, it uses the revision hash to trigger a code coverage upload task.

When these listeners run successfully, they will call back to Taskcluster to create new tasks. As an example, see the code coverage production hook and static analysis production hook on the Taskcluster Hooks Manager.