cq: add experimental option to opt in to use CQ-Depend.

Motivation: gradual rollout
 1. Test project. At this stage, no to lucicfg yet.
 2. ChromeOS. Must be supported in lucicfg.
 3. Make generally available, but behind a flag.

Bug: 912294
Change-Id: I344ca40cf91359ebe0b5f40136f0f322db3e11e6
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/1560868
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/cq/api/config/v2/cq.pb.go b/cq/api/config/v2/cq.pb.go
index ef05910..20be999 100644
--- a/cq/api/config/v2/cq.pb.go
+++ b/cq/api/config/v2/cq.pb.go
@@ -21,6 +21,35 @@
 // proto package needs to be updated.
 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
+// A boolean with an undefined value.
+type Trinary int32
+
+const (
+	Trinary_UNSET Trinary = 0
+	Trinary_YES   Trinary = 1
+	Trinary_NO    Trinary = 2
+)
+
+var Trinary_name = map[int32]string{
+	0: "UNSET",
+	1: "YES",
+	2: "NO",
+}
+
+var Trinary_value = map[string]int32{
+	"UNSET": 0,
+	"YES":   1,
+	"NO":    2,
+}
+
+func (x Trinary) String() string {
+	return proto.EnumName(Trinary_name, int32(x))
+}
+
+func (Trinary) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_59a2f489dbd601ec, []int{0}
+}
+
 // This message describes a Commit Queue configuration.
 //
 // The config file commit-queue.cfg should be stored in the config directory of your
@@ -38,10 +67,12 @@
 	// Optional options for how CLs should be submitted.
 	SubmitOptions *SubmitOptions `protobuf:"bytes,3,opt,name=submit_options,json=submitOptions,proto3" json:"submit_options,omitempty"`
 	// At least 1 ConfigGroup is required.
-	ConfigGroups         []*ConfigGroup `protobuf:"bytes,4,rep,name=config_groups,json=configGroups,proto3" json:"config_groups,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
-	XXX_unrecognized     []byte         `json:"-"`
-	XXX_sizecache        int32          `json:"-"`
+	ConfigGroups []*ConfigGroup `protobuf:"bytes,4,rep,name=config_groups,json=configGroups,proto3" json:"config_groups,omitempty"`
+	// EXPERIMENTAL!
+	CqdependOptions      *CQDependOptions `protobuf:"bytes,5,opt,name=cqdepend_options,json=cqdependOptions,proto3" json:"cqdepend_options,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
 }
 
 func (m *Config) Reset()         { *m = Config{} }
@@ -97,6 +128,13 @@
 	return nil
 }
 
+func (m *Config) GetCqdependOptions() *CQDependOptions {
+	if m != nil {
+		return m.CqdependOptions
+	}
+	return nil
+}
+
 // SubmitOptions control how CQ submits CLs.
 type SubmitOptions struct {
 	// Optional. Maximum number of successful CQ attempts completed by submitting
@@ -156,6 +194,46 @@
 	return nil
 }
 
+// EXPERIMENTAL! TODO(tandrii, crbug/912294): add doc.
+type CQDependOptions struct {
+	Allowed              Trinary  `protobuf:"varint,1,opt,name=allowed,proto3,enum=cq.config.Trinary" json:"allowed,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *CQDependOptions) Reset()         { *m = CQDependOptions{} }
+func (m *CQDependOptions) String() string { return proto.CompactTextString(m) }
+func (*CQDependOptions) ProtoMessage()    {}
+func (*CQDependOptions) Descriptor() ([]byte, []int) {
+	return fileDescriptor_59a2f489dbd601ec, []int{2}
+}
+
+func (m *CQDependOptions) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_CQDependOptions.Unmarshal(m, b)
+}
+func (m *CQDependOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_CQDependOptions.Marshal(b, m, deterministic)
+}
+func (m *CQDependOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_CQDependOptions.Merge(m, src)
+}
+func (m *CQDependOptions) XXX_Size() int {
+	return xxx_messageInfo_CQDependOptions.Size(m)
+}
+func (m *CQDependOptions) XXX_DiscardUnknown() {
+	xxx_messageInfo_CQDependOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CQDependOptions proto.InternalMessageInfo
+
+func (m *CQDependOptions) GetAllowed() Trinary {
+	if m != nil {
+		return m.Allowed
+	}
+	return Trinary_UNSET
+}
+
 // ConfigGroup allows one to share single verifiers config across a set of
 // Gerrit repositories, which may be in different Gerrit installations.
 type ConfigGroup struct {
@@ -172,7 +250,7 @@
 func (m *ConfigGroup) String() string { return proto.CompactTextString(m) }
 func (*ConfigGroup) ProtoMessage()    {}
 func (*ConfigGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{2}
+	return fileDescriptor_59a2f489dbd601ec, []int{3}
 }
 
 func (m *ConfigGroup) XXX_Unmarshal(b []byte) error {
@@ -225,7 +303,7 @@
 func (m *ConfigGroup_Gerrit) String() string { return proto.CompactTextString(m) }
 func (*ConfigGroup_Gerrit) ProtoMessage()    {}
 func (*ConfigGroup_Gerrit) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{2, 0}
+	return fileDescriptor_59a2f489dbd601ec, []int{3, 0}
 }
 
 func (m *ConfigGroup_Gerrit) XXX_Unmarshal(b []byte) error {
@@ -297,7 +375,7 @@
 func (m *ConfigGroup_Gerrit_Project) String() string { return proto.CompactTextString(m) }
 func (*ConfigGroup_Gerrit_Project) ProtoMessage()    {}
 func (*ConfigGroup_Gerrit_Project) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{2, 0, 0}
+	return fileDescriptor_59a2f489dbd601ec, []int{3, 0, 0}
 }
 
 func (m *ConfigGroup_Gerrit_Project) XXX_Unmarshal(b []byte) error {
@@ -368,7 +446,7 @@
 func (m *Verifiers) String() string { return proto.CompactTextString(m) }
 func (*Verifiers) ProtoMessage()    {}
 func (*Verifiers) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3}
+	return fileDescriptor_59a2f489dbd601ec, []int{4}
 }
 
 func (m *Verifiers) XXX_Unmarshal(b []byte) error {
@@ -458,7 +536,7 @@
 func (m *Verifiers_GerritCQAbility) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_GerritCQAbility) ProtoMessage()    {}
 func (*Verifiers_GerritCQAbility) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 0}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 0}
 }
 
 func (m *Verifiers_GerritCQAbility) XXX_Unmarshal(b []byte) error {
@@ -512,7 +590,7 @@
 func (m *Verifiers_TreeStatus) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_TreeStatus) ProtoMessage()    {}
 func (*Verifiers_TreeStatus) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 1}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 1}
 }
 
 func (m *Verifiers_TreeStatus) XXX_Unmarshal(b []byte) error {
@@ -554,7 +632,7 @@
 func (m *Verifiers_Tryjob) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_Tryjob) ProtoMessage()    {}
 func (*Verifiers_Tryjob) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 2}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 2}
 }
 
 func (m *Verifiers_Tryjob) XXX_Unmarshal(b []byte) error {
@@ -721,7 +799,7 @@
 func (m *Verifiers_Tryjob_Builder) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_Tryjob_Builder) ProtoMessage()    {}
 func (*Verifiers_Tryjob_Builder) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 2, 0}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 2, 0}
 }
 
 func (m *Verifiers_Tryjob_Builder) XXX_Unmarshal(b []byte) error {
@@ -827,7 +905,7 @@
 func (m *Verifiers_Tryjob_EquivalentBuilder) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_Tryjob_EquivalentBuilder) ProtoMessage()    {}
 func (*Verifiers_Tryjob_EquivalentBuilder) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 2, 1}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 2, 1}
 }
 
 func (m *Verifiers_Tryjob_EquivalentBuilder) XXX_Unmarshal(b []byte) error {
@@ -892,7 +970,7 @@
 func (m *Verifiers_Tryjob_RetryConfig) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_Tryjob_RetryConfig) ProtoMessage()    {}
 func (*Verifiers_Tryjob_RetryConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 2, 2}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 2, 2}
 }
 
 func (m *Verifiers_Tryjob_RetryConfig) XXX_Unmarshal(b []byte) error {
@@ -959,7 +1037,7 @@
 func (m *Verifiers_CQLinter) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_CQLinter) ProtoMessage()    {}
 func (*Verifiers_CQLinter) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 3}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 3}
 }
 
 func (m *Verifiers_CQLinter) XXX_Unmarshal(b []byte) error {
@@ -994,7 +1072,7 @@
 func (m *Verifiers_Fake) String() string { return proto.CompactTextString(m) }
 func (*Verifiers_Fake) ProtoMessage()    {}
 func (*Verifiers_Fake) Descriptor() ([]byte, []int) {
-	return fileDescriptor_59a2f489dbd601ec, []int{3, 4}
+	return fileDescriptor_59a2f489dbd601ec, []int{4, 4}
 }
 
 func (m *Verifiers_Fake) XXX_Unmarshal(b []byte) error {
@@ -1037,8 +1115,10 @@
 }
 
 func init() {
+	proto.RegisterEnum("cq.config.Trinary", Trinary_name, Trinary_value)
 	proto.RegisterType((*Config)(nil), "cq.config.Config")
 	proto.RegisterType((*SubmitOptions)(nil), "cq.config.SubmitOptions")
+	proto.RegisterType((*CQDependOptions)(nil), "cq.config.CQDependOptions")
 	proto.RegisterType((*ConfigGroup)(nil), "cq.config.ConfigGroup")
 	proto.RegisterType((*ConfigGroup_Gerrit)(nil), "cq.config.ConfigGroup.Gerrit")
 	proto.RegisterType((*ConfigGroup_Gerrit_Project)(nil), "cq.config.ConfigGroup.Gerrit.Project")
@@ -1058,70 +1138,76 @@
 }
 
 var fileDescriptor_59a2f489dbd601ec = []byte{
-	// 1039 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xcd, 0x6e, 0x1b, 0x37,
-	0x17, 0x85, 0x14, 0x59, 0x91, 0xee, 0x48, 0x4a, 0xcc, 0xd8, 0x89, 0x3e, 0x19, 0xf6, 0xe7, 0x3a,
-	0x31, 0xe2, 0x8d, 0x47, 0x80, 0x8c, 0x16, 0xfd, 0x09, 0x90, 0xfa, 0x27, 0x49, 0x51, 0x04, 0x88,
-	0x4d, 0x1b, 0x35, 0xd0, 0x0d, 0x31, 0x1a, 0x5d, 0x8d, 0x98, 0x8c, 0x86, 0x23, 0x0e, 0xc7, 0xb6,
-	0xd0, 0xf7, 0xe8, 0xa6, 0xeb, 0xee, 0xfb, 0x0c, 0x7d, 0x81, 0x3e, 0x40, 0xfb, 0x30, 0x05, 0x7f,
-	0x34, 0x92, 0x1d, 0xd5, 0x3b, 0xf2, 0xdc, 0x73, 0xc8, 0xcb, 0xcb, 0x73, 0x49, 0xf0, 0x23, 0xe1,
-	0x87, 0x23, 0x29, 0xc6, 0x3c, 0x1f, 0xfb, 0x42, 0x46, 0xdd, 0x38, 0x0f, 0x79, 0x37, 0x9c, 0x74,
-	0x83, 0x94, 0x77, 0x43, 0x91, 0x0c, 0x79, 0xd4, 0xbd, 0xea, 0x75, 0xc3, 0x89, 0x9f, 0x4a, 0xa1,
-	0x04, 0xa9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 0xff, 0x79, 0x62, 0xac, 0xf0, 0x82, 0x08, 0x00, 0x00,
+	// 1129 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x56, 0xed, 0x6e, 0xdb, 0x36,
+	0x17, 0x7e, 0xed, 0x24, 0x8e, 0x7d, 0x1c, 0x3b, 0x29, 0xfb, 0xe5, 0xaa, 0x68, 0xdf, 0x2e, 0x6d,
+	0xd0, 0x62, 0x58, 0x65, 0xc0, 0xc5, 0x86, 0x7d, 0x14, 0xe8, 0x9a, 0x8f, 0x76, 0x18, 0x8a, 0xb6,
+	0x61, 0xb2, 0x05, 0xdb, 0x1f, 0x42, 0x96, 0x8e, 0x65, 0xb6, 0xb2, 0x28, 0x53, 0x54, 0x12, 0x63,
+	0xf7, 0xb1, 0x3f, 0xfb, 0x39, 0xec, 0xff, 0xae, 0x61, 0x37, 0xb0, 0x0b, 0xd8, 0xcd, 0x0c, 0xfc,
+	0x90, 0xec, 0xa6, 0x5e, 0xfe, 0x89, 0xcf, 0x79, 0x1e, 0xf2, 0xf0, 0xe1, 0x39, 0xa4, 0xc0, 0x8f,
+	0x85, 0x1f, 0x8e, 0xa5, 0x98, 0xf0, 0x62, 0xe2, 0x0b, 0x19, 0xf7, 0x93, 0x22, 0xe4, 0xfd, 0x70,
+	0xda, 0x0f, 0x32, 0xde, 0x0f, 0x45, 0x3a, 0xe2, 0x71, 0xff, 0x74, 0xd0, 0x0f, 0xa7, 0x7e, 0x26,
+	0x85, 0x12, 0xa4, 0x15, 0x4e, 0x7d, 0x0b, 0x7b, 0x77, 0x63, 0x21, 0xe2, 0x04, 0xfb, 0x26, 0x30,
+	0x2c, 0x46, 0xfd, 0xa8, 0x90, 0x81, 0xe2, 0x22, 0xb5, 0xd4, 0xed, 0xdf, 0xeb, 0xd0, 0xd8, 0x33,
+	0x54, 0xe2, 0xc3, 0xd5, 0x48, 0x06, 0x3c, 0xe5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0xd9, 0xc7, 0xd2, 0xee, 0xc6, 0x0e, 0x3e,
+	0xdd, 0x81, 0x75, 0xf7, 0xbe, 0x91, 0x16, 0xac, 0xfd, 0xf0, 0xfa, 0xe8, 0xe0, 0x78, 0xeb, 0x7f,
+	0x64, 0x1d, 0x56, 0x7e, 0x3a, 0x38, 0xda, 0xaa, 0x91, 0x06, 0xd4, 0x5f, 0xbf, 0xd9, 0xaa, 0xef,
+	0x36, 0x7f, 0x6e, 0xd8, 0x12, 0x1c, 0x36, 0xcc, 0xe3, 0xfa, 0xe4, 0xdf, 0x00, 0x00, 0x00, 0xff,
+	0xff, 0xd9, 0xab, 0x1d, 0x82, 0x31, 0x09, 0x00, 0x00,
 }
diff --git a/cq/api/config/v2/cq.proto b/cq/api/config/v2/cq.proto
index 91d79de..5cc3345 100644
--- a/cq/api/config/v2/cq.proto
+++ b/cq/api/config/v2/cq.proto
@@ -41,6 +41,9 @@
 
   // At least 1 ConfigGroup is required.
   repeated ConfigGroup config_groups = 4;
+
+  // EXPERIMENTAL!
+  CQDependOptions cqdepend_options = 5;
 }
 
 // SubmitOptions control how CQ submits CLs.
@@ -62,6 +65,19 @@
 }
 
 
+// A boolean with an undefined value.
+enum Trinary {
+  UNSET = 0;
+  YES = 1;
+  NO = 2;
+}
+
+
+// EXPERIMENTAL! TODO(tandrii, crbug/912294): add doc.
+message CQDependOptions {
+  Trinary allowed = 1;
+}
+
 // ConfigGroup allows one to share single verifiers config across a set of
 // Gerrit repositories, which may be in different Gerrit installations.
 message ConfigGroup {