From c2f788adf537b9c668cfda99bffd6a2fd34d65f2 Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Thu, 11 Jan 2024 15:52:27 -0500 Subject: [PATCH 1/2] VPN-6098: Create a 'mark-as-shipped' task for Shipit integration This task makes a call to the Shipit API to update the release's status to "shipped" once all other release tasks have successfully completed. Issue: #8945 --- taskcluster/config.yml | 8 +++++ taskcluster/kinds/mark-as-shipped/kind.yml | 29 +++++++++++++++++++ .../transforms/set_name.py | 20 +++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 taskcluster/kinds/mark-as-shipped/kind.yml create mode 100644 taskcluster/mozillavpn_taskgraph/transforms/set_name.py diff --git a/taskcluster/config.yml b/taskcluster/config.yml index 9d754aacf..b15a56b51 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -105,6 +105,11 @@ workers: implementation: beetmover-import-from-gcs-to-artifact-registry os: scriptworker worker-type: 'mozillavpn-{level}-beetmover' + shipit: + provisioner: scriptworker-k8s + implementation: scriptworker-shipit + os: scriptworker + worker-type: 'mozillavpn-{level}-shipit' succeed: provisioner: built-in implementation: succeed @@ -126,3 +131,6 @@ release-promotion: - fetch - toolchain - toolchain-openssl + +shipit: + scope-prefix: project:mozillavpn:releng:ship-it diff --git a/taskcluster/kinds/mark-as-shipped/kind.yml b/taskcluster/kinds/mark-as-shipped/kind.yml new file mode 100644 index 000000000..48f53911e --- /dev/null +++ b/taskcluster/kinds/mark-as-shipped/kind.yml @@ -0,0 +1,29 @@ +# 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/. +--- +loader: taskgraph.loader.transform:loader + +transforms: + - taskgraph.transforms.from_deps + - mozillavpn_taskgraph.transforms.set_name + - mozilla_taskgraph.transforms.scriptworker.shipit.mark_as_shipped + - taskgraph.transforms.task + +kind-dependencies: + - beetmover-ship + +tasks: + mark-as-shipped: + worker-type: shipit + from-deps: + group-by: + attribute: shipping-phase + copy-attributes: true + unique-kinds: false + set-name: false + shipit-product: + by-build-type: + addons/opt: mozilla-vpn-addons + default: mozilla-vpn-client + run-on-tasks-for: [action] diff --git a/taskcluster/mozillavpn_taskgraph/transforms/set_name.py b/taskcluster/mozillavpn_taskgraph/transforms/set_name.py new file mode 100644 index 000000000..628a9a64c --- /dev/null +++ b/taskcluster/mozillavpn_taskgraph/transforms/set_name.py @@ -0,0 +1,20 @@ +from taskgraph.transforms.base import TransformSequence +from taskgraph.util.dependencies import get_primary_dependency + + +transforms = TransformSequence() + + +@transforms.add +def set_name(config, tasks): + for task in tasks: + if config.kind == "mark-as-shipped": + dep = get_primary_dependency(config, task) + assert dep + + product = ( + "addons" if dep.attributes["build-type"] == "addons/opt" else "client" + ) + task["name"] = f"mark-as-shipped-{product}" + + yield task From 36f77b40b5110d212da20b33d5cd37f3125cb84a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 23:40:06 +0000 Subject: [PATCH 2/2] Bump serde_json from 1.0.116 to 1.0.120 in /extension/bridge Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.116 to 1.0.120. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.116...v1.0.120) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- extension/bridge/Cargo.lock | 4 ++-- extension/bridge/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/bridge/Cargo.lock b/extension/bridge/Cargo.lock index 534e5f3ab..71eafe530 100644 --- a/extension/bridge/Cargo.lock +++ b/extension/bridge/Cargo.lock @@ -102,9 +102,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", diff --git a/extension/bridge/Cargo.toml b/extension/bridge/Cargo.toml index 8d6eae3fd..87ed09c33 100644 --- a/extension/bridge/Cargo.toml +++ b/extension/bridge/Cargo.toml @@ -5,5 +5,5 @@ edition = "2018" [dependencies] mio = { version = "0.8.11", features = ["os-poll", "net"] } -serde_json = "1.0.116" +serde_json = "1.0.120" byteorder = "1.5.0"