Skip to content

Commit

Permalink
Prepare ABQ 1.6.3 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayazhafiz committed Sep 27, 2023
1 parent 7b49035 commit 5f7fb87
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 125 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.6.3

ABQ 1.6.3 is a patch release.

An issue that could cause ABQ to error when reporting test results after an ABQ
native runner exited in an unexpected state is fixed.

## 1.6.2

ABQ 1.6.2 is a patch release.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/abq_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "abq"
version = "1.6.2"
version = "1.6.3"
edition = "2021"

[dependencies]
Expand Down
1 change: 0 additions & 1 deletion crates/abq_cli/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ fn process_results(

let completed_summary = &CompletedSummary {
native_runner_info: Some(native_runner_info),
other_error_messages: vec![],
};

for reporter in reporters {
Expand Down
2 changes: 1 addition & 1 deletion crates/abq_cli/src/reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl Reporter for RwxV1JsonReporter {
.map(|runner| &runner.specification);

self.collector
.write_json(fd, opt_specification, summary.other_error_messages.clone())
.write_json(fd, opt_specification)
.map_err(|_| ReportingError::FailedToFormat)?;

Ok(())
Expand Down
6 changes: 1 addition & 5 deletions crates/abq_cli/src/workers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@ async fn do_shutdown(
}

let native_runner_info = native_runner_info.clone();
let other_error_messages = status.error_messages().cloned().unwrap_or_default();
let completed_summary = CompletedSummary {
native_runner_info,
other_error_messages,
};
let completed_summary = CompletedSummary { native_runner_info };

let (suite_result, errors) = finalized_reporters.finish(&completed_summary);

Expand Down
5 changes: 3 additions & 2 deletions crates/abq_cli/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4844,6 +4844,7 @@ fn write_partial_rwx_v1_json_results_on_early_runner_termination() {
let rwx_v1_json = std::fs::read_to_string(rwx_v1_json.path()).unwrap();
let rwx_v1_json: serde_json::Value = serde_json::from_str(&rwx_v1_json).unwrap();
insta::assert_json_snapshot!(rwx_v1_json, {
".otherErrors[0].message" => "[Redacted test runner failure message]",
}, @r###"
{
"$schema": "https://raw.githubusercontent.com/rwx-research/test-results-schema/main/v1.json",
Expand All @@ -4853,13 +4854,13 @@ fn write_partial_rwx_v1_json_results_on_early_runner_termination() {
},
"otherErrors": [
{
"message": "ABQ had an error communicating with the native runner: early eof at crates/abq_runners/generic_test_runner/src/lib.rs@1035:87"
"message": "[Redacted test runner failure message]"
}
],
"summary": {
"canceled": 0,
"failed": 0,
"otherErrors": 2,
"otherErrors": 1,
"pended": 0,
"quarantined": 0,
"retries": 0,
Expand Down
1 change: 0 additions & 1 deletion crates/abq_reporting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub struct CompletedSummary {
/// The native test runner that was in use for this test run.
/// Can be [None] if the returned worker never ran any tests.
pub native_runner_info: Option<NativeRunnerInfo>,
pub other_error_messages: Vec<String>,
}

#[derive(Debug, Error)]
Expand Down
25 changes: 4 additions & 21 deletions crates/abq_runners/generic_test_runner/tests/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,27 +674,10 @@ fn native_runner_fails_while_executing_tests() {
let output = results[0].output.as_ref().unwrap();
let output = sanitize_output(output);

insta::assert_snapshot!(output, @r###"
-- Unexpected Test Runner Failure --
The test command
<simulation cmd>
stopped communicating with its abq worker before completing all test requests.
Here's the standard output/error we found for the failing command.
Stdout:
I failed catastrophically
Stderr:
For a reason explainable only by a backtrace
Please see worker 0, runner X for more details.
"###);
assert!(output.contains("-- Unexpected Test Runner Failure --"));
assert!(output.contains(
"stopped communicating with its abq worker before completing all test requests."
));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ pub fn mock_summary() -> CompletedSummary {
host: "zmachine".to_owned(),
},
}),
other_error_messages: vec![],
}
}

Expand Down
7 changes: 0 additions & 7 deletions crates/abq_workers/src/workers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ pub enum WorkersExitStatus {

impl WorkersExitStatus {
pub const SUCCESS: Self = Self::Completed(ExitCode::SUCCESS);

pub fn error_messages(&self) -> Option<&Vec<String>> {
match self {
Self::Completed(_) => None,
Self::Error { errors } => Some(errors),
}
}
}

#[derive(Debug)]
Expand Down

0 comments on commit 5f7fb87

Please sign in to comment.