Skip to content

Commit

Permalink
fix: parse output result for failed pod (#881)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin and vsukhin authored Jan 26, 2022
1 parent 0fd321a commit 0e6c066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/jobs/jobclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (c *JobClient) LaunchK8sJobSync(image string, repo result.Repository, execu
// wait for complete
l.Debug("poll immediate waiting for pod to succeed")
if err := wait.PollImmediate(pollInterval, pollTimeout, IsPodReady(c.ClientSet, pod.Name, c.Namespace)); err != nil {
// continue on poll err and try to get logs later
l.Errorw("waiting for pod complete error", "error", err)
}
l.Debug("poll immediate end")
Expand Down
2 changes: 2 additions & 0 deletions pkg/runner/output/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func ParseRunnerOutput(b []byte) (result testkube.ExecutionResult, logs []string
// try to locate execution result should be the last one
// but there could be some buffers or go routines used so go through whole
// array too
result.Status = testkube.ExecutionStatusError
for scanner.Scan() {
b := scanner.Bytes()

Expand All @@ -50,6 +51,7 @@ func ParseRunnerOutput(b []byte) (result testkube.ExecutionResult, logs []string
continue
}

result.Status = testkube.ExecutionStatusSuccess
switch log.Type_ {
case TypeResult:
if log.Result != nil {
Expand Down

0 comments on commit 0e6c066

Please sign in to comment.