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
jobs: tiny improvement to error handling #57307
Conversation
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis and @knz)
pkg/jobs/adopt.go, line 312 at r1 (raw file):
id, s.ID()) default: return errors.AssertionFailedf("unexpected job status %s: %v", job)
Your format string expects two arguments here and you've only provided one. Did you mean statusString, job
instead of only job
?
4cec27b
to
0933bce
Compare
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis and @knz)
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @knz and @postamar)
pkg/jobs/adopt.go, line 312 at r1 (raw file):
Previously, postamar (Marius Posta) wrote…
Your format string expects two arguments here and you've only provided one. Did you mean
statusString, job
instead of onlyjob
?
Quite right - fixed.
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.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @knz)
0933bce
to
4806820
Compare
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.
Reviewed 2 of 2 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 2 stale) (waiting on @jordanlewis)
pkg/jobs/adopt.go, line 262 at r2 (raw file):
// comment this out. // if errors.HasAssertionFailure(err) { // logcrash.ReportOrPanic(ctx, nil, err.Error())
Can you update this comment too?
(ditto the one in deprecated.go
)
Hmm, I don't understand those comments. @lucy-zhang? |
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.
The introduction of the ReportOrPanic
calls was originally so that we could have tests crash in contexts where we don't actually want to crash or return errors in production. I commented it out because it was causing test crashes in contexts where we actually wanted failures (IIRC). So if we don't want to call ReportOrPanic
anymore, then none of the commented-out lines are relevant anymore and should just be removed.
Reviewed 1 of 2 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 2 stale) (waiting on @jordanlewis)
Release note: None
4806820
to
4235ab6
Compare
bors r+ |
Build succeeded: |
Closes #56999
Release note: None