platforms

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.

mozci.platforms.build_tests_per_platform_graph(builders)

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

mozci.platforms.determine_upstream_builder(buildername)

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.

mozci.platforms.filter_buildernames(include, exclude, buildernames)

Return every buildername that contains the words in include and not the words in exclude.

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

Return a list of buildernames matching the criteria.

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

mozci.platforms.get_associated_platform_name(buildername)

Given a buildername, find the platform in which it is ran.

mozci.platforms.get_downstream_jobs(upstream_job)

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

mozci.platforms.is_downstream(buildername)

Determine if a job requires files to be triggered.

mozci.platforms.load_relations()

Loads the upstream to downstream.