Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cli/src/upload_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@

use api::client::ApiClient;
use api::{client::get_api_host, urls::url_for_test_case};
use bundle::{unzip_tarball, BundleMeta, BundlerUtil, Test};
use bundle::{BundleMeta, BundlerUtil, Test, unzip_tarball};
use clap::{ArgAction, Args};
use constants::EXIT_SUCCESS;
use context::bazel_bep::common::BepParseResult;
use display::{end_output::EndOutput, message::DisplayMessage};
use pluralizer::pluralize;
use superconsole::{
style::{style, Attribute, Color, Stylize},
Line, Lines, Span,
style::{Attribute, Color, Stylize, style},
};
use tempfile::TempDir;

use crate::context_quarantine::QuarantineContext;
use crate::validate_command::JunitReportValidations;
use crate::{
context::{
gather_debug_props, gather_exit_code_and_quarantined_tests_context,
PreTestContext, gather_debug_props, gather_exit_code_and_quarantined_tests_context,
gather_initial_test_context, gather_post_test_context, gather_upload_id_context,
generate_internal_file, generate_internal_file_from_bep, PreTestContext,
generate_internal_file, generate_internal_file_from_bep,
},
error_report::ErrorReport,
report_limiting::ValidationReport,
Expand Down Expand Up @@ -448,7 +448,7 @@
.quarantine_results
.clone();

// trunk-ignore(clippy/assigning_clones)

Check notice on line 451 in cli/src/upload_command.rs

View workflow job for this annotation

GitHub Actions / Trunk Check

trunk(ignore-does-nothing)

[new] trunk-ignore(clippy/assigning_clones) is not suppressing a lint issue
meta.failed_tests = quarantine_context.failures.clone();

let upload_started_at = chrono::Utc::now();
Expand Down Expand Up @@ -629,7 +629,7 @@
))?]));
if self.quarantine_context.fetch_status.is_failure() {
output.push(Line::from_iter([Span::new_styled(
style(" We were unable to determine the quarantine status for tests. Any failing tests will be reported as failures".to_string()).attribute(Attribute::Dim),
style(" We were unable to determine the quarantine status for tests. Any failing tests will be reported as failures".to_string()).with(Color::Yellow).attribute(Attribute::Bold),
)?]));
}
output.push(Line::default());
Expand Down Expand Up @@ -840,7 +840,9 @@
} else if failures.is_empty() && self.quarantine_context.exit_code != EXIT_SUCCESS {
// no test failures found but exit code not 0
output.push(Line::from_iter([
Span::new_unstyled("⚠️ No test failures found, but non zero exit code provided: ")?,
Span::new_unstyled(
"⚠️ No test failures found, but non zero exit code provided: ",
)?,
Span::new_styled(
style(format!("{}", self.quarantine_context.exit_code))
.attribute(Attribute::Bold),
Expand Down