diff --git a/commit_queue.py b/commit_queue.py index 714c9024c..32bcc3c5b 100755 --- a/commit_queue.py +++ b/commit_queue.py @@ -23,7 +23,7 @@ import rietveld THIRD_PARTY_DIR = os.path.join(os.path.dirname(__file__), 'third_party') sys.path.insert(0, THIRD_PARTY_DIR) -from cq_client import cq_pb2 +from cq_client.v1 import cq_pb2 from protobuf26 import text_format def usage(more): diff --git a/third_party/cq_client/README.depot_tools.md b/third_party/cq_client/README.depot_tools.md index eb3c04bb3..c5741ed3d 100644 --- a/third_party/cq_client/README.depot_tools.md +++ b/third_party/cq_client/README.depot_tools.md @@ -1,2 +1,2 @@ Import of CQ protobuf config from infra_internal repo. -Version: fde09c7a7b5e47b94a6aeffa24c8f339df0517a8 from Dec 19, 2016. +Version: 614723941add42edbe1c8d5a04658967f15d2645 from Aug 18, 2017. diff --git a/third_party/cq_client/v1/__init__.py b/third_party/cq_client/v1/__init__.py new file mode 100644 index 000000000..50b23dff6 --- /dev/null +++ b/third_party/cq_client/v1/__init__.py @@ -0,0 +1,3 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. diff --git a/third_party/cq_client/cq.pb.go b/third_party/cq_client/v1/cq.pb.go similarity index 68% rename from third_party/cq_client/cq.pb.go rename to third_party/cq_client/v1/cq.pb.go index 8205afba6..51652a9da 100644 --- a/third_party/cq_client/cq.pb.go +++ b/third_party/cq_client/v1/cq.pb.go @@ -75,6 +75,7 @@ type Config struct { // time is >= this time. // // This is an UTC RFC3339 (stiptime(tm)) string representing the time. + // For example, "2017-12-23T15:47:58Z" and Z is required. DrainingStartTime *string `protobuf:"bytes,13,opt,name=draining_start_time,json=drainingStartTime" json:"draining_start_time,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -212,6 +213,7 @@ func (m *Rietveld) GetProjectBases() []string { // Unlike Rietveld, Gerrit doesn't need a separate url. // Instead, the git_repo_url must be specified on the Gerrit instance, // and CQ will deduce Gerrit url from it. +// Also, gerrit_cq_ability verifier must be defined in case of Gerrit. // // For example, if https://chromium.googlesource.com/infra/infra.git is your // repo url provided in `git_repo_url` above, then @@ -274,6 +276,7 @@ type Verifiers struct { // * membership of the user in committers & dryrunners group, // * the state of CL/patchset on which CQ is triggered, // * relationship of the user to the CL. + // This verifier must be specified for Gerrit. GerritCqAbility *Verifiers_GerritCQAbilityVerifier `protobuf:"bytes,5,opt,name=gerrit_cq_ability,json=gerritCqAbility" json:"gerrit_cq_ability,omitempty"` // This verifier is used to check tree status before committing a CL. If the // tree is closed, then the verifier will wait until it is reopened. @@ -395,7 +398,19 @@ type Verifiers_GerritCQAbilityVerifier struct { // hasn't been approved. // This is usually the same group as tryjob-access. DryRunAccessList *string `protobuf:"bytes,4,opt,name=dry_run_access_list,json=dryRunAccessList" json:"dry_run_access_list,omitempty"` - XXX_unrecognized []byte `json:"-"` + // Optional. allow_submit_with_open_deps controls how CQ full run behaves + // when current Gerrit CL has open dependencies (not yet submitted CLs on + // which *this* CL depends). + // + // If set to false (default), CQ will abort full run attempt immediately if + // open dependencies are detected. + // + // If set to true, then CQ will not abort full run and upon passing all + // other verifiers, CQ will attempt to submit the CL regardless of open + // dependencies. In turn, if Gerrit project config allows this, Gerrit will + // execute submit all dependent CLs first and then this CL. + AllowSubmitWithOpenDeps *bool `protobuf:"varint,5,opt,name=allow_submit_with_open_deps,json=allowSubmitWithOpenDeps" json:"allow_submit_with_open_deps,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Verifiers_GerritCQAbilityVerifier) Reset() { *m = Verifiers_GerritCQAbilityVerifier{} } @@ -419,6 +434,13 @@ func (m *Verifiers_GerritCQAbilityVerifier) GetDryRunAccessList() string { return "" } +func (m *Verifiers_GerritCQAbilityVerifier) GetAllowSubmitWithOpenDeps() bool { + if m != nil && m.AllowSubmitWithOpenDeps != nil { + return *m.AllowSubmitWithOpenDeps + } + return false +} + type Verifiers_TreeStatusLgtmVerifier struct { // Required. URL of the project tree status app. TreeStatusUrl *string `protobuf:"bytes,1,opt,name=tree_status_url,json=treeStatusUrl" json:"tree_status_url,omitempty"` @@ -467,6 +489,74 @@ func (m *Verifiers_TryJobVerifier) GetTryJobRetryConfig() *Verifiers_TryJobVerif return nil } +type Verifiers_TryJobVerifier_EquivalentBuilder struct { + // Required. Bucket name of this builder. + Bucket *string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"` + // Required. Name of this builder. + Builder *string `protobuf:"bytes,2,opt,name=builder" json:"builder,omitempty"` + // Percentage expressing probability of CQ requiring this builder + // instead of the builder to which this builder is equilvanet to. + // + // If not specified, defaults to 50. + // + // A choice itself is made deterministicly based on CL alone, hereby + // all CQ attempts on all patchsets of a given CL will require the same + // builder, assuming CQ config doesn't change in the mean time. + // + // Note that if `owner_whitelist_group` is also specified, the choice over + // two builders will be made only for CLs owned by whitelisted group. + // + // To illustrate, suppose percentage=10. Then, + // Without owner_whitelist_group, + // ~10% of all CQ attempts will choose this builder. + // With owner_whitelist_group set and, suppose, 1/5 of CQ attempts are + // ran on CLs owned by this group, then only ~(1/10)*(1/5) or + // ~2% of all CQ attempts will choose this builder. + Percentage *int32 `protobuf:"varint,3,opt,name=percentage" json:"percentage,omitempty"` + // If not specified, limits the builder to CL owners in this group. + OwnerWhitelistGroup *string `protobuf:"bytes,4,opt,name=owner_whitelist_group,json=ownerWhitelistGroup" json:"owner_whitelist_group,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) Reset() { + *m = Verifiers_TryJobVerifier_EquivalentBuilder{} +} +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) String() string { + return proto.CompactTextString(m) +} +func (*Verifiers_TryJobVerifier_EquivalentBuilder) ProtoMessage() {} +func (*Verifiers_TryJobVerifier_EquivalentBuilder) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{3, 3, 0} +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetBucket() string { + if m != nil && m.Bucket != nil { + return *m.Bucket + } + return "" +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetBuilder() string { + if m != nil && m.Builder != nil { + return *m.Builder + } + return "" +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetPercentage() int32 { + if m != nil && m.Percentage != nil { + return *m.Percentage + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetOwnerWhitelistGroup() string { + if m != nil && m.OwnerWhitelistGroup != nil { + return *m.OwnerWhitelistGroup + } + return "" +} + type Verifiers_TryJobVerifier_Builder struct { // Name of the builder. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -479,14 +569,22 @@ type Verifiers_TryJobVerifier_Builder struct { // not affect the decicion whether a CL can land or not. This is typically // used to test new builders and estimate their capacity requirements. ExperimentPercentage *float32 `protobuf:"fixed32,4,opt,name=experiment_percentage,json=experimentPercentage" json:"experiment_percentage,omitempty"` - XXX_unrecognized []byte `json:"-"` + // Optionally specified alternative builder for CQ to choose instead. + // If provided, CQ will choose only one of the equivalent builders as + // required based purely on given CL and CL's owner and **regardless** of + // the possibly already completed try jobs. + // + // Note: none of the equivalent builders should be part of triggered_by + // chain, although CQ may eventually relax this requirement somewhat. + EquivalentTo *Verifiers_TryJobVerifier_EquivalentBuilder `protobuf:"bytes,5,opt,name=equivalent_to,json=equivalentTo" json:"equivalent_to,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Verifiers_TryJobVerifier_Builder) Reset() { *m = Verifiers_TryJobVerifier_Builder{} } func (m *Verifiers_TryJobVerifier_Builder) String() string { return proto.CompactTextString(m) } func (*Verifiers_TryJobVerifier_Builder) ProtoMessage() {} func (*Verifiers_TryJobVerifier_Builder) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 3, 0} + return fileDescriptor0, []int{3, 3, 1} } func (m *Verifiers_TryJobVerifier_Builder) GetName() string { @@ -510,6 +608,13 @@ func (m *Verifiers_TryJobVerifier_Builder) GetExperimentPercentage() float32 { return 0 } +func (m *Verifiers_TryJobVerifier_Builder) GetEquivalentTo() *Verifiers_TryJobVerifier_EquivalentBuilder { + if m != nil { + return m.EquivalentTo + } + return nil +} + type Verifiers_TryJobVerifier_Bucket struct { // Name of the bucket. This is typically the same as a master name without // the 'master.' prefix, e.g. 'chromium.linux' or 'tryserver.webrtc'. CQ @@ -524,7 +629,7 @@ func (m *Verifiers_TryJobVerifier_Bucket) Reset() { *m = Verifiers_TryJo func (m *Verifiers_TryJobVerifier_Bucket) String() string { return proto.CompactTextString(m) } func (*Verifiers_TryJobVerifier_Bucket) ProtoMessage() {} func (*Verifiers_TryJobVerifier_Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 3, 1} + return fileDescriptor0, []int{3, 3, 2} } func (m *Verifiers_TryJobVerifier_Bucket) GetName() string { @@ -563,7 +668,7 @@ func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) String() string { } func (*Verifiers_TryJobVerifier_TryJobRetryConfig) ProtoMessage() {} func (*Verifiers_TryJobVerifier_TryJobRetryConfig) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 3, 2} + return fileDescriptor0, []int{3, 3, 3} } func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) GetTryJobRetryQuota() int32 { @@ -619,6 +724,7 @@ func init() { proto.RegisterType((*Verifiers_GerritCQAbilityVerifier)(nil), "Verifiers.GerritCQAbilityVerifier") proto.RegisterType((*Verifiers_TreeStatusLgtmVerifier)(nil), "Verifiers.TreeStatusLgtmVerifier") proto.RegisterType((*Verifiers_TryJobVerifier)(nil), "Verifiers.TryJobVerifier") + proto.RegisterType((*Verifiers_TryJobVerifier_EquivalentBuilder)(nil), "Verifiers.TryJobVerifier.EquivalentBuilder") proto.RegisterType((*Verifiers_TryJobVerifier_Builder)(nil), "Verifiers.TryJobVerifier.Builder") proto.RegisterType((*Verifiers_TryJobVerifier_Bucket)(nil), "Verifiers.TryJobVerifier.Bucket") proto.RegisterType((*Verifiers_TryJobVerifier_TryJobRetryConfig)(nil), "Verifiers.TryJobVerifier.TryJobRetryConfig") @@ -628,69 +734,77 @@ func init() { func init() { proto.RegisterFile("cq.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1009 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x55, 0x6b, 0x8f, 0x1b, 0x35, - 0x17, 0x56, 0xb2, 0x9b, 0xdb, 0x99, 0xa4, 0x9b, 0xf8, 0xdd, 0xbe, 0x9d, 0x06, 0xa9, 0x4d, 0x03, - 0x45, 0x11, 0x97, 0xa8, 0x0a, 0xe2, 0x0b, 0x02, 0x89, 0x4d, 0x2a, 0x10, 0x68, 0xa9, 0x5a, 0x6f, - 0x4b, 0x3f, 0x80, 0x64, 0x39, 0x33, 0x27, 0x53, 0x97, 0xb9, 0x24, 0xb6, 0x27, 0xbb, 0xf9, 0x29, - 0xf0, 0x07, 0xf8, 0xca, 0xaf, 0xe2, 0x77, 0x20, 0xdb, 0x93, 0x49, 0xb2, 0x17, 0x09, 0xbe, 0xcd, - 0x3c, 0xe7, 0x79, 0xce, 0xf1, 0xb9, 0xd9, 0xd0, 0x0c, 0x56, 0xe3, 0xa5, 0xcc, 0x74, 0x36, 0xfc, - 0xf3, 0x18, 0xea, 0xb3, 0x2c, 0x5d, 0x88, 0x88, 0xf8, 0xd0, 0x58, 0xa3, 0x54, 0x22, 0x4b, 0xfd, - 0xca, 0xa0, 0x32, 0xaa, 0xd1, 0xed, 0x2f, 0x79, 0x00, 0x8d, 0x60, 0xc5, 0x52, 0x9e, 0xa0, 0x5f, - 0x1d, 0x54, 0x46, 0x2d, 0x5a, 0x0f, 0x56, 0x2f, 0x78, 0x82, 0x64, 0x04, 0xad, 0x35, 0x4a, 0xb1, - 0x10, 0x28, 0x95, 0x7f, 0x34, 0xa8, 0x8c, 0xbc, 0x09, 0x8c, 0x7f, 0xde, 0x22, 0x74, 0x67, 0x24, - 0x43, 0xe8, 0x04, 0x2b, 0xa6, 0x34, 0xd7, 0xb9, 0x62, 0xb9, 0x8c, 0xfd, 0x63, 0xeb, 0xc8, 0x0b, - 0x56, 0x17, 0x16, 0x7b, 0x23, 0x63, 0xf2, 0x35, 0x3c, 0x7c, 0x27, 0x42, 0x64, 0x12, 0x17, 0x4c, - 0xa4, 0x2c, 0xc8, 0x92, 0x44, 0x68, 0x8d, 0x21, 0x4b, 0x54, 0xe4, 0xd7, 0x06, 0x95, 0x51, 0x73, - 0x5a, 0xf5, 0x2b, 0xf4, 0xbe, 0x21, 0x51, 0x5c, 0xfc, 0x90, 0xce, 0xb6, 0x8c, 0x9f, 0x54, 0x44, - 0x3e, 0x03, 0xe2, 0x14, 0x6c, 0x9e, 0x4b, 0xa5, 0x59, 0x88, 0x31, 0xdf, 0xf8, 0x75, 0x9b, 0x49, - 0xd7, 0x59, 0xa6, 0xc6, 0xf0, 0xdc, 0xe0, 0x64, 0x04, 0xdd, 0x84, 0x5f, 0xb1, 0x7d, 0x85, 0xdf, - 0xb0, 0xdc, 0x7b, 0x09, 0xbf, 0x9a, 0xed, 0xe8, 0xe4, 0x43, 0xe8, 0x88, 0x94, 0x2d, 0x65, 0x16, - 0xe6, 0x81, 0x36, 0xc5, 0x69, 0x9a, 0x93, 0xd0, 0xb6, 0x48, 0x5f, 0x96, 0x18, 0x79, 0x0a, 0x4d, - 0x29, 0x50, 0xaf, 0x31, 0x0e, 0xfd, 0x96, 0xad, 0x43, 0x6b, 0x4c, 0x0b, 0x80, 0x96, 0x26, 0xf2, - 0x18, 0xea, 0x11, 0x4a, 0x29, 0xb4, 0x7f, 0x62, 0x49, 0x8d, 0xf1, 0xf7, 0xf6, 0x97, 0x16, 0x30, - 0x19, 0x40, 0x3b, 0x12, 0x9a, 0x49, 0x5c, 0x66, 0xb6, 0x4a, 0x60, 0xab, 0x04, 0x91, 0xd0, 0x14, - 0x97, 0x99, 0x29, 0xd2, 0x13, 0x00, 0xcd, 0x65,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 0x94, 0xf4, 0x7f, 0xaf, 0x42, - 0xef, 0x46, 0xf2, 0x66, 0x0e, 0x0e, 0xeb, 0xb8, 0xca, 0x33, 0xcd, 0x8b, 0x67, 0xb3, 0xbb, 0x57, - 0x99, 0x57, 0x06, 0x37, 0x4f, 0x53, 0x14, 0x67, 0x73, 0x1e, 0x1f, 0xb0, 0xdd, 0xc0, 0x77, 0x9d, - 0x65, 0x8f, 0xfd, 0x0c, 0x4e, 0x17, 0x5c, 0xc4, 0xb9, 0xc4, 0x82, 0x7e, 0x89, 0x22, 0x7a, 0xa7, - 0xed, 0xf8, 0xd7, 0x28, 0x29, 0x6c, 0x56, 0xf0, 0xd6, 0x5a, 0xc8, 0x0c, 0x1e, 0x69, 0xc9, 0x53, - 0x25, 0x4c, 0xd5, 0x6e, 0xd5, 0x1e, 0x5b, 0xed, 0x07, 0x25, 0xeb, 0xbb, 0x9b, 0x4e, 0x9e, 0xc1, - 0xa9, 0x79, 0x00, 0xb2, 0x5c, 0x1f, 0x4a, 0x6b, 0x2e, 0x6c, 0x61, 0xdb, 0x53, 0xf4, 0x7b, 0x70, - 0x72, 0xed, 0x7a, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xac, 0x31, 0x61, 0x59, 0x08, 0x00, - 0x00, + // 1147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xdb, 0x8e, 0x1b, 0x45, + 0x10, 0x95, 0xf7, 0xe2, 0x4b, 0xd9, 0xce, 0xae, 0x3b, 0x9b, 0x64, 0xe2, 0x48, 0x1b, 0x67, 0x21, + 0xc8, 0xe2, 0x62, 0x45, 0x46, 0xbc, 0xa0, 0x20, 0xb1, 0x76, 0x20, 0x02, 0x2d, 0x21, 0x19, 0x27, + 0xec, 0x03, 0x48, 0xad, 0xf1, 0x4c, 0x79, 0xb6, 0xc3, 0xdc, 0xdc, 0xdd, 0x63, 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aa, 0x3e, 0xc9, 0xa1, 0x61, 0x46, 0x8a, 0x78, 0xa6, 0x70, 0xd2, 0x87, 0xc3, 0xd8, + 0xbb, 0xa4, 0x9b, 0x16, 0x4e, 0x4d, 0x6b, 0x6f, 0xc5, 0xde, 0xe5, 0x78, 0x2d, 0x27, 0x1f, 0x40, + 0x9b, 0x25, 0x34, 0xe3, 0x69, 0x90, 0xfb, 0x52, 0x25, 0xa7, 0xae, 0x76, 0xe2, 0xb6, 0x58, 0xf2, + 0xb2, 0xc4, 0xc8, 0x63, 0xa8, 0x73, 0x86, 0x72, 0x81, 0x51, 0xe0, 0x34, 0x74, 0x1e, 0x1a, 0x03, + 0xd7, 0x02, 0x6e, 0x49, 0x91, 0x87, 0x50, 0x0d, 0x91, 0x73, 0x26, 0x9d, 0x03, 0x2d, 0xaa, 0x0d, + 0x9e, 0xeb, 0xa5, 0x6b, 0x61, 0xd2, 0x83, 0x56, 0xc8, 0x24, 0xe5, 0x98, 0xa5, 0x3a, 0x4b, 0xa0, + 0xb3, 0x04, 0x21, 0x93, 0x2e, 0x66, 0xa9, 0x4a, 0xd2, 0x23, 0x00, 0xe9, 0xf1, 0x10, 0x95, 0x68, + 0xe6, 0x34, 0x15, 0xaf, 0xb3, 0xd2, 0x30, 0xa8, 0x8b, 0x33, 0xf2, 0x21, 0xb4, 0xc4, 0x22, 0x59, + 0x3b, 0x69, 0x95, 0x22, 0x10, 0x8b, 0xa4, 0x70, 0x34, 0x80, 0xdb, 0x01, 0xf7, 0x58, 0xc2, 0x92, + 0x50, 0xd5, 0x85, 0x4b, 0x2a, 0x59, 0x8c, 0x4e, 0x5b, 0x47, 0xec, 0x14, 0xd4, 0x44, 0x31, 0xaf, + 0x59, 0x8c, 0x27, 0xa7, 0x50, 0x2f, 0x4e, 0x44, 0x0e, 0x61, 0x57, 0x39, 0xae, 0x68, 0xad, 0xfa, + 0x54, 0x59, 0xca, 0x78, 0xfa, 0x16, 0x7d, 0x49, 0xa7, 0x9e, 0x40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x67, 0x31, 0x26, 0x92, 0x6e, + 0xec, 0x50, 0x85, 0xdd, 0x71, 0x8f, 0xd6, 0xe4, 0xcb, 0xf5, 0x5e, 0x5f, 0x42, 0x1b, 0xcb, 0x94, + 0x50, 0x99, 0xda, 0x01, 0xf3, 0x2f, 0xa9, 0xbe, 0x96, 0x41, 0xb7, 0xb5, 0xf6, 0xf0, 0x3a, 0xed, + 0xfe, 0x0c, 0x55, 0x53, 0xd6, 0x1b, 0xcf, 0xf1, 0x15, 0xd4, 0x6d, 0x1a, 0xcd, 0x04, 0xbf, 0x3a, + 0x81, 0xae, 0xb4, 0x87, 0x09, 0x50, 0x9a, 0x74, 0xdf, 0xed, 0x40, 0xe7, 0x5a, 0xad, 0xd5, 0xa5, + 0xd9, 0x6e, 0x9b, 0x79, 0x9e, 0x4a, 0xcf, 0xfe, 0x64, 0x1c, 0x6e, 0x34, 0xc2, 0x2b, 0x85, 0xab, + 0x87, 0x3c, 0x8c, 0xd2, 0xa9, 0x17, 0x6d, 0xa9, 0xcd, 0x78, 0x38, 0x34, 0xcc, 0x86, 0xfa, 0x09, + 0x1c, 0xcd, 0x3c, 0x16, 0xe5, 0x1c, 0xad, 0x7c, 0x89, 0x2c, 0xbc, 0x90, 0xb6, 0xee, 0xc4, 0x72, + 0xda, 0xe0, 0x5c, 0x33, 0x64, 0x0c, 0xc7, 0x92, 0x7b, 0x89, 0x60, 0x2a, 0xa5, 0x37, 0xda, 0xee, + 0x69, 0xdb, 0x07, 0xa5, 0xea, 0xdb, 0xeb, 0x4e, 0x9e, 0xc0, 0x91, 0x7a, 0x2e, 0xd3, 0x5c, 0x6e, + 0x9b, 0xee, 0x9b, 0xb0, 0x96, 0xdb, 0xb0, 0xe8, 0x76, 0xe0, 0xe0, 0xca, 0x30, 0xfd, 0x27, 0x00, + 0x00, 0xff, 0xff, 0x21, 0xa6, 0x4b, 0xd2, 0x87, 0x09, 0x00, 0x00, } diff --git a/third_party/cq_client/cq.proto b/third_party/cq_client/v1/cq.proto similarity index 77% rename from third_party/cq_client/cq.proto rename to third_party/cq_client/v1/cq.proto index 8883d61d5..40d14b0d8 100644 --- a/third_party/cq_client/cq.proto +++ b/third_party/cq_client/v1/cq.proto @@ -57,6 +57,7 @@ message Config { // time is >= this time. // // This is an UTC RFC3339 (stiptime(tm)) string representing the time. + // For example, "2017-12-23T15:47:58Z" and Z is required. optional string draining_start_time = 13; } @@ -71,6 +72,7 @@ message Rietveld { // Unlike Rietveld, Gerrit doesn't need a separate url. // Instead, the git_repo_url must be specified on the Gerrit instance, // and CQ will deduce Gerrit url from it. +// Also, gerrit_cq_ability verifier must be defined in case of Gerrit. // // For example, if https://chromium.googlesource.com/infra/infra.git is your // repo url provided in `git_repo_url` above, then @@ -115,6 +117,7 @@ message Verifiers { // * membership of the user in committers & dryrunners group, // * the state of CL/patchset on which CQ is triggered, // * relationship of the user to the CL. + // This verifier must be specified for Gerrit. optional GerritCQAbilityVerifier gerrit_cq_ability = 5; // This verifier is used to check tree status before committing a CL. If the @@ -165,6 +168,19 @@ message Verifiers { // hasn't been approved. // This is usually the same group as tryjob-access. optional string dry_run_access_list = 4; + + // Optional. allow_submit_with_open_deps controls how CQ full run behaves + // when current Gerrit CL has open dependencies (not yet submitted CLs on + // which *this* CL depends). + // + // If set to false (default), CQ will abort full run attempt immediately if + // open dependencies are detected. + // + // If set to true, then CQ will not abort full run and upon passing all + // other verifiers, CQ will attempt to submit the CL regardless of open + // dependencies. In turn, if Gerrit project config allows this, Gerrit will + // execute submit all dependent CLs first and then this CL. + optional bool allow_submit_with_open_deps = 5; } message TreeStatusLgtmVerifier { @@ -173,6 +189,34 @@ message Verifiers { } message TryJobVerifier { + message EquivalentBuilder { + // Required. Bucket name of this builder. + optional string bucket = 1; + // Required. Name of this builder. + optional string builder = 2; + // Percentage expressing probability of CQ requiring this builder + // instead of the builder to which this builder is equilvanet to. + // + // If not specified, defaults to 50. + // + // A choice itself is made deterministicly based on CL alone, hereby + // all CQ attempts on all patchsets of a given CL will require the same + // builder, assuming CQ config doesn't change in the mean time. + // + // Note that if `owner_whitelist_group` is also specified, the choice over + // two builders will be made only for CLs owned by whitelisted group. + // + // To illustrate, suppose percentage=10. Then, + // Without owner_whitelist_group, + // ~10% of all CQ attempts will choose this builder. + // With owner_whitelist_group set and, suppose, 1/5 of CQ attempts are + // ran on CLs owned by this group, then only ~(1/10)*(1/5) or + // ~2% of all CQ attempts will choose this builder. + optional int32 percentage = 3; + // If not specified, limits the builder to CL owners in this group. + optional string owner_whitelist_group = 4; + } + message Builder { // Name of the builder. optional string name = 1; @@ -187,6 +231,15 @@ message Verifiers { // not affect the decicion whether a CL can land or not. This is typically // used to test new builders and estimate their capacity requirements. optional float experiment_percentage = 4; + + // Optionally specified alternative builder for CQ to choose instead. + // If provided, CQ will choose only one of the equivalent builders as + // required based purely on given CL and CL's owner and **regardless** of + // the possibly already completed try jobs. + // + // Note: none of the equivalent builders should be part of triggered_by + // chain, although CQ may eventually relax this requirement somewhat. + optional EquivalentBuilder equivalent_to = 5; } message Bucket { diff --git a/third_party/cq_client/cq_pb2.py b/third_party/cq_client/v1/cq_pb2.py similarity index 81% rename from third_party/cq_client/cq_pb2.py rename to third_party/cq_client/v1/cq_pb2.py index c96acaae7..2f7ca3273 100644 --- a/third_party/cq_client/cq_pb2.py +++ b/third_party/cq_client/v1/cq_pb2.py @@ -1,13 +1,13 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: cq.proto + # This file was originally generated by the protocol buffer compiler 2.6.1, but # was subsequently manually edited to import protobuf26 instead of # google.protobuf to prevent conflicts with a different version of -# google.protobuf that some users of depot_tools have installed. If you need to -# re-generate this file, please make similar changes again and add this comment -# back. More details on why we chose to rename the package can be found in the -# file depot_tools/third_party/protobuf26/README.chromium. - -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: cq.proto +# google.protobuf that some users of depot_tools have installed. If you need +# to re-generate this file, please make similar changes again and add this +# comment back. More details on why we chose to rename the package can be +# found in the file depot_tools/third_party/protobuf26/README.chromium. import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -26,7 +26,7 @@ _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='cq.proto', package='', - serialized_pb=_b('\n\x08\x63q.proto\"\xef\x02\n\x06\x43onfig\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x0f\n\x07\x63q_name\x18\x02 \x01(\t\x12\x1d\n\tverifiers\x18\x03 \x01(\x0b\x32\n.Verifiers\x12\x15\n\rcq_status_url\x18\x04 \x01(\t\x12%\n\x19hide_ref_in_committed_msg\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\x1a\n\x12\x63ommit_burst_delay\x18\x06 \x01(\x05\x12\x18\n\x10max_commit_burst\x18\x07 \x01(\x05\x12\x15\n\rin_production\x18\x08 \x01(\x08\x12\x1b\n\x08rietveld\x18\t \x01(\x0b\x32\t.Rietveld\x12\x17\n\x06gerrit\x18\x0f \x01(\x0b\x32\x07.Gerrit\x12\x14\n\x0cgit_repo_url\x18\n \x01(\t\x12\x16\n\ntarget_ref\x18\x0b \x01(\tB\x02\x18\x01\x12\x18\n\x0csvn_repo_url\x18\x0c \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x64raining_start_time\x18\r \x01(\t\".\n\x08Rietveld\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x15\n\rproject_bases\x18\x02 \x03(\t\"K\n\x06Gerrit\x12\x19\n\x11\x63q_verified_label\x18\x01 \x01(\t\x12&\n\x1e\x64ry_run_sets_cq_verified_label\x18\x02 \x01(\x08\"\x82\x08\n\tVerifiers\x12\x36\n\rreviewer_lgtm\x18\x01 \x01(\x0b\x32\x1f.Verifiers.ReviewerLgtmVerifier\x12=\n\x11gerrit_cq_ability\x18\x05 \x01(\x0b\x32\".Verifiers.GerritCQAbilityVerifier\x12\x36\n\x0btree_status\x18\x02 \x01(\x0b\x32!.Verifiers.TreeStatusLgtmVerifier\x12*\n\x07try_job\x18\x03 \x01(\x0b\x32\x19.Verifiers.TryJobVerifier\x12,\n\x08sign_cla\x18\x04 \x01(\x0b\x32\x1a.Verifiers.SignCLAVerifier\x1aw\n\x14ReviewerLgtmVerifier\x12\x16\n\x0e\x63ommitter_list\x18\x01 \x01(\t\x12\x15\n\rmax_wait_secs\x18\x02 \x01(\x05\x12\x13\n\x0bno_lgtm_msg\x18\x03 \x01(\t\x12\x1b\n\x13\x64ry_run_access_list\x18\x04 \x01(\t\x1aN\n\x17GerritCQAbilityVerifier\x12\x16\n\x0e\x63ommitter_list\x18\x01 \x01(\t\x12\x1b\n\x13\x64ry_run_access_list\x18\x04 \x01(\t\x1a\x31\n\x16TreeStatusLgtmVerifier\x12\x17\n\x0ftree_status_url\x18\x01 \x01(\t\x1a\xdc\x03\n\x0eTryJobVerifier\x12\x31\n\x07\x62uckets\x18\x01 \x03(\x0b\x32 .Verifiers.TryJobVerifier.Bucket\x12I\n\x14try_job_retry_config\x18\x02 \x01(\x0b\x32+.Verifiers.TryJobVerifier.TryJobRetryConfig\x1aL\n\x07\x42uilder\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ctriggered_by\x18\x02 \x01(\t\x12\x1d\n\x15\x65xperiment_percentage\x18\x04 \x01(\x02\x1aK\n\x06\x42ucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x33\n\x08\x62uilders\x18\x02 \x03(\x0b\x32!.Verifiers.TryJobVerifier.Builder\x1a\xb0\x01\n\x11TryJobRetryConfig\x12\x1b\n\x13try_job_retry_quota\x18\x01 \x01(\x05\x12\x1a\n\x12global_retry_quota\x18\x02 \x01(\x05\x12\x1c\n\x14\x66\x61ilure_retry_weight\x18\x03 \x01(\x05\x12&\n\x1etransient_failure_retry_weight\x18\x04 \x01(\x05\x12\x1c\n\x14timeout_retry_weight\x18\x05 \x01(\x05\x1a\x11\n\x0fSignCLAVerifier') + serialized_pb=_b('\n\x08\x63q.proto\"\xef\x02\n\x06\x43onfig\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x0f\n\x07\x63q_name\x18\x02 \x01(\t\x12\x1d\n\tverifiers\x18\x03 \x01(\x0b\x32\n.Verifiers\x12\x15\n\rcq_status_url\x18\x04 \x01(\t\x12%\n\x19hide_ref_in_committed_msg\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\x1a\n\x12\x63ommit_burst_delay\x18\x06 \x01(\x05\x12\x18\n\x10max_commit_burst\x18\x07 \x01(\x05\x12\x15\n\rin_production\x18\x08 \x01(\x08\x12\x1b\n\x08rietveld\x18\t \x01(\x0b\x32\t.Rietveld\x12\x17\n\x06gerrit\x18\x0f \x01(\x0b\x32\x07.Gerrit\x12\x14\n\x0cgit_repo_url\x18\n \x01(\t\x12\x16\n\ntarget_ref\x18\x0b \x01(\tB\x02\x18\x01\x12\x18\n\x0csvn_repo_url\x18\x0c \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x64raining_start_time\x18\r \x01(\t\".\n\x08Rietveld\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x15\n\rproject_bases\x18\x02 \x03(\t\"K\n\x06Gerrit\x12\x19\n\x11\x63q_verified_label\x18\x01 \x01(\t\x12&\n\x1e\x64ry_run_sets_cq_verified_label\x18\x02 \x01(\x08\"\xd5\t\n\tVerifiers\x12\x36\n\rreviewer_lgtm\x18\x01 \x01(\x0b\x32\x1f.Verifiers.ReviewerLgtmVerifier\x12=\n\x11gerrit_cq_ability\x18\x05 \x01(\x0b\x32\".Verifiers.GerritCQAbilityVerifier\x12\x36\n\x0btree_status\x18\x02 \x01(\x0b\x32!.Verifiers.TreeStatusLgtmVerifier\x12*\n\x07try_job\x18\x03 \x01(\x0b\x32\x19.Verifiers.TryJobVerifier\x12,\n\x08sign_cla\x18\x04 \x01(\x0b\x32\x1a.Verifiers.SignCLAVerifier\x1aw\n\x14ReviewerLgtmVerifier\x12\x16\n\x0e\x63ommitter_list\x18\x01 \x01(\t\x12\x15\n\rmax_wait_secs\x18\x02 \x01(\x05\x12\x13\n\x0bno_lgtm_msg\x18\x03 \x01(\t\x12\x1b\n\x13\x64ry_run_access_list\x18\x04 \x01(\t\x1as\n\x17GerritCQAbilityVerifier\x12\x16\n\x0e\x63ommitter_list\x18\x01 \x01(\t\x12\x1b\n\x13\x64ry_run_access_list\x18\x04 \x01(\t\x12#\n\x1b\x61llow_submit_with_open_deps\x18\x05 \x01(\x08\x1a\x31\n\x16TreeStatusLgtmVerifier\x12\x17\n\x0ftree_status_url\x18\x01 \x01(\t\x1a\x8a\x05\n\x0eTryJobVerifier\x12\x31\n\x07\x62uckets\x18\x01 \x03(\x0b\x32 .Verifiers.TryJobVerifier.Bucket\x12I\n\x14try_job_retry_config\x18\x02 \x01(\x0b\x32+.Verifiers.TryJobVerifier.TryJobRetryConfig\x1ag\n\x11\x45quivalentBuilder\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0f\n\x07\x62uilder\x18\x02 \x01(\t\x12\x12\n\npercentage\x18\x03 \x01(\x05\x12\x1d\n\x15owner_whitelist_group\x18\x04 \x01(\t\x1a\x90\x01\n\x07\x42uilder\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ctriggered_by\x18\x02 \x01(\t\x12\x1d\n\x15\x65xperiment_percentage\x18\x04 \x01(\x02\x12\x42\n\requivalent_to\x18\x05 \x01(\x0b\x32+.Verifiers.TryJobVerifier.EquivalentBuilder\x1aK\n\x06\x42ucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x33\n\x08\x62uilders\x18\x02 \x03(\x0b\x32!.Verifiers.TryJobVerifier.Builder\x1a\xb0\x01\n\x11TryJobRetryConfig\x12\x1b\n\x13try_job_retry_quota\x18\x01 \x01(\x05\x12\x1a\n\x12global_retry_quota\x18\x02 \x01(\x05\x12\x1c\n\x14\x66\x61ilure_retry_weight\x18\x03 \x01(\x05\x12&\n\x1etransient_failure_retry_weight\x18\x04 \x01(\x05\x12\x1c\n\x14timeout_retry_weight\x18\x05 \x01(\x05\x1a\x11\n\x0fSignCLAVerifier') ) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -299,6 +299,13 @@ _VERIFIERS_GERRITCQABILITYVERIFIER = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='allow_submit_with_open_deps', full_name='Verifiers.GerritCQAbilityVerifier.allow_submit_with_open_deps', index=2, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -311,7 +318,7 @@ _VERIFIERS_GERRITCQABILITYVERIFIER = _descriptor.Descriptor( oneofs=[ ], serialized_start=907, - serialized_end=985, + serialized_end=1022, ) _VERIFIERS_TREESTATUSLGTMVERIFIER = _descriptor.Descriptor( @@ -339,8 +346,58 @@ _VERIFIERS_TREESTATUSLGTMVERIFIER = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=987, - serialized_end=1036, + serialized_start=1024, + serialized_end=1073, +) + +_VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER = _descriptor.Descriptor( + name='EquivalentBuilder', + full_name='Verifiers.TryJobVerifier.EquivalentBuilder', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bucket', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.bucket', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='builder', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.builder', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='percentage', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.percentage', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='owner_whitelist_group', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.owner_whitelist_group', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + oneofs=[ + ], + serialized_start=1220, + serialized_end=1323, ) _VERIFIERS_TRYJOBVERIFIER_BUILDER = _descriptor.Descriptor( @@ -371,6 +428,13 @@ _VERIFIERS_TRYJOBVERIFIER_BUILDER = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='equivalent_to', full_name='Verifiers.TryJobVerifier.Builder.equivalent_to', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -382,8 +446,8 @@ _VERIFIERS_TRYJOBVERIFIER_BUILDER = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1183, - serialized_end=1259, + serialized_start=1326, + serialized_end=1470, ) _VERIFIERS_TRYJOBVERIFIER_BUCKET = _descriptor.Descriptor( @@ -418,8 +482,8 @@ _VERIFIERS_TRYJOBVERIFIER_BUCKET = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1261, - serialized_end=1336, + serialized_start=1472, + serialized_end=1547, ) _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG = _descriptor.Descriptor( @@ -475,8 +539,8 @@ _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1339, - serialized_end=1515, + serialized_start=1550, + serialized_end=1726, ) _VERIFIERS_TRYJOBVERIFIER = _descriptor.Descriptor( @@ -503,7 +567,7 @@ _VERIFIERS_TRYJOBVERIFIER = _descriptor.Descriptor( ], extensions=[ ], - nested_types=[_VERIFIERS_TRYJOBVERIFIER_BUILDER, _VERIFIERS_TRYJOBVERIFIER_BUCKET, _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG, ], + nested_types=[_VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER, _VERIFIERS_TRYJOBVERIFIER_BUILDER, _VERIFIERS_TRYJOBVERIFIER_BUCKET, _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG, ], enum_types=[ ], options=None, @@ -511,8 +575,8 @@ _VERIFIERS_TRYJOBVERIFIER = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1039, - serialized_end=1515, + serialized_start=1076, + serialized_end=1726, ) _VERIFIERS_SIGNCLAVERIFIER = _descriptor.Descriptor( @@ -533,8 +597,8 @@ _VERIFIERS_SIGNCLAVERIFIER = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1517, - serialized_end=1534, + serialized_start=1728, + serialized_end=1745, ) _VERIFIERS = _descriptor.Descriptor( @@ -591,7 +655,7 @@ _VERIFIERS = _descriptor.Descriptor( oneofs=[ ], serialized_start=508, - serialized_end=1534, + serialized_end=1745, ) _CONFIG.fields_by_name['verifiers'].message_type = _VERIFIERS @@ -600,6 +664,8 @@ _CONFIG.fields_by_name['gerrit'].message_type = _GERRIT _VERIFIERS_REVIEWERLGTMVERIFIER.containing_type = _VERIFIERS _VERIFIERS_GERRITCQABILITYVERIFIER.containing_type = _VERIFIERS _VERIFIERS_TREESTATUSLGTMVERIFIER.containing_type = _VERIFIERS +_VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER.containing_type = _VERIFIERS_TRYJOBVERIFIER +_VERIFIERS_TRYJOBVERIFIER_BUILDER.fields_by_name['equivalent_to'].message_type = _VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER _VERIFIERS_TRYJOBVERIFIER_BUILDER.containing_type = _VERIFIERS_TRYJOBVERIFIER _VERIFIERS_TRYJOBVERIFIER_BUCKET.fields_by_name['builders'].message_type = _VERIFIERS_TRYJOBVERIFIER_BUILDER _VERIFIERS_TRYJOBVERIFIER_BUCKET.containing_type = _VERIFIERS_TRYJOBVERIFIER @@ -664,6 +730,13 @@ Verifiers = _reflection.GeneratedProtocolMessageType('Verifiers', (_message.Mess TryJobVerifier = _reflection.GeneratedProtocolMessageType('TryJobVerifier', (_message.Message,), dict( + EquivalentBuilder = _reflection.GeneratedProtocolMessageType('EquivalentBuilder', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TryJobVerifier.EquivalentBuilder) + )) + , + Builder = _reflection.GeneratedProtocolMessageType('Builder', (_message.Message,), dict( DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER_BUILDER, __module__ = 'cq_pb2' @@ -705,6 +778,7 @@ _sym_db.RegisterMessage(Verifiers.ReviewerLgtmVerifier) _sym_db.RegisterMessage(Verifiers.GerritCQAbilityVerifier) _sym_db.RegisterMessage(Verifiers.TreeStatusLgtmVerifier) _sym_db.RegisterMessage(Verifiers.TryJobVerifier) +_sym_db.RegisterMessage(Verifiers.TryJobVerifier.EquivalentBuilder) _sym_db.RegisterMessage(Verifiers.TryJobVerifier.Builder) _sym_db.RegisterMessage(Verifiers.TryJobVerifier.Bucket) _sym_db.RegisterMessage(Verifiers.TryJobVerifier.TryJobRetryConfig) diff --git a/third_party/cq_client/testdata/cq_both.cfg b/third_party/cq_client/v1/testdata/cq_both.cfg similarity index 78% rename from third_party/cq_client/testdata/cq_both.cfg rename to third_party/cq_client/v1/testdata/cq_both.cfg index 15453e19a..cbe4f93a3 100644 --- a/third_party/cq_client/testdata/cq_both.cfg +++ b/third_party/cq_client/v1/testdata/cq_both.cfg @@ -10,7 +10,6 @@ rietveld { url: "https://codereview.chromium.org" } - gerrit { cq_verified_label: "Commit-Queue-Verified" } @@ -19,14 +18,19 @@ verifiers { # This verifier is not supported in Gerrit, and is just ignored. reviewer_lgtm: { - committer_list: "project-chromium-committers" - dry_run_access_list: "project-chromium-tryjob-access" - max_wait_secs: 600 - no_lgtm_msg: "LGTM is missing" + committer_list: "project-chromium-committers" + dry_run_access_list: "project-chromium-tryjob-access" + max_wait_secs: 600 + no_lgtm_msg: "LGTM is missing" + } + + # This verifier is not supported in Rietveld, and is just ignored. + gerrit_cq_ability { + committer_list: "committer_list" } tree_status: { - tree_status_url: "https://infra-status.appspot.com" + tree_status_url: "https://infra-status.appspot.com" } try_job { diff --git a/third_party/cq_client/testdata/cq_gerrit.cfg b/third_party/cq_client/v1/testdata/cq_gerrit.cfg similarity index 90% rename from third_party/cq_client/testdata/cq_gerrit.cfg rename to third_party/cq_client/v1/testdata/cq_gerrit.cfg index 7221e849e..07fbdcaac 100644 --- a/third_party/cq_client/testdata/cq_gerrit.cfg +++ b/third_party/cq_client/v1/testdata/cq_gerrit.cfg @@ -13,7 +13,11 @@ gerrit { verifiers { tree_status: { - tree_status_url: "https://infra-status.appspot.com" + tree_status_url: "https://infra-status.appspot.com" + } + + gerrit_cq_ability { + committer_list: "committer_list" } try_job { diff --git a/third_party/cq_client/testdata/cq_rietveld.cfg b/third_party/cq_client/v1/testdata/cq_rietveld.cfg similarity index 100% rename from third_party/cq_client/testdata/cq_rietveld.cfg rename to third_party/cq_client/v1/testdata/cq_rietveld.cfg diff --git a/third_party/cq_client/v2/__init__.py b/third_party/cq_client/v2/__init__.py new file mode 100644 index 000000000..a22a6ee39 --- /dev/null +++ b/third_party/cq_client/v2/__init__.py @@ -0,0 +1,3 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. diff --git a/third_party/cq_client/v2/cq.pb.go b/third_party/cq_client/v2/cq.pb.go new file mode 100644 index 000000000..cb0c469b1 --- /dev/null +++ b/third_party/cq_client/v2/cq.pb.go @@ -0,0 +1,792 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: cq.proto + +/* +Package cq is a generated protocol buffer package. + +It is generated from these files: + cq.proto + +It has these top-level messages: + Config + SharedConfig + Rietveld + Gerrit + Verifiers +*/ +package cq + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import 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.ProtoPackageIsVersion2 // please upgrade the proto package + +// This message describes a Commit Queue configuration for an entire project. +// The config file cq.cfg should be stored in the project's config directory. +type Config struct { + // Required. Version of the config format. + Version *int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` + // The actual configurations, shared across multiple repositories. + Configs []*SharedConfig `protobuf:"bytes,2,rep,name=configs" json:"configs,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Config) Reset() { *m = Config{} } +func (m *Config) String() string { return proto.CompactTextString(m) } +func (*Config) ProtoMessage() {} +func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Config) GetVersion() int32 { + if m != nil && m.Version != nil { + return *m.Version + } + return 0 +} + +func (m *Config) GetConfigs() []*SharedConfig { + if m != nil { + return m.Configs + } + return nil +} + +// This message describes a shared configuration for multiple repositories. +type SharedConfig struct { + // At least one required. List repositories which share this CQ configuration. + Repos []*SharedConfig_Repository `protobuf:"bytes,1,rep,name=repos" json:"repos,omitempty"` + // List of verifiers that verify if the CL is ready to be committed. + Verifiers *Verifiers `protobuf:"bytes,2,opt,name=verifiers" json:"verifiers,omitempty"` + // URL of the CQ status app to push updates to. + CqStatusUrl *string `protobuf:"bytes,3,opt,name=cq_status_url,json=cqStatusUrl" json:"cq_status_url,omitempty"` + // Delay between commit bursts in seconds. Default value is 480. + CommitBurstDelay *int32 `protobuf:"varint,4,opt,name=commit_burst_delay,json=commitBurstDelay" json:"commit_burst_delay,omitempty"` + // Maximum number of commits done sequentially, before waiting for + // commit_burst_delay. Default value is 4. + MaxCommitBurst *int32 `protobuf:"varint,5,opt,name=max_commit_burst,json=maxCommitBurst" json:"max_commit_burst,omitempty"` + // Configuration options for Rietveld code review. + // DEPRECATED, will be removed. + Rietveld *Rietveld `protobuf:"bytes,6,opt,name=rietveld" json:"rietveld,omitempty"` + // Configuration options for Gerrit code review. + Gerrit *Gerrit `protobuf:"bytes,7,opt,name=gerrit" json:"gerrit,omitempty"` + // If present, the CQ will refrain from processing any CLs which CQ was + // triggered after this time. Setting this time very far in the past will + // effectively make CQ not process any CLs. + // + // This is an UTC RFC3339 (stiptime(tm)) string representing the time. + // For example, "2017-12-23T15:47:58Z" and Z is required. + DrainingStartTime *string `protobuf:"bytes,8,opt,name=draining_start_time,json=drainingStartTime" json:"draining_start_time,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SharedConfig) Reset() { *m = SharedConfig{} } +func (m *SharedConfig) String() string { return proto.CompactTextString(m) } +func (*SharedConfig) ProtoMessage() {} +func (*SharedConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *SharedConfig) GetRepos() []*SharedConfig_Repository { + if m != nil { + return m.Repos + } + return nil +} + +func (m *SharedConfig) GetVerifiers() *Verifiers { + if m != nil { + return m.Verifiers + } + return nil +} + +func (m *SharedConfig) GetCqStatusUrl() string { + if m != nil && m.CqStatusUrl != nil { + return *m.CqStatusUrl + } + return "" +} + +func (m *SharedConfig) GetCommitBurstDelay() int32 { + if m != nil && m.CommitBurstDelay != nil { + return *m.CommitBurstDelay + } + return 0 +} + +func (m *SharedConfig) GetMaxCommitBurst() int32 { + if m != nil && m.MaxCommitBurst != nil { + return *m.MaxCommitBurst + } + return 0 +} + +func (m *SharedConfig) GetRietveld() *Rietveld { + if m != nil { + return m.Rietveld + } + return nil +} + +func (m *SharedConfig) GetGerrit() *Gerrit { + if m != nil { + return m.Gerrit + } + return nil +} + +func (m *SharedConfig) GetDrainingStartTime() string { + if m != nil && m.DrainingStartTime != nil { + return *m.DrainingStartTime + } + return "" +} + +type SharedConfig_Repository struct { + // Required. URL to repository and also its identifier. + Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` + // Refs to follow for the repository. + // If this field is left unspecified, refs/heads/master will be used. + Refs []string `protobuf:"bytes,2,rep,name=refs" json:"refs,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SharedConfig_Repository) Reset() { *m = SharedConfig_Repository{} } +func (m *SharedConfig_Repository) String() string { return proto.CompactTextString(m) } +func (*SharedConfig_Repository) ProtoMessage() {} +func (*SharedConfig_Repository) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } + +func (m *SharedConfig_Repository) GetUrl() string { + if m != nil && m.Url != nil { + return *m.Url + } + return "" +} + +func (m *SharedConfig_Repository) GetRefs() []string { + if m != nil { + return m.Refs + } + return nil +} + +type Rietveld struct { + // Required. URL of the codereview site. + Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Rietveld) Reset() { *m = Rietveld{} } +func (m *Rietveld) String() string { return proto.CompactTextString(m) } +func (*Rietveld) ProtoMessage() {} +func (*Rietveld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *Rietveld) GetUrl() string { + if m != nil && m.Url != nil { + return *m.Url + } + return "" +} + +// Unlike Rietveld, Gerrit doesn't need a separate url. +// Instead, the Repository url must be specified on the Gerrit instance, +// and CQ will deduce Gerrit url from it. +// Also, gerrit_cq_ability verifier must be defined in case of Gerrit. +// +// For example, if https://chromium.googlesource.com/infra/infra.git is your +// repo url provided in `git_repo_url` above, then +// https://chromium-review.googlesource.com/#/admin/projects/infra/infra should +// show general properties of your project. +// +// Also, +// https://chromium-review.googlesource.com/#/admin/projects/infra/infra,access +// should show ACLs for refs in your project, but you may need to be admin to +// see it. This will come handy to enable and customize the CQ-related workflows +// for your project. +type Gerrit struct { + // Optional. If set, tells CQ to vote on a given label to mark result of CQ + // run. The vote is either -1 if failed or 1 on success, and will be given on + // non-dry runs only. + // This vote can then be used in Gerrit's rule for submitting issues, so as to + // require CQ run. CQ will attempt to submit issue only after setting this + // label. + CqVerifiedLabel *string `protobuf:"bytes,1,opt,name=cq_verified_label,json=cqVerifiedLabel" json:"cq_verified_label,omitempty"` + // Optional and only allowed if cq_verified_label is set. Default: False. + // If set, tells CQ to vote on the Verified label even on dry run. + // This is useful if CQ has no presubmit builders, as dry run would be + // totally equivalent to full run, except that CQ won't try to actually submit + // the code. + DryRunSetsCqVerifiedLabel *bool `protobuf:"varint,2,opt,name=dry_run_sets_cq_verified_label,json=dryRunSetsCqVerifiedLabel" json:"dry_run_sets_cq_verified_label,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Gerrit) Reset() { *m = Gerrit{} } +func (m *Gerrit) String() string { return proto.CompactTextString(m) } +func (*Gerrit) ProtoMessage() {} +func (*Gerrit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Gerrit) GetCqVerifiedLabel() string { + if m != nil && m.CqVerifiedLabel != nil { + return *m.CqVerifiedLabel + } + return "" +} + +func (m *Gerrit) GetDryRunSetsCqVerifiedLabel() bool { + if m != nil && m.DryRunSetsCqVerifiedLabel != nil { + return *m.DryRunSetsCqVerifiedLabel + } + return false +} + +// Verifiers are various types of checks that a Commit Queue performs on a CL. +// All verifiers must pass in order for a CL to be landed. Configuration file +// describes types of verifiers that should be applied to each CL and their +// parameters. +type Verifiers struct { + // [Rietveld only] This verifier is used to ensure that an LGTM was posted to + // the code review site from a valid project committer. It also validates + // ability of non-committers to trigger CQ, which for Gerrit is done by + // GerritCQAbilityVerifier. + ReviewerLgtm *Verifiers_ReviewerLgtmVerifier `protobuf:"bytes,1,opt,name=reviewer_lgtm,json=reviewerLgtm" json:"reviewer_lgtm,omitempty"` + // [Gerrit only] GerritCQAbilityVerifier ensures that a user who triggered + // this CQ attempt has actually rights to do so based on 3 factors: + // * membership of the user in committers & dryrunners group, + // * the state of CL/patchset on which CQ is triggered, + // * relationship of the user to the CL. + // This verifier must be specified for Gerrit. + GerritCqAbility *Verifiers_GerritCQAbilityVerifier `protobuf:"bytes,5,opt,name=gerrit_cq_ability,json=gerritCqAbility" json:"gerrit_cq_ability,omitempty"` + // This verifier is used to check tree status before committing a CL. If the + // tree is closed, then the verifier will wait until it is reopened. + TreeStatus *Verifiers_TreeStatusLgtmVerifier `protobuf:"bytes,2,opt,name=tree_status,json=treeStatus" json:"tree_status,omitempty"` + // This verifier triggers a set of tryjobs that are to be run on builders on + // Buildbot. It automatically retries failed try-jobs and only allows CL to + // land if each builder has succeeded in the latest retry. If a given tryjob + // result is too old (>1 day) it is ignored. + TryJob *Verifiers_TryJobVerifier `protobuf:"bytes,3,opt,name=try_job,json=tryJob" json:"try_job,omitempty"` + // This verifier is used to ensure that the author has signed Google's + // Contributor License Agreement. + SignCla *Verifiers_SignCLAVerifier `protobuf:"bytes,4,opt,name=sign_cla,json=signCla" json:"sign_cla,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers) Reset() { *m = Verifiers{} } +func (m *Verifiers) String() string { return proto.CompactTextString(m) } +func (*Verifiers) ProtoMessage() {} +func (*Verifiers) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *Verifiers) GetReviewerLgtm() *Verifiers_ReviewerLgtmVerifier { + if m != nil { + return m.ReviewerLgtm + } + return nil +} + +func (m *Verifiers) GetGerritCqAbility() *Verifiers_GerritCQAbilityVerifier { + if m != nil { + return m.GerritCqAbility + } + return nil +} + +func (m *Verifiers) GetTreeStatus() *Verifiers_TreeStatusLgtmVerifier { + if m != nil { + return m.TreeStatus + } + return nil +} + +func (m *Verifiers) GetTryJob() *Verifiers_TryJobVerifier { + if m != nil { + return m.TryJob + } + return nil +} + +func (m *Verifiers) GetSignCla() *Verifiers_SignCLAVerifier { + if m != nil { + return m.SignCla + } + return nil +} + +type Verifiers_ReviewerLgtmVerifier struct { + // Required. Name of the chrome-infra-auth group, which contains the list of + // identities authorized to approve (lgtm) a CL and trigger CQ run or dry + // run. + CommitterList *string `protobuf:"bytes,1,opt,name=committer_list,json=committerList" json:"committer_list,omitempty"` + // Number of seconds to wait for LGTM on CQ. Default value is 0. + MaxWaitSecs *int32 `protobuf:"varint,2,opt,name=max_wait_secs,json=maxWaitSecs" json:"max_wait_secs,omitempty"` + // Message to be posted to code review site when no LGTM is found. Default + // value is "No LGTM from a valid reviewer yet. Only full committers are " + // "accepted.\nEven if an LGTM may have been provided, it was from a " + // "non-committer,\n_not_ a full super star committer.\nSee " + // "http://www.chromium.org/getting-involved/become-a-committer\nNote that " + // "this has nothing to do with OWNERS files." + NoLgtmMsg *string `protobuf:"bytes,3,opt,name=no_lgtm_msg,json=noLgtmMsg" json:"no_lgtm_msg,omitempty"` + // Optional, but recommended. Name of the chrome-infra-auth group, + // which contains the list of identities authorized to trigger CQ dry run. + // This is usually the same group as tryjob-access. + DryRunAccessList *string `protobuf:"bytes,4,opt,name=dry_run_access_list,json=dryRunAccessList" json:"dry_run_access_list,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_ReviewerLgtmVerifier) Reset() { *m = Verifiers_ReviewerLgtmVerifier{} } +func (m *Verifiers_ReviewerLgtmVerifier) String() string { return proto.CompactTextString(m) } +func (*Verifiers_ReviewerLgtmVerifier) ProtoMessage() {} +func (*Verifiers_ReviewerLgtmVerifier) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 0} +} + +func (m *Verifiers_ReviewerLgtmVerifier) GetCommitterList() string { + if m != nil && m.CommitterList != nil { + return *m.CommitterList + } + return "" +} + +func (m *Verifiers_ReviewerLgtmVerifier) GetMaxWaitSecs() int32 { + if m != nil && m.MaxWaitSecs != nil { + return *m.MaxWaitSecs + } + return 0 +} + +func (m *Verifiers_ReviewerLgtmVerifier) GetNoLgtmMsg() string { + if m != nil && m.NoLgtmMsg != nil { + return *m.NoLgtmMsg + } + return "" +} + +func (m *Verifiers_ReviewerLgtmVerifier) GetDryRunAccessList() string { + if m != nil && m.DryRunAccessList != nil { + return *m.DryRunAccessList + } + return "" +} + +type Verifiers_GerritCQAbilityVerifier struct { + // Required. Name of the chrome-infra-auth group, which contains the list of + // identities authorized to trigger CQ runs on any CLs in this project. + CommitterList *string `protobuf:"bytes,1,opt,name=committer_list,json=committerList" json:"committer_list,omitempty"` + // Optional, but strongly recommended. Name of the chrome-infra-auth group, + // which contains the list of identities authorized to trigger CQ dry run + // on Gerrit CLs they own (not to be confused with OWNER files) even if CL + // hasn't been approved. + // This is usually the same group as tryjob-access. + DryRunAccessList *string `protobuf:"bytes,4,opt,name=dry_run_access_list,json=dryRunAccessList" json:"dry_run_access_list,omitempty"` + // Optional. allow_submit_with_open_deps controls how CQ full run behaves + // when current Gerrit CL has open dependencies (not yet submitted CLs on + // which *this* CL depends). + // + // If set to false (default), CQ will abort full run attempt immediately if + // open dependencies are detected. + // + // If set to true, then CQ will not abort full run and upon passing all + // other verifiers, CQ will attempt to submit the CL regardless of open + // dependencies. In turn, if Gerrit project config allows this, Gerrit will + // execute submit all dependent CLs first and then this CL. + AllowSubmitWithOpenDeps *bool `protobuf:"varint,5,opt,name=allow_submit_with_open_deps,json=allowSubmitWithOpenDeps" json:"allow_submit_with_open_deps,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_GerritCQAbilityVerifier) Reset() { *m = Verifiers_GerritCQAbilityVerifier{} } +func (m *Verifiers_GerritCQAbilityVerifier) String() string { return proto.CompactTextString(m) } +func (*Verifiers_GerritCQAbilityVerifier) ProtoMessage() {} +func (*Verifiers_GerritCQAbilityVerifier) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 1} +} + +func (m *Verifiers_GerritCQAbilityVerifier) GetCommitterList() string { + if m != nil && m.CommitterList != nil { + return *m.CommitterList + } + return "" +} + +func (m *Verifiers_GerritCQAbilityVerifier) GetDryRunAccessList() string { + if m != nil && m.DryRunAccessList != nil { + return *m.DryRunAccessList + } + return "" +} + +func (m *Verifiers_GerritCQAbilityVerifier) GetAllowSubmitWithOpenDeps() bool { + if m != nil && m.AllowSubmitWithOpenDeps != nil { + return *m.AllowSubmitWithOpenDeps + } + return false +} + +type Verifiers_TreeStatusLgtmVerifier struct { + // Required. URL of the project tree status app. + TreeStatusUrl *string `protobuf:"bytes,1,opt,name=tree_status_url,json=treeStatusUrl" json:"tree_status_url,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TreeStatusLgtmVerifier) Reset() { *m = Verifiers_TreeStatusLgtmVerifier{} } +func (m *Verifiers_TreeStatusLgtmVerifier) String() string { return proto.CompactTextString(m) } +func (*Verifiers_TreeStatusLgtmVerifier) ProtoMessage() {} +func (*Verifiers_TreeStatusLgtmVerifier) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 2} +} + +func (m *Verifiers_TreeStatusLgtmVerifier) GetTreeStatusUrl() string { + if m != nil && m.TreeStatusUrl != nil { + return *m.TreeStatusUrl + } + return "" +} + +type Verifiers_TryJobVerifier struct { + // Buckets on which tryjobs are triggered/watched. + Buckets []*Verifiers_TryJobVerifier_Bucket `protobuf:"bytes,1,rep,name=buckets" json:"buckets,omitempty"` + // Provides project specific trybot retry configuration. This overrides the + // defaults used in the CQ. + TryJobRetryConfig *Verifiers_TryJobVerifier_TryJobRetryConfig `protobuf:"bytes,2,opt,name=try_job_retry_config,json=tryJobRetryConfig" json:"try_job_retry_config,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TryJobVerifier) Reset() { *m = Verifiers_TryJobVerifier{} } +func (m *Verifiers_TryJobVerifier) String() string { return proto.CompactTextString(m) } +func (*Verifiers_TryJobVerifier) ProtoMessage() {} +func (*Verifiers_TryJobVerifier) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 3} } + +func (m *Verifiers_TryJobVerifier) GetBuckets() []*Verifiers_TryJobVerifier_Bucket { + if m != nil { + return m.Buckets + } + return nil +} + +func (m *Verifiers_TryJobVerifier) GetTryJobRetryConfig() *Verifiers_TryJobVerifier_TryJobRetryConfig { + if m != nil { + return m.TryJobRetryConfig + } + return nil +} + +type Verifiers_TryJobVerifier_EquivalentBuilder struct { + // Required. Bucket name of this builder. + Bucket *string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"` + // Required. Name of this builder. + Builder *string `protobuf:"bytes,2,opt,name=builder" json:"builder,omitempty"` + // Percentage expressing probability of CQ requiring this builder + // instead of the builder to which this builder is equilvanet to. + // + // If not specified, defaults to 50. + // + // A choice itself is made deterministicly based on CL alone, hereby + // all CQ attempts on all patchsets of a given CL will require the same + // builder, assuming CQ config doesn't change in the mean time. + // + // Note that if `owner_whitelist_group` is also specified, the choice over + // two builders will be made only for CLs owned by whitelisted group. + // + // To illustrate, suppose percentage=10. Then, + // Without owner_whitelist_group, + // ~10% of all CQ attempts will choose this builder. + // With owner_whitelist_group set and, suppose, 1/5 of CQ attempts are + // ran on CLs owned by this group, then only ~(1/10)*(1/5) or + // ~2% of all CQ attempts will choose this builder. + Percentage *int32 `protobuf:"varint,3,opt,name=percentage" json:"percentage,omitempty"` + // If not specified, limits the builder to CL owners in this group. + OwnerWhitelistGroup *string `protobuf:"bytes,4,opt,name=owner_whitelist_group,json=ownerWhitelistGroup" json:"owner_whitelist_group,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) Reset() { + *m = Verifiers_TryJobVerifier_EquivalentBuilder{} +} +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) String() string { + return proto.CompactTextString(m) +} +func (*Verifiers_TryJobVerifier_EquivalentBuilder) ProtoMessage() {} +func (*Verifiers_TryJobVerifier_EquivalentBuilder) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 3, 0} +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetBucket() string { + if m != nil && m.Bucket != nil { + return *m.Bucket + } + return "" +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetBuilder() string { + if m != nil && m.Builder != nil { + return *m.Builder + } + return "" +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetPercentage() int32 { + if m != nil && m.Percentage != nil { + return *m.Percentage + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_EquivalentBuilder) GetOwnerWhitelistGroup() string { + if m != nil && m.OwnerWhitelistGroup != nil { + return *m.OwnerWhitelistGroup + } + return "" +} + +type Verifiers_TryJobVerifier_Builder struct { + // Name of the builder. + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Optionally specify a builder name that triggers the given builder. + // Otherwise, CQ will trigger this builder (default). If in doubt, you + // probably won't need this. + TriggeredBy *string `protobuf:"bytes,2,opt,name=triggered_by,json=triggeredBy" json:"triggered_by,omitempty"` + // When this field is present, it marks given builder as experimental. It + // is only executed on a given percentage of the CLs and the outcome does + // not affect the decicion whether a CL can land or not. This is typically + // used to test new builders and estimate their capacity requirements. + ExperimentPercentage *float32 `protobuf:"fixed32,4,opt,name=experiment_percentage,json=experimentPercentage" json:"experiment_percentage,omitempty"` + // Optionally specified alternative builder for CQ to choose instead. + // If provided, CQ will choose only one of the equivalent builders as + // required based purely on given CL and CL's owner and **regardless** of + // the possibly already completed try jobs. + // + // Note: none of the equivalent builders should be part of triggered_by + // chain, although CQ may eventually relax this requirement somewhat. + EquivalentTo *Verifiers_TryJobVerifier_EquivalentBuilder `protobuf:"bytes,5,opt,name=equivalent_to,json=equivalentTo" json:"equivalent_to,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TryJobVerifier_Builder) Reset() { *m = Verifiers_TryJobVerifier_Builder{} } +func (m *Verifiers_TryJobVerifier_Builder) String() string { return proto.CompactTextString(m) } +func (*Verifiers_TryJobVerifier_Builder) ProtoMessage() {} +func (*Verifiers_TryJobVerifier_Builder) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 3, 1} +} + +func (m *Verifiers_TryJobVerifier_Builder) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Verifiers_TryJobVerifier_Builder) GetTriggeredBy() string { + if m != nil && m.TriggeredBy != nil { + return *m.TriggeredBy + } + return "" +} + +func (m *Verifiers_TryJobVerifier_Builder) GetExperimentPercentage() float32 { + if m != nil && m.ExperimentPercentage != nil { + return *m.ExperimentPercentage + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_Builder) GetEquivalentTo() *Verifiers_TryJobVerifier_EquivalentBuilder { + if m != nil { + return m.EquivalentTo + } + return nil +} + +type Verifiers_TryJobVerifier_Bucket struct { + // Name of the bucket. This is typically the same as a master name without + // the 'master.' prefix, e.g. 'chromium.linux' or 'tryserver.webrtc'. CQ + // will automatically add 'master.' prefix if not there. + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Builders on which tryjobs should be triggered. + Builders []*Verifiers_TryJobVerifier_Builder `protobuf:"bytes,2,rep,name=builders" json:"builders,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TryJobVerifier_Bucket) Reset() { *m = Verifiers_TryJobVerifier_Bucket{} } +func (m *Verifiers_TryJobVerifier_Bucket) String() string { return proto.CompactTextString(m) } +func (*Verifiers_TryJobVerifier_Bucket) ProtoMessage() {} +func (*Verifiers_TryJobVerifier_Bucket) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 3, 2} +} + +func (m *Verifiers_TryJobVerifier_Bucket) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Verifiers_TryJobVerifier_Bucket) GetBuilders() []*Verifiers_TryJobVerifier_Builder { + if m != nil { + return m.Builders + } + return nil +} + +type Verifiers_TryJobVerifier_TryJobRetryConfig struct { + // Retry quota for a single tryjob. + TryJobRetryQuota *int32 `protobuf:"varint,1,opt,name=try_job_retry_quota,json=tryJobRetryQuota" json:"try_job_retry_quota,omitempty"` + // Retry quota for all tryjobs in a CL. + GlobalRetryQuota *int32 `protobuf:"varint,2,opt,name=global_retry_quota,json=globalRetryQuota" json:"global_retry_quota,omitempty"` + // The weight assigned to each tryjob failure. + FailureRetryWeight *int32 `protobuf:"varint,3,opt,name=failure_retry_weight,json=failureRetryWeight" json:"failure_retry_weight,omitempty"` + // The weight assigned to each transient failure. + TransientFailureRetryWeight *int32 `protobuf:"varint,4,opt,name=transient_failure_retry_weight,json=transientFailureRetryWeight" json:"transient_failure_retry_weight,omitempty"` + // The weight assigned to tryjob timeouts. + TimeoutRetryWeight *int32 `protobuf:"varint,5,opt,name=timeout_retry_weight,json=timeoutRetryWeight" json:"timeout_retry_weight,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) Reset() { + *m = Verifiers_TryJobVerifier_TryJobRetryConfig{} +} +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) String() string { + return proto.CompactTextString(m) +} +func (*Verifiers_TryJobVerifier_TryJobRetryConfig) ProtoMessage() {} +func (*Verifiers_TryJobVerifier_TryJobRetryConfig) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 3, 3} +} + +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) GetTryJobRetryQuota() int32 { + if m != nil && m.TryJobRetryQuota != nil { + return *m.TryJobRetryQuota + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) GetGlobalRetryQuota() int32 { + if m != nil && m.GlobalRetryQuota != nil { + return *m.GlobalRetryQuota + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) GetFailureRetryWeight() int32 { + if m != nil && m.FailureRetryWeight != nil { + return *m.FailureRetryWeight + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) GetTransientFailureRetryWeight() int32 { + if m != nil && m.TransientFailureRetryWeight != nil { + return *m.TransientFailureRetryWeight + } + return 0 +} + +func (m *Verifiers_TryJobVerifier_TryJobRetryConfig) GetTimeoutRetryWeight() int32 { + if m != nil && m.TimeoutRetryWeight != nil { + return *m.TimeoutRetryWeight + } + return 0 +} + +type Verifiers_SignCLAVerifier struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Verifiers_SignCLAVerifier) Reset() { *m = Verifiers_SignCLAVerifier{} } +func (m *Verifiers_SignCLAVerifier) String() string { return proto.CompactTextString(m) } +func (*Verifiers_SignCLAVerifier) ProtoMessage() {} +func (*Verifiers_SignCLAVerifier) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 4} } + +func init() { + proto.RegisterType((*Config)(nil), "Config") + proto.RegisterType((*SharedConfig)(nil), "SharedConfig") + proto.RegisterType((*SharedConfig_Repository)(nil), "SharedConfig.Repository") + proto.RegisterType((*Rietveld)(nil), "Rietveld") + proto.RegisterType((*Gerrit)(nil), "Gerrit") + proto.RegisterType((*Verifiers)(nil), "Verifiers") + proto.RegisterType((*Verifiers_ReviewerLgtmVerifier)(nil), "Verifiers.ReviewerLgtmVerifier") + proto.RegisterType((*Verifiers_GerritCQAbilityVerifier)(nil), "Verifiers.GerritCQAbilityVerifier") + proto.RegisterType((*Verifiers_TreeStatusLgtmVerifier)(nil), "Verifiers.TreeStatusLgtmVerifier") + proto.RegisterType((*Verifiers_TryJobVerifier)(nil), "Verifiers.TryJobVerifier") + proto.RegisterType((*Verifiers_TryJobVerifier_EquivalentBuilder)(nil), "Verifiers.TryJobVerifier.EquivalentBuilder") + proto.RegisterType((*Verifiers_TryJobVerifier_Builder)(nil), "Verifiers.TryJobVerifier.Builder") + proto.RegisterType((*Verifiers_TryJobVerifier_Bucket)(nil), "Verifiers.TryJobVerifier.Bucket") + proto.RegisterType((*Verifiers_TryJobVerifier_TryJobRetryConfig)(nil), "Verifiers.TryJobVerifier.TryJobRetryConfig") + proto.RegisterType((*Verifiers_SignCLAVerifier)(nil), "Verifiers.SignCLAVerifier") +} + +func init() { proto.RegisterFile("cq.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 1057 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5b, 0x6f, 0x1b, 0x45, + 0x14, 0x96, 0x73, 0xf1, 0xe5, 0x38, 0x6e, 0xec, 0x69, 0xda, 0x6e, 0x5d, 0x94, 0xa6, 0x96, 0x00, + 0x73, 0xb3, 0x2a, 0x23, 0x5e, 0x10, 0x48, 0xc4, 0x2e, 0x54, 0x82, 0x00, 0xed, 0x3a, 0x25, 0x0f, + 0x20, 0x8d, 0xc6, 0xeb, 0x93, 0xcd, 0xc0, 0x5e, 0xec, 0x99, 0xd9, 0x38, 0xfe, 0x09, 0xbc, 0xf7, + 0xa5, 0x3f, 0x02, 0x89, 0x7f, 0xc1, 0xdf, 0x42, 0x73, 0xd9, 0xf5, 0xba, 0x49, 0x2a, 0x78, 0xdb, + 0x3d, 0xdf, 0xf7, 0xcd, 0x39, 0x73, 0xce, 0x37, 0x33, 0x50, 0x0f, 0x16, 0x83, 0xb9, 0x48, 0x55, + 0xda, 0xfb, 0x01, 0xaa, 0xe3, 0x34, 0x39, 0xe7, 0x21, 0xf1, 0xa0, 0x76, 0x89, 0x42, 0xf2, 0x34, + 0xf1, 0x2a, 0x47, 0x95, 0xfe, 0xae, 0x9f, 0xff, 0x92, 0x0f, 0xa1, 0x16, 0x18, 0x8e, 0xf4, 0xb6, + 0x8e, 0xb6, 0xfb, 0xcd, 0x61, 0x6b, 0x30, 0xb9, 0x60, 0x02, 0x67, 0x56, 0xe9, 0xe7, 0x68, 0xef, + 0xf5, 0x36, 0xec, 0x95, 0x11, 0x32, 0x80, 0x5d, 0x81, 0xf3, 0x54, 0x7a, 0x15, 0xa3, 0xf3, 0x36, + 0x74, 0x03, 0x5f, 0x43, 0x5c, 0xa5, 0x62, 0xe5, 0x5b, 0x1a, 0xe9, 0x43, 0xe3, 0x12, 0x05, 0x3f, + 0xe7, 0x28, 0x74, 0xae, 0x4a, 0xbf, 0x39, 0x84, 0xc1, 0x2f, 0x79, 0xc4, 0x5f, 0x83, 0xa4, 0x07, + 0xad, 0x60, 0x41, 0xa5, 0x62, 0x2a, 0x93, 0x34, 0x13, 0x91, 0xb7, 0x7d, 0x54, 0xe9, 0x37, 0xfc, + 0x66, 0xb0, 0x98, 0x98, 0xd8, 0x2b, 0x11, 0x91, 0x4f, 0x81, 0x04, 0x69, 0x1c, 0x73, 0x45, 0xa7, + 0x99, 0x90, 0x8a, 0xce, 0x30, 0x62, 0x2b, 0x6f, 0xc7, 0x6c, 0xae, 0x6d, 0x91, 0x91, 0x06, 0x9e, + 0xe9, 0x38, 0xe9, 0x43, 0x3b, 0x66, 0x57, 0xb4, 0xac, 0xf0, 0x76, 0x0d, 0xf7, 0x4e, 0xcc, 0xae, + 0xc6, 0x6b, 0x3a, 0xf9, 0x08, 0xea, 0x82, 0xa3, 0xba, 0xc4, 0x68, 0xe6, 0x55, 0x4d, 0x91, 0x8d, + 0x81, 0xef, 0x02, 0xa3, 0x2d, 0xaf, 0xe2, 0x17, 0x30, 0x79, 0x0c, 0xd5, 0x10, 0x85, 0xe0, 0xca, + 0xab, 0x19, 0x62, 0x6d, 0xf0, 0xdc, 0xfc, 0xfa, 0x2e, 0x4c, 0x06, 0x70, 0x77, 0x26, 0x18, 0x4f, + 0x78, 0x12, 0xea, 0xdd, 0x08, 0x45, 0x15, 0x8f, 0xd1, 0xab, 0x9b, 0xdd, 0x74, 0x72, 0x68, 0xa2, + 0x91, 0x53, 0x1e, 0x63, 0x77, 0x08, 0xb0, 0x6e, 0x1b, 0x69, 0xc3, 0xb6, 0xde, 0x7b, 0xc5, 0xb0, + 0xf5, 0x27, 0x21, 0xb0, 0x23, 0xf0, 0xdc, 0x0e, 0xaa, 0xe1, 0x9b, 0xef, 0xde, 0x7b, 0x50, 0xcf, + 0xcb, 0xbb, 0xae, 0xe8, 0x2d, 0xa1, 0x6a, 0x6b, 0x22, 0x1f, 0x43, 0x27, 0x58, 0x50, 0xd7, 0xe3, + 0x19, 0x8d, 0xd8, 0x14, 0x73, 0xe6, 0x7e, 0xb0, 0x70, 0x63, 0x98, 0x9d, 0xe8, 0x30, 0x39, 0x86, + 0xc3, 0x99, 0x58, 0x51, 0x91, 0x25, 0x54, 0xa2, 0x92, 0xf4, 0xba, 0x50, 0x8f, 0xaf, 0xee, 0x3f, + 0x9c, 0x89, 0x95, 0x9f, 0x25, 0x13, 0x54, 0x72, 0xbc, 0xb9, 0x44, 0xef, 0x75, 0x0b, 0x1a, 0xc5, + 0x6c, 0xc9, 0x33, 0x68, 0x09, 0xbc, 0xe4, 0xb8, 0x44, 0x41, 0xa3, 0x50, 0xc5, 0x26, 0x71, 0x73, + 0xf8, 0x78, 0x3d, 0xfe, 0x81, 0xef, 0xf0, 0x93, 0x50, 0xc5, 0x79, 0xd4, 0xdf, 0x13, 0xa5, 0x28, + 0xf9, 0x09, 0x3a, 0xb6, 0xb1, 0xba, 0x20, 0x36, 0xe5, 0x11, 0x57, 0x2b, 0x33, 0xc5, 0xe6, 0xb0, + 0x57, 0x5a, 0xc9, 0x6e, 0x78, 0xfc, 0xf2, 0xd8, 0x32, 0x8a, 0xc5, 0xf6, 0xad, 0x78, 0xbc, 0x70, + 0x00, 0x19, 0x41, 0x53, 0x09, 0x44, 0x67, 0x34, 0x67, 0xc9, 0x27, 0xa5, 0x95, 0x4e, 0x05, 0xa2, + 0x75, 0xdc, 0x46, 0x55, 0xa0, 0x8a, 0x38, 0x19, 0x42, 0x4d, 0x89, 0x15, 0xfd, 0x3d, 0x9d, 0x1a, + 0x93, 0x36, 0x87, 0x0f, 0x37, 0xf4, 0xab, 0xef, 0xd3, 0x69, 0xa1, 0xab, 0x2a, 0xf3, 0x4f, 0xbe, + 0x80, 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58, 0x83, + 0x2f, 0xd6, 0xb5, 0xbe, 0x80, 0x16, 0x16, 0x2d, 0xa1, 0x2a, 0x75, 0x17, 0xcc, 0x3b, 0x5a, 0x7d, + 0xad, 0x83, 0xfe, 0xde, 0x7a, 0x85, 0xd3, 0xb4, 0xfb, 0x2b, 0x54, 0xed, 0x58, 0x6f, 0xdc, 0xc7, + 0xd7, 0x50, 0x77, 0x6d, 0xcc, 0x1f, 0xe0, 0x27, 0xef, 0xb2, 0x87, 0x4d, 0x50, 0x48, 0xba, 0x6f, + 0xb6, 0xa0, 0x73, 0x6d, 0xd6, 0xfa, 0xd0, 0x6c, 0xda, 0x66, 0x91, 0xa5, 0x8a, 0xb9, 0xa7, 0xbf, + 0x5d, 0x32, 0xc2, 0x4b, 0x1d, 0xd7, 0x6f, 0x69, 0x18, 0xa5, 0x53, 0x16, 0x6d, 0xb0, 0xed, 0xf5, + 0xd0, 0xb6, 0x48, 0x89, 0xfd, 0x14, 0x0e, 0xce, 0x19, 0x8f, 0x32, 0x81, 0x8e, 0xbe, 0x44, 0x1e, + 0x5e, 0x28, 0x37, 0x77, 0xe2, 0x30, 0x23, 0x38, 0x33, 0x08, 0x19, 0xc3, 0xa1, 0x12, 0x2c, 0x91, + 0x5c, 0xb7, 0xf4, 0x46, 0xad, 0x7d, 0xb7, 0x1f, 0x15, 0xac, 0xef, 0xae, 0x2f, 0xf2, 0x14, 0x0e, + 0xf4, 0xeb, 0x99, 0x66, 0x6a, 0x53, 0x6a, 0x9f, 0x71, 0xe2, 0xb0, 0x92, 0xa2, 0xdb, 0x81, 0xfd, + 0xb7, 0x2e, 0xd3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x53, 0x28, 0xaa, 0x1c, 0x09, 0x00, + 0x00, +} diff --git a/third_party/cq_client/v2/cq.proto b/third_party/cq_client/v2/cq.proto new file mode 100644 index 000000000..6451b61cd --- /dev/null +++ b/third_party/cq_client/v2/cq.proto @@ -0,0 +1,270 @@ +syntax = "proto2"; + +// This message describes a Commit Queue configuration for an entire project. +// The config file cq.cfg should be stored in the project's config directory. +message Config { + // Required. Version of the config format. + optional int32 version = 1; + + // The actual configurations, shared across multiple repositories. + repeated SharedConfig configs = 2; +} + +// This message describes a shared configuration for multiple repositories. +message SharedConfig { + message Repository { + // Required. URL to repository and also its identifier. + optional string url = 1; + + // Refs to follow for the repository. + // If this field is left unspecified, refs/heads/master will be used. + repeated string refs = 2; + } + + // At least one required. List repositories which share this CQ configuration. + repeated Repository repos = 1; + + // List of verifiers that verify if the CL is ready to be committed. + optional Verifiers verifiers = 2; + + // URL of the CQ status app to push updates to. + optional string cq_status_url = 3; + + // Delay between commit bursts in seconds. Default value is 480. + optional int32 commit_burst_delay = 4; + + // Maximum number of commits done sequentially, before waiting for + // commit_burst_delay. Default value is 4. + optional int32 max_commit_burst = 5; + + // Configuration options for Rietveld code review. + // DEPRECATED, will be removed. + optional Rietveld rietveld = 6 [deprecated = true]; + + // Configuration options for Gerrit code review. + optional Gerrit gerrit = 7; + + // If present, the CQ will refrain from processing any CLs which CQ was + // triggered after this time. Setting this time very far in the past will + // effectively make CQ not process any CLs. + // + // This is an UTC RFC3339 (stiptime(tm)) string representing the time. + // For example, "2017-12-23T15:47:58Z" and Z is required. + optional string draining_start_time = 8; +} + +message Rietveld { + // Required. URL of the codereview site. + optional string url = 1; +} + +// Unlike Rietveld, Gerrit doesn't need a separate url. +// Instead, the Repository url must be specified on the Gerrit instance, +// and CQ will deduce Gerrit url from it. +// Also, gerrit_cq_ability verifier must be defined in case of Gerrit. +// +// For example, if https://chromium.googlesource.com/infra/infra.git is your +// repo url provided in `git_repo_url` above, then +// https://chromium-review.googlesource.com/#/admin/projects/infra/infra should +// show general properties of your project. +// +// Also, +// https://chromium-review.googlesource.com/#/admin/projects/infra/infra,access +// should show ACLs for refs in your project, but you may need to be admin to +// see it. This will come handy to enable and customize the CQ-related workflows +// for your project. +message Gerrit { + // Optional. If set, tells CQ to vote on a given label to mark result of CQ + // run. The vote is either -1 if failed or 1 on success, and will be given on + // non-dry runs only. + // This vote can then be used in Gerrit's rule for submitting issues, so as to + // require CQ run. CQ will attempt to submit issue only after setting this + // label. + optional string cq_verified_label = 1; + + // Optional and only allowed if cq_verified_label is set. Default: False. + // If set, tells CQ to vote on the Verified label even on dry run. + // This is useful if CQ has no presubmit builders, as dry run would be + // totally equivalent to full run, except that CQ won't try to actually submit + // the code. + optional bool dry_run_sets_cq_verified_label = 2; +} + +// Verifiers are various types of checks that a Commit Queue performs on a CL. +// All verifiers must pass in order for a CL to be landed. Configuration file +// describes types of verifiers that should be applied to each CL and their +// parameters. +message Verifiers { + // [Rietveld only] This verifier is used to ensure that an LGTM was posted to + // the code review site from a valid project committer. It also validates + // ability of non-committers to trigger CQ, which for Gerrit is done by + // GerritCQAbilityVerifier. + optional ReviewerLgtmVerifier reviewer_lgtm = 1; + + // [Gerrit only] GerritCQAbilityVerifier ensures that a user who triggered + // this CQ attempt has actually rights to do so based on 3 factors: + // * membership of the user in committers & dryrunners group, + // * the state of CL/patchset on which CQ is triggered, + // * relationship of the user to the CL. + // This verifier must be specified for Gerrit. + optional GerritCQAbilityVerifier gerrit_cq_ability = 5; + + // This verifier is used to check tree status before committing a CL. If the + // tree is closed, then the verifier will wait until it is reopened. + optional TreeStatusLgtmVerifier tree_status = 2; + + // This verifier triggers a set of tryjobs that are to be run on builders on + // Buildbot. It automatically retries failed try-jobs and only allows CL to + // land if each builder has succeeded in the latest retry. If a given tryjob + // result is too old (>1 day) it is ignored. + optional TryJobVerifier try_job = 3; + + // This verifier is used to ensure that the author has signed Google's + // Contributor License Agreement. + optional SignCLAVerifier sign_cla = 4; + + message ReviewerLgtmVerifier { + // Required. Name of the chrome-infra-auth group, which contains the list of + // identities authorized to approve (lgtm) a CL and trigger CQ run or dry + // run. + optional string committer_list = 1; + + // Number of seconds to wait for LGTM on CQ. Default value is 0. + optional int32 max_wait_secs = 2; + + // Message to be posted to code review site when no LGTM is found. Default + // value is "No LGTM from a valid reviewer yet. Only full committers are " + // "accepted.\nEven if an LGTM may have been provided, it was from a " + // "non-committer,\n_not_ a full super star committer.\nSee " + // "http://www.chromium.org/getting-involved/become-a-committer\nNote that " + // "this has nothing to do with OWNERS files." + optional string no_lgtm_msg = 3; + + // Optional, but recommended. Name of the chrome-infra-auth group, + // which contains the list of identities authorized to trigger CQ dry run. + // This is usually the same group as tryjob-access. + optional string dry_run_access_list = 4; + } + + message GerritCQAbilityVerifier { + // Required. Name of the chrome-infra-auth group, which contains the list of + // identities authorized to trigger CQ runs on any CLs in this project. + optional string committer_list = 1; + + // Optional, but strongly recommended. Name of the chrome-infra-auth group, + // which contains the list of identities authorized to trigger CQ dry run + // on Gerrit CLs they own (not to be confused with OWNER files) even if CL + // hasn't been approved. + // This is usually the same group as tryjob-access. + optional string dry_run_access_list = 4; + + // Optional. allow_submit_with_open_deps controls how CQ full run behaves + // when current Gerrit CL has open dependencies (not yet submitted CLs on + // which *this* CL depends). + // + // If set to false (default), CQ will abort full run attempt immediately if + // open dependencies are detected. + // + // If set to true, then CQ will not abort full run and upon passing all + // other verifiers, CQ will attempt to submit the CL regardless of open + // dependencies. In turn, if Gerrit project config allows this, Gerrit will + // execute submit all dependent CLs first and then this CL. + optional bool allow_submit_with_open_deps = 5; + } + + message TreeStatusLgtmVerifier { + // Required. URL of the project tree status app. + optional string tree_status_url = 1; + } + + message TryJobVerifier { + message EquivalentBuilder { + // Required. Bucket name of this builder. + optional string bucket = 1; + // Required. Name of this builder. + optional string builder = 2; + // Percentage expressing probability of CQ requiring this builder + // instead of the builder to which this builder is equilvanet to. + // + // If not specified, defaults to 50. + // + // A choice itself is made deterministicly based on CL alone, hereby + // all CQ attempts on all patchsets of a given CL will require the same + // builder, assuming CQ config doesn't change in the mean time. + // + // Note that if `owner_whitelist_group` is also specified, the choice over + // two builders will be made only for CLs owned by whitelisted group. + // + // To illustrate, suppose percentage=10. Then, + // Without owner_whitelist_group, + // ~10% of all CQ attempts will choose this builder. + // With owner_whitelist_group set and, suppose, 1/5 of CQ attempts are + // ran on CLs owned by this group, then only ~(1/10)*(1/5) or + // ~2% of all CQ attempts will choose this builder. + optional int32 percentage = 3; + // If not specified, limits the builder to CL owners in this group. + optional string owner_whitelist_group = 4; + } + + message Builder { + // Name of the builder. + optional string name = 1; + + // Optionally specify a builder name that triggers the given builder. + // Otherwise, CQ will trigger this builder (default). If in doubt, you + // probably won't need this. + optional string triggered_by = 2; + + // When this field is present, it marks given builder as experimental. It + // is only executed on a given percentage of the CLs and the outcome does + // not affect the decicion whether a CL can land or not. This is typically + // used to test new builders and estimate their capacity requirements. + optional float experiment_percentage = 4; + + // Optionally specified alternative builder for CQ to choose instead. + // If provided, CQ will choose only one of the equivalent builders as + // required based purely on given CL and CL's owner and **regardless** of + // the possibly already completed try jobs. + // + // Note: none of the equivalent builders should be part of triggered_by + // chain, although CQ may eventually relax this requirement somewhat. + optional EquivalentBuilder equivalent_to = 5; + } + + message Bucket { + // Name of the bucket. This is typically the same as a master name without + // the 'master.' prefix, e.g. 'chromium.linux' or 'tryserver.webrtc'. CQ + // will automatically add 'master.' prefix if not there. + optional string name = 1; + + // Builders on which tryjobs should be triggered. + repeated Builder builders = 2; + } + + // Buckets on which tryjobs are triggered/watched. + repeated Bucket buckets = 1; + + message TryJobRetryConfig { + // Retry quota for a single tryjob. + optional int32 try_job_retry_quota = 1; + + // Retry quota for all tryjobs in a CL. + optional int32 global_retry_quota = 2; + + // The weight assigned to each tryjob failure. + optional int32 failure_retry_weight = 3; + + // The weight assigned to each transient failure. + optional int32 transient_failure_retry_weight = 4; + + // The weight assigned to tryjob timeouts. + optional int32 timeout_retry_weight = 5; + } + + // Provides project specific trybot retry configuration. This overrides the + // defaults used in the CQ. + optional TryJobRetryConfig try_job_retry_config = 2; + } + + message SignCLAVerifier {} +} diff --git a/third_party/cq_client/v2/cq_pb2.py b/third_party/cq_client/v2/cq_pb2.py new file mode 100644 index 000000000..ec7e8bcd0 --- /dev/null +++ b/third_party/cq_client/v2/cq_pb2.py @@ -0,0 +1,841 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: cq.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='cq.proto', + package='', + syntax='proto2', + serialized_pb=_b('\n\x08\x63q.proto\"9\n\x06\x43onfig\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x1e\n\x07\x63onfigs\x18\x02 \x03(\x0b\x32\r.SharedConfig\"\xa3\x02\n\x0cSharedConfig\x12\'\n\x05repos\x18\x01 \x03(\x0b\x32\x18.SharedConfig.Repository\x12\x1d\n\tverifiers\x18\x02 \x01(\x0b\x32\n.Verifiers\x12\x15\n\rcq_status_url\x18\x03 \x01(\t\x12\x1a\n\x12\x63ommit_burst_delay\x18\x04 \x01(\x05\x12\x18\n\x10max_commit_burst\x18\x05 \x01(\x05\x12\x1f\n\x08rietveld\x18\x06 \x01(\x0b\x32\t.RietveldB\x02\x18\x01\x12\x17\n\x06gerrit\x18\x07 \x01(\x0b\x32\x07.Gerrit\x12\x1b\n\x13\x64raining_start_time\x18\x08 \x01(\t\x1a\'\n\nRepository\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0c\n\x04refs\x18\x02 \x03(\t\"\x17\n\x08Rietveld\x12\x0b\n\x03url\x18\x01 \x01(\t\"K\n\x06Gerrit\x12\x19\n\x11\x63q_verified_label\x18\x01 \x01(\t\x12&\n\x1e\x64ry_run_sets_cq_verified_label\x18\x02 \x01(\x08\"\xd5\t\n\tVerifiers\x12\x36\n\rreviewer_lgtm\x18\x01 \x01(\x0b\x32\x1f.Verifiers.ReviewerLgtmVerifier\x12=\n\x11gerrit_cq_ability\x18\x05 \x01(\x0b\x32\".Verifiers.GerritCQAbilityVerifier\x12\x36\n\x0btree_status\x18\x02 \x01(\x0b\x32!.Verifiers.TreeStatusLgtmVerifier\x12*\n\x07try_job\x18\x03 \x01(\x0b\x32\x19.Verifiers.TryJobVerifier\x12,\n\x08sign_cla\x18\x04 \x01(\x0b\x32\x1a.Verifiers.SignCLAVerifier\x1aw\n\x14ReviewerLgtmVerifier\x12\x16\n\x0e\x63ommitter_list\x18\x01 \x01(\t\x12\x15\n\rmax_wait_secs\x18\x02 \x01(\x05\x12\x13\n\x0bno_lgtm_msg\x18\x03 \x01(\t\x12\x1b\n\x13\x64ry_run_access_list\x18\x04 \x01(\t\x1as\n\x17GerritCQAbilityVerifier\x12\x16\n\x0e\x63ommitter_list\x18\x01 \x01(\t\x12\x1b\n\x13\x64ry_run_access_list\x18\x04 \x01(\t\x12#\n\x1b\x61llow_submit_with_open_deps\x18\x05 \x01(\x08\x1a\x31\n\x16TreeStatusLgtmVerifier\x12\x17\n\x0ftree_status_url\x18\x01 \x01(\t\x1a\x8a\x05\n\x0eTryJobVerifier\x12\x31\n\x07\x62uckets\x18\x01 \x03(\x0b\x32 .Verifiers.TryJobVerifier.Bucket\x12I\n\x14try_job_retry_config\x18\x02 \x01(\x0b\x32+.Verifiers.TryJobVerifier.TryJobRetryConfig\x1ag\n\x11\x45quivalentBuilder\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0f\n\x07\x62uilder\x18\x02 \x01(\t\x12\x12\n\npercentage\x18\x03 \x01(\x05\x12\x1d\n\x15owner_whitelist_group\x18\x04 \x01(\t\x1a\x90\x01\n\x07\x42uilder\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ctriggered_by\x18\x02 \x01(\t\x12\x1d\n\x15\x65xperiment_percentage\x18\x04 \x01(\x02\x12\x42\n\requivalent_to\x18\x05 \x01(\x0b\x32+.Verifiers.TryJobVerifier.EquivalentBuilder\x1aK\n\x06\x42ucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x33\n\x08\x62uilders\x18\x02 \x03(\x0b\x32!.Verifiers.TryJobVerifier.Builder\x1a\xb0\x01\n\x11TryJobRetryConfig\x12\x1b\n\x13try_job_retry_quota\x18\x01 \x01(\x05\x12\x1a\n\x12global_retry_quota\x18\x02 \x01(\x05\x12\x1c\n\x14\x66\x61ilure_retry_weight\x18\x03 \x01(\x05\x12&\n\x1etransient_failure_retry_weight\x18\x04 \x01(\x05\x12\x1c\n\x14timeout_retry_weight\x18\x05 \x01(\x05\x1a\x11\n\x0fSignCLAVerifier') +) + + + + +_CONFIG = _descriptor.Descriptor( + name='Config', + full_name='Config', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='version', full_name='Config.version', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='configs', full_name='Config.configs', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12, + serialized_end=69, +) + + +_SHAREDCONFIG_REPOSITORY = _descriptor.Descriptor( + name='Repository', + full_name='SharedConfig.Repository', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='url', full_name='SharedConfig.Repository.url', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='refs', full_name='SharedConfig.Repository.refs', index=1, + number=2, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=324, + serialized_end=363, +) + +_SHAREDCONFIG = _descriptor.Descriptor( + name='SharedConfig', + full_name='SharedConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='repos', full_name='SharedConfig.repos', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='verifiers', full_name='SharedConfig.verifiers', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='cq_status_url', full_name='SharedConfig.cq_status_url', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='commit_burst_delay', full_name='SharedConfig.commit_burst_delay', index=3, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='max_commit_burst', full_name='SharedConfig.max_commit_burst', index=4, + number=5, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='rietveld', full_name='SharedConfig.rietveld', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + _descriptor.FieldDescriptor( + name='gerrit', full_name='SharedConfig.gerrit', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='draining_start_time', full_name='SharedConfig.draining_start_time', index=7, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_SHAREDCONFIG_REPOSITORY, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=72, + serialized_end=363, +) + + +_RIETVELD = _descriptor.Descriptor( + name='Rietveld', + full_name='Rietveld', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='url', full_name='Rietveld.url', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=365, + serialized_end=388, +) + + +_GERRIT = _descriptor.Descriptor( + name='Gerrit', + full_name='Gerrit', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='cq_verified_label', full_name='Gerrit.cq_verified_label', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='dry_run_sets_cq_verified_label', full_name='Gerrit.dry_run_sets_cq_verified_label', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=390, + serialized_end=465, +) + + +_VERIFIERS_REVIEWERLGTMVERIFIER = _descriptor.Descriptor( + name='ReviewerLgtmVerifier', + full_name='Verifiers.ReviewerLgtmVerifier', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='committer_list', full_name='Verifiers.ReviewerLgtmVerifier.committer_list', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='max_wait_secs', full_name='Verifiers.ReviewerLgtmVerifier.max_wait_secs', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='no_lgtm_msg', full_name='Verifiers.ReviewerLgtmVerifier.no_lgtm_msg', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='dry_run_access_list', full_name='Verifiers.ReviewerLgtmVerifier.dry_run_access_list', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=746, + serialized_end=865, +) + +_VERIFIERS_GERRITCQABILITYVERIFIER = _descriptor.Descriptor( + name='GerritCQAbilityVerifier', + full_name='Verifiers.GerritCQAbilityVerifier', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='committer_list', full_name='Verifiers.GerritCQAbilityVerifier.committer_list', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='dry_run_access_list', full_name='Verifiers.GerritCQAbilityVerifier.dry_run_access_list', index=1, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='allow_submit_with_open_deps', full_name='Verifiers.GerritCQAbilityVerifier.allow_submit_with_open_deps', index=2, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=867, + serialized_end=982, +) + +_VERIFIERS_TREESTATUSLGTMVERIFIER = _descriptor.Descriptor( + name='TreeStatusLgtmVerifier', + full_name='Verifiers.TreeStatusLgtmVerifier', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='tree_status_url', full_name='Verifiers.TreeStatusLgtmVerifier.tree_status_url', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=984, + serialized_end=1033, +) + +_VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER = _descriptor.Descriptor( + name='EquivalentBuilder', + full_name='Verifiers.TryJobVerifier.EquivalentBuilder', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bucket', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.bucket', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='builder', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.builder', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='percentage', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.percentage', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='owner_whitelist_group', full_name='Verifiers.TryJobVerifier.EquivalentBuilder.owner_whitelist_group', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1180, + serialized_end=1283, +) + +_VERIFIERS_TRYJOBVERIFIER_BUILDER = _descriptor.Descriptor( + name='Builder', + full_name='Verifiers.TryJobVerifier.Builder', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='Verifiers.TryJobVerifier.Builder.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='triggered_by', full_name='Verifiers.TryJobVerifier.Builder.triggered_by', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='experiment_percentage', full_name='Verifiers.TryJobVerifier.Builder.experiment_percentage', index=2, + number=4, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='equivalent_to', full_name='Verifiers.TryJobVerifier.Builder.equivalent_to', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1286, + serialized_end=1430, +) + +_VERIFIERS_TRYJOBVERIFIER_BUCKET = _descriptor.Descriptor( + name='Bucket', + full_name='Verifiers.TryJobVerifier.Bucket', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='Verifiers.TryJobVerifier.Bucket.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='builders', full_name='Verifiers.TryJobVerifier.Bucket.builders', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1432, + serialized_end=1507, +) + +_VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG = _descriptor.Descriptor( + name='TryJobRetryConfig', + full_name='Verifiers.TryJobVerifier.TryJobRetryConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='try_job_retry_quota', full_name='Verifiers.TryJobVerifier.TryJobRetryConfig.try_job_retry_quota', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='global_retry_quota', full_name='Verifiers.TryJobVerifier.TryJobRetryConfig.global_retry_quota', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='failure_retry_weight', full_name='Verifiers.TryJobVerifier.TryJobRetryConfig.failure_retry_weight', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='transient_failure_retry_weight', full_name='Verifiers.TryJobVerifier.TryJobRetryConfig.transient_failure_retry_weight', index=3, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='timeout_retry_weight', full_name='Verifiers.TryJobVerifier.TryJobRetryConfig.timeout_retry_weight', index=4, + number=5, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1510, + serialized_end=1686, +) + +_VERIFIERS_TRYJOBVERIFIER = _descriptor.Descriptor( + name='TryJobVerifier', + full_name='Verifiers.TryJobVerifier', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='buckets', full_name='Verifiers.TryJobVerifier.buckets', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='try_job_retry_config', full_name='Verifiers.TryJobVerifier.try_job_retry_config', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER, _VERIFIERS_TRYJOBVERIFIER_BUILDER, _VERIFIERS_TRYJOBVERIFIER_BUCKET, _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1036, + serialized_end=1686, +) + +_VERIFIERS_SIGNCLAVERIFIER = _descriptor.Descriptor( + name='SignCLAVerifier', + full_name='Verifiers.SignCLAVerifier', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1688, + serialized_end=1705, +) + +_VERIFIERS = _descriptor.Descriptor( + name='Verifiers', + full_name='Verifiers', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='reviewer_lgtm', full_name='Verifiers.reviewer_lgtm', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='gerrit_cq_ability', full_name='Verifiers.gerrit_cq_ability', index=1, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='tree_status', full_name='Verifiers.tree_status', index=2, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='try_job', full_name='Verifiers.try_job', index=3, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='sign_cla', full_name='Verifiers.sign_cla', index=4, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_VERIFIERS_REVIEWERLGTMVERIFIER, _VERIFIERS_GERRITCQABILITYVERIFIER, _VERIFIERS_TREESTATUSLGTMVERIFIER, _VERIFIERS_TRYJOBVERIFIER, _VERIFIERS_SIGNCLAVERIFIER, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto2', + extension_ranges=[], + oneofs=[ + ], + serialized_start=468, + serialized_end=1705, +) + +_CONFIG.fields_by_name['configs'].message_type = _SHAREDCONFIG +_SHAREDCONFIG_REPOSITORY.containing_type = _SHAREDCONFIG +_SHAREDCONFIG.fields_by_name['repos'].message_type = _SHAREDCONFIG_REPOSITORY +_SHAREDCONFIG.fields_by_name['verifiers'].message_type = _VERIFIERS +_SHAREDCONFIG.fields_by_name['rietveld'].message_type = _RIETVELD +_SHAREDCONFIG.fields_by_name['gerrit'].message_type = _GERRIT +_VERIFIERS_REVIEWERLGTMVERIFIER.containing_type = _VERIFIERS +_VERIFIERS_GERRITCQABILITYVERIFIER.containing_type = _VERIFIERS +_VERIFIERS_TREESTATUSLGTMVERIFIER.containing_type = _VERIFIERS +_VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER.containing_type = _VERIFIERS_TRYJOBVERIFIER +_VERIFIERS_TRYJOBVERIFIER_BUILDER.fields_by_name['equivalent_to'].message_type = _VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER +_VERIFIERS_TRYJOBVERIFIER_BUILDER.containing_type = _VERIFIERS_TRYJOBVERIFIER +_VERIFIERS_TRYJOBVERIFIER_BUCKET.fields_by_name['builders'].message_type = _VERIFIERS_TRYJOBVERIFIER_BUILDER +_VERIFIERS_TRYJOBVERIFIER_BUCKET.containing_type = _VERIFIERS_TRYJOBVERIFIER +_VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG.containing_type = _VERIFIERS_TRYJOBVERIFIER +_VERIFIERS_TRYJOBVERIFIER.fields_by_name['buckets'].message_type = _VERIFIERS_TRYJOBVERIFIER_BUCKET +_VERIFIERS_TRYJOBVERIFIER.fields_by_name['try_job_retry_config'].message_type = _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG +_VERIFIERS_TRYJOBVERIFIER.containing_type = _VERIFIERS +_VERIFIERS_SIGNCLAVERIFIER.containing_type = _VERIFIERS +_VERIFIERS.fields_by_name['reviewer_lgtm'].message_type = _VERIFIERS_REVIEWERLGTMVERIFIER +_VERIFIERS.fields_by_name['gerrit_cq_ability'].message_type = _VERIFIERS_GERRITCQABILITYVERIFIER +_VERIFIERS.fields_by_name['tree_status'].message_type = _VERIFIERS_TREESTATUSLGTMVERIFIER +_VERIFIERS.fields_by_name['try_job'].message_type = _VERIFIERS_TRYJOBVERIFIER +_VERIFIERS.fields_by_name['sign_cla'].message_type = _VERIFIERS_SIGNCLAVERIFIER +DESCRIPTOR.message_types_by_name['Config'] = _CONFIG +DESCRIPTOR.message_types_by_name['SharedConfig'] = _SHAREDCONFIG +DESCRIPTOR.message_types_by_name['Rietveld'] = _RIETVELD +DESCRIPTOR.message_types_by_name['Gerrit'] = _GERRIT +DESCRIPTOR.message_types_by_name['Verifiers'] = _VERIFIERS +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), dict( + DESCRIPTOR = _CONFIG, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Config) + )) +_sym_db.RegisterMessage(Config) + +SharedConfig = _reflection.GeneratedProtocolMessageType('SharedConfig', (_message.Message,), dict( + + Repository = _reflection.GeneratedProtocolMessageType('Repository', (_message.Message,), dict( + DESCRIPTOR = _SHAREDCONFIG_REPOSITORY, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:SharedConfig.Repository) + )) + , + DESCRIPTOR = _SHAREDCONFIG, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:SharedConfig) + )) +_sym_db.RegisterMessage(SharedConfig) +_sym_db.RegisterMessage(SharedConfig.Repository) + +Rietveld = _reflection.GeneratedProtocolMessageType('Rietveld', (_message.Message,), dict( + DESCRIPTOR = _RIETVELD, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Rietveld) + )) +_sym_db.RegisterMessage(Rietveld) + +Gerrit = _reflection.GeneratedProtocolMessageType('Gerrit', (_message.Message,), dict( + DESCRIPTOR = _GERRIT, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Gerrit) + )) +_sym_db.RegisterMessage(Gerrit) + +Verifiers = _reflection.GeneratedProtocolMessageType('Verifiers', (_message.Message,), dict( + + ReviewerLgtmVerifier = _reflection.GeneratedProtocolMessageType('ReviewerLgtmVerifier', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_REVIEWERLGTMVERIFIER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.ReviewerLgtmVerifier) + )) + , + + GerritCQAbilityVerifier = _reflection.GeneratedProtocolMessageType('GerritCQAbilityVerifier', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_GERRITCQABILITYVERIFIER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.GerritCQAbilityVerifier) + )) + , + + TreeStatusLgtmVerifier = _reflection.GeneratedProtocolMessageType('TreeStatusLgtmVerifier', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_TREESTATUSLGTMVERIFIER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TreeStatusLgtmVerifier) + )) + , + + TryJobVerifier = _reflection.GeneratedProtocolMessageType('TryJobVerifier', (_message.Message,), dict( + + EquivalentBuilder = _reflection.GeneratedProtocolMessageType('EquivalentBuilder', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER_EQUIVALENTBUILDER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TryJobVerifier.EquivalentBuilder) + )) + , + + Builder = _reflection.GeneratedProtocolMessageType('Builder', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER_BUILDER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TryJobVerifier.Builder) + )) + , + + Bucket = _reflection.GeneratedProtocolMessageType('Bucket', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER_BUCKET, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TryJobVerifier.Bucket) + )) + , + + TryJobRetryConfig = _reflection.GeneratedProtocolMessageType('TryJobRetryConfig', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER_TRYJOBRETRYCONFIG, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TryJobVerifier.TryJobRetryConfig) + )) + , + DESCRIPTOR = _VERIFIERS_TRYJOBVERIFIER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.TryJobVerifier) + )) + , + + SignCLAVerifier = _reflection.GeneratedProtocolMessageType('SignCLAVerifier', (_message.Message,), dict( + DESCRIPTOR = _VERIFIERS_SIGNCLAVERIFIER, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers.SignCLAVerifier) + )) + , + DESCRIPTOR = _VERIFIERS, + __module__ = 'cq_pb2' + # @@protoc_insertion_point(class_scope:Verifiers) + )) +_sym_db.RegisterMessage(Verifiers) +_sym_db.RegisterMessage(Verifiers.ReviewerLgtmVerifier) +_sym_db.RegisterMessage(Verifiers.GerritCQAbilityVerifier) +_sym_db.RegisterMessage(Verifiers.TreeStatusLgtmVerifier) +_sym_db.RegisterMessage(Verifiers.TryJobVerifier) +_sym_db.RegisterMessage(Verifiers.TryJobVerifier.EquivalentBuilder) +_sym_db.RegisterMessage(Verifiers.TryJobVerifier.Builder) +_sym_db.RegisterMessage(Verifiers.TryJobVerifier.Bucket) +_sym_db.RegisterMessage(Verifiers.TryJobVerifier.TryJobRetryConfig) +_sym_db.RegisterMessage(Verifiers.SignCLAVerifier) + + +_SHAREDCONFIG.fields_by_name['rietveld'].has_options = True +_SHAREDCONFIG.fields_by_name['rietveld']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +# @@protoc_insertion_point(module_scope)