Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parse output result for failed pod in sync mode #881

Merged
merged 2 commits into from
Jan 26, 2022
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
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