@@ -105,9 +105,6 @@ func (t *V2Spec) ScheduledWorkflow(modelJob *model.Job) (*scheduledworkflow.Sche
105105 return nil , util .Wrap (err , "Failed to convert runtime config" )
106106 }
107107 job .RuntimeConfig = jobRuntimeConfig
108-
109- // Parameter macros like [[CurrentTime]], [[RunUUID]], [[ScheduledTime]], [[Index]] are not formatted here.
110- // They remain unformatted in the ScheduledWorkflow spec and will be formatted by the scheduled workflow controller
111108 if err = t .validatePipelineJobInputs (job ); err != nil {
112109 return nil , util .Wrap (err , "invalid pipeline job inputs" )
113110 }
@@ -319,37 +316,6 @@ func (t *V2Spec) RunWorkflow(modelRun *model.Run, options RunWorkflowOptions) (u
319316 return nil , util .NewInternalServerError (err , "Failed to convert to PipelineJob RuntimeConfig" )
320317 }
321318 job .RuntimeConfig = jobRuntimeConfig
322-
323- // Format parameters to expand macros like [[CurrentTime]], [[RunUUID]], [[ScheduledTime]], [[Index]] (V1 forward compatibility).
324- // Uses NewSWFParameterFormatter to support all macros. For standalone runs, [[ScheduledTime]] and [[Index]] remain unformatted
325-
326- if job .RuntimeConfig != nil && len (job .RuntimeConfig .GetParameterValues ()) > 0 {
327- scheduledEpoch := int64 (- 1 ) // disabled by default
328-
329- if modelRun .ScheduledAtInSec > 0 {
330- scheduledEpoch = modelRun .ScheduledAtInSec
331- }
332- formatter := util .NewSWFParameterFormatter (
333- options .RunID ,
334- scheduledEpoch ,
335- options .RunAt ,
336- - 1 ,
337- )
338- // Convert structpb.Value to strings, format, convert back
339- paramValues := job .RuntimeConfig .GetParameterValues ()
340- stringParams := make (map [string ]string )
341- for key , val := range paramValues {
342- if strVal := val .GetStringValue (); strVal != "" {
343- stringParams [key ] = strVal
344- }
345- }
346- // Format the string parameters
347- formattedParams := formatter .FormatWorkflowParameters (stringParams )
348- // Convert formatted strings back to structpb.Value
349- for key , formattedVal := range formattedParams {
350- paramValues [key ] = structpb .NewStringValue (formattedVal )
351- }
352- }
353319 if err = t .validatePipelineJobInputs (job ); err != nil {
354320 return nil , util .Wrap (err , "invalid pipeline job inputs" )
355321 }
0 commit comments