testplans: Create a proto shell for test retry config
BUG=chromium:1051547
TEST=./generate.sh
Change-Id: I5e5deb020c574649fb425355ee0fd04fad402ac4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2052561
Commit-Queue: Dhanya Ganesh <dhanyaganesh@chromium.org>
Tested-by: Dhanya Ganesh <dhanyaganesh@chromium.org>
Auto-Submit: Dhanya Ganesh <dhanyaganesh@chromium.org>
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/descpb.bin b/descpb.bin
index 5acfd77..a5ed465 100644
--- a/descpb.bin
+++ b/descpb.bin
Binary files differ
diff --git a/go/testplans/test_retry.pb.go b/go/testplans/test_retry.pb.go
new file mode 100644
index 0000000..9f21e6f
--- /dev/null
+++ b/go/testplans/test_retry.pb.go
@@ -0,0 +1,221 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: testplans/test_retry.proto
+
+package testplans
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ test_platform "go.chromium.org/chromiumos/infra/proto/go/test_platform"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+//Defines a config for tests to be retried automatically.
+type SuiteRetryCfg struct {
+ // Tag defines which suite this config set should apply.
+ TestSuite string `protobuf:"bytes,1,opt,name=test_suite,json=testSuite,proto3" json:"test_suite,omitempty"`
+ // Scenarios to retry for each build_target.
+ SuiteScenarios []*SuiteRetryCfg_Scenario `protobuf:"bytes,3,rep,name=suite_scenarios,json=suiteScenarios,proto3" json:"suite_scenarios,omitempty"`
+ BuilderScenarios []*SuiteRetryCfg_BuilderScenario `protobuf:"bytes,4,rep,name=builder_scenarios,json=builderScenarios,proto3" json:"builder_scenarios,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SuiteRetryCfg) Reset() { *m = SuiteRetryCfg{} }
+func (m *SuiteRetryCfg) String() string { return proto.CompactTextString(m) }
+func (*SuiteRetryCfg) ProtoMessage() {}
+func (*SuiteRetryCfg) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5e1b8044c4eb67ff, []int{0}
+}
+
+func (m *SuiteRetryCfg) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SuiteRetryCfg.Unmarshal(m, b)
+}
+func (m *SuiteRetryCfg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SuiteRetryCfg.Marshal(b, m, deterministic)
+}
+func (m *SuiteRetryCfg) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SuiteRetryCfg.Merge(m, src)
+}
+func (m *SuiteRetryCfg) XXX_Size() int {
+ return xxx_messageInfo_SuiteRetryCfg.Size(m)
+}
+func (m *SuiteRetryCfg) XXX_DiscardUnknown() {
+ xxx_messageInfo_SuiteRetryCfg.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SuiteRetryCfg proto.InternalMessageInfo
+
+func (m *SuiteRetryCfg) GetTestSuite() string {
+ if m != nil {
+ return m.TestSuite
+ }
+ return ""
+}
+
+func (m *SuiteRetryCfg) GetSuiteScenarios() []*SuiteRetryCfg_Scenario {
+ if m != nil {
+ return m.SuiteScenarios
+ }
+ return nil
+}
+
+func (m *SuiteRetryCfg) GetBuilderScenarios() []*SuiteRetryCfg_BuilderScenario {
+ if m != nil {
+ return m.BuilderScenarios
+ }
+ return nil
+}
+
+// Scenario defines the test failure conditions that trigger retry.
+type SuiteRetryCfg_Scenario struct {
+ // Name of the test.
+ TestName string `protobuf:"bytes,1,opt,name=test_name,json=testName,proto3" json:"test_name,omitempty"`
+ // Failure reason/summary. This field is a substring of the actual error
+ // message. Ex: 'SSH connection failed' or 'DUT rebooted'.
+ Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
+ // Verdict of the test run.
+ Verdict test_platform.TaskState_Verdict `protobuf:"varint,3,opt,name=verdict,proto3,enum=test_platform.TaskState_Verdict" json:"verdict,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SuiteRetryCfg_Scenario) Reset() { *m = SuiteRetryCfg_Scenario{} }
+func (m *SuiteRetryCfg_Scenario) String() string { return proto.CompactTextString(m) }
+func (*SuiteRetryCfg_Scenario) ProtoMessage() {}
+func (*SuiteRetryCfg_Scenario) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5e1b8044c4eb67ff, []int{0, 0}
+}
+
+func (m *SuiteRetryCfg_Scenario) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SuiteRetryCfg_Scenario.Unmarshal(m, b)
+}
+func (m *SuiteRetryCfg_Scenario) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SuiteRetryCfg_Scenario.Marshal(b, m, deterministic)
+}
+func (m *SuiteRetryCfg_Scenario) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SuiteRetryCfg_Scenario.Merge(m, src)
+}
+func (m *SuiteRetryCfg_Scenario) XXX_Size() int {
+ return xxx_messageInfo_SuiteRetryCfg_Scenario.Size(m)
+}
+func (m *SuiteRetryCfg_Scenario) XXX_DiscardUnknown() {
+ xxx_messageInfo_SuiteRetryCfg_Scenario.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SuiteRetryCfg_Scenario proto.InternalMessageInfo
+
+func (m *SuiteRetryCfg_Scenario) GetTestName() string {
+ if m != nil {
+ return m.TestName
+ }
+ return ""
+}
+
+func (m *SuiteRetryCfg_Scenario) GetReason() string {
+ if m != nil {
+ return m.Reason
+ }
+ return ""
+}
+
+func (m *SuiteRetryCfg_Scenario) GetVerdict() test_platform.TaskState_Verdict {
+ if m != nil {
+ return m.Verdict
+ }
+ return test_platform.TaskState_VERDICT_UNSPECIFIED
+}
+
+type SuiteRetryCfg_BuilderScenario struct {
+ // Tag defines which builders this config set should apply.
+ Builders []string `protobuf:"bytes,1,rep,name=builders,proto3" json:"builders,omitempty"`
+ Scenarios []*SuiteRetryCfg_Scenario `protobuf:"bytes,2,rep,name=scenarios,proto3" json:"scenarios,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SuiteRetryCfg_BuilderScenario) Reset() { *m = SuiteRetryCfg_BuilderScenario{} }
+func (m *SuiteRetryCfg_BuilderScenario) String() string { return proto.CompactTextString(m) }
+func (*SuiteRetryCfg_BuilderScenario) ProtoMessage() {}
+func (*SuiteRetryCfg_BuilderScenario) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5e1b8044c4eb67ff, []int{0, 1}
+}
+
+func (m *SuiteRetryCfg_BuilderScenario) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SuiteRetryCfg_BuilderScenario.Unmarshal(m, b)
+}
+func (m *SuiteRetryCfg_BuilderScenario) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SuiteRetryCfg_BuilderScenario.Marshal(b, m, deterministic)
+}
+func (m *SuiteRetryCfg_BuilderScenario) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SuiteRetryCfg_BuilderScenario.Merge(m, src)
+}
+func (m *SuiteRetryCfg_BuilderScenario) XXX_Size() int {
+ return xxx_messageInfo_SuiteRetryCfg_BuilderScenario.Size(m)
+}
+func (m *SuiteRetryCfg_BuilderScenario) XXX_DiscardUnknown() {
+ xxx_messageInfo_SuiteRetryCfg_BuilderScenario.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SuiteRetryCfg_BuilderScenario proto.InternalMessageInfo
+
+func (m *SuiteRetryCfg_BuilderScenario) GetBuilders() []string {
+ if m != nil {
+ return m.Builders
+ }
+ return nil
+}
+
+func (m *SuiteRetryCfg_BuilderScenario) GetScenarios() []*SuiteRetryCfg_Scenario {
+ if m != nil {
+ return m.Scenarios
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*SuiteRetryCfg)(nil), "testplans.SuiteRetryCfg")
+ proto.RegisterType((*SuiteRetryCfg_Scenario)(nil), "testplans.SuiteRetryCfg.Scenario")
+ proto.RegisterType((*SuiteRetryCfg_BuilderScenario)(nil), "testplans.SuiteRetryCfg.BuilderScenario")
+}
+
+func init() { proto.RegisterFile("testplans/test_retry.proto", fileDescriptor_5e1b8044c4eb67ff) }
+
+var fileDescriptor_5e1b8044c4eb67ff = []byte{
+ // 322 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0x4d, 0x4b, 0xc3, 0x40,
+ 0x10, 0x25, 0x8d, 0xd4, 0x76, 0xc4, 0x56, 0xf7, 0x20, 0x21, 0x52, 0x88, 0x9e, 0x72, 0xda, 0x85,
+ 0x16, 0x2f, 0x5e, 0x84, 0x7a, 0xf3, 0xe0, 0x21, 0x55, 0x0f, 0x5e, 0xca, 0xb6, 0xdd, 0xc6, 0xd0,
+ 0x66, 0xb7, 0xec, 0x6c, 0x05, 0xf1, 0xbf, 0xf9, 0xdb, 0x24, 0xd3, 0x6e, 0x6a, 0x04, 0xc1, 0x5b,
+ 0xde, 0xbc, 0x8f, 0xbc, 0x99, 0x85, 0xd8, 0x29, 0x74, 0x9b, 0xb5, 0xd4, 0x28, 0xaa, 0xaf, 0xa9,
+ 0x55, 0xce, 0x7e, 0xf0, 0x8d, 0x35, 0xce, 0xb0, 0x6e, 0xcd, 0xc5, 0x03, 0x22, 0x37, 0x6b, 0xe9,
+ 0x96, 0xc6, 0x96, 0xc2, 0x49, 0x5c, 0xa1, 0x93, 0x4e, 0xed, 0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xb2, 0xd8, 0x96, 0xdc,
+ 0xd8, 0x5c, 0x78, 0x60, 0x50, 0x14, 0x7a, 0x69, 0xa5, 0xa0, 0xa7, 0x16, 0xb9, 0x11, 0x75, 0xf0,
+ 0xac, 0x4d, 0xb3, 0xd1, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x23, 0x3f, 0xed, 0x46, 0x02,
+ 0x00, 0x00,
+}
diff --git a/src/testplans/test_retry.proto b/src/testplans/test_retry.proto
new file mode 100644
index 0000000..f266fe1
--- /dev/null
+++ b/src/testplans/test_retry.proto
@@ -0,0 +1,42 @@
+// Copyright 2020 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto3";
+
+package testplans;
+
+import "test_platform/taskstate.proto";
+
+option go_package = "go.chromium.org/chromiumos/infra/proto/go/testplans";
+
+
+//Defines a config for tests to be retried automatically.
+message SuiteRetryCfg {
+ // Tag defines which suite this config set should apply.
+ string test_suite = 1;
+
+ // Scenario defines the test failure conditions that trigger retry.
+ message Scenario {
+ // Name of the test.
+ string test_name = 1;
+
+ // Failure reason/summary. This field is a substring of the actual error
+ // message. Ex: 'SSH connection failed' or 'DUT rebooted'.
+ string reason = 2;
+
+ // Verdict of the test run.
+ test_platform.TaskState.Verdict verdict = 3;
+ }
+
+ // Scenarios to retry for each build_target.
+ repeated Scenario suite_scenarios = 3;
+
+ message BuilderScenario{
+ // Tag defines which builders this config set should apply.
+ repeated string builders = 1;
+
+ repeated Scenario scenarios = 2;
+ }
+ repeated BuilderScenario builder_scenarios = 4;
+}