Skip to content

Commit

Permalink
Bug 1901281 - [ci] Use upstream Taskgraph's transform loader, a=RyanVM
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal committed Jul 3, 2024
1 parent d65569d commit d1d9ccc
Show file tree
Hide file tree
Showing 283 changed files with 533 additions and 592 deletions.
8 changes: 4 additions & 4 deletions taskcluster/android_taskgraph/loader/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.


from gecko_taskgraph.loader.transform import loader as base_loader
from taskgraph.loader.transform import loader as base_loader
from taskgraph.util.templates import merge

from ..build_config import get_apk_based_projects, get_components
Expand All @@ -14,7 +14,7 @@ def components_loader(kind, path, config, params, loaded_tasks):
Android-components are read from android-component/.buildconfig.yml
"""
config["jobs"] = _get_components_tasks(config)
config["tasks"] = _get_components_tasks(config)
return base_loader(kind, path, config, params, loaded_tasks)


Expand All @@ -24,12 +24,12 @@ def components_and_apks_loader(kind, path, config, params, loaded_tasks):
For instance focus-android yields one task.
Config is read from various .buildconfig.yml files.
Additional tasks can be provided in the kind.yml under the key `jobs`.
Additional tasks can be provided in the kind.yml under the key `tasks`.
"""

components_tasks = _get_components_tasks(config, for_build_type="regular")
apks_tasks = _get_apks_tasks(config)
config["jobs"] = merge(config["jobs"], components_tasks, apks_tasks)
config["tasks"] = merge(config["tasks"], components_tasks, apks_tasks)
return base_loader(kind, path, config, params, loaded_tasks)


Expand Down
3 changes: 1 addition & 2 deletions taskcluster/gecko_taskgraph/loader/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

import logging

from taskgraph.loader.transform import loader as transform_loader
from taskgraph.util.copy import deepcopy
from taskgraph.util.yaml import load_yaml

from .transform import loader as transform_loader

logger = logging.getLogger(__name__)


Expand Down
58 changes: 0 additions & 58 deletions taskcluster/gecko_taskgraph/loader/transform.py

This file was deleted.

4 changes: 2 additions & 2 deletions taskcluster/gecko_taskgraph/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def fake_loader(kind, path, config, parameters, loaded_tasks):
},
"dependencies": dependencies,
}
if "job-defaults" in config:
task = merge(config["job-defaults"], task)
if "task-defaults" in config:
task = merge(config["task-defaults"], task)
yield task


Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/balrog_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Optional("treeherder"): task_description_schema["treeherder"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
# Shipping product / phase
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/beetmover.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
Required("shipping-phase"): task_description_schema["shipping-phase"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("attributes"): task_description_schema["attributes"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Optional("locale"): str,
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Optional("extra"): object,
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
),
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("attributes"): task_description_schema["attributes"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Optional("treeherder"): task_description_schema["treeherder"],
Optional("locale"): str,
Optional("dependencies"): task_description_schema["dependencies"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("shipping-product"): task_description_schema["shipping-product"],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Required("product"): str,
Required("treeherder-platform"): str,
Optional("attributes"): {str: object},
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("run"): {str: object},
Optional("run-on-projects"): task_description_schema["run-on-projects"],
Optional("dependencies"): {str: taskref_or_string},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# locale is passed only for l10n beetmoving
Optional("locale"): str,
Required("shipping-phase"): task_description_schema["shipping-phase"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Required("shipping-phase"): task_description_schema["shipping-phase"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("priority"): task_description_schema["priority"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Initialization commands.
Required("pre-commands"): [str],
# relative path (from config.path) to the file task was defined in
Optional("job-from"): str,
Optional("task-from"): str,
}
)

Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/condprof.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Optional("dependencies"): task_description_schema["dependencies"],
Optional("fetches"): job_description_schema["fetches"],
Optional("index"): task_description_schema["index"],
Optional("job-from"): str,
Optional("task-from"): str,
Optional("name"): str,
Optional("run"): job_description_schema["run"],
Optional("run-on-projects"): task_description_schema["run-on-projects"],
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/gecko_taskgraph/transforms/diffoscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
# Treeherder symbol.
Required("symbol"): str,
# relative path (from config.path) to the file the task was defined in.
Optional("job-from"): str,
Optional("task-from"): str,
# Original and new builds to compare.
Required("original"): index_or_string,
Required("new"): index_or_string,
# Arguments to pass to diffoscope, used for job-defaults in
# Arguments to pass to diffoscope, used for task-defaults in
# taskcluster/kinds/diffoscope/kind.yml
Optional("args"): str,
# Extra arguments to pass to diffoscope, that can be set per job.
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/docker_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Required("symbol"): str,
# relative path (from config.path) to the file the docker image was defined
# in.
Optional("job-from"): str,
Optional("task-from"): str,
# Arguments to use for the Dockerfile.
Optional("args"): {str: str},
# Name of the docker image definition under taskcluster/docker, when
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Required("name"): str,
# Relative path (from config.path) to the file the task was defined
# in.
Optional("job-from"): str,
Optional("task-from"): str,
# Description of the task.
Required("description"): str,
Optional(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("worker"): task_description_schema["worker"],
Optional("worker-type"): task_description_schema["worker-type"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Optional("dependencies"): task_description_schema["dependencies"],
Optional("treeherder"): task_description_schema["treeherder"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/job/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# taskcluster/gecko_taskgraph/transforms/task.py for the schema details.
Required("description"): task_description_schema["description"],
Optional("attributes"): task_description_schema["attributes"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("dependencies"): task_description_schema["dependencies"],
Optional("if-dependencies"): task_description_schema["if-dependencies"],
Optional("soft-dependencies"): task_description_schema["soft-dependencies"],
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/l10n.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _by_platform(arg):
# Shipping product and phase
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/openh264_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
beetmover_description_schema = Schema(
{
# from the loader:
Optional("job-from"): str,
Optional("task-from"): str,
Optional("name"): str,
# from the from_deps transforms:
Optional("attributes"): task_description_schema["attributes"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# locale is passed only for l10n beetmoving
Optional("locale"): str,
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("dependencies"): task_description_schema["dependencies"],
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
push_flatpak_description_schema = Schema(
{
Required("name"): str,
Required("job-from"): task_description_schema["job-from"],
Required("task-from"): task_description_schema["task-from"],
Required("dependencies"): task_description_schema["dependencies"],
Required("description"): task_description_schema["description"],
Required("treeherder"): task_description_schema["treeherder"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("attributes"): task_description_schema["attributes"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("dependencies"): task_description_schema["dependencies"],
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Optional("treeherder"): task_description_schema["treeherder"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
push_msix_description_schema = Schema(
{
Required("name"): str,
Required("job-from"): task_description_schema["job-from"],
Required("task-from"): task_description_schema["task-from"],
Required("dependencies"): task_description_schema["dependencies"],
Required("description"): task_description_schema["description"],
Required("treeherder"): task_description_schema["treeherder"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Required("run-on-projects"): [],
Required("scopes"): optionally_keyed_by("release-level", [str]),
Required("shipping-phase"): task_description_schema["shipping-phase"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
}
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/gecko_taskgraph/transforms/repackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
Optional("run-as-root"): bool,
Optional("use-caches"): bool,
},
Optional("job-from"): job_description_schema["job-from"],
Optional("task-from"): job_description_schema["task-from"],
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
# Override the default priority for the project
Optional("priority"): task_description_schema["priority"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Optional("label"): str,
Optional("attributes"): task_description_schema["attributes"],
Optional("dependencies"): task_description_schema["dependencies"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
Optional("treeherder"): task_description_schema["treeherder"],
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Optional("shipping-product"): task_description_schema["shipping-product"],
Optional("shipping-phase"): task_description_schema["shipping-phase"],
Optional("priority"): task_description_schema["priority"],
Optional("job-from"): task_description_schema["job-from"],
Optional("task-from"): task_description_schema["task-from"],
}
)

Expand Down
Loading

0 comments on commit d1d9ccc

Please sign in to comment.