Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,11 @@ func (handler *PipelineConfigRestHandlerImpl) GetBuildLogs(w http.ResponseWriter
}(ctx.Done(), cn.CloseNotify())
}
defer cancel()
defer cleanUp()
defer func() {
if cleanUp != nil {
cleanUp()
}
}()
handler.streamOutput(w, logsReader, lastSeenMsgId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,11 @@ func (handler *PipelineConfigRestHandlerImpl) GetPrePostDeploymentLogs(w http.Re
}(ctx.Done(), cn.CloseNotify())
}
defer cancel()
defer cleanUp()
defer func() {
if cleanUp != nil {
cleanUp()
}
}()
handler.streamOutput(w, logsReader, lastSeenMsgId)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/CiHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ func (impl *CiHandlerImpl) GetRunningWorkflowLogs(workflowId int) (*bufio.Reader

func (impl *CiHandlerImpl) getWorkflowLogs(ciWorkflow *pipelineConfig.CiWorkflow) (*bufio.Reader, func() error, error) {
if string(v1alpha1.NodePending) == ciWorkflow.PodStatus {
return bufio.NewReader(strings.NewReader("")), nil, nil
return bufio.NewReader(strings.NewReader("")), func() error { return nil }, nil
}
ciLogRequest := types.BuildLogRequest{
PodName: ciWorkflow.PodName,
Expand Down
Loading