Runs


A task definition is, in a sense, the input to task execution. The output comes in the form of "runs" and associated "artifacts".

A run is an attempt to execute a task. Most tasks have a single run, but in cases where transient errors such loss of a compute node cause a run to fail, Taskcluster automatically adds additional runs.

Runs are identified by their runId, a small integer. While for most tasks, the single runId is 0, you should always use the latest run to avoid reading information about a run that failed.

Each run has properties describing the worker that claimed the run (referenced by the two-part namespace <workerGroup>/<workerId>), the reason the run was created, its current status, and various timestamps.

A run is in one of a few states:

  • pending - ready to be claimed and executed
  • running - currently executing
  • completed - finished successfully
  • failed - finished unsuccessfully
  • exception - finished due to some reason unrelated to the outcome of task execution

Exceptions for infrastructural reasons (for example, loss of a worker) will result in an automatic re-run if there are sufficient retries left for the task. Task cancellation and a few other unusual circumstances are also represented by the exception state, and distinguished by the reason field in the task status -- see the queue API reference for details.

A task's state is based on the state of its latest run, with the addition of an unscheduled state for a task with no runs (as is the case when the task's dependencies are not complete).