From b9e1561df64fc7ef94bd2a9c8fa0975ae4d21d9c Mon Sep 17 00:00:00 2001 From: tooptoop4 <33283496+tooptoop4@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:07:09 +1000 Subject: [PATCH] fix: only set ARGO_PROGRESS_FILE if self reporting progress (#13089) Fixes point 5 of #13089 --- workflow/controller/workflowpod.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/workflow/controller/workflowpod.go b/workflow/controller/workflowpod.go index 26d27228d075..e41b6eee52b2 100644 --- a/workflow/controller/workflowpod.go +++ b/workflow/controller/workflowpod.go @@ -295,13 +295,16 @@ func (woc *wfOperationCtx) createWorkflowPod(ctx context.Context, nodeName strin {Name: common.EnvVarNodeID, Value: nodeID}, {Name: common.EnvVarIncludeScriptOutput, Value: strconv.FormatBool(opts.includeScriptOutput)}, {Name: common.EnvVarDeadline, Value: woc.getDeadline(opts).Format(time.RFC3339)}, - {Name: common.EnvVarProgressFile, Value: common.ArgoProgressPath}, } - // only set tick durations if progress is enabled. The EnvVarProgressFile is always set (user convenience) but the - // progress is only monitored if the tick durations are >0. + // only set tick durations/EnvVarProgressFile if progress is enabled. + // The progress is only monitored if the tick durations are >0. if woc.controller.progressPatchTickDuration != 0 && woc.controller.progressFileTickDuration != 0 { envVars = append(envVars, + apiv1.EnvVar{ + Name: common.EnvVarProgressFile, + Value: common.ArgoProgressPath, + }, apiv1.EnvVar{ Name: common.EnvVarProgressPatchTickDuration, Value: woc.controller.progressPatchTickDuration.String(),