-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Error: error running tests context deadline exceeded is missing the root cause #5415
Comments
Looking at the code when there is a timeout, we check the timeout error. select {
case <-ctx.Done():
err = ctx.Err()
default:
} So we had a context timeout and captured the error. It does look like we may still have scorecardTests, err = o.Run(ctx)
if err != nil {
return fmt.Errorf("error running tests %w", err)
} If there are no errors, we will usually get to if err := c.printOutput(scorecardTests); err != nil {
log.Fatal(err)
} I think we should also see if there are results in scorecardTests, err = o.Run(ctx)
if err != nil && err != context.DeadlineExceeded {
return fmt.Errorf("error running tests %w", err)
} Or we could ALWAYS print out the results regardless of error. |
So I posted a PR #5628 that prints out the output. @camilamacedo86 let me know if this seems okay. Basically if there is a timeout, we will print the test results then return an error to cobra so that we still error out. This should give any information that may have occurred during a test failure.
|
Bug Report
Error: error running tests context deadline exceeded is missing the root cause
What did you do?
CVP has been using Scorecard and facing:
What did you expect to see?
The root cause of the issue in the error message
Ideally, if possible as well a suggestion over how to solve such as: Use the options
--storage-image
for the image ... and--untar-image
for ... in order to ... (if that is the same root cause of #5306)What did you see instead? Under which circumstances?
Only
error running tests context deadline exceeded
which shows that occurs when is not possible to download "docker.io/busybox:1.33.0". See: #4886The text was updated successfully, but these errors were encountered: