Closed renatolabs closed 2 weeks ago
cc @cockroachdb/test-eng
The issue is essentially this Sprintf
[1], so we end up losing the err
object. Short of instrumenting require
, that leaves the only option of matching on strings of the form "TRANSIENT_ERROR(ssh_problem): exit status ..." in order to recover the err
object expected by failuresMatchingError
.
Roachtest has automatic failure detection that relies on annotated errors to identify the types of flake, which team to assign the issue to, whether to report it or not, etc. See github.go for more details.
However, this does not work when the test uses the
require
API to ensure the absence of errors. For instance, if test code runs something like the following:then, if
SomeClusterFunction
fails due to a flake (registry.ErrorWithOwner
whereInfraFlake
is true), the failure will not be handled as a flake. This has to do with howrequire
reports errors and our implementation not being able to see the underlying error when reporting the failure.I'm pretty sure there should be a way to fix this and support
require
in roachtests, but this will require (pun intended) some investigation.Jira issue: CRDB-42369