go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/resultdb/proto/v1/failure_reason.pb.go (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  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.31.0
    18  // 	protoc        v3.21.7
    19  // source: go.chromium.org/luci/resultdb/proto/v1/failure_reason.proto
    20  
    21  package resultpb
    22  
    23  import (
    24  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    25  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    26  	reflect "reflect"
    27  	sync "sync"
    28  )
    29  
    30  const (
    31  	// Verify that this generated code is sufficiently up-to-date.
    32  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    33  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    34  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    35  )
    36  
    37  // Information about why a test failed. This information may be displayed
    38  // to developers in result viewing UIs and will also be used to cluster
    39  // similar failures together.
    40  // For example, this will contain assertion failure messages and stack traces.
    41  type FailureReason struct {
    42  	state         protoimpl.MessageState
    43  	sizeCache     protoimpl.SizeCache
    44  	unknownFields protoimpl.UnknownFields
    45  
    46  	// The error message that ultimately caused the test to fail. This should
    47  	// only be the error message and should not include any stack traces.
    48  	// An example would be the message from an Exception in a Java test.
    49  	// In the case that a test failed due to multiple expectation failures, any
    50  	// immediately fatal failure should be chosen, or otherwise the first
    51  	// expectation failure.
    52  	// If this field is empty, other fields (including those from the TestResult)
    53  	// may be used to cluster the failure instead.
    54  	//
    55  	// The size of the message must be equal to or smaller than 1024 bytes in
    56  	// UTF-8.
    57  	PrimaryErrorMessage string `protobuf:"bytes,1,opt,name=primary_error_message,json=primaryErrorMessage,proto3" json:"primary_error_message,omitempty"`
    58  	// The error(s) that caused the test to fail.
    59  	//
    60  	// If there is more than one error (e.g. due to multiple expectation failures),
    61  	// a stable sorting should be used. A recommended form of stable sorting is:
    62  	//   - Fatal errors (errors that cause the test to terminate immediately first,
    63  	//     then
    64  	//   - Within fatal/non-fatal errors, sort by chronological order
    65  	//     (earliest error first).
    66  	//
    67  	// Where this field is populated, errors[0].message shall match
    68  	// primary_error_message.
    69  	//
    70  	// The total combined size of all errors (as measured by proto.Size()) must
    71  	// not exceed 3,172 bytes.
    72  	Errors []*FailureReason_Error `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
    73  	// The number of errors that are truncated from the errors list above due to
    74  	// the size limits.
    75  	TruncatedErrorsCount int32 `protobuf:"varint,3,opt,name=truncated_errors_count,json=truncatedErrorsCount,proto3" json:"truncated_errors_count,omitempty"`
    76  }
    77  
    78  func (x *FailureReason) Reset() {
    79  	*x = FailureReason{}
    80  	if protoimpl.UnsafeEnabled {
    81  		mi := &file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes[0]
    82  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    83  		ms.StoreMessageInfo(mi)
    84  	}
    85  }
    86  
    87  func (x *FailureReason) String() string {
    88  	return protoimpl.X.MessageStringOf(x)
    89  }
    90  
    91  func (*FailureReason) ProtoMessage() {}
    92  
    93  func (x *FailureReason) ProtoReflect() protoreflect.Message {
    94  	mi := &file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes[0]
    95  	if protoimpl.UnsafeEnabled && x != nil {
    96  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  		if ms.LoadMessageInfo() == nil {
    98  			ms.StoreMessageInfo(mi)
    99  		}
   100  		return ms
   101  	}
   102  	return mi.MessageOf(x)
   103  }
   104  
   105  // Deprecated: Use FailureReason.ProtoReflect.Descriptor instead.
   106  func (*FailureReason) Descriptor() ([]byte, []int) {
   107  	return file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescGZIP(), []int{0}
   108  }
   109  
   110  func (x *FailureReason) GetPrimaryErrorMessage() string {
   111  	if x != nil {
   112  		return x.PrimaryErrorMessage
   113  	}
   114  	return ""
   115  }
   116  
   117  func (x *FailureReason) GetErrors() []*FailureReason_Error {
   118  	if x != nil {
   119  		return x.Errors
   120  	}
   121  	return nil
   122  }
   123  
   124  func (x *FailureReason) GetTruncatedErrorsCount() int32 {
   125  	if x != nil {
   126  		return x.TruncatedErrorsCount
   127  	}
   128  	return 0
   129  }
   130  
   131  // Error represents a problem that caused a test to fail, such as a crash
   132  // or expectation failure.
   133  type FailureReason_Error struct {
   134  	state         protoimpl.MessageState
   135  	sizeCache     protoimpl.SizeCache
   136  	unknownFields protoimpl.UnknownFields
   137  
   138  	// The error message. This should only be the error message and
   139  	// should not include any stack traces. An example would be the
   140  	// message from an Exception in a Java test.
   141  	//
   142  	// This message may be used to cluster related failures together.
   143  	//
   144  	// The size of the message must be equal to or smaller than 1024 bytes in
   145  	// UTF-8.
   146  	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
   147  }
   148  
   149  func (x *FailureReason_Error) Reset() {
   150  	*x = FailureReason_Error{}
   151  	if protoimpl.UnsafeEnabled {
   152  		mi := &file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes[1]
   153  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   154  		ms.StoreMessageInfo(mi)
   155  	}
   156  }
   157  
   158  func (x *FailureReason_Error) String() string {
   159  	return protoimpl.X.MessageStringOf(x)
   160  }
   161  
   162  func (*FailureReason_Error) ProtoMessage() {}
   163  
   164  func (x *FailureReason_Error) ProtoReflect() protoreflect.Message {
   165  	mi := &file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes[1]
   166  	if protoimpl.UnsafeEnabled && x != nil {
   167  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   168  		if ms.LoadMessageInfo() == nil {
   169  			ms.StoreMessageInfo(mi)
   170  		}
   171  		return ms
   172  	}
   173  	return mi.MessageOf(x)
   174  }
   175  
   176  // Deprecated: Use FailureReason_Error.ProtoReflect.Descriptor instead.
   177  func (*FailureReason_Error) Descriptor() ([]byte, []int) {
   178  	return file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescGZIP(), []int{0, 0}
   179  }
   180  
   181  func (x *FailureReason_Error) GetMessage() string {
   182  	if x != nil {
   183  		return x.Message
   184  	}
   185  	return ""
   186  }
   187  
   188  var File_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto protoreflect.FileDescriptor
   189  
   190  var file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDesc = []byte{
   191  	0x0a, 0x3b, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
   192  	0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2f,
   193  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65,
   194  	0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x6c,
   195  	0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x22,
   196  	0xdb, 0x01, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f,
   197  	0x6e, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x72, 0x72,
   198  	0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
   199  	0x52, 0x13, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65,
   200  	0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18,
   201  	0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73,
   202  	0x75, 0x6c, 0x74, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65,
   203  	0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72,
   204  	0x72, 0x6f, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65,
   205  	0x64, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
   206  	0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45,
   207  	0x72, 0x72, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x21, 0x0a, 0x05, 0x45, 0x72,
   208  	0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01,
   209  	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x31, 0x5a,
   210  	0x2f, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67,
   211  	0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2f, 0x70,
   212  	0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x70, 0x62,
   213  	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   214  }
   215  
   216  var (
   217  	file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescOnce sync.Once
   218  	file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescData = file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDesc
   219  )
   220  
   221  func file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescGZIP() []byte {
   222  	file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescOnce.Do(func() {
   223  		file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescData)
   224  	})
   225  	return file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDescData
   226  }
   227  
   228  var file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   229  var file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_goTypes = []interface{}{
   230  	(*FailureReason)(nil),       // 0: luci.resultdb.v1.FailureReason
   231  	(*FailureReason_Error)(nil), // 1: luci.resultdb.v1.FailureReason.Error
   232  }
   233  var file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_depIdxs = []int32{
   234  	1, // 0: luci.resultdb.v1.FailureReason.errors:type_name -> luci.resultdb.v1.FailureReason.Error
   235  	1, // [1:1] is the sub-list for method output_type
   236  	1, // [1:1] is the sub-list for method input_type
   237  	1, // [1:1] is the sub-list for extension type_name
   238  	1, // [1:1] is the sub-list for extension extendee
   239  	0, // [0:1] is the sub-list for field type_name
   240  }
   241  
   242  func init() { file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_init() }
   243  func file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_init() {
   244  	if File_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto != nil {
   245  		return
   246  	}
   247  	if !protoimpl.UnsafeEnabled {
   248  		file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   249  			switch v := v.(*FailureReason); i {
   250  			case 0:
   251  				return &v.state
   252  			case 1:
   253  				return &v.sizeCache
   254  			case 2:
   255  				return &v.unknownFields
   256  			default:
   257  				return nil
   258  			}
   259  		}
   260  		file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   261  			switch v := v.(*FailureReason_Error); i {
   262  			case 0:
   263  				return &v.state
   264  			case 1:
   265  				return &v.sizeCache
   266  			case 2:
   267  				return &v.unknownFields
   268  			default:
   269  				return nil
   270  			}
   271  		}
   272  	}
   273  	type x struct{}
   274  	out := protoimpl.TypeBuilder{
   275  		File: protoimpl.DescBuilder{
   276  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   277  			RawDescriptor: file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDesc,
   278  			NumEnums:      0,
   279  			NumMessages:   2,
   280  			NumExtensions: 0,
   281  			NumServices:   0,
   282  		},
   283  		GoTypes:           file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_goTypes,
   284  		DependencyIndexes: file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_depIdxs,
   285  		MessageInfos:      file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_msgTypes,
   286  	}.Build()
   287  	File_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto = out.File
   288  	file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_rawDesc = nil
   289  	file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_goTypes = nil
   290  	file_go_chromium_org_luci_resultdb_proto_v1_failure_reason_proto_depIdxs = nil
   291  }