-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachtest: use first transient error when checking for flakes #124403
roachtest: use first transient error when checking for flakes #124403
Conversation
5efd8e3
to
84e0bb6
Compare
matched = true | ||
err = errors.Unwrap(err) | ||
if err == nil { | ||
break |
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.
Or keep going? What if the next occurrence can be unwrapped?
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.
errors.Unwrap(err)
returning nil
means the err
passed doesn't wrap any other error, so there's no "next occurrence". But maybe I misunderstand what you're trying to say.
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.
I was thinking of "multi-errors" (more in the comment for UnwrapOnce
). Either way, Unwrap
returns nil
, in this case, so I suppose those errors aren't very likely.
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.
Thanks!
Previously, roachtest would only look at the outermost error in a chain that matched a `TransientError` (or `ErrorWithOwnership`) when checking for flakes. However, that is in most cases *not* what we want: if a transient error wraps another transient error, the actual reason for the failure is the original (wrapped) error. Informs: cockroachdb#123887 Release note: None
84e0bb6
to
e24022b
Compare
TFTR! bors r=srosenberg |
Build failed (retrying...): |
blathers backport 24.1 23.2 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from e24022b to blathers/backport-release-23.2-124403: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This PR is very similar to cockroachdb#124403, but applying the same logic when finding `ErrorWithOwnership` instances (instead of `TransientErorr` instances). Specifically, we look for the innermost instance of an error with ownership to decide what ownership to apply. The idea is that ownership should be assigned based on the "first" error observed during the test. Fixes: cockroachdb#130469 Release note: None
130508: roachtest: find error ownership in the innermost error in the chain r=srosenberg a=renatolabs This PR is very similar to #124403, but applying the same logic when finding `ErrorWithOwnership` instances (instead of `TransientErorr` instances). Specifically, we look for the innermost instance of an error with ownership to decide what ownership to apply. The idea is that ownership should be assigned based on the "first" error observed during the test. Fixes: #130469 Release note: None Co-authored-by: Renato Costa <renato@cockroachlabs.com>
Previously, roachtest would only look at the outermost error in a chain that matched a
TransientError
(orErrorWithOwnership
) when checking for flakes. However, that is in most cases not what we want: if a transient error wraps another transient error, the actual reason for the failure is the original (wrapped) error.Informs: #123887
Release note: None