This module helps us connect builds to tests.

mozci.platforms.build_talos_buildernames_for_repo(repo_name, pgo_only=False)

This function aims to generate all possible talos jobs for a given branch.

Here we take the list of talos buildernames for a given branch. When we want pgo, we build a list of pgo buildernames, then find the non-pgo builders which do not have a pgo equivalent. To do this, we hack the buildernames in a temporary set by removing ‘ pgo’ from the name, then finding the unique jobs in the talos_re jobs. Now we can take the pgo jobs and jobs with no pgo equivalent and have a full set of pgo jobs.


Return a graph mapping platforms to tests that run in it.


Given a builder name, find the build job that triggered it.

When buildername corresponds to a test job it determines the triggering build job through allthethings.json. When a buildername corresponds to a build job, it returns it unchanged.

Raises MozciError if no matching build job is found.

mozci.platforms.filter_buildernames(buildernames, include=[], exclude=[])

Return every builder matching the words in include and not in exclude.

mozci.platforms.find_buildernames(repo, suite_name=None, platform=None, job_type='opt')

Return a list of buildernames matching the criteria.

1) if the developer provides suite_name, repo and platform and job_type return only the specific buildername 2) if the developer provides suite_name and platform only, then return the suite_name for all platforms 3) if the developer provides platform and repo, then return all the suite_name for that platform


Return metadata associated to a buildername.

Returns a dictionary with the following information:
  • build_type - It returns ‘opt’ or ‘debug’
  • downstream - If the job requires an upstream job to be triggered
  • job_type - It returns ‘build’, ‘test’ or ‘talos’
  • platform_name - It associates upstream & downstream builders (e.g. win32)
  • product - e.g. firefox
  • repo_name - Associated short name for a repository (e.g. alder)
  • suite_name - talos & test jobs have an associated suite name (e.g chromez)

Return all test jobs that are downstream from a build job.


Determine if a job requires a build job to have triggered.


Determine if a job triggered by any other.

mozci.platforms.list_builders(repo_name=None, filter=True)

Return a list of all builders running in the buildbot CI.


Loads upstream to downstream mapping.