From 9bc07c695752a45ca8f933a5264326444291d207 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Mon, 5 Sep 2022 17:03:42 +0200 Subject: [PATCH] Bug 1786780 - part 3: Rebuild all components on nightly and release --- .../android/taskcluster/ac_taskgraph/loader/build_config.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py b/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py index 9a6d0cf91058..b0c62e4f1b54 100644 --- a/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py +++ b/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py @@ -117,13 +117,11 @@ def loader(kind, path, config, params, loaded_tasks): for d in deps: downstream_component_dependencies[d].add(component) - if params["head_ref"] == "refs/heads/main": - # Disable the affected_components optimization to make sure we execute all tests to get - # a complete code coverage report for pushes to 'main'. - # See https://github.com/mozilla-mobile/android-components/issues/9382#issuecomment-760506327 - logger.info("head_ref is refs/heads/main. Building every component...") - affected_components = ALL_COMPONENTS - else: + # Disable the affected_components optimization to make sure we execute all tests to get + # a complete code coverage report for pushes to 'main'. + # See https://github.com/mozilla-mobile/android-components/issues/9382#issuecomment-760506327 + if params["tasks_for"] in ("github-pull-request", "github-push") and params["head_ref"] != "refs/heads/main": + logger.info("Looking for changed files to rebuild the modified components only...") files_changed = get_changed_files(params["head_repository"], params["head_rev"], params["base_rev"]) affected_components = get_affected_components(files_changed, config.get("files-affecting-components"), upstream_component_dependencies, downstream_component_dependencies) -- 2.11.4.GIT