Queue AMQP Exchanges


The queue, typically available at queue.taskcluster.net, is responsible for accepting tasks and track their state as they are executed by workers. In order ensure they are eventually resolved.

This document describes AMQP exchanges offered by the queue, which allows third-party listeners to monitor tasks as they progress to resolution. These exchanges targets the following audience:

  • Schedulers, who takes action after tasks are completed,
  • Workers, who wants to listen for new or canceled tasks (optional),
  • Tools, that wants to update their view as task progress.

You'll notice that all the exchanges in the document shares the same routing key pattern. This makes it very easy to bind to all messages about a certain kind tasks.

Task specific routes, a task can define a task specific route using the task.routes property. See task creation documentation for details on permissions required to provide task specific routes. If a task has the entry 'notify.by-email' in as task specific route defined in task.routes all messages about this task will be CC'ed with the routing-key 'route.notify.by-email'.

These routes will always be prefixed route., so that cannot interfere with the primary routing key as documented here. Notice that the primary routing key is always prefixed primary.. This is ensured in the routing key reference, so API clients will do this automatically.

Please, note that the way RabbitMQ works, the message will only arrive in your queue once, even though you may have bound to the exchange with multiple routing key patterns that matches more of the CC'ed routing routing keys.

Delivery guarantees, most operations on the queue are idempotent, which means that if repeated with the same arguments then the requests will ensure completion of the operation and return the same response. This is useful if the server crashes or the TCP connection breaks, but when re-executing an idempotent operation, the queue will also resend any related AMQP messages. Hence, messages may be repeated.

This shouldn't be much of a problem, as the best you can achieve using confirm messages with AMQP is at-least-once delivery semantics. Hence, this only prevents you from obtaining at-most-once delivery semantics.

Remark, some message generated by timeouts maybe dropped if the server crashes at wrong time. Ideally, we'll address this in the future. For now we suggest you ignore this corner case, and notify us if this corner case is of concern to you.

Exchanges

NameExchangeSummary
taskDefinedexchange/taskcluster-queue/v1/task-definedTask Defined Messages
taskPendingexchange/taskcluster-queue/v1/task-pendingTask Pending Messages
taskRunningexchange/taskcluster-queue/v1/task-runningTask Running Messages
artifactCreatedexchange/taskcluster-queue/v1/artifact-createdArtifact Creation Messages
taskCompletedexchange/taskcluster-queue/v1/task-completedTask Completed Messages
taskFailedexchange/taskcluster-queue/v1/task-failedTask Failed Messages
taskExceptionexchange/taskcluster-queue/v1/task-exceptionTask Exception Messages
taskGroupResolvedexchange/taskcluster-queue/v1/task-group-resolvedTask Group Resolved Messages

taskDefined

Exchange
exchange/taskcluster-queue/v1/task-defined
Signature
"taskDefined(routingKeyPattern)"

When a task is created or just defined a message is posted to this exchange.

This message exchange is mainly useful when tasks are scheduled by a scheduler that uses defineTask as this does not make the task pending. Thus, no taskPending message is published. Please, note that messages are also published on this exchange if defined using createTask.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

option-key

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

option-key

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

option-key

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Task Defined Message (source)

Message reporting that a task has been defined. The task may or may not be scheduled too.

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.



taskPending

Exchange
exchange/taskcluster-queue/v1/task-pending
Signature
"taskPending(routingKeyPattern)"

When a task becomes pending a message is posted to this exchange.

This is useful for workers who doesn't want to constantly poll the queue for new tasks. The queue will also be authority for task states and claims. But using this exchange workers should be able to distribute work efficiently and they would be able to reduce their polling interval significantly without affecting general responsiveness.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

option-key

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

option-key

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Task Pending Message (source)

Message reporting that a task is now pending

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.

runIdinteger[0:1000]

Id of run that became pending, run-ids always starts from 0



taskRunning

Exchange
exchange/taskcluster-queue/v1/task-running
Signature
"taskRunning(routingKeyPattern)"

Whenever a task is claimed by a worker, a run is started on the worker, and a message is posted on this exchange.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Task Running Message (source)

Message reporting that a given run of a task have started

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.

runIdinteger[0:1000]

Id of the run that just started, always starts from 0

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker-group within which this run started.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker executing this run.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed.



artifactCreated

Exchange
exchange/taskcluster-queue/v1/artifact-created
Signature
"artifactCreated(routingKeyPattern)"

Whenever the createArtifact end-point is called, the queue will create a record of the artifact and post a message on this exchange. All of this happens before the queue returns a signed URL for the caller to upload the actual artifact with (pending on storageType).

This means that the actual artifact is rarely available when this message is posted. But it is not unreasonable to assume that the artifact will will become available at some point later. Most signatures will expire in 30 minutes or so, forcing the uploader to call createArtifact with the same payload again in-order to continue uploading the artifact.

However, in most cases (especially for small artifacts) it's very reasonable assume the artifact will be available within a few minutes. This property means that this exchange is mostly useful for tools monitoring task evaluation. One could also use it count number of artifacts per task, or index artifacts though in most cases it'll be smarter to index artifacts after the task in question have completed successfully.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Artifact Created Message (source)

Message reporting a new artifact has been created for a given task.

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.

runIdinteger[0:1000]

Id of the run on which artifact was created.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker-group within which the run with the created artifacted is running.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker within which the run with the created artifact is running.

artifactObject of

Information about the artifact that was created

storageTypestring
  • blob
  • reference
  • error

This is the storageType for the request that was used to create the artifact.

namestring[0:1024]

Name of the artifact that was created, this is useful if you want to attempt to fetch the artifact. But keep in mind that just because an artifact is created doesn't mean that it's immediately available.

expiresstringdate-time

Date and time after which the artifact created will be automatically deleted by the queue.

contentTypestring[0:255]

Mimetype for the artifact that was created.



taskCompleted

Exchange
exchange/taskcluster-queue/v1/task-completed
Signature
"taskCompleted(routingKeyPattern)"

When a task is successfully completed by a worker a message is posted this exchange. This message is routed using the runId, workerGroup and workerId that completed the task. But information about additional runs is also available from the task status structure.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Task Completed Message (source)

Message reporting that a task has complete successfully.

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.

runIdinteger[0:1000]

Id of the run that completed the task

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker-group within which this run ran.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker that executed this run.



taskFailed

Exchange
exchange/taskcluster-queue/v1/task-failed
Signature
"taskFailed(routingKeyPattern)"

When a task ran, but failed to complete successfully a message is posted to this exchange. This is same as worker ran task-specific code, but the task specific code exited non-zero.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

option-key

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

option-key

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

option-key

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Task Failed Message (source)

Message reporting that a task failed to complete successfully.

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.

runIdinteger[0:1000]

Id of the run that failed.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker-group within which this run ran.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker that executed this run.



taskException

Exchange
exchange/taskcluster-queue/v1/task-exception
Signature
"taskException(routingKeyPattern)"

Whenever Taskcluster fails to run a message is posted to this exchange. This happens if the task isn't completed before its deadl├Čne, all retries failed (i.e. workers stopped responding), the task was canceled by another entity, or the task carried a malformed payload.

The specific reason is evident from that task status structure, refer to the reasonResolved property for the last run.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskId

taskId for the task this message concerns

2
runId

runId of latest run for the task, _ if no run is exists for the task.

option-key

3
workerGroup

workerGroup of latest run for the task, _ if no run is exists for the task.

option-key

4
workerId

workerId of latest run for the task, _ if no run is exists for the task.

option-key

5
provisionerId

provisionerId this task is targeted at.

6
workerType

workerType this task must run on.

7
schedulerId

schedulerId this task was created by.

8
taskGroupId

taskGroupId this task was created in.

9
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

Task Exception Message (source)

Message reporting that Taskcluster have failed to run a task.

versioninteger
  • 1

Message version

statusObject of

A representation of task status as known by the queue

taskIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Unique task identifier, this is UUID encoded as URL-safe base64 and stripped of = padding.

provisionerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Unique identifier for the provisioner that this task must be scheduled on

workerTypestring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker type within the specified provisioner

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that defined this task.

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId.

deadlinestringdate-time

Deadline of the task, pending and running runs are resolved as exception if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future

expiresstringdate-time

Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the task must have an expiration that is no later than this.

retriesLeftinteger[0:999]

Number of retries left for the task in case of infrastructure issues

statestring
  • unscheduled
  • pending
  • running
  • completed
  • failed
  • exception

State of this task. This is just an auxiliary property derived from state of latests run, or unscheduled if none.

runsArray of

List of runs, ordered so that index i has runId == i

runIdinteger[0:1000]

Id of this task run, run-ids always starts from 0

statestring
  • pending
  • running
  • completed
  • failed
  • exception

State of this run

reasonCreatedstring
  • scheduled
  • retry
  • task-retry
  • rerun
  • exception

Reason for the creation of this run, more reasons may be added in the future.

reasonResolvedstring
  • completed
  • failed
  • deadline-exceeded
  • canceled
  • superseded
  • claim-expired
  • worker-shutdown
  • malformed-payload
  • resource-unavailable
  • internal-error
  • intermittent-task

Reason that run was resolved, this is mainly useful for runs resolved as exception. Note, more reasons may be added in the future, also this property is only available after the run is resolved. Some of these reasons, notably intermittent-task, worker-shutdown, and claim-expired, will trigger an automatic retry of the task.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for group that worker who executes this run is a part of, this identifier is mainly used for efficient routing. Note, this property is only present after the run is claimed.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for worker evaluating this run within given workerGroup. Note, this property is only available after the run has been claimed.

takenUntilstringdate-time

Time at which the run expires and is resolved as failed, if the run isn't reclaimed. Note, only present after the run has been claimed.

scheduledstringdate-time

Date-time at which this run was scheduled, ie. when the run was created in state pending.

startedstringdate-time

Date-time at which this run was claimed, ie. when the run changed state from pending to running. This property is only present after the run has been claimed.

resolvedstringdate-time

Date-time at which this run was resolved, ie. when the run changed state from running to either completed, failed or exception. This property is only present after the run as been resolved.

runIdinteger[0:1000]

Id of the last run for the task, not provided if deadline was exceeded before a run was started.

workerGroupstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the worker-group within which the last attempt of the task ran. Not provided, if deadline was exceeded before a run was started.

workerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the last worker that failed to report, causing the task to fail. Not provided, if deadline was exceeded before a run was started.



taskGroupResolved

Exchange
exchange/taskcluster-queue/v1/task-group-resolved
Signature
"taskGroupResolved(routingKeyPattern)"

A message is published on task-group-resolved whenever all submitted tasks (whether scheduled or unscheduled) for a given task group have been resolved, regardless of whether they resolved as successful or not. A task group may be resolved multiple times, since new tasks may be submitted against an already resolved task group.

Routing Key

IndexNameSummary
0
routingKeyKind

Identifier for the routing-key kind. This is always 'primary' for the formalized routing key.

constant-key

1
taskGroupId

taskGroupId for the task-group this message concerns

2
schedulerId

schedulerId for the task-group this message concerns

3
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

Task Group Resolved (source)

Message written once a task group has no tasks to be run. It is possible for a task group to later have another task added, in which case this message will be sent again once it finishes.

versioninteger
  • 1

Message version

taskGroupIdstring^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$

Identifier for the task-group being listed.

schedulerIdstring[1:22]^([a-zA-Z0-9-_]*)$

Identifier for the scheduler that created this task-group.