taskgraph.transforms package

Submodules

taskgraph.transforms.balrog_submit module

taskgraph.transforms.balrog_toplevel module

Transform the beetmover task into an actual task description.

taskgraph.transforms.balrog_toplevel.generate_update_line(config, jobs)

Resolve fields that can be keyed by platform, etc.

taskgraph.transforms.base module

class taskgraph.transforms.base.TransformConfig(kind, path: str, config: dict, params: taskgraph.parameters.Parameters, kind_dependencies_tasks, graph_config: taskgraph.config.GraphConfig, write_artifacts: bool)

Bases: object

A container for configuration affecting transforms. The config argument to transforms is an instance of this class.

class taskgraph.transforms.base.TransformSequence(transforms=NOTHING)

Bases: object

Container for a sequence of transforms. Each transform is represented as a callable taking (config, items) and returning a generator which will yield transformed items. The resulting sequence has the same interface.

This is convenient to use in a file full of transforms, as it provides a decorator, @transforms.add, that will add the decorated function to the sequence.

add(func)
add_validate(schema)
class taskgraph.transforms.base.ValidateSchema(schema: taskgraph.util.schema.Schema)

Bases: object

taskgraph.transforms.beetmover module

taskgraph.transforms.beetmover_checksums module

taskgraph.transforms.beetmover_emefree_checksums module

taskgraph.transforms.beetmover_geckoview module

taskgraph.transforms.beetmover_langpack_checksums module

taskgraph.transforms.beetmover_push_to_release module

taskgraph.transforms.beetmover_repackage module

taskgraph.transforms.beetmover_repackage_l10n module

Transform the signing task into an actual task description.

taskgraph.transforms.beetmover_repackage_l10n.make_beetmover_description(config, jobs)

taskgraph.transforms.beetmover_repackage_partner module

taskgraph.transforms.beetmover_snap module

Transform the snap beetmover kind into an actual task description.

taskgraph.transforms.beetmover_snap.leave_snap_repackage_dependencies_only(config, jobs)
taskgraph.transforms.beetmover_snap.set_custom_treeherder_job_name(config, jobs)

taskgraph.transforms.beetmover_source module

Transform the beetmover-source task to also append build as dependency

taskgraph.transforms.beetmover_source.remove_build_dependency_in_beetmover_source(config, jobs)

taskgraph.transforms.beetmover_source_checksums module

taskgraph.transforms.bouncer_aliases module

taskgraph.transforms.bouncer_check module

taskgraph.transforms.bouncer_check.add_command(config, jobs)
taskgraph.transforms.bouncer_check.add_previous_versions(config, jobs)
taskgraph.transforms.bouncer_check.command_to_string(config, jobs)

Convert command to string to make it work properly with run-task

taskgraph.transforms.bouncer_check.handle_keyed_by(config, jobs)

Resolve fields that can be keyed by project, etc.

taskgraph.transforms.bouncer_locations module

taskgraph.transforms.bouncer_locations.make_task_worker(config, jobs)

taskgraph.transforms.bouncer_submission module

taskgraph.transforms.bouncer_submission_partners module

taskgraph.transforms.build module

Apply some defaults and minor modifications to the jobs defined in the build kind.

taskgraph.transforms.build.enable_full_crashsymbols(config, jobs)

Enable full crashsymbols on jobs with ‘enable-full-crashsymbols’ set to True and on release branches, or on try

taskgraph.transforms.build.mozconfig(config, jobs)
taskgraph.transforms.build.resolve_keys(config, jobs)
taskgraph.transforms.build.resolve_shipping_product(config, jobs)
taskgraph.transforms.build.set_defaults(config, jobs)

Set defaults, including those that differ per worker implementation

taskgraph.transforms.build.stub_installer(config, jobs)
taskgraph.transforms.build.update_channel(config, jobs)
taskgraph.transforms.build.use_artifact(config, jobs)
taskgraph.transforms.build.use_profile_data(config, jobs)

taskgraph.transforms.build_attrs module

taskgraph.transforms.build_attrs.set_build_attributes(config, jobs)

Set the build_platform and build_type attributes based on the job name. Although not all jobs using this transform are actual “builds”, the try option syntax treats them as such, and this arranges the attributes appropriately for that purpose.

taskgraph.transforms.build_attrs.set_schedules_optimization(config, jobs)

Set the skip-unless-affected optimization based on the build platform.

taskgraph.transforms.build_fat_aar module

taskgraph.transforms.build_fat_aar.set_fetches_and_locations(config, jobs)

Set defaults, including those that differ per worker implementation

taskgraph.transforms.build_lints module

Apply some defaults and minor modifications to the jobs defined in the build kind.

taskgraph.transforms.build_lints.check_mozharness_perfherder_options(config, jobs)

Verify that multiple jobs don’t use the same perfherder bucket.

Build jobs record perfherder metrics by default. Perfherder metrics go to a bucket derived by the platform by default. The name can further be customized by the presence of “extra options” either defined in mozharness sub-configs or in an environment variable.

This linter tries to verify that no 2 jobs will send Perfherder metrics to the same bucket by looking for jobs not defining extra options when their platform or mozharness config are otherwise similar.

taskgraph.transforms.build_signing module

Transform the signing task into an actual task description.

taskgraph.transforms.build_signing.add_signed_routes(config, jobs)

Add routes corresponding to the routes of the build task this corresponds to, with .signed inserted, for all gecko.v2 routes

taskgraph.transforms.build_signing.define_upstream_artifacts(config, jobs)

taskgraph.transforms.cached_tasks module

taskgraph.transforms.cached_tasks.cache_task(config, tasks)
taskgraph.transforms.cached_tasks.format_task_digest(cached_task)
taskgraph.transforms.cached_tasks.order_tasks(config, tasks)

Iterate image tasks in an order where parent tasks come first.

taskgraph.transforms.chunk_partners module

Chunk the partner repack tasks by subpartner and locale

taskgraph.transforms.chunk_partners.chunk_partners(config, jobs)

taskgraph.transforms.code_review module

Add soft dependencies and configuration to code-review tasks.

taskgraph.transforms.code_review.add_dependencies(config, jobs)
taskgraph.transforms.code_review.add_phabricator_config(config, jobs)

taskgraph.transforms.copy_attributes_from_dependent_task module

Transform the repackage task into an actual task description.

taskgraph.transforms.copy_attributes_from_dependent_task.copy_attributes(config, jobs)

taskgraph.transforms.diffoscope module

taskgraph.transforms.docker_image module

taskgraph.transforms.fetch module

class taskgraph.transforms.fetch.FetchBuilder(schema: taskgraph.util.schema.Schema, builder)

Bases: object

taskgraph.transforms.fetch.configure_fetch(config, typ, name, fetch)
taskgraph.transforms.fetch.create_chromium_fetch_task(config, name, fetch)
taskgraph.transforms.fetch.create_fetch_url_task(config, name, fetch)
taskgraph.transforms.fetch.create_git_fetch_task(config, name, fetch)
taskgraph.transforms.fetch.fetch_builder(name, schema)
taskgraph.transforms.fetch.make_task(config, jobs)
taskgraph.transforms.fetch.process_fetch_job(config, jobs)

taskgraph.transforms.final_verify module

Transform the beetmover task into an actual task description.

taskgraph.transforms.final_verify.add_command(config, tasks)

taskgraph.transforms.geckodriver_signing module

taskgraph.transforms.github_sync module

taskgraph.transforms.github_sync.sync_github(config, tasks)

Do transforms specific to github-sync tasks.

taskgraph.transforms.iris module

Take the base iris task definition and generate all of the actual test chunks for all combinations of test categories and test platforms.

taskgraph.transforms.iris.add_notify_email(config, tasks)
taskgraph.transforms.iris.fill_email_data(config, tasks)
taskgraph.transforms.iris.make_iris_tasks(config, jobs)

taskgraph.transforms.l10n module

taskgraph.transforms.mac_notarization_poller module

Transform the mac notarization poller task into an actual task description.

taskgraph.transforms.mac_notarization_poller.make_task_description(config, jobs)

taskgraph.transforms.mar_signing module

Transform the {partials,mar}-signing task into an actual task description.

taskgraph.transforms.mar_signing.generate_complete_artifacts(job, kind)
taskgraph.transforms.mar_signing.generate_partials_artifacts(job, release_history, platform, locale=None)
taskgraph.transforms.mar_signing.make_task_description(config, jobs)

taskgraph.transforms.maybe_release module

taskgraph.transforms.maybe_release.make_task_description(config, jobs)

taskgraph.transforms.merge_automation module

Transform the update generation task into an actual task description.

taskgraph.transforms.merge_automation.add_payload_config(config, tasks)
taskgraph.transforms.merge_automation.handle_keyed_by(config, tasks)

Resolve fields that can be keyed by platform, etc.

taskgraph.transforms.merge_automation.update_labels(config, tasks)

taskgraph.transforms.name_sanity module

Generate labels for tasks without names, consistently. Uses attributes from primary-dependency.

taskgraph.transforms.name_sanity.make_label(config, jobs)

Generate a sane label for a new task constructed from a dependency Using attributes from the dependent job and the current task kind

taskgraph.transforms.openh264 module

This transform is used to help populate mozharness options for openh264 jobs

taskgraph.transforms.openh264.set_mh_options(config, jobs)

This transform sets the ‘openh264_rev’ attribute.

taskgraph.transforms.openh264_signing module

taskgraph.transforms.partials module

Transform the partials task into an actual task description.

taskgraph.transforms.partials.identify_desired_signing_keys(project, product)
taskgraph.transforms.partials.make_task_description(config, jobs)

taskgraph.transforms.partner_attribution module

Transform the partner attribution task into an actual task description.

taskgraph.transforms.partner_attribution.add_command_arguments(config, tasks)

taskgraph.transforms.partner_attribution_beetmover module

taskgraph.transforms.partner_repack module

Transform the partner repack task into an actual task description.

taskgraph.transforms.partner_repack.add_command_arguments(config, tasks)
taskgraph.transforms.partner_repack.make_label(config, tasks)
taskgraph.transforms.partner_repack.populate_repack_manifests_url(config, tasks)
taskgraph.transforms.partner_repack.skip_unnecessary_platforms(config, tasks)

taskgraph.transforms.partner_signing module

Transform the signing task into an actual task description.

taskgraph.transforms.partner_signing.define_upstream_artifacts(config, jobs)
taskgraph.transforms.partner_signing.set_mac_label(config, jobs)

taskgraph.transforms.per_platform_dummy module

Transform the repackage task into an actual task description.

taskgraph.transforms.per_platform_dummy.one_task_per_product_and_platform(config, jobs)

taskgraph.transforms.perftest module

This transform passes options from mach perftest to the corresponding task.

taskgraph.transforms.perftest.handle_keyed_by_perftest(config, jobs)
taskgraph.transforms.perftest.parse_perftest_metrics(config, jobs)

Parse the metrics into a dictionary immediately.

This way we can modify the extraOptions field (and others) entry through the transforms that come later. The metrics aren’t formatted until the end of the transforms.

taskgraph.transforms.perftest.pass_perftest_options(config, jobs)
taskgraph.transforms.perftest.setup_http3_tests(config, jobs)
taskgraph.transforms.perftest.setup_perftest_browsertime_variants(config, jobs)
taskgraph.transforms.perftest.setup_perftest_extra_options(config, jobs)
taskgraph.transforms.perftest.setup_perftest_metrics(config, jobs)
taskgraph.transforms.perftest.setup_perftest_test_date(config, jobs)
taskgraph.transforms.perftest.split_btime_variants(config, jobs)
taskgraph.transforms.perftest.split_perftest_variants(config, jobs)
taskgraph.transforms.perftest.split_tests(config, jobs)

taskgraph.transforms.python_update module

Transform the repo-update task into an actual task description.

taskgraph.transforms.python_update.resolve_keys(config, tasks)

taskgraph.transforms.raptor module

taskgraph.transforms.raptor.add_extra_options(config, tests)
taskgraph.transforms.raptor.apply_tier_optimization(config, tests)
taskgraph.transforms.raptor.handle_keyed_by(config, tests)
taskgraph.transforms.raptor.handle_keyed_by_prereqs(config, tests)

Only resolve keys for prerequisite fields here since the these keyed-by options might have keyed-by fields as well.

taskgraph.transforms.raptor.set_defaults(config, tests)
taskgraph.transforms.raptor.split_apps(config, tests)
taskgraph.transforms.raptor.split_page_load_by_url(config, tests)
taskgraph.transforms.raptor.split_pageload(config, tests)
taskgraph.transforms.raptor.split_raptor_subtests(config, tests)

taskgraph.transforms.release module

Transforms for release tasks

taskgraph.transforms.release.run_on_releases(config, jobs)

Filter out jobs with run-on-releases set, and that don’t match the release_type paramater.

taskgraph.transforms.release_beetmover_signed_addons module

taskgraph.transforms.release_deps module

Add dependencies to release tasks.

taskgraph.transforms.release_deps.add_dependencies(config, jobs)

taskgraph.transforms.release_flatpak_push module

taskgraph.transforms.release_flatpak_repackage module

taskgraph.transforms.release_flatpak_repackage.format(config, tasks)

Apply format substitution to worker.env and worker.command.

taskgraph.transforms.release_generate_checksums module

Transform the checksums task into an actual task description.

taskgraph.transforms.release_generate_checksums.handle_keyed_by(config, jobs)

Resolve fields that can be keyed by project, etc.

taskgraph.transforms.release_generate_checksums.interpolate(config, jobs)

taskgraph.transforms.release_generate_checksums_beetmover module

taskgraph.transforms.release_generate_checksums_signing module

taskgraph.transforms.release_mark_as_shipped module

taskgraph.transforms.release_mark_as_shipped.make_task_description(config, jobs)

taskgraph.transforms.release_notifications module

Add notifications via taskcluster-notify for release tasks

class taskgraph.transforms.release_notifications.TitleCaseFormatter

Bases: string.Formatter

Support title formatter for strings

convert_field(value, conversion)
taskgraph.transforms.release_notifications.add_notifications(config, jobs)

taskgraph.transforms.release_sign_and_push_langpacks module

taskgraph.transforms.release_snap_push module

taskgraph.transforms.release_snap_repackage module

taskgraph.transforms.release_snap_repackage.format(config, tasks)

Apply format substitution to worker.env and worker.command.

taskgraph.transforms.release_started module

Add notifications via taskcluster-notify for release tasks

taskgraph.transforms.release_started.add_notifications(config, jobs)

taskgraph.transforms.release_version_bump module

Transform the update generation task into an actual task description.

taskgraph.transforms.release_version_bump.handle_keyed_by(config, tasks)

Resolve fields that can be keyed by platform, etc.

taskgraph.transforms.repackage module

taskgraph.transforms.repackage_l10n module

Transform the repackage task into an actual task description.

taskgraph.transforms.repackage_l10n.split_locales(config, jobs)

taskgraph.transforms.repackage_partner module

taskgraph.transforms.repackage_routes module

Add indexes to repackage kinds

taskgraph.transforms.repackage_routes.add_indexes(config, jobs)

taskgraph.transforms.repackage_signing module

taskgraph.transforms.repackage_signing_partner module

taskgraph.transforms.repo_update module

Transform the repo-update task into an actual task description.

taskgraph.transforms.repo_update.resolve_keys(config, tasks)

taskgraph.transforms.reverse_chunk_deps module

Adjust dependencies to not exceed MAX_DEPENDENCIES

taskgraph.transforms.reverse_chunk_deps.add_dependencies(config, jobs)
taskgraph.transforms.reverse_chunk_deps.yield_job(orig_job, deps, count)

taskgraph.transforms.run_pgo_profile module

Apply some defaults and minor modifications to the pgo jobs.

taskgraph.transforms.run_pgo_profile.run_profile_data(config, jobs)

taskgraph.transforms.scriptworker module

Transforms for adding appropriate scopes to scriptworker tasks.

taskgraph.transforms.scriptworker.add_balrog_scopes(config, jobs)

taskgraph.transforms.scriptworker_canary module

Build a command to run mach release push-scriptworker-canaries.

taskgraph.transforms.scriptworker_canary.build_command(config, jobs)

taskgraph.transforms.shippable_l10n_signing module

Transform the signing task into an actual task description.

taskgraph.transforms.shippable_l10n_signing.define_upstream_artifacts(config, jobs)
taskgraph.transforms.shippable_l10n_signing.make_signing_description(config, jobs)

taskgraph.transforms.signing module

taskgraph.transforms.source_checksums_signing module

taskgraph.transforms.source_test module

taskgraph.transforms.spidermonkey module

taskgraph.transforms.spidermonkey.handle_keyed_by(config, jobs)

Resolve fields that can be keyed by platform, etc.

taskgraph.transforms.strip_dependent_task module

FIXME

taskgraph.transforms.strip_dependent_task.strip_dependent_task(config, jobs)

taskgraph.transforms.task module

taskgraph.transforms.tests module

These transforms construct a task description to run the given test, based on a test description. The implementation here is shared among all test kinds, but contains specific support for how we run tests in Gecko (via mozharness, invoked in particular ways).

This is a good place to translate a test-description option such as single-core: true to the implementation of that option in a task description (worker options, mozharness commandline, environment variables, etc.)

The test description should be fully formed by the time it reaches these transforms, and these transforms should not embody any specific knowledge about what should run where. this is the wrong place for special-casing platforms, for example - use all_tests.py instead.

taskgraph.transforms.tests.DYNAMIC_CHUNK_DURATION = 1200

The approximate time each test chunk should take to run.

taskgraph.transforms.tests.DYNAMIC_CHUNK_MULTIPLIER = {'^(?!android).*-xpcshell.*': 0.2}

A multiplication factor to tweak the total duration per platform / suite.

taskgraph.transforms.tests.adjust_mobile_e10s(config, tasks)
taskgraph.transforms.tests.allow_software_gl_layers(config, tasks)

Handle the “allow-software-gl-layers” property for platforms where it applies.

taskgraph.transforms.tests.disable_try_only_platforms(config, tasks)

Turns off platforms that should only run on try.

taskgraph.transforms.tests.disable_wpt_timeouts_on_autoland(config, tasks)

do not run web-platform-tests that are expected TIMEOUT on autoland

taskgraph.transforms.tests.enable_code_coverage(config, tasks)

Enable code coverage for the ccov build-platforms

taskgraph.transforms.tests.enable_webrender(config, tasks)

Handle the “webrender” property by passing a flag to mozharness if it is enabled.

taskgraph.transforms.tests.ensure_spi_disabled_on_all_but_spi(config, tasks)
taskgraph.transforms.tests.fission_filter(task)
taskgraph.transforms.tests.get_firefox_version()
taskgraph.transforms.tests.get_mobile_project(task)

Returns the mobile project of the specified task or None.

taskgraph.transforms.tests.gv_e10s_filter(task)
taskgraph.transforms.tests.handle_artifact_prefix(config, tasks)

Handle translating artifact_prefix appropriately

taskgraph.transforms.tests.handle_fission_attributes(config, tasks)

Handle run_on_projects for fission tasks.

taskgraph.transforms.tests.handle_keyed_by(config, tasks)

Resolve fields that can be keyed by platform, etc.

taskgraph.transforms.tests.handle_keyed_by_mozharness(config, tasks)

Resolve a mozharness field if it is keyed by something

taskgraph.transforms.tests.handle_keyed_by_variant(config, tasks)

Resolve fields that can be keyed by platform, etc.

taskgraph.transforms.tests.handle_run_on_projects(config, tasks)

Handle translating built-projects appropriately

taskgraph.transforms.tests.handle_suite_category(config, tasks)
taskgraph.transforms.tests.limit_platforms(config, tasks)
taskgraph.transforms.tests.make_job_description(config, tasks)

Convert test descriptions to job descriptions (input to taskgraph.transforms.job)

taskgraph.transforms.tests.normpath(path)
taskgraph.transforms.tests.resolve_dynamic_chunks(config, tasks)

Determine how many chunks are needed to handle the given set of manifests.

taskgraph.transforms.tests.resolve_keys(config, tasks)
taskgraph.transforms.tests.runs_on_central(task)
taskgraph.transforms.tests.set_defaults(config, tasks)
taskgraph.transforms.tests.set_download_symbols(config, tasks)

In general, we download symbols immediately for debug builds, but only on demand for everything else. ASAN builds shouldn’t download symbols since they don’t product symbol zips see bug 1283879

taskgraph.transforms.tests.set_profile(config, tasks)

Set profiling mode for tests.

taskgraph.transforms.tests.set_retry_exit_status(config, tasks)

Set the retry exit status to TBPL_RETRY, the value returned by mozharness scripts to indicate a transient failure that should be retried.

taskgraph.transforms.tests.set_schedules_components(config, tasks)
taskgraph.transforms.tests.set_schedules_for_webrender_android(config, tasks)

android-hw has limited resources, we need webrender on phones

taskgraph.transforms.tests.set_tag(config, tasks)

Set test for a specific tag.

taskgraph.transforms.tests.set_target(config, tasks)
taskgraph.transforms.tests.set_test_manifests(config, tasks)

Determine the set of test manifests that should run in this task.

taskgraph.transforms.tests.set_test_type(config, tasks)
taskgraph.transforms.tests.set_test_verify_chunks(config, tasks)

Set the number of chunks we use for test-verify.

taskgraph.transforms.tests.set_tier(config, tasks)

Set the tier based on policy for all test descriptions that do not specify a tier otherwise.

taskgraph.transforms.tests.set_treeherder_machine_platform(config, tasks)

Set the appropriate task.extra.treeherder.machine.platform

taskgraph.transforms.tests.set_worker_type(config, tasks)

Set the worker type based on the test platform.

taskgraph.transforms.tests.setup_browsertime(config, tasks)

Configure browsertime dependencies for Raptor pageload tests that have –browsertime extra option.

taskgraph.transforms.tests.setup_browsertime_flag(config, tasks)

Optionally add –browsertime flag to Raptor pageload tests.

taskgraph.transforms.tests.setup_raptor(config, tasks)

Add options that are specific to raptor jobs (identified by suite=raptor)

taskgraph.transforms.tests.setup_talos(config, tasks)

Add options that are specific to talos jobs (identified by suite=talos)

taskgraph.transforms.tests.split_chunks(config, tasks)

Based on the ‘chunks’ key, split tests up into chunks by duplicating them and assigning ‘this-chunk’ appropriately and updating the treeherder symbol.

taskgraph.transforms.tests.split_e10s(config, tasks)
taskgraph.transforms.tests.split_variants(config, tasks)

taskgraph.transforms.try_job module

taskgraph.transforms.try_job.set_job_try_name(config, jobs)

For a task which is governed by -j in try syntax, set the job_try_name attribute based on the job name.

taskgraph.transforms.update_verify module

Transform the beetmover task into an actual task description.

taskgraph.transforms.update_verify.add_command(config, tasks)

taskgraph.transforms.update_verify_config module

taskgraph.transforms.upload_generated_sources module

Transform the upload-generated-files task description template, taskcluster/ci/upload-generated-sources/kind.yml, into an actual task description.

taskgraph.transforms.upload_generated_sources.add_task_info(config, jobs)

taskgraph.transforms.upload_symbols module

Transform the upload-symbols task description template, taskcluster/ci/upload-symbols/job-template.yml into an actual task description.

taskgraph.transforms.upload_symbols.check_nightlies(config, tasks)

Ensure that we upload symbols for all shippable builds, so that crash-stats can resolve any reports sent to it. Try may enable full symbols but not upload them.

Putting this check here (instead of the transforms for the build kind) lets us leverage the any not-for-build-platforms set in the update-symbols kind.

taskgraph.transforms.upload_symbols.fill_template(config, tasks)

taskgraph.transforms.upstream_artifact_task module

Find upstream artifact task.

taskgraph.transforms.upstream_artifact_task.find_upstream_artifact_task(config, jobs)

taskgraph.transforms.visual_metrics module

These transformations take a task description for a visual metrics task and add the necessary environment variables to run on the given inputs.

taskgraph.transforms.visual_metrics.set_visual_metrics_jobs(config, jobs)

Set the visual metrics configuration for the given jobs.

taskgraph.transforms.visual_metrics_dep module

These transformations take a task description for a visual metrics task and add the necessary environment variables to run on the given inputs.

taskgraph.transforms.visual_metrics_dep.run_visual_metrics(config, jobs)

Module contents