From 60d46711aab43a516e63bed9d92905623c2abb85 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:13:03 +0000 Subject: [PATCH 1/2] Initial plan From 113da39bacc05183a6e9344a42985901e8a3c276 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:26:16 +0000 Subject: [PATCH 2/2] refactor: encapsulate deploy/stop status difference in set-target-status step Replace hardcoded status literals in SQL UPDATE queries with a parameterized approach using step.set to declare target_status at the top of each pipeline. - Deploy pipeline: set-target-status sets target_status = "active" - Stop pipeline: set-target-status sets target_status = "stopped" - update-status query now uses ? placeholder for status value - status is passed as first param referencing set-target-status.target_status The only structural difference between the two pipelines is now the value in set-target-status, making the semantic intent of each pipeline clear while the update logic (SQL query, param pattern) is identical. Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- admin/config.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/admin/config.yaml b/admin/config.yaml index 1be52a64..17c96315 100644 --- a/admin/config.yaml +++ b/admin/config.yaml @@ -1033,6 +1033,11 @@ workflows: middlewares: [admin-cors, admin-auth-middleware] pipeline: steps: + - name: set-target-status + type: step.set + config: + values: + target_status: "active" - name: parse-request type: step.request_parse config: @@ -1060,8 +1065,9 @@ workflows: type: step.db_exec config: database: admin-db - query: "UPDATE workflows SET status = 'active', updated_at = ? WHERE id = ?" + query: "UPDATE workflows SET status = ?, updated_at = ? WHERE id = ?" params: + - "{{index .steps \"set-target-status\" \"target_status\"}}" - "{{index .steps \"set-now\" \"now\"}}" - "{{index .steps \"parse-request\" \"path_params\" \"id\"}}" - name: get-updated @@ -1089,6 +1095,11 @@ workflows: middlewares: [admin-cors, admin-auth-middleware] pipeline: steps: + - name: set-target-status + type: step.set + config: + values: + target_status: "stopped" - name: parse-request type: step.request_parse config: @@ -1116,8 +1127,9 @@ workflows: type: step.db_exec config: database: admin-db - query: "UPDATE workflows SET status = 'stopped', updated_at = ? WHERE id = ?" + query: "UPDATE workflows SET status = ?, updated_at = ? WHERE id = ?" params: + - "{{index .steps \"set-target-status\" \"target_status\"}}" - "{{index .steps \"set-now\" \"now\"}}" - "{{index .steps \"parse-request\" \"path_params\" \"id\"}}" - name: get-updated