From 551d5ddc2c21040a38d2ea67657388aea61c6aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geovanny=20Gonz=C3=A1lez-Rodr=C3=ADguez?= Date: Wed, 25 Jun 2025 13:25:31 +0200 Subject: [PATCH] Change the default behavior for assigning `gpu` to steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the `gpu` configuration is set, but no specific step is specified, apply it to all steps. Signed-off-by: Geovanny González-Rodríguez --- core/controller/ticket_controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/controller/ticket_controller.py b/core/controller/ticket_controller.py index c625ae3..60b9a0c 100644 --- a/core/controller/ticket_controller.py +++ b/core/controller/ticket_controller.py @@ -458,6 +458,8 @@ def create_relval_from_workflow(self, ticket, workflow_id, workflow_dict): step_steps = [x.split(":")[0] for x in new_step["driver"]["step"]] if gpu_steps and (set(gpu_steps) & set(step_steps)): new_step["gpu"] = deepcopy(gpu_dict) + if not gpu_steps and gpu_dict and gpu_dict.get("requires") in ("optional", "required"): + new_step["gpu"] = deepcopy(gpu_dict) if new_step["driver"].get("relval"): events, events_per_job = new_step["driver"]["relval"].split(",", 1)