Skip to content

Commit

Permalink
Merge pull request #189 from hneiva/hneiva/taskgraph-upgrade
Browse files Browse the repository at this point in the history
[ci] Upgrade to taskgraph 4.1.1
  • Loading branch information
hneiva authored Feb 8, 2023
2 parents 9fd4d05 + abf851e commit 4c6ba2f
Show file tree
Hide file tree
Showing 25 changed files with 141 additions and 136 deletions.
2 changes: 1 addition & 1 deletion .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ tasks:
taskclusterProxy: true
chainOfTrust: true

image: mozillareleases/taskgraph:decision-cf4b4b4baff57d84c1f9ec8fcd70c9839b70a7d66e6430a6c41ffe67252faa19@sha256:425e07f6813804483bc5a7258288a7684d182617ceeaa0176901ccc7702dfe28
image: mozillareleases/taskgraph:decision-8af16934fd68303cebf9735705515cb48df542d251c04e921c7ac50564faac32@sha256:2965f42c2e91fc66ae7bd27d5dff88297225a90d04ebc6de23c538e3933d4049

maxRunTime: 1800

Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/addons-linter/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ transforms:
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms

job-template:
task-template:
description: Run addons-linter
worker-type: b-linux
# We only want to execute addons-linter on privileged extensions (for now).
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/balrog/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kind-dependencies:

only-for-addon-types: ["system"]

job-template:
task-template:
run-on-tasks-for: ["action"]
worker-type: balrog
balrog:
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/beetmover/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kind-dependencies:

only-for-addon-types: ["system"]

job-template:
task-template:
run-on-tasks-for: ["action"]
worker-type: beetmover
attributes:
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/ci/build/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ transforms:
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms

job-defaults:
task-defaults:
description: Build XPI from source code.
worker-type: b-linux
worker:
Expand All @@ -21,7 +21,7 @@ job-defaults:
run:
use-caches: false

jobs:
tasks:
release:
attributes:
shipping-phase: build
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/dep-signing/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ transforms:
- taskgraph.transforms.cached_tasks:transforms
- taskgraph.transforms.task:transforms

job-template:
task-template:
description: Development-sign XPI
index:
type: dep-signing
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/docker-image/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ transforms:
- taskgraph.transforms.cached_tasks:transforms
- taskgraph.transforms.task:transforms

jobs:
tasks:
node-latest:
definition: node
args:
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/pr/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ transforms:
- taskgraph.transforms.code_review:transforms
- taskgraph.transforms.task:transforms

jobs:
tasks:
complete:
description: PR Summary Task
run-on-tasks-for: [github-pull-request]
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/release-github/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ transforms:
kind-dependencies:
- release-signing

job-template:
task-template:
name: release-github
description: upload release artifacts to github and publish
run-on-tasks-for: ["action"]
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/release-mark-as-shipped/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kind-dependencies:

group-by: addon-type

job-template:
task-template:
name: release-mark-as-shipped
description: mark release as shipped in Ship-It
run-on-tasks-for: ["action"]
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/release-notify-completed/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kind-dependencies:
- release-signing
- release-mark-as-shipped

job-template:
task-template:
name: release-notify-completed
description: Sends email to the notify list telling release was completed.
run-on-tasks-for: ["action"]
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/ci/release-notify-started/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ transforms:
- xpi_taskgraph.transforms.release_notifications:transforms
- taskgraph.transforms.task:transforms

job-defaults:
task-defaults:
name: release-notify-started
description: Sends email to the notify list telling release was started.
run-on-tasks-for: ["action"]
worker-type: succeed
worker:
implementation: succeed

jobs:
tasks:
build:
attributes:
shipping-phase: build
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/release-signing/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ transforms:
- xpi_taskgraph.transforms.signing:transforms
- taskgraph.transforms.task:transforms

job-template:
task-template:
description: Release-sign XPI
index:
type: release-signing
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/test/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ transforms:
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms

job-template:
task-template:
description: Test XPI
worker-type: b-linux
worker:
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# For instructions on managing dependencies, see:
# https://taskcluster-taskgraph.readthedocs.io/en/latest/howto/bootstrap-taskgraph.html

taskcluster-taskgraph>=1.3.0
taskcluster-taskgraph>=4.1.1
70 changes: 44 additions & 26 deletions taskcluster/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --generate-hashes --output-file=requirements.txt requirements.in
#
appdirs==1.4.4 \
--hash=sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41 \
--hash=sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128
# via taskcluster-taskgraph
attrs==21.4.0 \
--hash=sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4 \
--hash=sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd
attrs==22.1.0 \
--hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \
--hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c
# via taskcluster-taskgraph
certifi==2021.10.8 \
--hash=sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872 \
--hash=sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569
certifi==2022.9.24 \
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
# via requests
charset-normalizer==2.0.12 \
--hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \
--hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df
charset-normalizer==2.1.1 \
--hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 \
--hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f
# via requests
idna==3.3 \
--hash=sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff \
--hash=sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d
giturlparse==0.10.0 \
--hash=sha256:04ba1a3a099c3093fa8d24a422913c6a9b2c2cd22bcffc939cf72e3e98f672d7 \
--hash=sha256:2595ab291d30717cda8474b874c9fd509f1b9802ad7f6968c36a45e4b13eb337
# via mozilla-repo-urls
idna==3.4 \
--hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
--hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
# via requests
json-e==4.4.3 \
--hash=sha256:604cc506746ece244e5f4c66ce1b77887b0340749f9f10f58f311caf5701315f \
--hash=sha256:8ed3974faa887ca96a7987298f6550cf2ad35472419a980766b3abe48258de0a
# via taskcluster-taskgraph
mozilla-repo-urls==0.1.1 \
--hash=sha256:30510d3519479aa70211145d0ac9cf6e2fadcb8d30fa3b196bb957bd773502ba \
--hash=sha256:7364da790751db2a060eb45adbf1d7db89a145ed279ba235f3425db9dd255915
# via taskcluster-taskgraph
pyyaml==6.0 \
--hash=sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf \
--hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \
--hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \
--hash=sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57 \
Expand All @@ -39,35 +49,42 @@ pyyaml==6.0 \
--hash=sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287 \
--hash=sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513 \
--hash=sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0 \
--hash=sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782 \
--hash=sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0 \
--hash=sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92 \
--hash=sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f \
--hash=sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 \
--hash=sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc \
--hash=sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1 \
--hash=sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c \
--hash=sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86 \
--hash=sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4 \
--hash=sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c \
--hash=sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34 \
--hash=sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b \
--hash=sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d \
--hash=sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c \
--hash=sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb \
--hash=sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7 \
--hash=sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737 \
--hash=sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3 \
--hash=sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d \
--hash=sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358 \
--hash=sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53 \
--hash=sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78 \
--hash=sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803 \
--hash=sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a \
--hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \
--hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
--hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
# via taskcluster-taskgraph
redo==2.0.4 \
--hash=sha256:81066955041c853b0e6491eb65a0877dce45131c4cfa3d42d923fc2aa8f7a043
--hash=sha256:81066955041c853b0e6491eb65a0877dce45131c4cfa3d42d923fc2aa8f7a043 \
--hash=sha256:c76e4c23ab2f8840261736a851323cd98493710e7a9d36a1058535dca501f293
# via taskcluster-taskgraph
requests==2.27.1 \
--hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \
--hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d
requests==2.28.1 \
--hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \
--hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349
# via
# requests-unixsocket
# taskcluster-taskgraph
Expand All @@ -79,19 +96,20 @@ slugid==2.0.0 \
--hash=sha256:a950d98b72691178bdd4d6c52743c4a2aa039207cf7a97d71060a111ff9ba297 \
--hash=sha256:aec8b0e01c4ad32e38e12d609eab3ec912fd129aaf6b2ded0199b56a5f8fd67c
# via taskcluster-taskgraph
taskcluster-taskgraph==1.3.0 \
--hash=sha256:a1050f8a613e31fcd7bc4fed85e07e57baa5675a5a5719065caebada533eb8f5 \
--hash=sha256:bd3c35d82296c323064c8b6e6d4a88ab186bcd872bdd930bfe734a0b2525a082
taskcluster-taskgraph==4.1.1 \
--hash=sha256:757c8886dac97dcf7100e7311fe917f9fd4f4fa88c46d954f0682bd96c07f61e \
--hash=sha256:fd177b0172f8b6a93e4f5da69dbdd4e05a2ef4615ed66d44f2dbb3197610202d
# via -r requirements.in
taskcluster-urls==13.0.1 \
--hash=sha256:5e25e7e6818e8877178b175ff43d2e6548afad72694aa125f404a7329ece0973 \
--hash=sha256:b25e122ecec249c4299ac7b20b08db76e3e2025bdaeb699a9d444556de5fd367 \
--hash=sha256:f66dcbd6572a6216ab65949f0fa0b91f2df647918028436c384e6af5cd12ae2b
# via taskcluster-taskgraph
urllib3==1.26.9 \
--hash=sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14 \
--hash=sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e
urllib3==1.26.13 \
--hash=sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc \
--hash=sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8
# via requests
voluptuous==0.12.2 \
--hash=sha256:4db1ac5079db9249820d49c891cb4660a6f8cae350491210abce741fabf56513
voluptuous==0.13.1 \
--hash=sha256:4b838b185f5951f2d6e8752b68fcf18bd7a9c26ded8f143f92d6d28f3921a3e6 \
--hash=sha256:e8d31c20601d6773cb14d4c0f42aee29c6821bbd1018039aac7ac5605b489723
# via taskcluster-taskgraph
19 changes: 9 additions & 10 deletions taskcluster/xpi_taskgraph/loader/multi_dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import copy

from taskgraph.task import Task
from taskgraph.util.attributes import sorted_unique_list
from taskgraph.util.schema import Schema
from voluptuous import Required

Expand Down Expand Up @@ -66,7 +65,7 @@ def group_tasks(config, tasks):


def loader(kind, path, config, params, loaded_tasks):
job_template = config.get("job-template")
task_template = config.get("task-template")
for dep_tasks in group_tasks(config, loaded_tasks):
kinds = [dep.kind for dep in dep_tasks]
kinds_occurrences = {kind: kinds.count(kind) for kind in kinds}
Expand All @@ -77,21 +76,21 @@ def loader(kind, path, config, params, loaded_tasks):

primary_dep = get_primary_dep(config, dep_tasks_per_unique_key)

job = {"primary-dependency": primary_dep}
if job_template:
job.update(copy.deepcopy(job_template))
job["dependencies"] = {
task = {"primary-dependency": primary_dep}
if task_template:
task.update(copy.deepcopy(task_template))
task["dependencies"] = {
dep_key: dep.label for dep_key, dep in dep_tasks_per_unique_key.items()
}
copy_of_attributes = primary_dep.attributes.copy()
job["attributes"] = {
task["attributes"] = {
**copy_of_attributes,
**job["attributes"],
**task["attributes"],
**{"kind": kind},
}
job.setdefault("run-on-tasks-for", copy_of_attributes['run_on_tasks_for'])
task.setdefault("run-on-tasks-for", copy_of_attributes["run_on_tasks_for"])

yield job
yield task


def get_primary_dep(config, dep_tasks):
Expand Down
19 changes: 9 additions & 10 deletions taskcluster/xpi_taskgraph/loader/single_dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,27 @@

import copy

from voluptuous import Required

from taskgraph.task import Task
from taskgraph.util.schema import Schema
from voluptuous import Required

schema = Schema({Required("primary-dependency", "primary dependency task"): Task})


def loader(kind, path, config, params, loaded_tasks):
"""
Load tasks based on the jobs dependant kinds.
Load tasks based on the tasks dependant kinds.
Optional `only-for-attributes` kind configuration, if specified, will limit
the jobs chosen to ones which have the specified attribute, with the specified
the tasks chosen to ones which have the specified attribute, with the specified
value.
Optional `job-template` kind configuration value, if specified, will be used to
Optional `task-template` kind configuration value, if specified, will be used to
pass configuration down to the specified transforms used.
"""
only_attributes = config.get("only-for-attributes")
only_addon_types = config.get("only-for-addon-types")
job_template = config.get("job-template")
task_template = config.get("task-template")

for task in loaded_tasks:
if task.kind not in config.get("kind-dependencies", []):
Expand All @@ -43,9 +42,9 @@ def loader(kind, path, config, params, loaded_tasks):
if not addon_type in only_addon_types:
continue

job = {"primary-dependency": task}
task = {"primary-dependency": task}

if job_template:
job.update(copy.deepcopy(job_template))
if task_template:
task.update(copy.deepcopy(task_template))

yield job
yield task
Loading

0 comments on commit 4c6ba2f

Please sign in to comment.