go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/resultdb/proto/v1/failure_reason.proto (about)

     1  // Copyright 2021 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package luci.resultdb.v1;
    18  
    19  option go_package = "go.chromium.org/luci/resultdb/proto/v1;resultpb";
    20  
    21  // Information about why a test failed. This information may be displayed
    22  // to developers in result viewing UIs and will also be used to cluster
    23  // similar failures together.
    24  // For example, this will contain assertion failure messages and stack traces.
    25  message FailureReason {
    26    // The error message that ultimately caused the test to fail. This should
    27    // only be the error message and should not include any stack traces.
    28    // An example would be the message from an Exception in a Java test.
    29    // In the case that a test failed due to multiple expectation failures, any
    30    // immediately fatal failure should be chosen, or otherwise the first
    31    // expectation failure.
    32    // If this field is empty, other fields (including those from the TestResult)
    33    // may be used to cluster the failure instead.
    34    //
    35    // The size of the message must be equal to or smaller than 1024 bytes in
    36    // UTF-8.
    37    string primary_error_message = 1;
    38  
    39    // Error represents a problem that caused a test to fail, such as a crash
    40    // or expectation failure.
    41    message Error {
    42      // The error message. This should only be the error message and
    43      // should not include any stack traces. An example would be the
    44      // message from an Exception in a Java test.
    45      //
    46      // This message may be used to cluster related failures together.
    47      //
    48      // The size of the message must be equal to or smaller than 1024 bytes in
    49      // UTF-8.
    50      string message = 1;
    51    }
    52  
    53    // The error(s) that caused the test to fail.
    54    //
    55    // If there is more than one error (e.g. due to multiple expectation failures),
    56    // a stable sorting should be used. A recommended form of stable sorting is:
    57    // - Fatal errors (errors that cause the test to terminate immediately first,
    58    //   then
    59    // - Within fatal/non-fatal errors, sort by chronological order
    60    //   (earliest error first).
    61    //
    62    // Where this field is populated, errors[0].message shall match
    63    // primary_error_message.
    64    //
    65    // The total combined size of all errors (as measured by proto.Size()) must
    66    // not exceed 3,172 bytes.
    67    repeated Error errors = 2;
    68  
    69    // The number of errors that are truncated from the errors list above due to
    70    // the size limits.
    71    int32 truncated_errors_count = 3;
    72  }