taskgraph.util package

Submodules

taskgraph.util.attributes module

taskgraph.util.attributes.attrmatch(attributes, **kwargs)

Determine whether the given set of task attributes matches. The conditions are given as keyword arguments, where each keyword names an attribute. The keyword value can be a literal, a set, or a callable. A literal must match the attribute exactly. Given a set, the attribute value must be in the set. A callable is called with the attribute value. If an attribute is specified as a keyword argument but not present in the attributes, the result is False.

taskgraph.util.attributes.copy_attributes_from_dependent_job(dep_job)
taskgraph.util.attributes.keymatch(attributes, target)

Determine if any keys in attributes are a match to target, then return a list of matching values. First exact matches will be checked. Failing that, regex matches and finally a default key.

taskgraph.util.attributes.match_run_on_hg_branches(hg_branch, run_on_hg_branches)

Determine whether the given project is included in the run-on-hg-branches parameter. Allows ‘all’.

taskgraph.util.attributes.match_run_on_projects(project, run_on_projects)

Determine whether the given project is included in the run-on-projects parameter, applying expansions for things like “integration” mentioned in the attribute documentation.

taskgraph.util.attributes.sorted_unique_list(*args)

Join one or more lists, and return a sorted list of unique members

taskgraph.util.cached_tasks module

taskgraph.util.cached_tasks.add_optimization(config, taskdesc, cache_type, cache_name, digest=None, digest_data=None)

Allow the results of this task to be cached. This adds index routes to the task so it can be looked up for future runs, and optimization hints so that cached artifacts can be found. Exactly one of digest and digest_data must be passed.

Parameters:
  • config (TransformConfig) – The configuration for the kind being transformed.
  • taskdesc (dict) – The description of the current task.
  • cache_type (str) – The type of task result being cached.
  • cache_name (str) – The name of the object being cached.
  • digest (bytes or None) – A unique string indentifying this version of the artifacts being generated. Typically this will be the hash of inputs to the task.
  • digest_data (list of bytes or None) – A list of bytes representing the inputs of this task. They will be concatenated and hashed to create the digest for this task.

taskgraph.util.docker module

class taskgraph.util.docker.HashingWriter(writer)

Bases: object

A file object with write capabilities that hashes the written data at the same time it passes down to a real file object.

hexdigest()
write(buf)
class taskgraph.util.docker.VoidWriter

Bases: object

A file object with write capabilities that does nothing with the written data.

write(buf)
taskgraph.util.docker.create_context_tar(topsrcdir, context_dir, out_path, prefix, args=None)

Create a context tarball.

A directory context_dir containing a Dockerfile will be assembled into a gzipped tar file at out_path. Files inside the archive will be prefixed by directory prefix.

We also scan the source Dockerfile for special syntax that influences context generation.

If a line in the Dockerfile has the form # %include <path>, the relative path specified on that line will be matched against files in the source repository and added to the context under the path topsrcdir/. If an entry is a directory, we add all files under that directory.

If a line in the Dockerfile has the form # %ARG <name>, occurrences of the string $<name> in subsequent lines are replaced with the value found in the args argument. Exception: this doesn’t apply to VOLUME definitions.

Returns the SHA-256 hex digest of the created archive.

taskgraph.util.docker.docker_image(name, by_tag=False)

Resolve in-tree prebuilt docker image to <registry>/<repository>@sha256:<digest>, or <registry>/<repository>:<tag> if by_tag is True.

taskgraph.util.docker.docker_url(path, **kwargs)
taskgraph.util.docker.generate_context_hash(topsrcdir, image_path, image_name, args=None)

Generates a sha256 hash for context directory used to build an image.

taskgraph.util.docker.image_path(name)
taskgraph.util.docker.image_paths

Return a map of image name to paths containing their Dockerfile.

taskgraph.util.docker.parse_volumes

Parse VOLUME entries from a Dockerfile for an image.

taskgraph.util.docker.post_to_docker(tar, api_path, **kwargs)

POSTs a tar file to a given docker API path.

The tar argument can be anything that can be passed to requests.post() as data (e.g. iterator or file object). The extra keyword arguments are passed as arguments to the docker API.

taskgraph.util.docker.stream_context_tar(topsrcdir, context_dir, out_file, prefix, args=None)

Like create_context_tar, but streams the tar file to the out_file file object.

taskgraph.util.hash module

taskgraph.util.hash.hash_path

Hash a single file.

Returns the SHA-256 hash in hex form.

taskgraph.util.hash.hash_paths(base_path, patterns)

Give a list of path patterns, return a digest of the contents of all the corresponding files, similarly to git tree objects or mercurial manifests.

Each file is hashed. The list of all hashes and file paths is then itself hashed to produce the result.

taskgraph.util.hg module

taskgraph.util.hg.calculate_head_rev(root)
taskgraph.util.hg.find_hg_revision_push_info(repository, revision)

Given the parameters for this action and a revision, find the pushlog_id of the revision.

taskgraph.util.hg.get_hg_revision_branch(root, revision)

Given the parameters for a revision, find the hg_branch (aka relbranch) of the revision.

taskgraph.util.parameterization module

taskgraph.util.parameterization.resolve_task_references(label, task_def, dependencies)

Resolve all instances of {‘task-reference’: ‘..<..>..’} in the given task definition, using the given dependencies

taskgraph.util.parameterization.resolve_timestamps(now, task_def)

Resolve all instances of {‘relative-datestamp’: ‘..’} in the given task definition

taskgraph.util.partials module

taskgraph.util.partials.find_localtest(fileUrls)
taskgraph.util.partials.get_balrog_platform_name(platform)

Convert build platform names into balrog platform names

taskgraph.util.partials.get_builds(release_history, platform, locale)

Examine cached balrog release history and return the list of builds we need to generate diffs from

taskgraph.util.partials.get_partials_artifact_map(release_history, platform, locale)
taskgraph.util.partials.get_partials_artifacts(release_history, platform, locale)
taskgraph.util.partials.get_release_builds(release, branch)
taskgraph.util.partials.get_sorted_releases(product, branch)

Returns a list of release names from Balrog. :param product: product name, AKA appName :param branch: branch name, e.g. mozilla-central :return: a sorted list of release names, most recent first.

taskgraph.util.partials.populate_release_history(product, branch, maxbuilds=4, maxsearch=10, partial_updates=None)

taskgraph.util.partners module

taskgraph.util.partners.EMEFREE_BRANCHES = {u'birch': u'release', u'jamun': u'release', u'maple': u'release', u'mozilla-beta': u'release', u'mozilla-release': u'release'}

LOGIN_QUERY, MANIFEST_QUERY, and REPACK_CFG_QUERY are all written to the Github v4 API, which users GraphQL. See https://developer.github.com/v4/

taskgraph.util.partners.check_if_partners_enabled(config, tasks)
taskgraph.util.partners.check_login(token)
taskgraph.util.partners.fix_partner_config(orig_config)
taskgraph.util.partners.get_ftp_platform(platform)
taskgraph.util.partners.get_partner_config_by_kind(config, kind)

Retrieve partner data starting from the manifest url, which points to a repository containing a default.xml that is intended to be drive the Google tool ‘repo’. It descends into each partner repo to lookup and parse the repack.cfg file(s).

Supports caching data by kind to avoid repeated requests, relying on the related kinds for partner repacking, signing, repackage, repackage signing all having the same kind prefix.

taskgraph.util.partners.get_partner_config_by_url(manifest_url, kind, token, partner_subset=None)

Retrieve partner data starting from the manifest url, which points to a repository containing a default.xml that is intended to be drive the Google tool ‘repo’. It descends into each partner repo to lookup and parse the repack.cfg file(s).

If partner_subset is a list of sub_config names only return data for those.

Supports caching data by kind to avoid repeated requests, relying on the related kinds for partner repacking, signing, repackage, repackage signing all having the same kind prefix.

taskgraph.util.partners.get_partner_url_config(parameters, graph_config, enable_emefree=True, enable_partners=True)
taskgraph.util.partners.get_partners(manifestRepo, token)

Given the url to a manifest repository, retieve the default.xml and parse it into a list of parter repos.

taskgraph.util.partners.get_repack_configs(repackRepo, token)

For a partner repository, retrieve all the repack.cfg files and parse them into a dict

taskgraph.util.partners.get_repo_params(repo)

Parse the organisation and repo name from an https or git url for a repo

taskgraph.util.partners.get_token(params)

We use a Personal Access Token from Github to lookup partner config. No extra scopes are needed on the token to read public repositories, but need the ‘repo’ scope to see private repositories. This is not fine grained and also grants r/w access, but is revoked at the repo level.

taskgraph.util.partners.locales_per_build_platform(build_platform, locales)
taskgraph.util.partners.parse_config(data)
Parse a single repack.cfg file into a python dictionary.
data is contents of the file, in “foo=bar
baz=buzz” style. We do some translation on
locales and platforms data, otherewise passthrough
taskgraph.util.partners.query_api(query, token)

Make a query with a Github auth header, returning the json

taskgraph.util.perfile module

taskgraph.util.perfile.perfile_number_of_chunks

taskgraph.util.platforms module

taskgraph.util.platforms.archive_format(build_platform)

Given a build platform, return the archive format used on the platform.

taskgraph.util.platforms.executable_extension(build_platform)

Given a build platform, return the executable extension used on the platform.

taskgraph.util.platforms.platform_family(build_platform)

Given a build platform, return the platform family (linux, macosx, etc.)

taskgraph.util.python_path module

taskgraph.util.python_path.find_object(path)

Find a Python object given a path of the form <modulepath>:<objectpath>. Conceptually equivalent to

def find_object(modulepath, objectpath):
import <modulepath> as mod return mod.<objectpath>

taskgraph.util.schema module

class taskgraph.util.schema.Schema(*args, **kwargs)

Bases: voluptuous.schema_builder.Schema

Operates identically to voluptuous.Schema, but applying some taskgraph-specific checks in the process.

extend(*args, **kwargs)

Create a new Schema by merging this and the provided schema.

Neither this Schema nor the provided schema are modified. The resulting Schema inherits the required and extra parameters of this, unless overridden.

Both schemas must be dictionary-based.

Parameters:
  • schema – dictionary to extend this Schema with
  • required – if set, overrides required of this Schema
  • extra – if set, overrides extra of this Schema
taskgraph.util.schema.check_schema(schema)
taskgraph.util.schema.optionally_keyed_by(*arguments)

Mark a schema value as optionally keyed by any of a number of fields. The schema is the last argument, and the remaining fields are taken to be the field names. For example:

‘some-value’: optionally_keyed_by(
‘test-platform’, ‘build-platform’, Any(‘a’, ‘b’, ‘c’))

The resulting schema will allow nesting of by-test-platform and by-build-platform in either order.

taskgraph.util.schema.resolve_keyed_by(item, field, item_name, **extra_values)

For values which can either accept a literal value, or be keyed by some other attribute of the item, perform that lookup and replacement in-place (modifying item directly). The field is specified using dotted notation to traverse dictionaries.

For example, given item:

job:
    test-platform: linux128
    chunks:
        by-test-platform:
            macosx-10.11/debug: 13
            win.*: 6
            default: 12

a call to resolve_keyed_by(item, ‘job.chunks’, item[‘thing-name’]) would mutate item in-place to:

job:
    chunks: 12

The item_name parameter is used to generate useful error messages.

If extra_values are supplied, they represent additional values available for reference from by-<field>.

Items can be nested as deeply as the schema will allow:

chunks:
    by-test-platform:
        win.*:
            by-project:
                ash: ..
                cedar: ..
        linux: 13
        default: 12
taskgraph.util.schema.validate_schema(schema, obj, msg_prefix)

Validate that object satisfies schema. If not, generate a useful exception beginning with msg_prefix.

taskgraph.util.scriptworker module

Make scriptworker.cot.verify more user friendly by making scopes dynamic.

Scriptworker uses certain scopes to determine which sets of credentials to use. Certain scopes are restricted by branch in chain of trust verification, and are checked again at the script level. This file provides functions to adjust these scopes automatically by project; this makes pushing to try, forking a project branch, and merge day uplifts more user friendly.

In the future, we may adjust scopes by other settings as well, e.g. different scopes for push-to-candidates rather than push-to-releases, even if both happen on mozilla-beta and mozilla-release.

Additional configuration is found in the graph config.

taskgraph.util.scriptworker.BALROG_ACTIONS = (u'submit-locale', u'submit-toplevel', u'schedule')

Map balrog scope aliases to sets of projects.

This is a list of list-pairs, for ordering.

taskgraph.util.scriptworker.BALROG_SCOPE_ALIAS_TO_PROJECT = [[u'nightly', set([u'comm-central', u'mozilla-central'])], [u'beta', set([u'comm-beta', u'mozilla-beta'])], [u'release', set([u'mozilla-release'])], [u'esr60', set([u'comm-esr60', u'mozilla-esr60'])], [u'esr', set([u'mozilla-esr52'])]]

Map the balrog scope aliases to the actual scopes.

taskgraph.util.scriptworker.BEETMOVER_ACTION_SCOPES = {u'default': u'beetmover:action:push-to-candidates', u'nightly': u'beetmover:action:push-to-nightly'}

Known balrog actions.

taskgraph.util.scriptworker.BEETMOVER_BUCKET_SCOPES = {u'all-nightly-branches': u'beetmover:bucket:nightly', u'all-release-branches': u'beetmover:bucket:release', u'default': u'beetmover:bucket:dep'}

Map the beetmover tasks aliases to the actual action scopes.

taskgraph.util.scriptworker.BEETMOVER_SCOPE_ALIAS_TO_PROJECT = [[u'all-nightly-branches', set([u'comm-central', u'mozilla-central'])], [u'all-release-branches', set([u'comm-esr60', u'mozilla-esr60', u'mozilla-release', u'comm-beta', u'mozilla-beta'])]]

Map the beetmover scope aliases to the actual scopes.

taskgraph.util.scriptworker.DEVEDITION_SIGNING_CERT_SCOPES = {u'beta': u'signing:cert:nightly-signing', u'default': u'signing:cert:dep-signing'}

Map beetmover scope aliases to sets of projects.

taskgraph.util.scriptworker.PUSH_APK_SCOPES = {u'beta': u'googleplay:beta', u'central': u'googleplay:aurora', u'default': u'googleplay:dep', u'release': u'googleplay:release'}

The list of the release promotion phases which we send notifications for

taskgraph.util.scriptworker.SIGNING_SCOPE_ALIAS_TO_PROJECT = [[u'all-nightly-branches', set([u'comm-central', u'mozilla-central'])], [u'all-release-branches', set([u'comm-esr60', u'mozilla-esr60', u'mozilla-release', u'comm-beta', u'mozilla-beta'])]]

Map the signing scope aliases to the actual scopes.

taskgraph.util.scriptworker.add_scope_prefix(config, scope)

Prepends the scriptworker scope prefix from the graph config.

Parameters:
  • config (TransformConfig) – The configuration for the kind being transformed.
  • scope (string) – The suffix of the scope
Returns:

the scope to use.

Return type:

string

taskgraph.util.scriptworker.generate_beetmover_artifact_map(config, job, **kwargs)

Generate the beetmover artifact map.

Currently only applies to beetmover tasks.

Parameters:
  • () (config) – Current taskgraph configuration.
  • job (dict) – The current job being generated
Common kwargs:
platform (str): The current build platform locale (str): The current locale being beetmoved.
Returns:
A list of dictionaries containing source->destination
maps for beetmover.
Return type:list
taskgraph.util.scriptworker.generate_beetmover_compressed_upstream_artifacts(job, dependencies=None)

Generate compressed file upstream artifacts for beetmover.

These artifacts will not be beetmoved directly, but will be decompressed from upstream_mapping and the contents beetmoved using the mapping entry in the artifact map.

Currently only applies to beetmover tasks.

Parameters:
  • job (dict) – The current job being generated
  • dependencies (list) – A list of the job’s dependency labels.
Returns:

A list of dictionaries conforming to the upstream_artifacts spec.

Return type:

list

taskgraph.util.scriptworker.generate_beetmover_upstream_artifacts(job, platform, locale=None, dependencies=None)

Generate the upstream artifacts for beetmover, using the artifact map.

Currently only applies to beetmover tasks.

Parameters:
  • job (dict) – The current job being generated
  • dependencies (list) – A list of the job’s dependency labels.
  • platform (str) – The current build platform
  • locale (str) – The current locale being beetmoved.
Returns:

A list of dictionaries conforming to the upstream_artifacts spec.

Return type:

list

taskgraph.util.scriptworker.get_autograph_format_scope(config)
taskgraph.util.scriptworker.get_balrog_action_scope(config, **kwargs)
taskgraph.util.scriptworker.get_phase_from_target_method(config, alias_to_tasks_map, alias_to_phase_map)

Determine the phase from config.params[‘target_tasks_method’].

Parameters:
  • config (TransformConfig) – The configuration for the kind being transformed.
  • alias_to_tasks_map (list of lists) – each list pair contains the alias and the set of target methods that match. This is ordered.
  • alias_to_phase_map (dict) – the alias to phase map
Returns:

the phase to use.

Return type:

string

taskgraph.util.scriptworker.get_release_config(config)

Get the build number and version for a release task.

Currently only applies to beetmover tasks.

Parameters:config (TransformConfig) – The configuration for the kind being transformed.
Returns:
containing both build_number and version. This can be used to
update task.payload.
Return type:dict
taskgraph.util.scriptworker.get_scope_from_project(config, **kwargs)

Determine the restricted scope from config.params[‘project’].

Parameters:
  • config (TransformConfig) – The configuration for the kind being transformed.
  • alias_to_project_map (list of lists) – each list pair contains the alias and the set of projects that match. This is ordered.
  • alias_to_scope_map (dict) – the alias alias to scope
Returns:

the scope to use.

Return type:

string

taskgraph.util.scriptworker.get_scope_from_release_type(config, **kwargs)

Determine the restricted scope from config.params[‘target_tasks_method’].

Parameters:
  • config (TransformConfig) – The configuration for the kind being transformed.
  • release_type_to_scope_map (dict) – the maps release types to scopes
Returns:

the scope to use.

Return type:

string

taskgraph.util.scriptworker.get_signing_cert_scope_per_platform(build_platform, is_nightly, config)
taskgraph.util.scriptworker.get_worker_type_for_scope(config, scope)

Get the scriptworker type that will accept the given scope.

Parameters:
  • config (TransformConfig) – The configuration for the kind being transformed.
  • scope (string) – The scope being used.
Returns:

The worker-type to use.

Return type:

string

taskgraph.util.scriptworker.should_use_artifact_map(platform, project)

Return True if this task uses the beetmover artifact map.

This function exists solely for the beetmover artifact map migration.

taskgraph.util.scriptworker.with_scope_prefix(f)

Wraps a function, calling add_scope_prefix() on the result of calling the wrapped function.

Parameters:f (callable) – A function that takes a config and some keyword arguments, and returns a scope suffix.
Returns:the wrapped function
Return type:callable

taskgraph.util.seta module

class taskgraph.util.seta.SETA

Bases: object

Interface to the SETA service, which defines low-value tasks that can be optimized out of the taskgraph.

is_low_value_task(label, project, pushlog_id, push_date)
minutes_between_pushes(project, cur_push_id, cur_push_date)
query_low_value_tasks(project)

taskgraph.util.signed_artifacts module

Defines artifacts to sign before repackage.

taskgraph.util.signed_artifacts.generate_specifications_of_artifacts_to_sign(task, keep_locale_template=True, kind=None)
taskgraph.util.signed_artifacts.get_signed_artifacts(input, formats)

Get the list of signed artifacts for the given input and formats.

taskgraph.util.signed_artifacts.is_partner_kind(kind)

taskgraph.util.taskcluster module

taskgraph.util.taskcluster.cancel_task(task_id, use_proxy=False)

Cancels a task given a task_id. In testing mode, just logs that it would have cancelled.

taskgraph.util.taskcluster.find_task_id(index_path, use_proxy=False)
taskgraph.util.taskcluster.get_artifact(task_id, path, use_proxy=False)

Returns the artifact with the given path for the given task id.

If the path ends with “.json” or “.yml”, the content is deserialized as, respectively, json or yaml, and the corresponding python data (usually dict) is returned. For other types of content, a file-like object is returned.

taskgraph.util.taskcluster.get_artifact_from_index(index_path, artifact_path, use_proxy=False)
taskgraph.util.taskcluster.get_artifact_path(task, path)
taskgraph.util.taskcluster.get_artifact_prefix(task)
taskgraph.util.taskcluster.get_artifact_url(task_id, path, use_proxy=False)
taskgraph.util.taskcluster.get_current_scopes()

Get the current scopes. This only makes sense in a task with the Taskcluster proxy enabled, where it returns the actual scopes accorded to the task.

taskgraph.util.taskcluster.get_index_url(index_path, use_proxy=False, multiple=False)
taskgraph.util.taskcluster.get_purge_cache_url(provisioner_id, worker_type, use_proxy=False)
taskgraph.util.taskcluster.get_session
taskgraph.util.taskcluster.get_task_definition(task_id, use_proxy=False)
taskgraph.util.taskcluster.get_task_url(task_id, use_proxy=False)
taskgraph.util.taskcluster.get_taskcluster_artifact_prefix(task, task_id, postfix=u'', locale=None, force_private=False)
taskgraph.util.taskcluster.list_artifacts(task_id, use_proxy=False)
taskgraph.util.taskcluster.list_tasks(index_path, use_proxy=False)

Returns a list of task_ids where each task_id is indexed under a path in the index. Results are sorted by expiration date from oldest to newest.

taskgraph.util.taskcluster.parse_time(timestamp)

Turn a “JSON timestamp” as used in TC APIs into a datetime

taskgraph.util.taskcluster.purge_cache(provisioner_id, worker_type, cache_name, use_proxy=False)

Requests a cache purge from the purge-caches service.

taskgraph.util.taskcluster.rerun_task(task_id)

Reruns a task given a task_id. In testing mode, just logs that it would have reran.

taskgraph.util.taskcluster.send_email(address, subject, content, link, use_proxy=False)

Sends an email using the notify service

taskgraph.util.taskcluster.status_task(task_id, use_proxy=False)

Gets the status of a task given a task_id. In testing mode, just logs that it would have retrieved status.

taskgraph.util.templates module

taskgraph.util.templates.merge(*objects)

Merge the given objects, using the semantics described for merge_to, with objects later in the list taking precedence. From an inheritance perspective, “parents” should be listed before “children”.

Returns the result without modifying any arguments.

taskgraph.util.templates.merge_to(source, dest)

Merge dict and arrays (override scalar values)

Keys from source override keys from dest, and elements from lists in source are appended to lists in dest.

Parameters:
  • source (dict) – to copy from
  • dest (dict) – to copy to (modified in place)

taskgraph.util.time module

exception taskgraph.util.time.InvalidString

Bases: exceptions.Exception

exception taskgraph.util.time.UnknownTimeMeasurement

Bases: exceptions.Exception

taskgraph.util.time.current_json_time(datetime_format=False)
Parameters:datetime_format (boolean) – Set True to get a datetime output
Returns:JSON string representation of the current time.
taskgraph.util.time.days(value)
taskgraph.util.time.hours(value)
taskgraph.util.time.json_time_from_now(input_str, now=None, datetime_format=False)
Parameters:
  • input_str (str) – Input string (see value of)
  • now (datetime) – Optionally set the definition of now
  • datetime_format (boolean) – Set True to get a datetime output
Returns:

JSON string representation of time in future.

taskgraph.util.time.minutes(value)
taskgraph.util.time.months(value)
taskgraph.util.time.seconds(value)
taskgraph.util.time.value_of(input_str)

Convert a string to a json date in the future :param str input_str: (ex: 1d, 2d, 6years, 2 seconds) :returns: Unit given in seconds

taskgraph.util.time.years(value)

taskgraph.util.treeherder module

taskgraph.util.treeherder.add_suffix(treeherder_symbol, chunk)

Add a suffix to a treeherder symbol that may contain a group.

taskgraph.util.treeherder.join_symbol(group, symbol)

Perform the reverse of split_symbol, combining the given group and symbol. If the group is ‘?’, then it is omitted.

taskgraph.util.treeherder.split_symbol(treeherder_symbol)

Split a symbol expressed as grp(sym) into its two parts. If no group is given, the returned group is ‘?’

taskgraph.util.verify module

class taskgraph.util.verify.VerificationSequence(verifications=NOTHING)

Bases: object

Container for a sequence of verifications over a TaskGraph. Each verification is represented as a callable taking (task, taskgraph, scratch_pad), called for each task in the taskgraph, and one more time with no task but with the taskgraph and the same scratch_pad that was passed for each task.

add(graph_name)
taskgraph.util.verify.verify_always_optimized(task, taskgraph, scratch_pad, graph_config)

This function ensures that always-optimized tasks have been optimized.

taskgraph.util.verify.verify_dependency_tiers(task, taskgraph, scratch_pad, graph_config)
taskgraph.util.verify.verify_docs(filename, identifiers, appearing_as)
taskgraph.util.verify.verify_required_signoffs(task, taskgraph, scratch_pad, graph_config)

Task with required signoffs can’t be dependencies of tasks with less required signoffs.

taskgraph.util.verify.verify_routes_notification_filters(task, taskgraph, scratch_pad, graph_config)

This function ensures that only understood filters for notifications are specified.

See: https://docs.taskcluster.net/reference/core/taskcluster-notify/docs/usage

taskgraph.util.verify.verify_task_graph_symbol(task, taskgraph, scratch_pad, graph_config)

This function verifies that tuple (collection.keys(), machine.platform, groupSymbol, symbol) is unique for a target task graph.

taskgraph.util.verify.verify_trust_domain_v2_routes(task, taskgraph, scratch_pad, graph_config)

This function ensures that any two tasks have distinct index.{trust-domain}.v2 routes.

taskgraph.util.workertypes module

taskgraph.util.workertypes.worker_type_implementation(worker_type)

Get the worker implementation and OS for the given workerType, where the OS represents the host system, not the target OS, in the case of cross-compiles.

taskgraph.util.yaml module

taskgraph.util.yaml.load_yaml(path, name, enforce_order=False)

Convenience function to load a YAML file in the given path. This is useful for loading kind configuration files from the kind path. If enforce_order is given, then any top-level keys in the file must be given in order.

Module contents