From da6161f5a4786aafcde0908e8c32d5811e4accf2 Mon Sep 17 00:00:00 2001 From: Arnon Gilboa Date: Tue, 26 Mar 2024 17:47:12 +0200 Subject: [PATCH] Fix Teardown context for cleanup on timeout Before this change, if the passed Run() context timed out, the Teardown() would time out immediately, so as we want to do the cleanup in the timeout case, the context was changed accordingly. Signed-off-by: Arnon Gilboa --- pkg/internal/launcher/launcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/launcher/launcher.go b/pkg/internal/launcher/launcher.go index ef847d66..ff9c0b8d 100644 --- a/pkg/internal/launcher/launcher.go +++ b/pkg/internal/launcher/launcher.go @@ -74,7 +74,7 @@ func (l Launcher) Run(ctx context.Context) (runErr error) { } defer func() { - if err := l.checkup.Teardown(ctx); err != nil { + if err := l.checkup.Teardown(context.Background()); err != nil { runStatus.FailureReason = append(runStatus.FailureReason, err.Error()) } }()