Bug 1919083 - Create 'os-integration' cron tasks to help validate worker image changes, r=jmaher,taskgraph-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D222349
This commit is contained in:
Andrew Halberstadt 2024-09-24 14:49:29 +00:00
parent 3a6127c2b7
commit ca838ec1cb
8 changed files with 76 additions and 15 deletions

View File

@ -399,3 +399,13 @@ jobs:
run-on-projects: [mozilla-beta]
when:
- {hour: 2, minute: 0}
- name: os-integration
job:
type: decision-task
treeherder-symbol: osint
target-tasks-method: os-integration
run-on-projects:
- mozilla-central
when:
- {weekday: 'Monday', hour: 6, minute: 0}

View File

@ -109,6 +109,7 @@ treeherder:
'M-f-swr-cf': 'Mochitest failures software webrender w/confirm failure'
'M-msix': 'Mochitests from MSIX builds'
'M-msix-cf': 'Mochitests confirm failure from MSIX builds'
'M-osint': 'Mochitests tagged with os-integration'
'MSI': 'Repack installers into MSIs'
'MSIs': 'Signing of Repacked installers of MSIs'
'MSIX': 'Repack into MSIX package'

View File

@ -1727,3 +1727,12 @@ def target_tasks_android_l10n_import(full_task_graph, parameters, graph_config):
@register_target_task("android-l10n-sync")
def target_tasks_android_l10n_sync(full_task_graph, parameters, graph_config):
return [l for l, t in full_task_graph.tasks.items() if l == "android-l10n-sync"]
@register_target_task("os-integration")
def target_tasks_os_integration(full_task_graph, parameters, graph_config):
return [
l
for l, t in full_task_graph.tasks.items()
if t.attributes.get("unittest_variant") == "os-integration"
]

View File

@ -17,7 +17,6 @@ what should run where. this is the wrong place for special-casing platforms,
for example - use `all_tests.py` instead.
"""
import logging
from importlib import import_module
@ -407,10 +406,16 @@ def run_remaining_transforms(config, tasks):
("worker", None),
("confirm_failure", None),
("pernosco", lambda t: t["build-platform"].startswith("linux64")),
# These transforms should always run last as there is never any
# difference in configuration from one chunk to another (other than
# chunk number).
# These transforms should run last as there is never any difference in
# configuration from one chunk to another (other than chunk number).
# Although the os-integration transforms setup an index route that
# depends on the chunk number.
("chunk", None),
(
"os_integration",
lambda t: t.get("attributes", {}).get("unittest_variant")
== "os-integration",
),
)
for task in tasks:

View File

@ -18,7 +18,11 @@ def test_confirm_failure_tasks(config, tasks):
yield task
continue
if "backlog" in task["suite"] or "failure" in task["suite"]:
if (
"backlog" in task["suite"]
or "failure" in task["suite"]
or task.get("attributes", {}).get("unittest_variant") == "os-integration"
):
yield task
continue

View File

@ -0,0 +1,24 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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 taskgraph.transforms.base import TransformSequence
transforms = TransformSequence()
@transforms.add
def add_index_route(config, tasks):
project = config.params["project"]
if project != "mozilla-central":
yield from tasks
return
index_base = f"gecko.v2.{project}.latest.test.os-integration"
for task in tasks:
routing_key = f"{index_base}.{task['test-platform']}.{task['test-name']}"
if task["chunks"] > 1:
routing_key = f"{routing_key}-{task['this-chunk']}"
task.setdefault("routes", []).append(routing_key)
yield task

View File

@ -37,18 +37,11 @@ WPT_SUBSUITES = {
def get_test_tags(config, env):
test_tags = []
try_config = json.loads(
tags = json.loads(
config.params["try_task_config"].get("env", {}).get("MOZHARNESS_TEST_TAG", "[]")
)
env_tags = env.get("MOZHARNESS_TEST_TAG", [])
if env_tags:
if try_config:
env_tags.extend(try_config)
test_tags = list(set(env_tags))
elif try_config:
test_tags = try_config
return test_tags
tags.extend(env.get("MOZHARNESS_TEST_TAG", []))
return list(set(tags))
def guess_mozinfo_from_task(task, repo="", test_tags=[]):

View File

@ -475,3 +475,18 @@ draw-snapshot:
mozharness:
extra-options:
- "--setpref=reftest.use-draw-snapshot=true"
os-integration:
description: >-
{description} limited to tests identified as good candidates for validating the test environment.
component: Release Engineering::Firefox-CI Administration
expiration: never
suffix: osint
when:
$eval: >-
"debug" in task["test-platform"]
&& !("macosx" in task["test-platform"])
merge:
worker:
env:
MOZHARNESS_TEST_TAG: ["os_integration"]