Skip to content

Commit

Permalink
Add tag for error from Tpx binary
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Will-MingLun-Li authored and facebook-github-bot committed Jan 26, 2025
1 parent 84e4afb commit e6c8429
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/buck2_data/error.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions app/buck2_error/src/classify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ pub(crate) fn category_and_rank(tag: ErrorTag) -> (Option<Tier>, 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),
Expand Down
2 changes: 1 addition & 1 deletion app/buck2_test/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6c8429

Please sign in to comment.