Skip to content

Commit

Permalink
fix: patch report outputs completed if task result not exists. (argop…
Browse files Browse the repository at this point in the history
…roj#12748)

Signed-off-by: shuangkun <[email protected]>
  • Loading branch information
shuangkun authored Mar 6, 2024
1 parent d27c9d0 commit 0a75598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ func (we *WorkflowExecutor) FinalizeOutput(ctx context.Context) {
err := we.patchTaskResultLabels(ctx, map[string]string{
common.LabelKeyReportOutputsCompleted: "true",
})
if apierr.IsForbidden(err) {
if apierr.IsForbidden(err) || apierr.IsNotFound(err) {
log.WithError(err).Warn("failed to patch task result, falling back to legacy/insecure pod patch, see https://argo-workflows.readthedocs.io/en/latest/workflow-rbac/")
// Only added as a backup in case LabelKeyReportOutputsCompleted could not be set
err = we.AddAnnotation(ctx, common.AnnotationKeyReportOutputsCompleted, "true")
Expand Down

0 comments on commit 0a75598

Please sign in to comment.