taskgraph.transforms.run package#

Submodules#

taskgraph.transforms.run.common module#

Common support for various task types. These functions are all named after the worker implementation they operate on, and take the same three parameters, for consistency.

taskgraph.transforms.run.common.add_artifacts(config, task, taskdesc, path)#
taskgraph.transforms.run.common.add_cache(task, taskdesc, name, mount_point, skip_untrusted=False)#

Adds a cache based on the worker’s implementation.

Parameters:
  • task (dict) – Tasks object.

  • taskdesc (dict) – Target task description to modify.

  • name (str) – Name of the cache.

  • mount_point (path) – Path on the host to mount the cache.

  • skip_untrusted (bool) – Whether cache is used in untrusted environments (default: False). Only applies to docker-worker.

taskgraph.transforms.run.common.docker_worker_add_artifacts(config, task, taskdesc)#

Adds an artifact directory to the task

taskgraph.transforms.run.common.generic_worker_add_artifacts(config, task, taskdesc)#

Adds an artifact directory to the task

taskgraph.transforms.run.common.get_vcsdir_name(os)#
taskgraph.transforms.run.common.support_vcs_checkout(config, task, taskdesc, repo_configs, sparse=False)#

Update a task with parameters to enable a VCS checkout.

This can only be used with run-task tasks, as the cache name is reserved for run-task tasks.

taskgraph.transforms.run.run_task module#

Support for running tasks that are invoked via the run-task script.

taskgraph.transforms.run.run_task.common_setup(config, task, taskdesc, command)#
taskgraph.transforms.run.run_task.docker_worker_run_task(config, task, taskdesc)#
taskgraph.transforms.run.run_task.generic_worker_run_task(config, task, taskdesc)#
taskgraph.transforms.run.run_task.script_url(config, script)#

taskgraph.transforms.run.toolchain module#

Support for running toolchain-building tasks via dedicated scripts

taskgraph.transforms.run.toolchain.common_toolchain(config, task, taskdesc, is_docker)#
taskgraph.transforms.run.toolchain.docker_worker_toolchain(config, task, taskdesc)#
taskgraph.transforms.run.toolchain.generic_worker_toolchain(config, task, taskdesc)#
taskgraph.transforms.run.toolchain.get_digest_data(config, run, taskdesc)#

Module contents#

Convert a run description into a task description.

Run descriptions are similar to task descriptions, but they specify how to run the task at a higher level, using a “run” field that can be interpreted by run-using handlers in taskcluster/taskgraph/transforms/run.

taskgraph.transforms.run.add_resource_monitor(config, tasks)#
taskgraph.transforms.run.always_optimized(config, task, taskdesc)#
taskgraph.transforms.run.configure_taskdesc_for_run(config, task, taskdesc, worker_implementation)#

Run the appropriate function for this task against the given task description.

This will raise an appropriate error if no function exists, or if the task’s run is not valid according to the schema.

taskgraph.transforms.run.get_attribute(dict, key, attributes, attribute_name)#

Get attribute_name from the given attributes dict, and if there is a corresponding value, set key in dict to that value.

taskgraph.transforms.run.make_task_description(config, tasks)#

Given a build description, create a task description

taskgraph.transforms.run.rewrite_when_to_optimization(config, tasks)#
taskgraph.transforms.run.run_task_using(worker_implementation, run_using, schema=None, defaults={})#

Register the decorated function as able to set up a task description for tasks with the given worker implementation and run.using property. If schema is given, the task’s run field will be verified to match it.

The decorated function should have the signature using_foo(config, task, taskdesc) and should modify the task description in-place. The skeleton of the task description is already set up, but without a payload.

taskgraph.transforms.run.set_implementation(config, tasks)#
taskgraph.transforms.run.set_label(config, tasks)#
taskgraph.transforms.run.use_fetches(config, tasks)#