Skip to content

Commit f674403

Browse files
committed
added comments
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
1 parent cf9ed65 commit f674403

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

actions/k8s/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ func buildOutputUri(ctx context.Context, ta *executorv1.TaskAction) string {
579579
return ""
580580
}
581581
attempt := ta.Status.Attempts
582-
if attempt == 0 {
582+
if attempt == 0 { // if attempts is not set, default to 1
583583
attempt = 1
584584
}
585585
prefix, err := plugin.ComputeActionOutputPath(ctx, ta.Namespace, ta.Name, ta.Spec.RunOutputBase, ta.Spec.ActionName, attempt)

executor/pkg/plugin/task_exec_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func NewTaskExecutionContext(
137137
// Output writer — scope outputs per action and attempt so retries don't overwrite each other.
138138
// Path: <RunOutputBase>/<shard>/<ActionName>/<attempt>/
139139
attempt := taskAction.Status.Attempts
140-
if attempt == 0 {
140+
if attempt == 0 { // if attempts is not set, default to 1
141141
attempt = 1
142142
}
143143
outputPrefix, err := ComputeActionOutputPath(ctx, taskAction.Namespace, taskAction.Name, taskAction.Spec.RunOutputBase, taskAction.Spec.ActionName, attempt)

0 commit comments

Comments
 (0)