Skip to content

Commit

Permalink
fix: don't return error for missed pod
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin committed Apr 10, 2024
1 parent 598010a commit aee873e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/executor/containerexecutor/containerexecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aee873e

Please sign in to comment.