From 3589647c768dfe0c71a56ff61e274a552a779522 Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Thu, 26 Sep 2024 12:09:48 -0400 Subject: [PATCH] fix: always get the workspace when executing workflow steps Signed-off-by: Donnie Adams --- .../handlers/workflowexecution/workflowexecution.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/controller/handlers/workflowexecution/workflowexecution.go b/pkg/controller/handlers/workflowexecution/workflowexecution.go index 7b7afc44..49ae2767 100644 --- a/pkg/controller/handlers/workflowexecution/workflowexecution.go +++ b/pkg/controller/handlers/workflowexecution/workflowexecution.go @@ -161,10 +161,8 @@ func (h *Handler) newThread(ctx context.Context, c kclient.Client, wf *v1.Workfl } var ws v1.Workspace - if workspaceName == "" { - if err := c.Get(ctx, router.Key(wf.Namespace, wf.Status.WorkspaceName), &ws); err != nil { - return nil, err - } + if err := c.Get(ctx, router.Key(wf.Namespace, workspaceName), &ws); err != nil { + return nil, err } var knowledgWs v1.Workspace