gecko_taskgraph.transforms.job packageο
Submodulesο
gecko_taskgraph.transforms.job.common moduleο
Common support for various job types. These functions are all named after the worker implementation they operate on, and take the same three parameters, for consistency.
- gecko_taskgraph.transforms.job.common.add_artifacts(config, job, taskdesc, path)ο
- gecko_taskgraph.transforms.job.common.add_tooltool(config, job, taskdesc, internal=False)ο
Give the task access to tooltool.
Enables the tooltool cache. Adds releng proxy. Configures scopes.
By default, only public tooltool access will be granted. Access to internal tooltool can be enabled via
internal=True.This can only be used with
run-tasktasks, as the cache name is reserved for use withrun-task.
- gecko_taskgraph.transforms.job.common.clone_type(config, job)ο
- gecko_taskgraph.transforms.job.common.docker_worker_add_artifacts(config, job, taskdesc)ο
Adds an artifact directory to the task
- gecko_taskgraph.transforms.job.common.generic_worker_add_artifacts(config, job, taskdesc)ο
Adds an artifact directory to the task
- gecko_taskgraph.transforms.job.common.get_cache_name(config, job)ο
- gecko_taskgraph.transforms.job.common.get_expiration(config, policy='default')ο
- gecko_taskgraph.transforms.job.common.setup_secrets(config, job, taskdesc)ο
Set up access to secrets via taskcluster-proxy. The value of run[βsecretsβ] should be a boolean or a list of secret names that can be accessed.
- gecko_taskgraph.transforms.job.common.support_vcs_checkout(config, job, taskdesc, repo_configs)ο
Update a job/task with parameters to enable a VCS checkout.
This can only be used with
run-tasktasks, as the cache name is reserved forrun-tasktasks.
gecko_taskgraph.transforms.job.distro_package moduleο
Support for running spidermonkey jobs via dedicated scripts
- class gecko_taskgraph.transforms.job.distro_package.CommonSchema(*, dsc: SourceDefinition | None = None, tarball: SourceDefinition | None = None, name: str | None = None, patch: str | None = None, pre_build_command: str | None = None, arch: str | None = None, packages: list[str] | None = None, resolver: Literal['apt-get', 'aptitude'] | None = None, workdir: str)ο
Bases:
Schema- arch: str | Noneο
- dsc: SourceDefinition | Noneο
- name: str | Noneο
- packages: list[str] | Noneο
- patch: str | Noneο
- pre_build_command: str | Noneο
- resolver: Literal['apt-get', 'aptitude'] | Noneο
- tarball: SourceDefinition | Noneο
- workdir: strο
- class gecko_taskgraph.transforms.job.distro_package.DebianSchema(*, dsc: SourceDefinition | None = None, tarball: SourceDefinition | None = None, name: str | None = None, patch: str | None = None, pre_build_command: str | None = None, arch: str | None = None, packages: list[str] | None = None, resolver: Literal['apt-get', 'aptitude'] | None = None, workdir: str, using: Literal['debian-package'], dist: str)ο
Bases:
CommonSchema- dist: strο
- using: Literal['debian-package']ο
- class gecko_taskgraph.transforms.job.distro_package.SourceDefinition(*, url: str, sha256: str)ο
Bases:
Schema- sha256: strο
- url: strο
- class gecko_taskgraph.transforms.job.distro_package.UbuntuSchema(*, dsc: SourceDefinition | None = None, tarball: SourceDefinition | None = None, name: str | None = None, patch: str | None = None, pre_build_command: str | None = None, arch: str | None = None, packages: list[str] | None = None, resolver: Literal['apt-get', 'aptitude'] | None = None, workdir: str, using: Literal['ubuntu-package'], dist: str)ο
Bases:
CommonSchema- dist: strο
- using: Literal['ubuntu-package']ο
- gecko_taskgraph.transforms.job.distro_package.common_package(config, job, taskdesc, distro, version)ο
- gecko_taskgraph.transforms.job.distro_package.docker_worker_debian_package(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.distro_package.docker_worker_ubuntu_package(config, job, taskdesc)ο
gecko_taskgraph.transforms.job.hazard moduleο
Support for running hazard jobs via dedicated scripts
- class gecko_taskgraph.transforms.job.hazard.HazRunSchema(*, using: Literal['hazard'], command: str, mozconfig: str | None = None, secrets: bool | list[str] | None = None, clone_with: Literal['hg', 'git'] | None = 'git', workdir: str | None = None)ο
Bases:
Schema- clone_with: Literal['hg', 'git'] | Noneο
- command: strο
- mozconfig: str | Noneο
- secrets: bool | list[str] | Noneο
- using: Literal['hazard']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.hazard.docker_worker_hazard(config, job, taskdesc)ο
gecko_taskgraph.transforms.job.mach moduleο
Support for running mach tasks (via run-task)
- class gecko_taskgraph.transforms.job.mach.MachSchema(*, using: Literal['mach'], mach: str | TaskRefTypeSchema, sparse_profile: str | None = None, comm_checkout: bool, prepend_env: dict[str, str] | None = None, workdir: str | None = None, use_caches: bool | list[str] | None = None, clone_with: Literal['hg', 'git'] | None = 'git')ο
Bases:
Schema- clone_with: Literal['hg', 'git'] | Noneο
- comm_checkout: boolο
- mach: str | TaskRefTypeSchemaο
- sparse_profile: str | Noneο
- use_caches: bool | list[str] | Noneο
- using: Literal['mach']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.mach.configure_mach(config, job, taskdesc)ο
gecko_taskgraph.transforms.job.mozharness moduleο
Support for running jobs via mozharness. Ideally, most stuff gets run this way, and certainly anything using mozharness should use this approach.
- class gecko_taskgraph.transforms.job.mozharness.MozharnessRunSchema(*, using: Literal['mozharness'], script: str, config_paths: list[str] | None = None, config: list[str], actions: list[str] | None = None, options: list[str] | None = None, custom_build_variant_cfg: str | None = None, extra_config: dict | None = None, tooltool_downloads: bool | Literal['public', 'internal'], secrets: bool | list[str], taskcluster_proxy: bool, keep_artifacts: bool, job_script: str | None = None, requires_signed_builds: bool, use_caches: bool | list[str] | None = None, clone_with: Literal['hg', 'git'] | None = 'git', sparse_profile: str | None = None, use_simple_package: bool, use_magic_mh_args: bool, comm_checkout: bool, workdir: str | None = None, run_as_root: bool | None = None)ο
Bases:
Schema- actions: list[str] | Noneο
- clone_with: Literal['hg', 'git'] | Noneο
- comm_checkout: boolο
- config: list[str]ο
- config_paths: list[str] | Noneο
- custom_build_variant_cfg: str | Noneο
- job_script: str | Noneο
- keep_artifacts: boolο
- options: list[str] | Noneο
- requires_signed_builds: boolο
- run_as_root: bool | Noneο
- script: strο
- secrets: bool | list[str]ο
- sparse_profile: str | Noneο
- taskcluster_proxy: boolο
- tooltool_downloads: bool | Literal['public', 'internal']ο
- use_caches: bool | list[str] | Noneο
- use_magic_mh_args: boolο
- use_simple_package: boolο
- using: Literal['mozharness']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.mozharness.mozharness_on_docker_worker_setup(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.mozharness.mozharness_on_generic_worker(config, job, taskdesc)ο
gecko_taskgraph.transforms.job.mozharness_test moduleο
- class gecko_taskgraph.transforms.job.mozharness_test.MozharnessTestRunSchema(*, using: Literal['mozharness-test'], test: MozharnessTestSchema, workdir: str | None = None, clone_with: Literal['hg', 'git'] | None = 'git')ο
Bases:
Schema- clone_with: Literal['hg', 'git'] | Noneο
- test: MozharnessTestSchemaο
- using: Literal['mozharness-test']ο
- workdir: str | Noneο
- class gecko_taskgraph.transforms.job.mozharness_test.MozharnessTestSchema(*, test_platform: str, mozharness: ~gecko_taskgraph.transforms.test.MozharnessSchema, docker_image: ~typing.Annotated[~typing.Any, <taskgraph.util.schema.OptionallyKeyedBy object at 0x7f367f4852b0>], loopback_video: bool, loopback_audio: bool, max_run_time: ~typing.Annotated[~typing.Any, <taskgraph.util.schema.OptionallyKeyedBy object at 0x7f367f4857c0>], retry_exit_status: list[int] | None = None)ο
Bases:
Schema- docker_image: OptionallyKeyedBy object at 0x7f367f4852b0>]ο
- loopback_audio: boolο
- loopback_video: boolο
- max_run_time: OptionallyKeyedBy object at 0x7f367f4857c0>]ο
- mozharness: MozharnessSchemaο
- retry_exit_status: list[int] | Noneο
- test_platform: strο
- gecko_taskgraph.transforms.job.mozharness_test.get_variant(test_platform)ο
- gecko_taskgraph.transforms.job.mozharness_test.installer_url(taskdesc)ο
- gecko_taskgraph.transforms.job.mozharness_test.mozharness_test_on_docker(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.mozharness_test.mozharness_test_on_generic_worker(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.mozharness_test.test_packages_url(taskdesc)ο
Account for different platforms that name their test packages differently
gecko_taskgraph.transforms.job.python_test moduleο
Support for running mach python-test tasks (via run-task)
- class gecko_taskgraph.transforms.job.python_test.PythonTestSchema(*, using: Literal['python-test'], subsuite: str, workdir: str | None = None, use_caches: bool | list[str] | None = None, prepend_env: dict[str, str] | None = None, clone_with: Literal['hg', 'git'] | None = 'git')ο
Bases:
Schema- clone_with: Literal['hg', 'git'] | Noneο
- subsuite: strο
- use_caches: bool | list[str] | Noneο
- using: Literal['python-test']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.python_test.configure_python_test(config, job, taskdesc)ο
gecko_taskgraph.transforms.job.run_task moduleο
Support for running jobs that are invoked via the run-task script.
- class gecko_taskgraph.transforms.job.run_task.RunTaskSchema(*, using: Literal['run-task'], use_caches: bool | list[str] | None = None, checkout: bool = True, cwd: str | None = None, sparse_profile: str | None = None, sparse_profile_prefix: str | None = None, shallow_clone: bool | None = None, clone_with: Literal['hg', 'git'] | None = 'git', comm_checkout: bool = False, command: list[str | TaskRefTypeSchema] | str | TaskRefTypeSchema, workdir: str | None = None, tooltool_downloads: bool | Literal['public', 'internal'] = False, run_as_root: bool | None = None)ο
Bases:
Schema- checkout: boolο
- clone_with: Literal['hg', 'git'] | Noneο
- comm_checkout: boolο
- command: list[str | TaskRefTypeSchema] | str | TaskRefTypeSchemaο
- cwd: str | Noneο
- run_as_root: bool | Noneο
- shallow_clone: bool | Noneο
- sparse_profile: str | Noneο
- sparse_profile_prefix: str | Noneο
- tooltool_downloads: bool | Literal['public', 'internal']ο
- use_caches: bool | list[str] | Noneο
- using: Literal['run-task']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.run_task.common_setup(config, job, taskdesc, command)ο
- gecko_taskgraph.transforms.job.run_task.docker_worker_run_task(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.run_task.generic_worker_run_task(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.run_task.psutil_platforms(job)ο
- gecko_taskgraph.transforms.job.run_task.script_url(config, script)ο
gecko_taskgraph.transforms.job.spidermonkey moduleο
Support for running spidermonkey jobs via dedicated scripts
- class gecko_taskgraph.transforms.job.spidermonkey.SmRunSchema(*, using: Literal['spidermonkey', 'spidermonkey-package'], spidermonkey_variant: str, spidermonkey_platform: str | None = None, workdir: str | None = None, tooltool_downloads: bool | Literal['public', 'internal'], clone_with: Literal['hg', 'git'] | None = 'git')ο
Bases:
Schema- clone_with: Literal['hg', 'git'] | Noneο
- spidermonkey_platform: str | Noneο
- spidermonkey_variant: strο
- tooltool_downloads: bool | Literal['public', 'internal']ο
- using: Literal['spidermonkey', 'spidermonkey-package']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.spidermonkey.docker_worker_spidermonkey(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.spidermonkey.generic_worker_spidermonkey(config, job, taskdesc)ο
gecko_taskgraph.transforms.job.toolchain moduleο
Support for running toolchain-building jobs via dedicated scripts
- class gecko_taskgraph.transforms.job.toolchain.ToolchainRunSchema(*, using: ~typing.Literal['toolchain-script'], script: str, arguments: list[str] | None = None, tooltool_downloads: bool | ~typing.Literal['public', 'internal'], sparse_profile: str | None, sparse_profile_prefix: str | None = None, resources: list[str] | None = None, toolchain_artifact: str, toolchain_alias: ~typing.Annotated[~typing.Any, <taskgraph.util.schema.OptionallyKeyedBy object at 0x7f368088ef30>] | None = None, toolchain_env: dict[str, object] | None = None, toolchain_extract: bool | None = None, clone_with: ~typing.Literal['hg', 'git'] | None = 'git', workdir: str | None = None)ο
Bases:
Schema- arguments: list[str] | Noneο
- clone_with: Literal['hg', 'git'] | Noneο
- resources: list[str] | Noneο
- script: strο
- sparse_profile: str | Noneο
- sparse_profile_prefix: str | Noneο
- toolchain_alias: OptionallyKeyedBy object at 0x7f368088ef30>] | Noneο
- toolchain_artifact: strο
- toolchain_extract: bool | Noneο
- tooltool_downloads: bool | Literal['public', 'internal']ο
- using: Literal['toolchain-script']ο
- workdir: str | Noneο
- gecko_taskgraph.transforms.job.toolchain.common_toolchain(config, job, taskdesc, is_docker)ο
- gecko_taskgraph.transforms.job.toolchain.docker_worker_toolchain(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.toolchain.generic_worker_toolchain(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.toolchain.get_digest_data(config, run, taskdesc, fetches)ο
Module contentsο
Convert a job description into a task description.
Jobs descriptions are similar to task descriptions, but they specify how to run the job at a higher level, using a βrunβ field that can be interpreted by run-using handlers in taskcluster/gecko_taskgraph/transforms/job.
- class gecko_taskgraph.transforms.job.FetchArtifactSchema(*, artifact: str, dest: str | None = None, extract: bool | None = None, verify_hash: bool | None = None)ο
Bases:
Schema- artifact: strο
- dest: str | Noneο
- extract: bool | Noneο
- verify_hash: bool | Noneο
- class gecko_taskgraph.transforms.job.JobDescriptionSchema(*, name: str | None = None, label: str | None = None, description: str, attributes: dict[str, object] | None=None, task_from: str | None = None, dependencies: dict[str, object] | None=None, if_dependencies: list[str] | None = None, soft_dependencies: list[str] | None = None, requires: Literal['all-completed', 'all-resolved'] | None=None, expires_after: str | None = None, expiration_policy: str | None = None, routes: list[str] | None = None, scopes: list[str] | None = None, tags: dict[str, str] | None=None, extra: dict[str, object] | None=None, treeherder: TreeherderSchema | None = None, index: IndexSchema | None = None, run_on_repo_type: list[~typing.Literal['git', 'hg']] | None=None, run_on_projects: Any, <taskgraph.util.schema.OptionallyKeyedBy object at 0x7f3679733f50>] | None=None, run_on_git_branches: list[str] | None = None, shipping_phase: Literal['build', 'promote', 'push', 'ship'] | None=None, shipping_product: str | None = None, always_target: bool | None = None, optimization: OptimizationSchema | None = None, use_sccache: bool | None = None, use_python: Literal['system', 'default'] | str | None=None, use_uv: bool | None = None, priority: Any, <taskgraph.util.schema.OptionallyKeyedBy object at 0x7f3679730260>] | None=None, when: WhenSchema | None = None, fetches: dict[str, list[str | ~gecko_taskgraph.transforms.job.FetchArtifactSchema]] | None=None, run: JobRunSchema, worker_type: str | None, worker: dict | None = None)ο
Bases:
Schema- always_target: bool | Noneο
- description: strο
- expiration_policy: str | Noneο
- expires_after: str | Noneο
- fetches: dict[str, list[str | FetchArtifactSchema]] | Noneο
- if_dependencies: list[str] | Noneο
- index: IndexSchema | Noneο
- label: str | Noneο
- name: str | Noneο
- optimization: OptimizationSchema | Noneο
- priority: OptionallyKeyedBy object at 0x7f3679730260>] | Noneο
- requires: Literal['all-completed', 'all-resolved'] | Noneο
- routes: list[str] | Noneο
- run: JobRunSchemaο
- run_on_git_branches: list[str] | Noneο
- run_on_projects: OptionallyKeyedBy object at 0x7f3679733f50>] | Noneο
- run_on_repo_type: list[Literal['git', 'hg']] | Noneο
- scopes: list[str] | Noneο
- shipping_phase: Literal['build', 'promote', 'push', 'ship'] | Noneο
- shipping_product: str | Noneο
- soft_dependencies: list[str] | Noneο
- task_from: str | Noneο
- treeherder: TreeherderSchema | Noneο
- use_python: Literal['system', 'default'] | str | Noneο
- use_sccache: bool | Noneο
- use_uv: bool | Noneο
- when: WhenSchema | Noneο
- worker_type: str | Noneο
- class gecko_taskgraph.transforms.job.JobRunSchema(*, using: str, workdir: str | None = None)ο
Bases:
Schema- using: strο
- workdir: str | Noneο
- class gecko_taskgraph.transforms.job.WhenSchema(*, files_changed: list[str] | None = None)ο
Bases:
Schema- files_changed: list[str] | Noneο
- gecko_taskgraph.transforms.job.add_perfherder_fetch_content_artifact(config, jobs)ο
- gecko_taskgraph.transforms.job.always_optimized(config, job, taskdesc)ο
- gecko_taskgraph.transforms.job.configure_taskdesc_for_run(config, job, taskdesc, worker_implementation)ο
Run the appropriate function for this job against the given task description.
This will raise an appropriate error if no function exists, or if the jobβs run is not valid according to the schema.
- gecko_taskgraph.transforms.job.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.
- gecko_taskgraph.transforms.job.get_platform(job)ο
- gecko_taskgraph.transforms.job.make_task_description(config, jobs)ο
Given a build description, create a task description
- gecko_taskgraph.transforms.job.run_job_using(worker_implementation, run_using, schema=None, defaults={})ο
Register the decorated function as able to set up a task description for jobs with the given worker implementation and run.using property. If schema is given, the jobβs run field will be verified to match it.
The decorated function should have the signature using_foo(config, job, taskdesc) and should modify the task description in-place. The skeleton of the task description is already set up, but without a payload.
- gecko_taskgraph.transforms.job.set_implementation(config, jobs)ο
- gecko_taskgraph.transforms.job.set_label(config, jobs)ο
- gecko_taskgraph.transforms.job.use_fetches(config, jobs)ο
- gecko_taskgraph.transforms.job.use_system_python(config, jobs)ο
- gecko_taskgraph.transforms.job.use_uv(config, jobs)ο