Skip to content

Commit a509aa3

Browse files
huntlyroaddivyansh42
authored andcommitted
fix panic when trying to read pod logs when pod is already deleted
1 parent b4b9908 commit a509aa3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/log/task_reader.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ func (r *Reader) getTaskRunPodNames(run *v1.TaskRun) (<-chan string, <-chan erro
290290

291291
func filterSteps(pod *corev1.Pod, allSteps bool, stepsGiven []string) []*step {
292292
steps := []*step{}
293+
if pod == nil {
294+
return steps
295+
}
293296
stepsInPod := getSteps(pod)
294297

295298
if allSteps {

0 commit comments

Comments
 (0)