From 850cfc52d2f93cbfb75caa5b7fb79c972915a923 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Thu, 19 Dec 2024 14:10:26 +0100 Subject: [PATCH] ci: check `tc-admin diff` exit code Avoid optimizing out all tasks when the diff fails. --- taskcluster/fxci_config_taskgraph/optimizations.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taskcluster/fxci_config_taskgraph/optimizations.py b/taskcluster/fxci_config_taskgraph/optimizations.py index e06947fb..e9c4b2eb 100644 --- a/taskcluster/fxci_config_taskgraph/optimizations.py +++ b/taskcluster/fxci_config_taskgraph/optimizations.py @@ -29,9 +29,12 @@ def _get_modified_worker_pools(self) -> set[str]: ] env = os.environ.copy() if "TASKCLUSTER_PROXY_URL" in env: + # Force tc-admin diff to look at fxci even when we're running on stage del env["TASKCLUSTER_PROXY_URL"] env["TASKCLUSTER_ROOT_URL"] = FIREFOXCI_ROOT_URL proc = subprocess.run(cmd, stdout=subprocess.PIPE, text=True, env=env) + if proc.returncode not in (0, 2): + proc.check_returncode() lines = [line for line in proc.stdout.splitlines() if line.startswith("!")] worker_pools = set()