File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
backend/src/v2/cmd/driver Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import (
2929 "os"
3030 "path/filepath"
3131 "strconv"
32+ "strings"
3233
3334 "github.com/golang/glog"
3435 "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec"
@@ -146,6 +147,18 @@ func drive() (err error) {
146147 return err
147148 }
148149
150+ // Support reading component spec from a file if value starts with @
151+ // This bypasses exec() argument size limits for large workflows
152+ if strings .HasPrefix (* componentSpecJson , "@" ) {
153+ filePath := (* componentSpecJson )[1 :] // Remove the "@" prefix
154+ data , err := os .ReadFile (filePath )
155+ if err != nil {
156+ return fmt .Errorf ("failed to read component spec from file %s: %w" , filePath , err )
157+ }
158+ * componentSpecJson = string (data )
159+ glog .Infof ("Read component spec from file: %s (%d bytes)" , filePath , len (data ))
160+ }
161+
149162 proxy .InitializeConfig (* httpProxy , * httpsProxy , * noProxy )
150163 glog .Infof ("input ComponentSpec:%s\n " , prettyPrint (* componentSpecJson ))
151164 componentSpec := & pipelinespec.ComponentSpec {}
You can’t perform that action at this time.
0 commit comments