mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1752111 - Make l10n bumper run on autoland instead of mozilla-central r=aki
Differential Revision: https://phabricator.services.mozilla.com/D154305
This commit is contained in:
parent
b3dca0593e
commit
d74544871f
@ -29,8 +29,6 @@ jobs:
|
||||
- mozilla-central
|
||||
when:
|
||||
by-project:
|
||||
# `l10n-bumper` job should have enough time to finish before this
|
||||
# job runs
|
||||
mozilla-central: [{hour: 10, minute: 0}, {hour: 22, minute: 0}]
|
||||
# No default
|
||||
|
||||
@ -277,12 +275,14 @@ jobs:
|
||||
treeherder-symbol: l10n-bump
|
||||
target-tasks-method: l10n_bump
|
||||
run-on-projects:
|
||||
- autoland
|
||||
- mozilla-central
|
||||
- mozilla-beta
|
||||
when:
|
||||
by-project:
|
||||
# 3h15m before launch of `nightly-desktop`
|
||||
mozilla-central: [{hour: 6, minute: 45}, {hour: 18, minute: 45}]
|
||||
autoland: [{hour: 6, minute: 45}, {hour: 18, minute: 45}]
|
||||
mozilla-central: []
|
||||
# 3h15m before launch of `daily-releases`
|
||||
mozilla-beta: [{hour: 18, minute: 45}]
|
||||
# No default
|
||||
|
@ -555,7 +555,10 @@ workers:
|
||||
worker-type:
|
||||
by-release-level:
|
||||
production: '{trust-domain}-3-tree'
|
||||
staging: '{trust-domain}-1-tree'
|
||||
staging:
|
||||
by-project:
|
||||
autoland: '{trust-domain}-3-tree'
|
||||
default: '{trust-domain}-1-tree'
|
||||
tree-dev:
|
||||
provisioner: scriptworker-k8s
|
||||
implementation: treescript
|
||||
|
@ -8,7 +8,6 @@ transforms:
|
||||
- gecko_taskgraph.transforms.release_version_bump:transforms
|
||||
- gecko_taskgraph.transforms.task:transforms
|
||||
|
||||
|
||||
job-defaults:
|
||||
worker-type: tree
|
||||
worker:
|
||||
@ -19,15 +18,20 @@ job-defaults:
|
||||
by-project:
|
||||
mozilla-beta: false
|
||||
default: true
|
||||
ignore-closed-tree: false
|
||||
ignore-closed-tree:
|
||||
by-project:
|
||||
autoland: true
|
||||
default: false
|
||||
push:
|
||||
by-project:
|
||||
mozilla-(central|beta): true
|
||||
autoland: true
|
||||
default: false
|
||||
source-repo:
|
||||
by-release-type:
|
||||
beta: https://hg.mozilla.org/releases/mozilla-beta
|
||||
default: https://hg.mozilla.org/mozilla-central
|
||||
nightly: https://hg.mozilla.org/mozilla-central
|
||||
default: https://hg.mozilla.org/integration/autoland
|
||||
l10n-bump-info:
|
||||
by-release-type:
|
||||
# XXX whenever the `beta` config changes, make sure to make
|
||||
@ -52,23 +56,27 @@ job-defaults:
|
||||
- win64-devedition
|
||||
- win64-aarch64
|
||||
- win64-aarch64-devedition
|
||||
platform-configs: [{
|
||||
"platforms": [
|
||||
"linux",
|
||||
"linux-devedition",
|
||||
"linux64",
|
||||
"linux64-devedition",
|
||||
"macosx64",
|
||||
"macosx64-devedition",
|
||||
"win32",
|
||||
"win32-devedition",
|
||||
"win64",
|
||||
"win64-devedition",
|
||||
"win64-aarch64",
|
||||
"win64-aarch64-devedition",
|
||||
],
|
||||
"path": "browser/locales/shipped-locales",
|
||||
}]
|
||||
platform-configs:
|
||||
[
|
||||
{
|
||||
"platforms":
|
||||
[
|
||||
"linux",
|
||||
"linux-devedition",
|
||||
"linux64",
|
||||
"linux64-devedition",
|
||||
"macosx64",
|
||||
"macosx64-devedition",
|
||||
"win32",
|
||||
"win32-devedition",
|
||||
"win64",
|
||||
"win64-devedition",
|
||||
"win64-aarch64",
|
||||
"win64-aarch64-devedition",
|
||||
],
|
||||
"path": "browser/locales/shipped-locales",
|
||||
},
|
||||
]
|
||||
default:
|
||||
name: Firefox l10n changesets
|
||||
path: browser/locales/l10n-changesets.json
|
||||
@ -89,23 +97,27 @@ job-defaults:
|
||||
- win64-devedition
|
||||
- win64-aarch64
|
||||
- win64-aarch64-devedition
|
||||
platform-configs: [{
|
||||
"platforms": [
|
||||
"linux",
|
||||
"linux-devedition",
|
||||
"linux64",
|
||||
"linux64-devedition",
|
||||
"macosx64",
|
||||
"macosx64-devedition",
|
||||
"win32",
|
||||
"win32-devedition",
|
||||
"win64",
|
||||
"win64-devedition",
|
||||
"win64-aarch64",
|
||||
"win64-aarch64-devedition",
|
||||
],
|
||||
"path": "browser/locales/all-locales",
|
||||
}]
|
||||
platform-configs:
|
||||
[
|
||||
{
|
||||
"platforms":
|
||||
[
|
||||
"linux",
|
||||
"linux-devedition",
|
||||
"linux64",
|
||||
"linux64-devedition",
|
||||
"macosx64",
|
||||
"macosx64-devedition",
|
||||
"win32",
|
||||
"win32-devedition",
|
||||
"win64",
|
||||
"win64-devedition",
|
||||
"win64-aarch64",
|
||||
"win64-aarch64-devedition",
|
||||
],
|
||||
"path": "browser/locales/all-locales",
|
||||
},
|
||||
]
|
||||
|
||||
jobs:
|
||||
l10n-bumper:
|
||||
|
@ -107,7 +107,7 @@ graph_config_schema = Schema(
|
||||
Required("implementation"): str,
|
||||
Required("os"): str,
|
||||
Required("worker-type"): optionally_keyed_by(
|
||||
"level", "release-level", str
|
||||
"level", "release-level", "project", str
|
||||
),
|
||||
}
|
||||
},
|
||||
|
@ -29,7 +29,6 @@ from taskgraph.graph import Graph
|
||||
from taskgraph.task import Task
|
||||
from taskgraph.taskgraph import TaskGraph
|
||||
|
||||
from .util.attributes import release_level
|
||||
from .util.workertypes import get_worker_type
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
@ -71,7 +70,9 @@ def derive_misc_task(
|
||||
image_taskid = label_to_taskid["docker-image-" + image]
|
||||
|
||||
provisioner_id, worker_type = get_worker_type(
|
||||
graph_config, "misc", parameters["level"], release_level(parameters["project"])
|
||||
graph_config,
|
||||
parameters,
|
||||
"misc",
|
||||
)
|
||||
|
||||
deps = copy.copy(dependencies)
|
||||
|
@ -45,6 +45,7 @@ def config():
|
||||
"head_repository": "http://hg.example.com",
|
||||
"head_rev": "abcdef",
|
||||
"level": 1,
|
||||
"project": "example",
|
||||
}
|
||||
)
|
||||
return TransformConfig(
|
||||
|
@ -27,7 +27,7 @@ def set_defaults(config, jobs):
|
||||
job["treeherder"].setdefault("kind", "build")
|
||||
job["treeherder"].setdefault("tier", 1)
|
||||
_, worker_os = worker_type_implementation(
|
||||
config.graph_config, job["worker-type"]
|
||||
config.graph_config, config.params, job["worker-type"]
|
||||
)
|
||||
worker = job.setdefault("worker", {})
|
||||
worker.setdefault("env", {})
|
||||
@ -172,7 +172,7 @@ def use_profile_data(config, jobs):
|
||||
job["worker"]["env"].update({"TASKCLUSTER_PGO_PROFILE_USE": "1"})
|
||||
|
||||
_, worker_os = worker_type_implementation(
|
||||
config.graph_config, job["worker-type"]
|
||||
config.graph_config, config.params, job["worker-type"]
|
||||
)
|
||||
if worker_os == "linux":
|
||||
# LTO linkage needs more open files than the default from run-task.
|
||||
|
@ -133,7 +133,9 @@ def rewrite_when_to_optimization(config, jobs):
|
||||
@transforms.add
|
||||
def set_implementation(config, jobs):
|
||||
for job in jobs:
|
||||
impl, os = worker_type_implementation(config.graph_config, job["worker-type"])
|
||||
impl, os = worker_type_implementation(
|
||||
config.graph_config, config.params, job["worker-type"]
|
||||
)
|
||||
if os:
|
||||
job.setdefault("tags", {})["os"] = os
|
||||
if impl:
|
||||
@ -163,7 +165,7 @@ def add_resource_monitor(config, jobs):
|
||||
for job in jobs:
|
||||
if job.get("attributes", {}).get("resource-monitor"):
|
||||
worker_implementation, worker_os = worker_type_implementation(
|
||||
config.graph_config, job["worker-type"]
|
||||
config.graph_config, config.params, job["worker-type"]
|
||||
)
|
||||
# Normalise worker os so that linux-bitbar and similar use linux tools.
|
||||
worker_os = worker_os.split("-")[0]
|
||||
|
@ -21,7 +21,12 @@ def handle_keyed_by(config, tasks):
|
||||
]
|
||||
for task in tasks:
|
||||
fields = default_fields[:]
|
||||
for additional_field in ("l10n-bump-info", "source-repo", "dontbuild"):
|
||||
for additional_field in (
|
||||
"l10n-bump-info",
|
||||
"source-repo",
|
||||
"dontbuild",
|
||||
"ignore-closed-tree",
|
||||
):
|
||||
if additional_field in task["worker"]:
|
||||
fields.append(f"worker.{additional_field}")
|
||||
for field in fields:
|
||||
|
@ -475,7 +475,7 @@ def make_job_description(config, jobs):
|
||||
|
||||
worker["artifacts"] = _generate_task_output_files(
|
||||
dep_job,
|
||||
worker_type_implementation(config.graph_config, worker_type),
|
||||
worker_type_implementation(config.graph_config, config.params, worker_type),
|
||||
repackage_config=repackage_config,
|
||||
locale=locale,
|
||||
)
|
||||
|
@ -177,7 +177,7 @@ def make_job_description(config, jobs):
|
||||
|
||||
worker["artifacts"] = _generate_task_output_files(
|
||||
dep_job,
|
||||
worker_type_implementation(config.graph_config, worker_type),
|
||||
worker_type_implementation(config.graph_config, config.params, worker_type),
|
||||
repackage_config,
|
||||
partner=repack_id,
|
||||
)
|
||||
|
@ -1431,7 +1431,9 @@ def set_implementation(config, tasks):
|
||||
yield task
|
||||
continue
|
||||
|
||||
impl, os = worker_type_implementation(config.graph_config, task["worker-type"])
|
||||
impl, os = worker_type_implementation(
|
||||
config.graph_config, config.params, task["worker-type"]
|
||||
)
|
||||
|
||||
tags = task.setdefault("tags", {})
|
||||
tags["worker-implementation"] = impl
|
||||
@ -1820,9 +1822,8 @@ def build_task(config, tasks):
|
||||
else:
|
||||
provisioner_id, worker_type = get_worker_type(
|
||||
config.graph_config,
|
||||
config.params,
|
||||
task["worker-type"],
|
||||
level=level,
|
||||
release_level=release_level(config.params["project"]),
|
||||
)
|
||||
task["worker-type"] = "/".join([provisioner_id, worker_type])
|
||||
project = config.params["project"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
# 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/.
|
||||
|
||||
|
||||
from gecko_taskgraph.util.attributes import release_level as _release_level
|
||||
from mozbuild.util import memoize
|
||||
from taskgraph.util.attributes import keymatch
|
||||
from taskgraph.util.keyed_by import evaluate_keyed_by
|
||||
@ -20,7 +20,7 @@ WORKER_TYPES = {
|
||||
|
||||
|
||||
@memoize
|
||||
def _get(graph_config, alias, level, release_level):
|
||||
def _get(graph_config, alias, level, release_level, project):
|
||||
"""Get the configuration for this worker_type alias: {provisioner,
|
||||
worker-type, implementation, os}"""
|
||||
level = str(level)
|
||||
@ -61,10 +61,13 @@ def _get(graph_config, alias, level, release_level):
|
||||
"alias": alias,
|
||||
}
|
||||
)
|
||||
attrs = {"level": level, "release-level": release_level}
|
||||
if project:
|
||||
attrs["project"] = project
|
||||
worker_config["worker-type"] = evaluate_keyed_by(
|
||||
worker_config["worker-type"],
|
||||
f"worker-type alias {alias} field worker-type",
|
||||
{"level": level, "release-level": release_level},
|
||||
attrs,
|
||||
).format(
|
||||
**{
|
||||
"trust-domain": graph_config["trust-domain"],
|
||||
@ -76,18 +79,26 @@ def _get(graph_config, alias, level, release_level):
|
||||
return worker_config
|
||||
|
||||
|
||||
def worker_type_implementation(graph_config, worker_type):
|
||||
def worker_type_implementation(graph_config, parameters, worker_type):
|
||||
"""Get the worker implementation and OS for the given workerType, where the
|
||||
OS represents the host system, not the target OS, in the case of
|
||||
cross-compiles."""
|
||||
worker_config = _get(graph_config, worker_type, "1", "staging")
|
||||
worker_config = _get(
|
||||
graph_config, worker_type, "1", "staging", parameters["project"]
|
||||
)
|
||||
return worker_config["implementation"], worker_config.get("os")
|
||||
|
||||
|
||||
def get_worker_type(graph_config, worker_type, level, release_level):
|
||||
def get_worker_type(graph_config, parameters, worker_type):
|
||||
"""
|
||||
Get the worker type provisioner and worker-type, optionally evaluating
|
||||
aliases from the graph config.
|
||||
"""
|
||||
worker_config = _get(graph_config, worker_type, level, release_level)
|
||||
worker_config = _get(
|
||||
graph_config,
|
||||
worker_type,
|
||||
parameters["level"],
|
||||
_release_level(parameters.get("project")),
|
||||
parameters.get("project"),
|
||||
)
|
||||
return worker_config["provisioner"], worker_config["worker-type"]
|
||||
|
@ -505,10 +505,7 @@ class WorkerOverrides(TryConfig):
|
||||
)
|
||||
sys.exit(1)
|
||||
provisioner, worker_type = get_worker_type(
|
||||
graph_config,
|
||||
alias,
|
||||
level="1",
|
||||
release_level="staging",
|
||||
graph_config, worker_type=alias, parameters={"level": "1"}
|
||||
)
|
||||
overrides[alias] = "{provisioner}/{worker_type}{suffix}".format(
|
||||
provisioner=provisioner, worker_type=worker_type, suffix=suffix
|
||||
|
Loading…
Reference in New Issue
Block a user