-
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
fix: printout errors even if we have a timeout #5628
Conversation
before this change, timeout would simply result in the context error showing:
|
after this change, the test results will printout
|
Signed-off-by: jesus m. rodriguez <jesusr@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit.
/lgtm
@@ -233,6 +233,12 @@ func (c *scorecardCmd) run() (err error) { | |||
|
|||
scorecardTests, err = o.Run(ctx) | |||
if err != nil { | |||
// if we got a timeout; printout the test results if there are any | |||
if err == context.DeadlineExceeded { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
if err == context.DeadlineExceeded { | |
if errors.Is(err, context.DeadlineExceeded) { |
Signed-off-by: jesus m. rodriguez <jesusr@redhat.com> Signed-off-by: Venkat Ramaraju <vramaraj@redhat.com>
…ework#5628)" This reverts commit b389906.
Signed-off-by: jesus m. rodriguez jesusr@redhat.com
Description of the change:
Handle
DeadlineExceeded
errors by allowing test output to be printed even during context timeoutsMotivation for the change:
context timeouts hide all test results
Fixes: #5415
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs