From 09641b2cba72de30a008d8a2128550ebd6751f26 Mon Sep 17 00:00:00 2001 From: Naman-Nirwan Date: Mon, 21 Sep 2026 15:15:08 +0530 Subject: [PATCH] fixed the --input-set bug in execute pipeline --- modules/pipeline/execute.go | 12 ++++++++++-- pkg/spec/pipeline.spec.yaml | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/pipeline/execute.go b/modules/pipeline/execute.go index 3cd5ade..ae13b18 100644 --- a/modules/pipeline/execute.go +++ b/modules/pipeline/execute.go @@ -29,13 +29,21 @@ const executeRetryBodyFnID = "execute_retry_body" func executePipelineBody(ctx *cmdctx.Ctx) (any, error) { inputFile := cmdctx.GetString(ctx.FlagValues, "input-file") inputPairs := cmdctx.GetStringSlice(ctx.FlagValues, "input") - + inputSetIDs := cmdctx.GetStringSlice(ctx.FlagValues, "input-set") + if len(inputSetIDs) > 0 { + hlog.Debug("execute pipeline: input-set flags provided", "inputSetIDs", inputSetIDs) + body, err := executeInputSetBody(ctx) + if err != nil { + return nil, err + } + return body, nil + } inputs, err := parseKeyValuePairs(inputPairs) if err != nil { return nil, err } - if inputFile == "" && len(inputs) == 0 { + if inputFile == "" && len(inputs) == 0 && len(inputSetIDs) == 0 { hlog.Debug("execute pipeline: no runtime inputs provided") return nil, nil } diff --git a/pkg/spec/pipeline.spec.yaml b/pkg/spec/pipeline.spec.yaml index 55199b2..55e8324 100644 --- a/pkg/spec/pipeline.spec.yaml +++ b/pkg/spec/pipeline.spec.yaml @@ -527,6 +527,7 @@ commands: description: Branch to execute (for remote pipelines) - name: input-set description: Input set identifier to apply when executing + is_multi: true - name: input description: "Runtime input as key=value (repeatable); e.g. --input loop_count=5" is_multi: true @@ -537,7 +538,7 @@ commands: description: Stream logs live after execution starts; exits when the execution reaches a terminal state endpoint: method: POST - path: /pipeline/api/pipeline/execute/{{ctx.id}} + path: '{{len(flags["input-set"]) > 0 ? "/pipeline/api/pipeline/execute/" + ctx.id + "/inputSetList" : "/pipeline/api/pipeline/execute/" + ctx.id}}' item_expr: it.data.planExecution text_header: "\nExecution started successfully.\n" text_footer: | @@ -551,7 +552,6 @@ commands: body_fn: execute_body query_params: branch: flags.branch - inputSetIdentifiers: flags["input-set"] - command: execute pipeline:dynamic verb: execute