From aee873e4d1c90c24d76a4461f1b7254d39f2941a Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 10 Apr 2024 17:26:10 +0300 Subject: [PATCH] fix: don't return error for missed pod --- pkg/executor/containerexecutor/containerexecutor.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/executor/containerexecutor/containerexecutor.go b/pkg/executor/containerexecutor/containerexecutor.go index 89160c43d7c..5c2dffcc4ec 100644 --- a/pkg/executor/containerexecutor/containerexecutor.go +++ b/pkg/executor/containerexecutor/containerexecutor.go @@ -370,7 +370,8 @@ func (c *ContainerExecutor) updateResultsFromPod( podsClient := c.clientSet.CoreV1().Pods(execution.TestNamespace) latestExecutorPod, err := podsClient.Get(context.Background(), executorPod.Name, metav1.GetOptions{}) if err != nil { - return execution.ExecutionResult, err + execution.ExecutionResult.Err(err) + return execution.ExecutionResult, nil } var scraperLogs []byte @@ -404,11 +405,15 @@ func (c *ContainerExecutor) updateResultsFromPod( // continue on poll err and try to get logs later l.Errorw("waiting for scraper pod complete error", "error", err) } + if err != nil { + execution.ExecutionResult.Err(err) + } l.Debug("poll scraper immediate end") latestScraperPod, err := podsClient.Get(context.Background(), scraperPod.Name, metav1.GetOptions{}) if err != nil { - return execution.ExecutionResult, err + execution.ExecutionResult.Err(err) + return execution.ExecutionResult, nil } pvcsClient := c.clientSet.CoreV1().PersistentVolumeClaims(execution.TestNamespace)