1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 from datetime
import datetime
, timedelta
12 from redo
import retry
13 from taskgraph
.parameters
import Parameters
14 from taskgraph
.target_tasks
import _target_task
, get_method
15 from taskgraph
.util
.taskcluster
import find_task_id
17 from gecko_taskgraph
import GECKO
, try_option_syntax
18 from gecko_taskgraph
.util
.attributes
import (
19 match_run_on_hg_branches
,
20 match_run_on_projects
,
22 from gecko_taskgraph
.util
.hg
import find_hg_revision_push_info
, get_hg_commit_message
23 from gecko_taskgraph
.util
.platforms
import platform_family
25 logger
= logging
.getLogger(__name__
)
28 # Some tasks show up in the target task set, but are possibly special cases,
29 # uncommon tasks, or tasks running against limited hardware set that they
30 # should only be selectable with --full.
31 UNCOMMON_TRY_TASK_LABELS
= [
32 # Platforms and/or Build types
33 r
"build-.*-gcp", # Bug 1631990
34 r
"mingwclang", # Bug 1631990
35 r
"valgrind", # Bug 1631990
37 r
"android-geckoview-docs",
40 r
"windows10-64-ref-hw",
41 r
"windows10-aarch64-qr",
43 r
"linux-", # hide all linux32 tasks by default - bug 1599197
44 r
"linux1804-32", # hide linux32 tests - bug 1599197
46 r
"web-platform-tests.*backlog", # hide wpt jobs that are not implemented yet - bug 1572820
48 r
"-profiling-", # talos/raptor profiling jobs are run too often
49 r
"-32-.*-webgpu", # webgpu gets little benefit from these tests.
52 # Hide shippable versions of tests we have opt versions of because the non-shippable
53 # versions are faster to run. This is mostly perf tests.
54 r
"-shippable(?!.*(awsy|browsertime|marionette-headless|mochitest-devtools-chrome-fis|raptor|talos|web-platform-tests-wdspec-headless|mochitest-plain-headless))", # noqa - too long
55 r
"nightly-simulation",
59 def index_exists(index_path
, reason
=""):
60 print(f
"Looking for existing index {index_path} {reason}...")
62 task_id
= find_task_id(index_path
)
63 print(f
"Index {index_path} exists: taskId {task_id}")
66 print(f
"Index {index_path} doesn't exist.")
70 def filter_out_shipping_phase(task
, parameters
):
72 # nightly still here because of geckodriver
73 not task
.attributes
.get("nightly")
74 and task
.attributes
.get("shipping_phase") in (None, "build")
78 def filter_out_devedition(task
, parameters
):
79 return not task
.attributes
.get("shipping_product") == "devedition"
82 def filter_out_cron(task
, parameters
):
84 Filter out tasks that run via cron.
86 return not task
.attributes
.get("cron")
89 def filter_for_project(task
, parameters
):
90 """Filter tasks by project. Optionally enable nightlies."""
91 run_on_projects
= set(task
.attributes
.get("run_on_projects", []))
92 return match_run_on_projects(parameters
["project"], run_on_projects
)
95 def filter_for_hg_branch(task
, parameters
):
96 """Filter tasks by hg branch.
97 If `run_on_hg_branch` is not defined, then task runs on all branches"""
98 run_on_hg_branches
= set(task
.attributes
.get("run_on_hg_branches", ["all"]))
99 return match_run_on_hg_branches(parameters
["hg_branch"], run_on_hg_branches
)
102 def filter_on_platforms(task
, platforms
):
103 """Filter tasks on the given platform"""
104 platform
= task
.attributes
.get("build_platform")
105 return platform
in platforms
108 def filter_by_uncommon_try_tasks(task
, optional_filters
=None):
109 """Filters tasks that should not be commonly run on try.
112 task (str): String representing the task name.
113 optional_filters (list, optional):
114 Additional filters to apply to task filtering.
117 (Boolean): True if task does not match any known filters.
120 filters
= UNCOMMON_TRY_TASK_LABELS
122 filters
= itertools
.chain(filters
, optional_filters
)
124 return not any(re
.search(pattern
, task
) for pattern
in filters
)
127 def filter_by_regex(task_label
, regexes
, mode
="include"):
128 """Filters tasks according to a list of pre-compiled reguar expressions.
130 If mode is "include", a task label must match any regex to pass.
131 If it is "exclude", a task label must _not_ match any regex to pass.
136 assert mode
in ["include", "exclude"]
138 any_match
= any(r
.search(task_label
) for r
in regexes
)
140 return mode
== "include"
141 return mode
!= "include"
144 def filter_release_tasks(task
, parameters
):
145 platform
= task
.attributes
.get("build_platform")
154 if task
.attributes
["kind"] == "l10n":
155 # This is on-change l10n
158 task
.attributes
["build_type"] == "opt"
159 and task
.attributes
.get("unittest_suite") != "talos"
160 and task
.attributes
.get("unittest_suite") != "raptor"
164 if task
.attributes
.get("shipping_phase") not in (None, "build"):
167 """ No debug on release, keep on ESR with 4 week cycles, release
168 will not be too different from central, but ESR will live for a long time.
170 From June 2019 -> June 2020, we found 1 unique regression on ESR debug
171 and 5 unique regressions on beta/release. Keeping spidermonkey and linux
172 debug finds all but 1 unique regressions (windows found on try) for beta/release.
174 ...but debug-only failures started showing up on ESR (esr-91, esr-102) so
175 desktop debug tests were added back for beta.
177 build_type
= task
.attributes
.get("build_type", "")
178 build_platform
= task
.attributes
.get("build_platform", "")
179 test_platform
= task
.attributes
.get("test_platform", "")
181 if parameters
["release_type"].startswith("esr") or (
182 parameters
["release_type"] == "beta" and "android" not in build_platform
186 # code below here is intended to reduce release debug tasks
187 if task
.kind
== "hazard" or "toolchain" in build_platform
:
188 # keep hazard and toolchain builds around
191 if build_type
== "debug":
192 if "linux" not in build_platform
:
193 # filter out windows/mac/android
195 if task
.kind
not in ["spidermonkey"] and "-qr" in test_platform
:
196 # filter out linux-qr tests, leave spidermonkey
198 if "64" not in build_platform
:
199 # filter out linux32 builds
202 # webrender-android-*-debug doesn't have attributes to find 'debug', using task.label.
203 if task
.kind
== "webrender" and "debug" in task
.label
:
208 def filter_out_missing_signoffs(task
, parameters
):
209 for signoff
in parameters
["required_signoffs"]:
210 if signoff
not in parameters
["signoff_urls"] and signoff
in task
.attributes
.get(
211 "required_signoffs", []
217 def filter_tests_without_manifests(task
, parameters
):
218 """Remove test tasks that have an empty 'test_manifests' attribute.
220 This situation can arise when the test loader (e.g bugbug) decided there
221 weren't any important manifests to run for the given push. We filter tasks
222 out here rather than in the transforms so that the full task graph is still
223 aware that the task exists (which is needed by the backfill action).
227 and "test_manifests" in task
.attributes
228 and not task
.attributes
["test_manifests"]
234 def standard_filter(task
, parameters
):
236 filter_func(task
, parameters
)
240 filter_for_hg_branch
,
241 filter_tests_without_manifests
,
246 def accept_raptor_android_build(platform
):
247 """Helper function for selecting the correct android raptor builds."""
248 if "android" not in platform
:
250 if "shippable" not in platform
:
252 if "p5" in platform
and "aarch64" in platform
:
254 if "p6" in platform
and "aarch64" in platform
:
256 if "s21" in platform
and "aarch64" in platform
:
258 if "a51" in platform
:
263 def accept_raptor_desktop_build(platform
):
264 """Helper function for selecting correct desktop raptor builds."""
265 if "android" in platform
:
267 # ignore all windows 7 perf jobs scheduled automatically
268 if "windows7" in platform
or "windows10-32" in platform
:
270 # Completely ignore all non-shippable platforms
271 if "shippable" in platform
:
276 def accept_awsy_task(try_name
, platform
):
277 if accept_raptor_desktop_build(platform
):
278 if "windows" in platform
and "windows11-64" not in platform
:
280 if "dmd" in try_name
:
282 if "awsy-base" in try_name
:
284 if "awsy-tp6" in try_name
:
289 def filter_unsupported_artifact_builds(task
, parameters
):
290 try_config
= parameters
.get("try_task_config", {})
291 if not try_config
.get("use-artifact-builds", False):
294 supports_artifact_builds
= task
.attributes
.get("supports-artifact-builds", True)
295 return supports_artifact_builds
298 def filter_out_shippable(task
):
299 return not task
.attributes
.get("shippable", False)
302 def _try_task_config(full_task_graph
, parameters
, graph_config
):
303 requested_tasks
= parameters
["try_task_config"]["tasks"]
304 pattern_tasks
= [x
for x
in requested_tasks
if x
.endswith("-*")]
305 tasks
= list(set(requested_tasks
) - set(pattern_tasks
))
308 for pattern
in pattern_tasks
:
311 for t
in full_task_graph
.graph
.nodes
312 if t
.split(pattern
.replace("*", ""))[-1].isnumeric()
315 matched_tasks
.extend(found
)
319 if "MOZHARNESS_TEST_PATHS" in parameters
["try_task_config"].get("env", {}):
320 matched_tasks
= [x
for x
in matched_tasks
if x
.endswith("-1")]
322 selected_tasks
= set(tasks
) |
set(matched_tasks
)
323 missing
.update(selected_tasks
- set(full_task_graph
.tasks
))
326 missing_str
= "\n ".join(sorted(missing
))
328 f
"The following tasks were requested but do not exist in the full task graph and will be skipped:\n {missing_str}"
330 return list(selected_tasks
- missing
)
333 def _try_option_syntax(full_task_graph
, parameters
, graph_config
):
334 """Generate a list of target tasks based on try syntax in
335 parameters['message'] and, for context, the full task graph."""
336 options
= try_option_syntax
.TryOptionSyntax(
337 parameters
, full_task_graph
, graph_config
339 target_tasks_labels
= [
341 for t
in full_task_graph
.tasks
.values()
342 if options
.task_matches(t
)
343 and filter_by_uncommon_try_tasks(t
.label
)
344 and filter_unsupported_artifact_builds(t
, parameters
)
348 k
: getattr(options
, k
)
355 for l
in target_tasks_labels
:
356 task
= full_task_graph
[l
]
357 if "unittest_suite" in task
.attributes
:
358 task
.attributes
["task_duplicates"] = options
.trigger_tests
360 for l
in target_tasks_labels
:
361 task
= full_task_graph
[l
]
362 # If the developer wants test jobs to be rebuilt N times we add that value here
363 if options
.trigger_tests
> 1 and "unittest_suite" in task
.attributes
:
364 task
.attributes
["task_duplicates"] = options
.trigger_tests
366 # If the developer wants test talos jobs to be rebuilt N times we add that value here
368 options
.talos_trigger_tests
> 1
369 and task
.attributes
.get("unittest_suite") == "talos"
371 task
.attributes
["task_duplicates"] = options
.talos_trigger_tests
373 # If the developer wants test raptor jobs to be rebuilt N times we add that value here
375 options
.raptor_trigger_tests
376 and options
.raptor_trigger_tests
> 1
377 and task
.attributes
.get("unittest_suite") == "raptor"
379 task
.attributes
["task_duplicates"] = options
.raptor_trigger_tests
381 task
.attributes
.update(attributes
)
383 # Add notifications here as well
384 if options
.notifications
:
385 for task
in full_task_graph
:
386 owner
= parameters
.get("owner")
387 routes
= task
.task
.setdefault("routes", [])
388 if options
.notifications
== "all":
389 routes
.append(f
"notify.email.{owner}.on-any")
390 elif options
.notifications
== "failure":
391 routes
.append(f
"notify.email.{owner}.on-failed")
392 routes
.append(f
"notify.email.{owner}.on-exception")
394 return target_tasks_labels
397 @_target_task("try_tasks")
398 def target_tasks_try(full_task_graph
, parameters
, graph_config
):
399 try_mode
= parameters
["try_mode"]
400 if try_mode
== "try_task_config":
401 return _try_task_config(full_task_graph
, parameters
, graph_config
)
402 if try_mode
== "try_option_syntax":
403 return _try_option_syntax(full_task_graph
, parameters
, graph_config
)
404 # With no try mode, we schedule nothing, allowing the user to add tasks
405 # later via treeherder.
409 @_target_task("try_select_tasks")
410 def target_tasks_try_select(full_task_graph
, parameters
, graph_config
):
411 tasks
= target_tasks_try_select_uncommon(full_task_graph
, parameters
, graph_config
)
412 return [l
for l
in tasks
if filter_by_uncommon_try_tasks(l
)]
415 @_target_task("try_select_tasks_uncommon")
416 def target_tasks_try_select_uncommon(full_task_graph
, parameters
, graph_config
):
417 from gecko_taskgraph
.decision
import PER_PROJECT_PARAMETERS
419 projects
= ("autoland", "mozilla-central")
420 if parameters
["project"] not in projects
:
421 projects
= (parameters
["project"],)
424 for project
in projects
:
425 params
= dict(parameters
)
426 params
["project"] = project
427 parameters
= Parameters(**params
)
430 target_tasks_method
= PER_PROJECT_PARAMETERS
[project
]["target_tasks_method"]
432 target_tasks_method
= "default"
435 get_method(target_tasks_method
)(full_task_graph
, parameters
, graph_config
)
441 @_target_task("try_auto")
442 def target_tasks_try_auto(full_task_graph
, parameters
, graph_config
):
443 """Target the tasks which have indicated they should be run on autoland
444 (rather than try) via the `run_on_projects` attributes.
446 Should do the same thing as the `default` target tasks method.
448 params
= dict(parameters
)
449 params
["project"] = "autoland"
450 parameters
= Parameters(**params
)
452 regex_filters
= parameters
["try_task_config"].get("tasks-regex")
453 include_regexes
= exclude_regexes
= []
455 include_regexes
= [re
.compile(r
) for r
in regex_filters
.get("include", [])]
456 exclude_regexes
= [re
.compile(r
) for r
in regex_filters
.get("exclude", [])]
460 for l
, t
in full_task_graph
.tasks
.items()
461 if standard_filter(t
, parameters
)
462 and filter_out_shipping_phase(t
, parameters
)
463 and filter_out_devedition(t
, parameters
)
464 and filter_by_uncommon_try_tasks(t
.label
)
465 and filter_by_regex(t
.label
, include_regexes
, mode
="include")
466 and filter_by_regex(t
.label
, exclude_regexes
, mode
="exclude")
467 and filter_unsupported_artifact_builds(t
, parameters
)
468 and filter_out_shippable(t
)
472 @_target_task("default")
473 def target_tasks_default(full_task_graph
, parameters
, graph_config
):
474 """Target the tasks which have indicated they should be run on this project
475 via the `run_on_projects` attributes."""
478 for l
, t
in full_task_graph
.tasks
.items()
479 if standard_filter(t
, parameters
)
480 and filter_out_shipping_phase(t
, parameters
)
481 and filter_out_devedition(t
, parameters
)
485 @_target_task("autoland_tasks")
486 def target_tasks_autoland(full_task_graph
, parameters
, graph_config
):
487 """In addition to doing the filtering by project that the 'default'
488 filter does, also remove any tests running against shippable builds
489 for non-backstop pushes."""
490 filtered_for_project
= target_tasks_default(
491 full_task_graph
, parameters
, graph_config
495 if task
.kind
!= "test":
498 if parameters
["backstop"]:
501 build_type
= task
.attributes
.get("build_type")
503 if not build_type
or build_type
!= "opt" or filter_out_shippable(task
):
508 return [l
for l
in filtered_for_project
if filter(full_task_graph
[l
])]
511 @_target_task("mozilla_central_tasks")
512 def target_tasks_mozilla_central(full_task_graph
, parameters
, graph_config
):
513 """In addition to doing the filtering by project that the 'default'
514 filter does, also remove any tests running against regular (aka not shippable,
515 asan, etc.) opt builds."""
516 filtered_for_project
= target_tasks_default(
517 full_task_graph
, parameters
, graph_config
521 if task
.kind
!= "test":
524 build_platform
= task
.attributes
.get("build_platform")
525 build_type
= task
.attributes
.get("build_type")
526 shippable
= task
.attributes
.get("shippable", False)
528 if not build_platform
or not build_type
:
531 family
= platform_family(build_platform
)
532 # We need to know whether this test is against a "regular" opt build
533 # (which is to say, not shippable, asan, tsan, or any other opt build
534 # with other properties). There's no positive test for this, so we have to
535 # do it somewhat hackily. Android doesn't have variants other than shippable
536 # so it is pretty straightforward to check for. Other platforms have many
537 # variants, but none of the regular opt builds we're looking for have a "-"
538 # in their platform name, so this works (for now).
540 family
== "android" and not shippable
541 ) or "-" not in build_platform
543 if build_type
!= "opt" or not is_regular_opt
:
548 return [l
for l
in filtered_for_project
if filter(full_task_graph
[l
])]
551 @_target_task("graphics_tasks")
552 def target_tasks_graphics(full_task_graph
, parameters
, graph_config
):
553 """In addition to doing the filtering by project that the 'default'
554 filter does, also remove artifact builds because we have csets on
555 the graphics branch that aren't on the candidate branches of artifact
557 filtered_for_project
= target_tasks_default(
558 full_task_graph
, parameters
, graph_config
562 if task
.attributes
["kind"] == "artifact-build":
566 return [l
for l
in filtered_for_project
if filter(full_task_graph
[l
])]
569 @_target_task("mozilla_beta_tasks")
570 def target_tasks_mozilla_beta(full_task_graph
, parameters
, graph_config
):
571 """Select the set of tasks required for a promotable beta or release build
572 of desktop, plus android CI. The candidates build process involves a pipeline
573 of builds and signing, but does not include beetmover or balrog jobs."""
577 for l
, t
in full_task_graph
.tasks
.items()
578 if filter_release_tasks(t
, parameters
) and standard_filter(t
, parameters
)
582 @_target_task("mozilla_release_tasks")
583 def target_tasks_mozilla_release(full_task_graph
, parameters
, graph_config
):
584 """Select the set of tasks required for a promotable beta or release build
585 of desktop, plus android CI. The candidates build process involves a pipeline
586 of builds and signing, but does not include beetmover or balrog jobs."""
590 for l
, t
in full_task_graph
.tasks
.items()
591 if filter_release_tasks(t
, parameters
) and standard_filter(t
, parameters
)
595 @_target_task("mozilla_esr115_tasks")
596 def target_tasks_mozilla_esr115(full_task_graph
, parameters
, graph_config
):
597 """Select the set of tasks required for a promotable beta or release build
598 of desktop, without android CI. The candidates build process involves a pipeline
599 of builds and signing, but does not include beetmover or balrog jobs."""
602 if not filter_release_tasks(task
, parameters
):
605 if not standard_filter(task
, parameters
):
608 platform
= task
.attributes
.get("build_platform")
610 # Android is not built on esr115.
611 if platform
and "android" in platform
:
616 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
619 @_target_task("promote_desktop")
620 def target_tasks_promote_desktop(full_task_graph
, parameters
, graph_config
):
621 """Select the superset of tasks required to promote a beta or release build
622 of a desktop product. This should include all non-android
623 mozilla_{beta,release} tasks, plus l10n, beetmover, balrog, etc."""
626 # Bug 1758507 - geckoview ships in the promote phase
627 if not parameters
["release_type"].startswith("esr") and is_geckoview(
632 if task
.attributes
.get("shipping_product") != parameters
["release_product"]:
635 # 'secondary' balrog/update verify/final verify tasks only run for RCs
636 if parameters
.get("release_type") != "release-rc":
637 if "secondary" in task
.kind
:
640 if not filter_out_missing_signoffs(task
, parameters
):
643 if task
.attributes
.get("shipping_phase") == "promote":
646 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
649 def is_geckoview(task
, parameters
):
651 task
.attributes
.get("shipping_product") == "fennec"
652 and task
.kind
in ("beetmover-geckoview", "upload-symbols")
653 and parameters
["release_product"] == "firefox"
657 @_target_task("push_desktop")
658 def target_tasks_push_desktop(full_task_graph
, parameters
, graph_config
):
659 """Select the set of tasks required to push a build of desktop to cdns.
660 Previous build deps will be optimized out via action task."""
661 filtered_for_candidates
= target_tasks_promote_desktop(
668 if not filter_out_missing_signoffs(task
, parameters
):
670 # Include promotion tasks; these will be optimized out
671 if task
.label
in filtered_for_candidates
:
675 task
.attributes
.get("shipping_product") == parameters
["release_product"]
676 and task
.attributes
.get("shipping_phase") == "push"
680 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
683 @_target_task("ship_desktop")
684 def target_tasks_ship_desktop(full_task_graph
, parameters
, graph_config
):
685 """Select the set of tasks required to ship desktop.
686 Previous build deps will be optimized out via action task."""
687 is_rc
= parameters
.get("release_type") == "release-rc"
689 # ship_firefox_rc runs after `promote` rather than `push`; include
691 filtered_for_candidates
= target_tasks_promote_desktop(
697 # ship_firefox runs after `push`; include all push tasks.
698 filtered_for_candidates
= target_tasks_push_desktop(
705 if not filter_out_missing_signoffs(task
, parameters
):
707 # Include promotion tasks; these will be optimized out
708 if task
.label
in filtered_for_candidates
:
712 task
.attributes
.get("shipping_product") != parameters
["release_product"]
713 or task
.attributes
.get("shipping_phase") != "ship"
717 if "secondary" in task
.kind
:
721 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
724 @_target_task("pine_tasks")
725 def target_tasks_pine(full_task_graph
, parameters
, graph_config
):
726 """Bug 1879960 - no reftests or wpt needed"""
727 filtered_for_project
= target_tasks_default(
728 full_task_graph
, parameters
, graph_config
732 suite
= task
.attributes
.get("unittest_suite", "")
733 if "reftest" in suite
or "web-platform" in suite
:
737 return [l
for l
in filtered_for_project
if filter(full_task_graph
[l
])]
740 @_target_task("larch_tasks")
741 def target_tasks_larch(full_task_graph
, parameters
, graph_config
):
742 """Bug 1879213 - only run necessary tasks on larch"""
743 filtered_for_project
= target_tasks_default(
744 full_task_graph
, parameters
, graph_config
748 # no localized builds, no android
751 or "msix" in task
.kind
752 or "android" in task
.attributes
.get("build_platform", "")
753 or (task
.kind
== "test" and "msix" in task
.label
)
756 # otherwise reduce tests only
757 if task
.kind
!= "test":
759 return "browser-chrome" in task
.label
or "xpcshell" in task
.label
761 return [l
for l
in filtered_for_project
if filter(full_task_graph
[l
])]
764 @_target_task("kaios_tasks")
765 def target_tasks_kaios(full_task_graph
, parameters
, graph_config
):
766 """The set of tasks to run for kaios integration"""
769 # We disable everything in central, and adjust downstream.
772 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
775 @_target_task("ship_geckoview")
776 def target_tasks_ship_geckoview(full_task_graph
, parameters
, graph_config
):
777 """Select the set of tasks required to ship geckoview nightly. The
778 nightly build process involves a pipeline of builds and an upload to
779 maven.mozilla.org."""
781 f
"{graph_config['trust-domain']}.v2.{parameters['project']}.revision."
782 f
"{parameters['head_rev']}.taskgraph.decision-ship-geckoview"
784 if os
.environ
.get("MOZ_AUTOMATION") and retry(
788 "reason": "to avoid triggering multiple nightlies off the same revision",
794 # XXX Starting 69, we don't ship Fennec Nightly anymore. We just want geckoview to be
796 return task
.attributes
.get("shipping_product") == "fennec" and task
.kind
in (
797 "beetmover-geckoview",
801 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
804 @_target_task("custom-car_perf_testing")
805 def target_tasks_custom_car_perf_testing(full_task_graph
, parameters
, graph_config
):
806 """Select tasks required for running daily performance tests for custom chromium-as-release."""
809 platform
= task
.attributes
.get("test_platform")
810 attributes
= task
.attributes
811 if attributes
.get("unittest_suite") != "raptor":
814 try_name
= attributes
.get("raptor_try_name")
816 # Desktop and Android selection for CaR
817 if accept_raptor_desktop_build(platform
) or accept_raptor_android_build(
820 if "browsertime" in try_name
and (
821 "custom-car" in try_name
or "cstm-car-m" in try_name
823 if "hw-s21" in platform
and "speedometer3" not in try_name
:
828 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
831 @_target_task("general_perf_testing")
832 def target_tasks_general_perf_testing(full_task_graph
, parameters
, graph_config
):
834 Select tasks required for running performance tests 3 times a week.
838 platform
= task
.attributes
.get("test_platform")
839 attributes
= task
.attributes
840 if attributes
.get("unittest_suite") != "raptor":
843 try_name
= attributes
.get("raptor_try_name")
845 if "tp6-bench" in try_name
:
848 # Bug 1867669 - Temporarily disable all live site tests
849 if "live" in try_name
and "sheriffed" not in try_name
:
853 if accept_raptor_desktop_build(platform
):
854 # Select some browsertime tasks as desktop smoke-tests
855 if "browsertime" in try_name
:
856 if "chrome" in try_name
:
857 if "tp6" in try_name
and "essential" not in try_name
:
860 if "chromium" in try_name
:
861 if "tp6" in try_name
and "essential" not in try_name
:
864 # chromium-as-release has it's own cron
865 if "custom-car" in try_name
:
867 if "-live" in try_name
:
869 if "-fis" in try_name
:
871 if "linux" in platform
:
872 if "speedometer" in try_name
:
874 if "safari" and "benchmark" in try_name
:
877 elif accept_raptor_android_build(platform
):
878 if "hw-s21" in platform
and "speedometer3" not in try_name
:
880 if "chrome-m" in try_name
and (
881 ("ebay" in try_name
and "live" not in try_name
)
884 and ("facebook" in try_name
or "dailymail" in try_name
)
888 # Ignore all fennec tests here, we run those weekly
889 if "fennec" in try_name
:
891 # Only run webrender tests
892 if "chrome-m" not in try_name
and "-qr" not in platform
:
894 # Select live site tests
895 if "-live" in try_name
:
897 # Select fenix resource usage tests
898 if "fenix" in try_name
:
899 # Bug 1816421 disable fission perf tests
900 if "-fis" in try_name
:
902 if "-power" in try_name
:
904 # Select geckoview resource usage tests
905 if "geckoview" in try_name
:
906 # Bug 1816421 disable fission perf tests
907 if "-fis" in try_name
:
909 # Run cpu+memory, and power tests
910 cpu_n_memory_task
= "-cpu" in try_name
and "-memory" in try_name
911 power_task
= "-power" in try_name
912 # Ignore cpu+memory+power tests
913 if power_task
and cpu_n_memory_task
:
915 if cpu_n_memory_task
:
918 return "browsertime" in try_name
919 # Select browsertime-specific tests
920 if "browsertime" in try_name
:
921 # Don't run android CaR sp tests as we already have a cron for this.
922 if "m-car" in try_name
:
924 if "speedometer" in try_name
:
928 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
931 def make_desktop_nightly_filter(platforms
):
932 """Returns a filter that gets all nightly tasks on the given platform."""
934 def filter(task
, parameters
):
937 filter_on_platforms(task
, platforms
),
938 filter_for_project(task
, parameters
),
939 task
.attributes
.get("shippable", False),
940 # Tests and nightly only builds don't have `shipping_product` set
941 task
.attributes
.get("shipping_product")
942 in {None, "firefox", "thunderbird"},
943 task
.kind
not in {"l10n"}, # no on-change l10n
950 @_target_task("sp-perftests")
951 def target_tasks_speedometer_tests(full_task_graph
, parameters
, graph_config
):
953 platform
= task
.attributes
.get("test_platform")
954 attributes
= task
.attributes
955 if attributes
.get("unittest_suite") != "raptor":
958 if accept_raptor_desktop_build(platform
) or accept_raptor_android_build(
961 try_name
= attributes
.get("raptor_try_name")
962 if "hw-s21" in platform
and "speedometer3" not in try_name
:
965 "browsertime" in try_name
966 and "speedometer" in try_name
967 and "chrome" in try_name
971 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
974 @_target_task("nightly_linux")
975 def target_tasks_nightly_linux(full_task_graph
, parameters
, graph_config
):
976 """Select the set of tasks required for a nightly build of linux. The
977 nightly build process involves a pipeline of builds, signing,
978 and, eventually, uploading the tasks to balrog."""
979 filter = make_desktop_nightly_filter(
980 {"linux64-shippable", "linux-shippable", "linux-aarch64-shippable"}
982 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
985 @_target_task("nightly_macosx")
986 def target_tasks_nightly_macosx(full_task_graph
, parameters
, graph_config
):
987 """Select the set of tasks required for a nightly build of macosx. The
988 nightly build process involves a pipeline of builds, signing,
989 and, eventually, uploading the tasks to balrog."""
990 filter = make_desktop_nightly_filter({"macosx64-shippable"})
991 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
994 @_target_task("nightly_win32")
995 def target_tasks_nightly_win32(full_task_graph
, parameters
, graph_config
):
996 """Select the set of tasks required for a nightly build of win32 and win64.
997 The nightly build process involves a pipeline of builds, signing,
998 and, eventually, uploading the tasks to balrog."""
999 filter = make_desktop_nightly_filter({"win32-shippable"})
1000 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
1003 @_target_task("nightly_win64")
1004 def target_tasks_nightly_win64(full_task_graph
, parameters
, graph_config
):
1005 """Select the set of tasks required for a nightly build of win32 and win64.
1006 The nightly build process involves a pipeline of builds, signing,
1007 and, eventually, uploading the tasks to balrog."""
1008 filter = make_desktop_nightly_filter({"win64-shippable"})
1009 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
1012 @_target_task("nightly_win64_aarch64")
1013 def target_tasks_nightly_win64_aarch64(full_task_graph
, parameters
, graph_config
):
1014 """Select the set of tasks required for a nightly build of win32 and win64.
1015 The nightly build process involves a pipeline of builds, signing,
1016 and, eventually, uploading the tasks to balrog."""
1017 filter = make_desktop_nightly_filter({"win64-aarch64-shippable"})
1018 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
1021 @_target_task("nightly_asan")
1022 def target_tasks_nightly_asan(full_task_graph
, parameters
, graph_config
):
1023 """Select the set of tasks required for a nightly build of asan. The
1024 nightly build process involves a pipeline of builds, signing,
1025 and, eventually, uploading the tasks to balrog."""
1026 filter = make_desktop_nightly_filter(
1027 {"linux64-asan-reporter-shippable", "win64-asan-reporter-shippable"}
1029 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
1032 @_target_task("daily_releases")
1033 def target_tasks_daily_releases(full_task_graph
, parameters
, graph_config
):
1034 """Select the set of tasks required to identify if we should release.
1035 If we determine that we should the task will communicate to ship-it to
1036 schedule the release itself."""
1039 return task
.kind
in ["maybe-release"]
1041 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1044 @_target_task("nightly_desktop")
1045 def target_tasks_nightly_desktop(full_task_graph
, parameters
, graph_config
):
1046 """Select the set of tasks required for a nightly build of linux, mac,
1049 f
"{graph_config['trust-domain']}.v2.{parameters['project']}.revision."
1050 f
"{parameters['head_rev']}.taskgraph.decision-nightly-desktop"
1052 if os
.environ
.get("MOZ_AUTOMATION") and retry(
1056 "reason": "to avoid triggering multiple nightlies off the same revision",
1061 # Tasks that aren't platform specific
1062 release_filter
= make_desktop_nightly_filter({None}
)
1064 l
for l
, t
in full_task_graph
.tasks
.items() if release_filter(t
, parameters
)
1066 # Avoid duplicate tasks.
1068 set(target_tasks_nightly_win32(full_task_graph
, parameters
, graph_config
))
1069 |
set(target_tasks_nightly_win64(full_task_graph
, parameters
, graph_config
))
1071 target_tasks_nightly_win64_aarch64(
1072 full_task_graph
, parameters
, graph_config
1075 |
set(target_tasks_nightly_macosx(full_task_graph
, parameters
, graph_config
))
1076 |
set(target_tasks_nightly_linux(full_task_graph
, parameters
, graph_config
))
1077 |
set(target_tasks_nightly_asan(full_task_graph
, parameters
, graph_config
))
1078 |
set(release_tasks
)
1082 # Run Searchfox analysis once daily.
1083 @_target_task("searchfox_index")
1084 def target_tasks_searchfox(full_task_graph
, parameters
, graph_config
):
1085 """Select tasks required for indexing Firefox for Searchfox web site each day"""
1087 "searchfox-linux64-searchfox/debug",
1088 "searchfox-macosx64-searchfox/debug",
1089 "searchfox-win64-searchfox/debug",
1090 "searchfox-android-armv7-searchfox/debug",
1091 "searchfox-ios-searchfox/debug",
1092 "source-test-file-metadata-bugzilla-components",
1093 "source-test-file-metadata-test-info-all",
1094 "source-test-wpt-metadata-summary",
1098 # Run build linux64-plain-clang-trunk/opt on mozilla-central/beta with perf tests
1099 @_target_task("linux64_clang_trunk_perf")
1100 def target_tasks_build_linux64_clang_trunk_perf(
1101 full_task_graph
, parameters
, graph_config
1103 """Select tasks required to run perf test on linux64 build with clang trunk"""
1105 # Only keep tasks generated from platform `linux1804-64-clang-trunk-qr/opt`
1106 def filter(task_label
):
1107 if "linux1804-64-clang-trunk-qr/opt" in task_label
:
1111 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
.label
)]
1114 # Run Updatebot's cron job 4 times daily.
1115 @_target_task("updatebot_cron")
1116 def target_tasks_updatebot_cron(full_task_graph
, parameters
, graph_config
):
1117 """Select tasks required to run Updatebot's cron job"""
1118 return ["updatebot-cron"]
1121 @_target_task("customv8_update")
1122 def target_tasks_customv8_update(full_task_graph
, parameters
, graph_config
):
1123 """Select tasks required for building latest d8/v8 version."""
1124 return ["toolchain-linux64-custom-v8"]
1127 @_target_task("file_update")
1128 def target_tasks_file_update(full_task_graph
, parameters
, graph_config
):
1129 """Select the set of tasks required to perform nightly in-tree file updates"""
1132 # For now any task in the repo-update kind is ok
1133 return task
.kind
in ["repo-update"]
1135 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1138 @_target_task("l10n_bump")
1139 def target_tasks_l10n_bump(full_task_graph
, parameters
, graph_config
):
1140 """Select the set of tasks required to perform l10n bumping."""
1143 # For now any task in the repo-update kind is ok
1144 return task
.kind
in ["l10n-bump"]
1146 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1149 @_target_task("merge_automation")
1150 def target_tasks_merge_automation(full_task_graph
, parameters
, graph_config
):
1151 """Select the set of tasks required to perform repository merges."""
1154 # For now any task in the repo-update kind is ok
1155 return task
.kind
in ["merge-automation"]
1157 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1160 @_target_task("scriptworker_canary")
1161 def target_tasks_scriptworker_canary(full_task_graph
, parameters
, graph_config
):
1162 """Select the set of tasks required to run scriptworker canaries."""
1165 # For now any task in the repo-update kind is ok
1166 return task
.kind
in ["scriptworker-canary"]
1168 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1171 @_target_task("cron_bouncer_check")
1172 def target_tasks_bouncer_check(full_task_graph
, parameters
, graph_config
):
1173 """Select the set of tasks required to perform bouncer version verification."""
1176 if not filter_for_project(task
, parameters
):
1178 # For now any task in the repo-update kind is ok
1179 return task
.kind
in ["cron-bouncer-check"]
1181 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1184 @_target_task("staging_release_builds")
1185 def target_tasks_staging_release(full_task_graph
, parameters
, graph_config
):
1187 Select all builds that are part of releases.
1191 if not task
.attributes
.get("shipping_product"):
1193 if parameters
["release_type"].startswith(
1195 ) and "android" in task
.attributes
.get("build_platform", ""):
1197 if parameters
["release_type"] != "beta" and "devedition" in task
.attributes
.get(
1198 "build_platform", ""
1201 if task
.attributes
.get("shipping_phase") == "build":
1205 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1208 @_target_task("release_simulation")
1209 def target_tasks_release_simulation(full_task_graph
, parameters
, graph_config
):
1211 Select builds that would run on push on a release branch.
1213 project_by_release
= {
1214 "nightly": "mozilla-central",
1215 "beta": "mozilla-beta",
1216 "release": "mozilla-release",
1217 "esr115": "mozilla-esr115",
1219 target_project
= project_by_release
.get(parameters
["release_type"])
1220 if target_project
is None:
1221 raise Exception("Unknown or unspecified release type in simulation run.")
1223 def filter_for_target_project(task
):
1224 """Filter tasks by project. Optionally enable nightlies."""
1225 run_on_projects
= set(task
.attributes
.get("run_on_projects", []))
1226 return match_run_on_projects(target_project
, run_on_projects
)
1228 def filter_out_android_on_esr(task
):
1229 if parameters
["release_type"].startswith(
1231 ) and "android" in task
.attributes
.get("build_platform", ""):
1237 for l
, t
in full_task_graph
.tasks
.items()
1238 if filter_release_tasks(t
, parameters
)
1239 and filter_out_cron(t
, parameters
)
1240 and filter_for_target_project(t
)
1241 and filter_out_android_on_esr(t
)
1245 @_target_task("codereview")
1246 def target_tasks_codereview(full_task_graph
, parameters
, graph_config
):
1247 """Select all code review tasks needed to produce a report"""
1251 if task
.kind
in ["code-review"]:
1255 if task
.attributes
.get("code-review") is True:
1260 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1263 @_target_task("nothing")
1264 def target_tasks_nothing(full_task_graph
, parameters
, graph_config
):
1265 """Select nothing, for DONTBUILD pushes"""
1269 @_target_task("daily_beta_perf")
1270 def target_tasks_daily_beta_perf(full_task_graph
, parameters
, graph_config
):
1272 Select performance tests on the beta branch to be run daily
1275 f
"{graph_config['trust-domain']}.v2.{parameters['project']}.revision."
1276 f
"{parameters['head_rev']}.taskgraph.decision-daily-beta-perf"
1278 if os
.environ
.get("MOZ_AUTOMATION") and retry(
1282 "reason": "to avoid triggering multiple daily beta perftests off of the same revision",
1288 platform
= task
.attributes
.get("test_platform")
1289 attributes
= task
.attributes
1290 try_name
= attributes
.get("raptor_try_name") or task
.label
1292 unittest_suite
= attributes
.get("unittest_suite")
1293 if unittest_suite
not in ("raptor", "awsy", "talos"):
1298 # Select beta tasks for awsy
1299 if "awsy" in try_name
:
1300 if accept_awsy_task(try_name
, platform
):
1304 # Select beta tasks for talos
1305 if "talos" == unittest_suite
:
1306 if accept_raptor_desktop_build(platform
):
1307 if "windows11-64" in platform
:
1308 if "xperf" in try_name
:
1311 if ("mac" in platform
or "windows" in platform
) and "g3" in try_name
:
1313 if "-swr" in try_name
:
1314 if "dromaeo" in try_name
:
1316 if "perf-reftest-singletons" in try_name
:
1318 if "realworldweb" in try_name
:
1322 for x
in ("prof", "ipc", "gli", "sessionrestore", "tabswitch")
1328 if accept_raptor_desktop_build(platform
):
1329 if "browsertime" and "firefox" in try_name
:
1330 if "profiling" in try_name
:
1332 if "bytecode" in try_name
:
1334 if "live" in try_name
:
1336 if "webext" in try_name
:
1338 if "unity" in try_name
:
1340 if "wasm" in try_name
:
1342 if "tp6-bench" in try_name
:
1344 if "tp6" in try_name
:
1346 if "benchmark" in try_name
:
1348 elif accept_raptor_android_build(platform
):
1349 # Select browsertime & geckoview specific tests
1350 if "browsertime" and "geckoview" in try_name
:
1351 if "power" in try_name
:
1353 if "cpu" in try_name
:
1355 if "profiling" in try_name
:
1357 if "-live" in try_name
:
1359 if "speedometer" in try_name
:
1361 if "webgl" in try_name
:
1363 if "tp6m" in try_name
:
1368 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1371 @_target_task("weekly_release_perf")
1372 def target_tasks_weekly_release_perf(full_task_graph
, parameters
, graph_config
):
1374 Select performance tests on the release branch to be run weekly
1378 platform
= task
.attributes
.get("test_platform")
1379 attributes
= task
.attributes
1380 try_name
= attributes
.get("raptor_try_name") or task
.label
1382 if attributes
.get("unittest_suite") not in ("raptor", "awsy"):
1387 # Select release tasks for awsy
1388 if "awsy" in try_name
:
1389 if accept_awsy_task(try_name
, platform
):
1393 # Select browsertime tests
1394 if accept_raptor_desktop_build(platform
):
1395 if "browsertime" and "firefox" in try_name
:
1396 if "power" in try_name
:
1398 if "profiling" in try_name
:
1400 if "bytecode" in try_name
:
1402 if "live" in try_name
:
1404 if "webext" in try_name
:
1406 if "tp6-bench" in try_name
:
1408 if "tp6" in try_name
:
1410 if "benchmark" in try_name
:
1412 if "youtube-playback" in try_name
:
1414 elif accept_raptor_android_build(platform
):
1415 # Select browsertime & geckoview specific tests
1416 if "browsertime" and "geckoview" in try_name
:
1417 if "power" in try_name
:
1419 if "cpu" in try_name
:
1421 if "profiling" in try_name
:
1423 if "-live" in try_name
:
1425 if "speedometer" in try_name
:
1427 if "webgl" in try_name
:
1429 if "tp6m" in try_name
:
1431 if "youtube-playback" in try_name
:
1436 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1439 @_target_task("raptor_tp6m")
1440 def target_tasks_raptor_tp6m(full_task_graph
, parameters
, graph_config
):
1442 Select tasks required for running raptor cold page-load tests on fenix and refbrow
1446 platform
= task
.attributes
.get("build_platform")
1447 attributes
= task
.attributes
1449 if platform
and "android" not in platform
:
1451 if attributes
.get("unittest_suite") != "raptor":
1453 try_name
= attributes
.get("raptor_try_name")
1454 if "-cold" in try_name
and "shippable" in platform
:
1455 # Get browsertime amazon smoke tests
1457 "browsertime" in try_name
1458 and "amazon" in try_name
1459 and "search" not in try_name
1460 and "fenix" in try_name
1464 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1467 @_target_task("backfill_all_browsertime")
1468 def target_tasks_backfill_all_browsertime(full_task_graph
, parameters
, graph_config
):
1470 Search for revisions that contains patches that were reviewed by perftest reviewers
1471 and landed the day before the cron is running. Trigger backfill-all-browsertime action
1472 task on each of them.
1474 from gecko_taskgraph
.actions
.util
import get_decision_task_id
, get_pushes
1476 def date_is_yesterday(date
):
1477 yesterday
= datetime
.today() - timedelta(days
=1)
1478 date
= datetime
.fromtimestamp(date
)
1479 return date
.date() == yesterday
.date()
1481 def reviewed_by_perftest(push
):
1483 commit_message
= get_hg_commit_message(
1484 os
.path
.join(GECKO
, graph_config
["product-dir"]), rev
=push
1486 except Exception as e
:
1490 for line
in commit_message
.split("\n\n"):
1491 if line
.lower().startswith("bug ") and "r=" in line
:
1492 if "perftest-reviewers" in line
.split("r=")[-1]:
1497 pushes
= get_pushes(
1498 project
=parameters
["head_repository"],
1499 end_id
=int(parameters
["pushlog_id"]),
1503 for push_id
in sorted([int(p
) for p
in pushes
.keys()], reverse
=True):
1504 push_rev
= pushes
[str(push_id
)]["changesets"][-1]
1505 push_info
= find_hg_revision_push_info(
1506 "https://hg.mozilla.org/integration/" + parameters
["project"], push_rev
1508 pushdate
= int(push_info
["pushdate"])
1509 if date_is_yesterday(pushdate
) and reviewed_by_perftest(push_rev
):
1510 from gecko_taskgraph
.actions
.util
import trigger_action
1513 f
"Revision {push_rev} was created yesterday and was reviewed by "
1514 f
"#perftest-reviewers."
1517 push_decision_task_id
= get_decision_task_id(
1518 parameters
["project"], push_id
1521 print(f
"Could not find decision task for push {push_id}")
1525 action_name
="backfill-all-browsertime",
1526 # This lets the action know on which push we want to add a new task
1527 decision_task_id
=push_decision_task_id
,
1529 except Exception as e
:
1530 print(f
"Failed to trigger action for {push_rev}: {e}")
1535 @_target_task("condprof")
1536 def target_tasks_condprof(full_task_graph
, parameters
, graph_config
):
1538 Select tasks required for building conditioned profiles.
1540 for name
, task
in full_task_graph
.tasks
.items():
1541 if task
.kind
== "condprof":
1542 if "a51" not in name
: # bug 1765348
1546 @_target_task("system_symbols")
1547 def target_tasks_system_symbols(full_task_graph
, parameters
, graph_config
):
1549 Select tasks for scraping and uploading system symbols.
1551 for name
, task
in full_task_graph
.tasks
.items():
1554 "system-symbols-upload",
1555 "system-symbols-reprocess",
1560 @_target_task("perftest")
1561 def target_tasks_perftest(full_task_graph
, parameters
, graph_config
):
1563 Select perftest tasks we want to run daily
1565 for name
, task
in full_task_graph
.tasks
.items():
1566 if task
.kind
!= "perftest":
1568 if task
.attributes
.get("cron", False):
1572 @_target_task("perftest-on-autoland")
1573 def target_tasks_perftest_autoland(full_task_graph
, parameters
, graph_config
):
1575 Select perftest tasks we want to run daily
1577 for name
, task
in full_task_graph
.tasks
.items():
1578 if task
.kind
!= "perftest":
1580 if task
.attributes
.get("cron", False) and any(
1581 test_name
in name
for test_name
in ["view"]
1586 @_target_task("l10n-cross-channel")
1587 def target_tasks_l10n_cross_channel(full_task_graph
, parameters
, graph_config
):
1588 """Select the set of tasks required to run l10n cross-channel."""
1591 return task
.kind
in ["l10n-cross-channel"]
1593 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1596 @_target_task("are-we-esmified-yet")
1597 def target_tasks_are_we_esmified_yet(full_task_graph
, parameters
, graph_config
):
1599 select the task to track the progress of the esmification project
1602 l
for l
, t
in full_task_graph
.tasks
.items() if t
.kind
== "are-we-esmified-yet"
1606 @_target_task("eslint-build")
1607 def target_tasks_eslint_build(full_task_graph
, parameters
, graph_config
):
1608 """Select the task to run additional ESLint rules which require a build."""
1610 for name
, task
in full_task_graph
.tasks
.items():
1611 if task
.kind
!= "source-test":
1613 if "eslint-build" in name
:
1617 @_target_task("holly_tasks")
1618 def target_tasks_holly(full_task_graph
, parameters
, graph_config
):
1619 """Bug 1814661: only run updatebot tasks on holly"""
1622 return task
.kind
== "updatebot"
1624 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
)]
1627 @_target_task("snap_upstream_tests")
1628 def target_tasks_snap_upstream_tests(full_task_graph
, parameters
, graph_config
):
1630 Select tasks for testing Snap package built as upstream. Omit -try because
1631 it does not really make sense on a m-c cron
1633 for name
, task
in full_task_graph
.tasks
.items():
1634 if "snap-upstream-test" in name
and not "-try" in name
:
1638 @_target_task("nightly-android")
1639 def target_tasks_nightly_android(full_task_graph
, parameters
, graph_config
):
1640 def filter(task
, parameters
):
1641 build_type
= task
.attributes
.get("build-type", "")
1642 return build_type
in (
1646 "fenix-nightly-firebase",
1647 "focus-nightly-firebase",
1651 f
"{graph_config['trust-domain']}.v2.{parameters['project']}.branch."
1652 f
"{parameters['head_ref']}.revision.{parameters['head_rev']}.taskgraph.decision-nightly-android"
1654 if os
.environ
.get("MOZ_AUTOMATION") and retry(
1658 "reason": "to avoid triggering multiple nightlies off the same revision",
1663 return [l
for l
, t
in full_task_graph
.tasks
.items() if filter(t
, parameters
)]
1666 @_target_task("android-l10n-import")
1667 def target_tasks_android_l10n_import(full_task_graph
, parameters
, graph_config
):
1668 return [l
for l
, t
in full_task_graph
.tasks
.items() if l
== "android-l10n-import"]