You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
102 buf := new(bytes.Buffer)
103 _, returnErr = io.Copy(buf, podLogs)
104 if err != nil { <--- this should be returnErr
105 log.Error(err, "unable to copy logs from the pod")
106 return
107 }
108
109 if returnErr = json.Unmarshal(buf.Bytes(), &inspectOutput); returnErr != nil {
110 // this shouldn't normally happen but if it does, let's log output by default
111 log.Error(returnErr, fmt.Sprintf("unable to marshal: `%s`", buf.String()))
112 }
yorugac
changed the title
Unhandle error when copying log from pod in controller
Handle error when copying log from initializer in controller
Sep 3, 2024
Brief summary
When investigating an error running a test I fund this message in the controller's log:
Looking at the code I found an unhandled error when reading logs from the pod (line 104) that can be hiding the root cause of this error:
k6-operator version or image
v0.0.16
Helm chart version (if applicable)
No response
TestRun / PrivateLoadZone YAML
Other environment details (if applicable)
Trying to run a test with a custom runner image
Steps to reproduce the problem
N/A
Expected behaviour
N/A
Actual behaviour
N/A
The text was updated successfully, but these errors were encountered: