Taskcluster-treeherder Pulse Exchange


The taskcluster-treeherder service is responsible for processing task events published by TaskCluster Queue and producing job messages that are consumable by Treeherder.

This exchange provides that job messages to be consumed by any queue that attached to the exchange. This could be a production Treeheder instance, a local development environment, or a custom dashboard.

Exchanges

NameExchangeSummary
jobsexchange/taskcluster-treeherder/v1/jobsJob Messages

jobs

Exchange
exchange/taskcluster-treeherder/v1/jobs
Signature
"jobs(routingKeyPattern)"

When a task run is scheduled or resolved, a message is posted to this exchange in a Treeherder consumable format.

Routing Key

IndexNameSummary
0
destination

destination

1
project

project

2
reserved

Space reserved for future routing-key entries, you should always match this entry with #. As automatically done by our tooling, if not specified.

option-key

multi-key

Message Payload

Job Definition (source)

Definition of a single job that can be added to Treeherder Project is determined by the routing key, so we don't need to specify it here.

taskIdstring[1:50]^[A-Za-z0-9/+-]+$

This could just be what was formerly submitted as a job_guid in the REST API.

retryIdinteger

The infrastructure retry iteration on this job. The number of times this job has been retried by the infrastructure. If it's the 1st time running, then it should be 0. If this is the first retry, it will be 1, etc.

isRetriedboolean

True indicates this job has been retried.

buildSystemstring[1:25]^[\w-]+$

The name of the build system that initiated this content. Some examples are "buildbot" and "taskcluster". But this could be any name. This value will be used in the routing key for retriggering jobs in the publish-job-action task.

originOne of
HG PushObject of

PREFERRED: An HG job that only has a revision. This is for all jobs going forward.

kindstring
  • hg.mozilla.org
projectstring[1:50]^[\w-]+$
revisionstring[40:40]^[0-9a-f]+$
pushLogIDinteger
Github Pull RequestObject of
kindstring
  • github.com
ownerstring[1:50]^[\w-]+$

This could be the organization or the individual git username depending on who owns the repo.

projectstring[1:50]^[\w-]+$
revisionstring[40:40]
pullRequestIDinteger
displayObject of
jobSymbolstring[0:25]
chunkIdinteger[1:∞]
chunkCountinteger[1:∞]
groupSymbolstring[1:25]
jobNamestring[1:100]
groupNamestring[1:100]
statestring
  • unscheduled
  • pending
  • running
  • completed

unscheduled: not yet scheduled pending: not yet started running: currently in progress completed: Job ran through to completion

resultstring
  • success
  • fail
  • exception
  • canceled
  • superseded
  • unknown

fail: A failure exception: An infrastructure error/exception success: Build/Test executed without error or failure canceled: The job was cancelled by a user unknown: When the job is not yet completed superseded: When a job has been superseded by another job

jobKindstring
default: other
  • build
  • test
  • other
tierinteger[1:3]
coalescedArray of

The job guids that were coalesced to this job.

Job GUIDstring[1:50]^[\w/+-]+$
timeScheduledstringdate-time
timeStartedstringdate-time
timeCompletedstringdate-time
labelsArray of

Labels are a dimension of a platform. The values here can vary wildly, so most strings are valid for this. The list of labels that are used is maleable going forward.

These were formerly known as "Options" within "Option Collections" but calling labels now so they can be understood to be just strings that denotes a characteristic of the job.

Some examples of labels that have been used: opt Optimize Compiler GCC optimize flags debug Debug flags passed in pgo Profile Guided Optimization - Like opt, but runs with profiling, then builds again using that profiling asan Address Sanitizer tsan Thread Sanitizer Build

Labelstring[1:50]^[\w-]+$
ownerstring[1:50]

Description of who submitted the job: gaia | scheduler name | username | email

reasonstring[1:125]

Examples include:

  • scheduled
  • scheduler
  • Self-serve: Rebuilt by foo@example.com
  • Self-serve: Requested by foo@example.com
  • The Nightly scheduler named 'b2g_mozilla-inbound periodic' triggered this build
  • unknown
productNamestring[1:125]

Examples include:

  • 'b2g'
  • 'firefox'
  • 'taskcluster'
  • 'xulrunner'
buildMachineObject of
namestring[1:50]^[\w-]+$
platformstring[1:100]^[\w-]+$
osstring[1:25]^[\w-]+$
architecturestring[1:25]^[\w-]+$
runMachineObject of
namestring[1:50]^[\w-]+$
platformstring[1:100]^[\w-]+$
osstring[1:25]^[\w-]+$
architecturestring[1:25]^[\w-]+$
jobInfoObject of

Definition of the Job Info for a job. These are extra data fields that go along with a job that will be displayed in the details panel within Treeherder.

summarystring

Plain text description of the job and its state. Submitted with the final message about a task.

linksArray of
urlstring[0:512]uri
linkTextstring[1:125]
labelstring[1:70]
logsArray of
urlstring[1:255]uri
namestring[1:50]
stepsArray of

This object defines what is seen in the Treeherder Log Viewer. These values can be submitted here, or they will be generated by Treeherder's internal log parsing process from the submitted log. If this value is submitted, Treeherder will consider the log already parsed and skip parsing.

errorsArray of
linestring[1:255]
linenumberinteger
namestring[1:255]
timeStartedstringdate-time
timeFinishedstringdate-time
lineStartedinteger
lineFinishedinteger
resultstring
  • success
  • fail
  • exception
  • canceled
  • unknown
errorsTruncatedboolean

If true, indicates that the number of errors in the log was too large and not all of those lines are indicated here.

extraObject of

Extra information that Treeherder reads on a best-effort basis

Anything ¯\_(ツ)_/¯
versioninteger
  • 1

Message version