mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1886767 - fix nightly-all target tasks method to include ship-geckoview. r=taskgraph-reviewers,bhearsum
In bug 1882100 I updated the nightly-android method to include ship-geckoview, but in bug 1882083 I'd picked the wrong function to select android tasks as part of nightly-all, so geckoview ship tasks went missing. Remove the duplicate/confusing target_tasks_nightly from android_taskgraph to prevent something like this happening again. Differential Revision: https://phabricator.services.mozilla.com/D205330
This commit is contained in:
parent
6f86e7fe32
commit
a42c855dac
@ -2,62 +2,11 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
|
||||
from redo import retry
|
||||
from taskgraph.target_tasks import _target_task
|
||||
from taskgraph.util.taskcluster import find_task_id
|
||||
|
||||
from android_taskgraph.release_type import does_task_match_release_type
|
||||
|
||||
|
||||
def index_exists(index_path, reason=""):
|
||||
print(f"Looking for existing index {index_path} {reason}...")
|
||||
try:
|
||||
task_id = find_task_id(index_path)
|
||||
print(f"Index {index_path} exists: taskId {task_id}")
|
||||
return True
|
||||
except KeyError:
|
||||
print(f"Index {index_path} doesn't exist.")
|
||||
return False
|
||||
|
||||
|
||||
@_target_task("nightly")
|
||||
def target_tasks_nightly(full_task_graph, parameters, graph_config):
|
||||
def filter(task, parameters):
|
||||
build_type = task.attributes.get("build-type", "")
|
||||
return build_type in (
|
||||
"nightly",
|
||||
"focus-nightly",
|
||||
"fenix-nightly",
|
||||
"fenix-nightly-firebase",
|
||||
"focus-nightly-firebase",
|
||||
)
|
||||
|
||||
index_path = (
|
||||
f"{graph_config['trust-domain']}.v2.{parameters['project']}.branch."
|
||||
f"{parameters['head_ref']}.revision.{parameters['head_rev']}.taskgraph.decision-nightly"
|
||||
)
|
||||
if os.environ.get("MOZ_AUTOMATION") and retry(
|
||||
index_exists,
|
||||
args=(index_path,),
|
||||
kwargs={
|
||||
"reason": "to avoid triggering multiple nightlies off the same revision",
|
||||
},
|
||||
):
|
||||
return []
|
||||
|
||||
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
|
||||
|
||||
|
||||
@_target_task("nightly-test")
|
||||
def target_tasks_nightly_test(full_task_graph, parameters, graph_config):
|
||||
def filter(task, parameters):
|
||||
return task.attributes.get("nightly-test", False)
|
||||
|
||||
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
|
||||
|
||||
|
||||
@_target_task("promote_android")
|
||||
def target_tasks_promote(full_task_graph, parameters, graph_config):
|
||||
return _filter_release_promotion(
|
||||
|
@ -1043,10 +1043,7 @@ def target_tasks_nightly_desktop(full_task_graph, parameters, graph_config):
|
||||
|
||||
@_target_task("nightly_all")
|
||||
def target_tasks_nightly_all(full_task_graph, parameters, graph_config):
|
||||
from android_taskgraph.target_tasks import (
|
||||
target_tasks_nightly as target_tasks_nightly_android,
|
||||
)
|
||||
|
||||
"""Select the set of tasks required for a nightly build of firefox desktop and android"""
|
||||
return list(
|
||||
set(target_tasks_nightly_desktop(full_task_graph, parameters, graph_config))
|
||||
| set(target_tasks_nightly_android(full_task_graph, parameters, graph_config))
|
||||
|
Loading…
Reference in New Issue
Block a user