From e6c84298f305c5482291d41b63b1167c4e159387 Mon Sep 17 00:00:00 2001 From: Will Li Date: Sun, 26 Jan 2025 01:06:22 -0800 Subject: [PATCH] Add tag for error from Tpx binary Summary: Vast majority of infra errors for `buck2 test` are coming from TPX binary, so adding a tag for it to make it more distinguishable for now. Skimming through Scuba, most of these are actually user errors for passing in the wrong argument. This is mostly a note for myself but we could do a string match for `Error parsing test runner arguments` to mark 90% of these are User Errors, but that's a brittle solution especially since that's just an error context and not even an actual ErrorType. Reviewed By: JakobDegen Differential Revision: D68646142 fbshipit-source-id: 2fb44f175d43eea01b775b8207fb7c5f7f14ad7e --- app/buck2_data/error.proto | 3 +++ app/buck2_error/src/classify.rs | 1 + app/buck2_test/src/command.rs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/buck2_data/error.proto b/app/buck2_data/error.proto index f89c45249a0e..de94317071a4 100644 --- a/app/buck2_data/error.proto +++ b/app/buck2_data/error.proto @@ -226,6 +226,9 @@ enum ErrorTag { // Tests TEST_DEADLINE_EXPIRED = 5001; + // Error from TPX binary + TPX = 5500; + // None turned into an error. This carries no useful information whatsoever. UNEXPECTED_NONE = 6001; } diff --git a/app/buck2_error/src/classify.rs b/app/buck2_error/src/classify.rs index 9c92fcca7e8b..95b43bee2ed6 100644 --- a/app/buck2_error/src/classify.rs +++ b/app/buck2_error/src/classify.rs @@ -173,6 +173,7 @@ pub(crate) fn category_and_rank(tag: ErrorTag) -> (Option, u32) { ErrorTag::IoEdenUnknownField => rank!(unspecified), ErrorTag::MaterializationError => rank!(unspecified), ErrorTag::CleanInterrupt => rank!(unspecified), + ErrorTag::Tpx => rank!(unspecified), ErrorTag::Http => rank!(unspecified), ErrorTag::DownloadFileHeadRequest => rank!(unspecified), ErrorTag::Install => rank!(unspecified), diff --git a/app/buck2_test/src/command.rs b/app/buck2_test/src/command.rs index 275083010bba..1b6fde18109e 100644 --- a/app/buck2_test/src/command.rs +++ b/app/buck2_test/src/command.rs @@ -561,7 +561,7 @@ async fn test_targets( let res = tag_result!( "executor_launch_failed", - res.map_err(|e| from_any_with_tag(e, buck2_error::ErrorTag::Tier0)), + res.map_err(|e| from_any_with_tag(e, buck2_error::ErrorTag::Tpx)), quiet: true, daemon_in_memory_state_is_corrupted: true, task: false