Skip to content
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

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

ayazhafiz
Copy link
Contributor

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

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.
Comment on lines +428 to +451
#[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,
}
}
}
Copy link
Contributor Author

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.

@ayazhafiz ayazhafiz enabled auto-merge (squash) September 27, 2023 19:20
"summary": {
"canceled": 0,
"failed": 0,
"otherErrors": 1,
"otherErrors": 2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 should this be 1?

Copy link
Member

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)

@github-actions
Copy link

Bigtest for c04e1ea (run)

Benchmarks:

  • RSpec: 15.32% overhead
    • RSpec time: 17.82 seconds
    • ABQ time: 20.55 seconds
  • RSpec parallel, 10 runs: max 15.99% overhead
    • min 7.24% overhead
    • standard deviation: 3.11%
  • Jest: 7.67% overhead
    • Jest time: 20.936 seconds
    • ABQ time: 22.542 seconds

Fuzz result sizes:

  • PASSED

@ayazhafiz ayazhafiz merged commit 7b49035 into main Sep 27, 2023
17 checks passed
@ayazhafiz ayazhafiz deleted the ayaz/fix-native-runner-reporter-error branch September 27, 2023 19:39
ayazhafiz added a commit that referenced this pull request Sep 27, 2023
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.
@ayazhafiz ayazhafiz mentioned this pull request Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants