Skip to content

Commit

Permalink
fix: only set ARGO_PROGRESS_FILE if self reporting progress (argoproj…
Browse files Browse the repository at this point in the history
…#13089)

Fixes point 5 of argoproj#13089
  • Loading branch information
tooptoop4 authored Jun 2, 2024
1 parent 85c8832 commit b9e1561
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit b9e1561

Please sign in to comment.