-
Notifications
You must be signed in to change notification settings - Fork 0
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
Surface native runner information in the presence of errors, and unconditionally write to reporters. #76
Conversation
Our TLS certs for tests expired Sept 1, 2023. Create a new set for another year.
Prior to this commit, an ABQ worker that observed a native runner failure would bail with an error, without communicating the native runner's information. This could pose a problem, because if the worker ran any tests, we attempt to write to reporters regardless of whether the worker succeeded or errored. As such, when it is available, make sure to bubble up the native runner information to the reporters, even in error scenarios.
Although the native runner info will be filled in the rwx v1 json reporter whenever possible, as a defensive strategy to avoid bailing out from runs, use the "other" specification if there are cases where the runner info is missing.
#[derive(Serialize, Deserialize, Clone)] | ||
struct OtherError { | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
location: Option<Location>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
meta: Option<MetadataMap>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
exception: Option<String>, | ||
message: String, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
backtrace: Option<Vec<String>>, | ||
} | ||
|
||
impl OtherError { | ||
fn from_message(message: String) -> Self { | ||
Self { | ||
location: None, | ||
meta: None, | ||
exception: None, | ||
message, | ||
backtrace: None, | ||
} | ||
} | ||
} |
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 confirmed captain
is able to re-parse the JSON produced by this addition.
"summary": { | ||
"canceled": 0, | ||
"failed": 0, | ||
"otherErrors": 1, | ||
"otherErrors": 2, |
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.
🤔 should this be 1?
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 differently stated, we only have one otherError
in the list of other errors and I the summary is supposed to reflect those lists (other errors and the tests)
Benchmarks:
Fuzz result sizes:
|
As Kyle noted in #76, the calculation of other errors was incorrect. It turns out that we were already recording other native runner errors, but not bubbling them up appropriately to the surface of the rwx v1 json! This makes sure we do so.
See individual commits.
Update expired testdata TLS certs
Our TLS certs for tests expired Sept 1, 2023. Create a new set for
another year.
Make sure to communicate native runner info even if tests fail
Prior to this commit, an ABQ worker that observed a native runner
failure would bail with an error, without communicating the native
runner's information. This could pose a problem, because if the worker
ran any tests, we attempt to write to reporters regardless of whether
the worker succeeded or errored. As such, when it is available, make
sure to bubble up the native runner information to the reporters, even
in error scenarios.
Unconditionally use "other" framework if native runner info is missing
Although the native runner info will be filled in the rwx v1 json
reporter whenever possible, as a defensive strategy to avoid bailing out
from runs, use the "other" specification if there are cases where the
runner info is missing.
Report native runner errors as "other errors" in the rwx v1 json reporter