Update go/cq/.. to support IncludableOnly and use go package
cq_watcher was breaking with
"unknown field name "includable_only" in cq.Verifiers_Tryjob_Builder"
so I tried to re-generate cq.pb.go but did not work because various
things have changed since the last time. So I figured could directly
use the go module instead because now we use go.mod.
Change-Id: Ia46248b1688b70a035f6d5c7ae63a954aba1eb32
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/265156
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
diff --git a/go/cq/cmd/check-cq/main.go b/go/cq/cmd/check-cq/main.go
index 546ff12..b364b38 100644
--- a/go/cq/cmd/check-cq/main.go
+++ b/go/cq/cmd/check-cq/main.go
@@ -10,6 +10,7 @@
"strings"
"github.com/golang/protobuf/proto"
+ "go.chromium.org/luci/cq/api/config/v2"
"go.skia.org/infra/go/common"
"go.skia.org/infra/go/cq"
"go.skia.org/infra/go/git"
@@ -79,7 +80,7 @@
if err != nil {
sklog.Fatalf("Failed to read %s: %s", *configFile, err)
}
- var cfg cq.Config
+ var cfg config.Config
if err := proto.UnmarshalText(string(cfgBytes), &cfg); err != nil {
sklog.Fatalf("Failed to parse config proto: %s", err)
}
diff --git a/go/cq/cmd/new-branch-cq/main.go b/go/cq/cmd/new-branch-cq/main.go
index a611dbb..4a793fa 100644
--- a/go/cq/cmd/new-branch-cq/main.go
+++ b/go/cq/cmd/new-branch-cq/main.go
@@ -6,6 +6,7 @@
"io/ioutil"
"regexp"
+ "go.chromium.org/luci/cq/api/config/v2"
"go.skia.org/infra/go/common"
"go.skia.org/infra/go/cq"
"go.skia.org/infra/go/sklog"
@@ -46,7 +47,7 @@
}
// Update the config.
- newCfgBytes, err := cq.WithUpdateCQConfig(oldCfgBytes, func(cfg *cq.Config) error {
+ newCfgBytes, err := cq.WithUpdateCQConfig(oldCfgBytes, func(cfg *config.Config) error {
return cq.CloneBranch(cfg, *oldBranch, *newBranch, *includeExperimental, *includeTreeCheck, excludeTrybotRegexp)
})
if err != nil {
diff --git a/go/cq/cq.go b/go/cq/cq.go
index fec65b6..752527f 100644
--- a/go/cq/cq.go
+++ b/go/cq/cq.go
@@ -13,6 +13,7 @@
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
buildbucketpb "go.chromium.org/luci/buildbucket/proto"
+ "go.chromium.org/luci/cq/api/config/v2"
"go.skia.org/infra/go/common"
"go.skia.org/infra/go/gerrit"
"go.skia.org/infra/go/gitiles"
@@ -91,7 +92,7 @@
// MatchConfigGroup returns the ConfigGroup, ConfigGroup_Gerrit, and
// ConfigGroup_Gerrit_Project which match the given full ref name, or nil if
// there is no matching ConfigGroup.
-func MatchConfigGroup(cqCfg *Config, ref string) (*ConfigGroup, *ConfigGroup_Gerrit, *ConfigGroup_Gerrit_Project, error) {
+func MatchConfigGroup(cqCfg *config.Config, ref string) (*config.ConfigGroup, *config.ConfigGroup_Gerrit, *config.ConfigGroup_Gerrit_Project, error) {
for _, configGroup := range cqCfg.GetConfigGroups() {
for _, g := range configGroup.GetGerrit() {
for _, p := range g.GetProjects() {
@@ -112,12 +113,12 @@
}
// GetCQConfig returns the Config for the given repo.
-func GetCQConfig(repo *gitiles.Repo) (*Config, error) {
+func GetCQConfig(repo *gitiles.Repo) (*config.Config, error) {
var buf bytes.Buffer
if err := repo.ReadFileAtRef(context.Background(), CQ_CFG_FILE, CQ_CFG_REF, &buf); err != nil {
return nil, err
}
- var cqCfg Config
+ var cqCfg config.Config
if err := proto.UnmarshalText(buf.String(), &cqCfg); err != nil {
return nil, err
}
@@ -126,7 +127,7 @@
// GetCQTryBots is a convenience method for retrieving the list of CQ trybots
// from a Config.
-func GetCQTryBots(cqCfg *Config, ref string) ([]string, error) {
+func GetCQTryBots(cqCfg *config.Config, ref string) ([]string, error) {
tryJobs := []string{}
configGroup, _, _, err := MatchConfigGroup(cqCfg, ref)
if err != nil {
@@ -139,6 +140,10 @@
// Exclude experimental builders, unless running for all CLs.
continue
}
+ if builder.IncludableOnly {
+ // Exclude builders which have been specified only for "Cq-Include-Trybots".
+ continue
+ }
if util.ContainsAny(builder.GetName(), PRESUBMIT_BOTS) {
// Exclude presubmit bots because they could fail or be delayed
// due to factors such as owners approval and other project
diff --git a/go/cq/cq.pb.go b/go/cq/cq.pb.go
deleted file mode 100644
index f6ef75d..0000000
--- a/go/cq/cq.pb.go
+++ /dev/null
@@ -1,1130 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: cq.proto
-
-package cq
-
-import (
- fmt "fmt"
- math "math"
-
- proto "github.com/golang/protobuf/proto"
- duration "github.com/golang/protobuf/ptypes/duration"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
-
-// This message describes a Commit Queue configuration.
-//
-// The config file commit-queue.cfg should be stored in the config directory of your
-// project, alongside cr-buildbucket.cfg.
-type Config struct {
- // Optional. If present, the CQ will refrain from processing any CLs,
- // on which CQ was triggered after the specified 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,1,opt,name=draining_start_time,json=drainingStartTime,proto3" json:"draining_start_time,omitempty"`
- // Optional and deprecated.
- // URL of the CQ status app to push updates to.
- CqStatusHost string `protobuf:"bytes,2,opt,name=cq_status_host,json=cqStatusHost,proto3" json:"cq_status_host,omitempty"`
- // 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:"-"`
-}
-
-func (m *Config) Reset() { *m = Config{} }
-func (m *Config) String() string { return proto.CompactTextString(m) }
-func (*Config) ProtoMessage() {}
-func (*Config) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{0}
-}
-
-func (m *Config) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Config.Unmarshal(m, b)
-}
-func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Config.Marshal(b, m, deterministic)
-}
-func (m *Config) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Config.Merge(m, src)
-}
-func (m *Config) XXX_Size() int {
- return xxx_messageInfo_Config.Size(m)
-}
-func (m *Config) XXX_DiscardUnknown() {
- xxx_messageInfo_Config.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Config proto.InternalMessageInfo
-
-func (m *Config) GetDrainingStartTime() string {
- if m != nil {
- return m.DrainingStartTime
- }
- return ""
-}
-
-func (m *Config) GetCqStatusHost() string {
- if m != nil {
- return m.CqStatusHost
- }
- return ""
-}
-
-func (m *Config) GetSubmitOptions() *SubmitOptions {
- if m != nil {
- return m.SubmitOptions
- }
- return nil
-}
-
-func (m *Config) GetConfigGroups() []*ConfigGroup {
- if m != nil {
- return m.ConfigGroups
- }
- return nil
-}
-
-// SubmitOptions control how CQ submits CLs.
-type SubmitOptions struct {
- // Optional. Maximum number of successful CQ attempts completed by submitting
- // corresponding Gerrit CL(s) before waiting burst_delay.
- //
- // This feature today applies to all attempts processed by this CQ, across all
- // config_groups.
- //
- // Must be >0 to take effect. Requires burst_delay to be set, too.
- MaxBurst int32 `protobuf:"varint,1,opt,name=max_burst,json=maxBurst,proto3" json:"max_burst,omitempty"`
- // Optional. Delay between bursts of submissions of CQ attempts.
- // See max_burst for more info.
- //
- // Must be >0 to take effect. Requires max_burst to be set, too.
- BurstDelay *duration.Duration `protobuf:"bytes,2,opt,name=burst_delay,json=burstDelay,proto3" json:"burst_delay,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SubmitOptions) Reset() { *m = SubmitOptions{} }
-func (m *SubmitOptions) String() string { return proto.CompactTextString(m) }
-func (*SubmitOptions) ProtoMessage() {}
-func (*SubmitOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{1}
-}
-
-func (m *SubmitOptions) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_SubmitOptions.Unmarshal(m, b)
-}
-func (m *SubmitOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_SubmitOptions.Marshal(b, m, deterministic)
-}
-func (m *SubmitOptions) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SubmitOptions.Merge(m, src)
-}
-func (m *SubmitOptions) XXX_Size() int {
- return xxx_messageInfo_SubmitOptions.Size(m)
-}
-func (m *SubmitOptions) XXX_DiscardUnknown() {
- xxx_messageInfo_SubmitOptions.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SubmitOptions proto.InternalMessageInfo
-
-func (m *SubmitOptions) GetMaxBurst() int32 {
- if m != nil {
- return m.MaxBurst
- }
- return 0
-}
-
-func (m *SubmitOptions) GetBurstDelay() *duration.Duration {
- if m != nil {
- return m.BurstDelay
- }
- return nil
-}
-
-// ConfigGroup allows one to share single verifiers config across a set of
-// Gerrit repositories, which may be in different Gerrit installations.
-type ConfigGroup struct {
- // At least 1 Gerrit instance with repositories to work with is required.
- Gerrit []*ConfigGroup_Gerrit `protobuf:"bytes,1,rep,name=gerrit,proto3" json:"gerrit,omitempty"`
- // Defines how to verify a CL before submitting it. Required.
- Verifiers *Verifiers `protobuf:"bytes,2,opt,name=verifiers,proto3" json:"verifiers,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ConfigGroup) Reset() { *m = ConfigGroup{} }
-func (m *ConfigGroup) String() string { return proto.CompactTextString(m) }
-func (*ConfigGroup) ProtoMessage() {}
-func (*ConfigGroup) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{2}
-}
-
-func (m *ConfigGroup) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ConfigGroup.Unmarshal(m, b)
-}
-func (m *ConfigGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ConfigGroup.Marshal(b, m, deterministic)
-}
-func (m *ConfigGroup) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ConfigGroup.Merge(m, src)
-}
-func (m *ConfigGroup) XXX_Size() int {
- return xxx_messageInfo_ConfigGroup.Size(m)
-}
-func (m *ConfigGroup) XXX_DiscardUnknown() {
- xxx_messageInfo_ConfigGroup.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ConfigGroup proto.InternalMessageInfo
-
-func (m *ConfigGroup) GetGerrit() []*ConfigGroup_Gerrit {
- if m != nil {
- return m.Gerrit
- }
- return nil
-}
-
-func (m *ConfigGroup) GetVerifiers() *Verifiers {
- if m != nil {
- return m.Verifiers
- }
- return nil
-}
-
-// Enumerates repositories on a Gerrit instance for which CQ should work.
-type ConfigGroup_Gerrit struct {
- // Gerrit URL, e.g., https://chromium-review.googlesource.com.
- // No trailing slashes allowed.
- Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
- // Gerrit projects of this Gerrit instance to work with.
- //
- // At least 1 required.
- Projects []*ConfigGroup_Gerrit_Project `protobuf:"bytes,2,rep,name=projects,proto3" json:"projects,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ConfigGroup_Gerrit) Reset() { *m = ConfigGroup_Gerrit{} }
-func (m *ConfigGroup_Gerrit) String() string { return proto.CompactTextString(m) }
-func (*ConfigGroup_Gerrit) ProtoMessage() {}
-func (*ConfigGroup_Gerrit) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{2, 0}
-}
-
-func (m *ConfigGroup_Gerrit) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ConfigGroup_Gerrit.Unmarshal(m, b)
-}
-func (m *ConfigGroup_Gerrit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ConfigGroup_Gerrit.Marshal(b, m, deterministic)
-}
-func (m *ConfigGroup_Gerrit) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ConfigGroup_Gerrit.Merge(m, src)
-}
-func (m *ConfigGroup_Gerrit) XXX_Size() int {
- return xxx_messageInfo_ConfigGroup_Gerrit.Size(m)
-}
-func (m *ConfigGroup_Gerrit) XXX_DiscardUnknown() {
- xxx_messageInfo_ConfigGroup_Gerrit.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ConfigGroup_Gerrit proto.InternalMessageInfo
-
-func (m *ConfigGroup_Gerrit) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
-}
-
-func (m *ConfigGroup_Gerrit) GetProjects() []*ConfigGroup_Gerrit_Project {
- if m != nil {
- return m.Projects
- }
- return nil
-}
-
-type ConfigGroup_Gerrit_Project struct {
- // Repository name inside Gerrit host. Required.
- //
- // No leading or trailing slashes allowed, no '.git' at the end.
- // 'a/' prefix is also not allowed (it's used on *.googlesource.com for
- // forcing authentication).
- //
- // Examples on https://chromium-review.googlesource.com:
- // catapult
- // chromium/src
- // chromium/tools/depot_tools
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // Limit CLs in this repo to only these refs. Required.
- //
- // If not specified, defaults to "refs/heads/master".
- //
- // NOTE: your Gerrit admin must configure Gerrit ACLs such that CQ has
- // read access to these refs, otherwise your users will be waiting for CQ
- // to act on their CLs forever.
- //
- // Regular expression is validated by https://github.com/google/re2 library.
- //
- // NOTE: Git globs aren't supported. Convert them to a regular expression,
- // e.g., Git glob "refs/heads/*" should be "refs/heads/[^/]+".
- // However, users typically expect "refs/heads/.+", since expectation is
- // that every typical Git branch to be CQ-able, including
- // "refs/heads/experimental/foobar".
- RefRegexp []string `protobuf:"bytes,2,rep,name=ref_regexp,json=refRegexp,proto3" json:"ref_regexp,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ConfigGroup_Gerrit_Project) Reset() { *m = ConfigGroup_Gerrit_Project{} }
-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_dfc3c1383080898a, []int{2, 0, 0}
-}
-
-func (m *ConfigGroup_Gerrit_Project) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ConfigGroup_Gerrit_Project.Unmarshal(m, b)
-}
-func (m *ConfigGroup_Gerrit_Project) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ConfigGroup_Gerrit_Project.Marshal(b, m, deterministic)
-}
-func (m *ConfigGroup_Gerrit_Project) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ConfigGroup_Gerrit_Project.Merge(m, src)
-}
-func (m *ConfigGroup_Gerrit_Project) XXX_Size() int {
- return xxx_messageInfo_ConfigGroup_Gerrit_Project.Size(m)
-}
-func (m *ConfigGroup_Gerrit_Project) XXX_DiscardUnknown() {
- xxx_messageInfo_ConfigGroup_Gerrit_Project.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ConfigGroup_Gerrit_Project proto.InternalMessageInfo
-
-func (m *ConfigGroup_Gerrit_Project) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *ConfigGroup_Gerrit_Project) GetRefRegexp() []string {
- if m != nil {
- return m.RefRegexp
- }
- return nil
-}
-
-// 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 submitted. Configuration file
-// describes types of verifiers that should be applied to each CL and their
-// parameters.
-type Verifiers struct {
- // Required. GerritCQAbility ensures that a user who triggered
- // this CQ attempt actually has 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.
- GerritCqAbility *Verifiers_GerritCQAbility `protobuf:"bytes,1,opt,name=gerrit_cq_ability,json=gerritCqAbility,proto3" 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_TreeStatus `protobuf:"bytes,2,opt,name=tree_status,json=treeStatus,proto3" json:"tree_status,omitempty"`
- // This verifier triggers a set of builds through Buildbucket.
- //
- // CQ automatically retries failed tryjobs 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.
- //
- // Typically, builds from Buildbucket are executed on LUCI stack, however, CQ
- // is agnostic to how and where builds are executed.
- Tryjob *Verifiers_Tryjob `protobuf:"bytes,3,opt,name=tryjob,proto3" json:"tryjob,omitempty"`
- // Deprecator is for internal CQ use only. DO NOT USE IN YOUR cq.cfg.
- Deprecator *Verifiers_Deprecator `protobuf:"bytes,4,opt,name=deprecator,proto3" json:"deprecator,omitempty"`
- // Fake is for internal CQ use only. DO NOT USE IN YOUR cq.cfg.
- Fake *Verifiers_Fake `protobuf:"bytes,5,opt,name=fake,proto3" json:"fake,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `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 fileDescriptor_dfc3c1383080898a, []int{3}
-}
-
-func (m *Verifiers) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers.Unmarshal(m, b)
-}
-func (m *Verifiers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers.Marshal(b, m, deterministic)
-}
-func (m *Verifiers) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers.Merge(m, src)
-}
-func (m *Verifiers) XXX_Size() int {
- return xxx_messageInfo_Verifiers.Size(m)
-}
-func (m *Verifiers) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers proto.InternalMessageInfo
-
-func (m *Verifiers) GetGerritCqAbility() *Verifiers_GerritCQAbility {
- if m != nil {
- return m.GerritCqAbility
- }
- return nil
-}
-
-func (m *Verifiers) GetTreeStatus() *Verifiers_TreeStatus {
- if m != nil {
- return m.TreeStatus
- }
- return nil
-}
-
-func (m *Verifiers) GetTryjob() *Verifiers_Tryjob {
- if m != nil {
- return m.Tryjob
- }
- return nil
-}
-
-func (m *Verifiers) GetDeprecator() *Verifiers_Deprecator {
- if m != nil {
- return m.Deprecator
- }
- return nil
-}
-
-func (m *Verifiers) GetFake() *Verifiers_Fake {
- if m != nil {
- return m.Fake
- }
- return nil
-}
-
-type Verifiers_GerritCQAbility struct {
- // Required. Name of the chrome-infra-auth group, which contains the list of
- // identities authorized to trigger CQ runs on any CLs in projects specified
- // in the config group.
- //
- // Typically, such groups are named "project-<name>-committers".
- CommitterList string `protobuf:"bytes,1,opt,name=committer_list,json=committerList,proto3" 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.
- //
- // Typically, such groups are named "project-<name>-tryjob-access".
- DryRunAccessList string `protobuf:"bytes,2,opt,name=dry_run_access_list,json=dryRunAccessList,proto3" 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 and whether CQ verified those open dependencies.
- // In turn, if Gerrit project config allows this, Gerrit will execute submit
- // of all dependent CLs first and then this CL.
- AllowSubmitWithOpenDeps bool `protobuf:"varint,3,opt,name=allow_submit_with_open_deps,json=allowSubmitWithOpenDeps,proto3" json:"allow_submit_with_open_deps,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_GerritCQAbility) Reset() { *m = Verifiers_GerritCQAbility{} }
-func (m *Verifiers_GerritCQAbility) String() string { return proto.CompactTextString(m) }
-func (*Verifiers_GerritCQAbility) ProtoMessage() {}
-func (*Verifiers_GerritCQAbility) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{3, 0}
-}
-
-func (m *Verifiers_GerritCQAbility) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_GerritCQAbility.Unmarshal(m, b)
-}
-func (m *Verifiers_GerritCQAbility) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_GerritCQAbility.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_GerritCQAbility) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_GerritCQAbility.Merge(m, src)
-}
-func (m *Verifiers_GerritCQAbility) XXX_Size() int {
- return xxx_messageInfo_Verifiers_GerritCQAbility.Size(m)
-}
-func (m *Verifiers_GerritCQAbility) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_GerritCQAbility.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_GerritCQAbility proto.InternalMessageInfo
-
-func (m *Verifiers_GerritCQAbility) GetCommitterList() string {
- if m != nil {
- return m.CommitterList
- }
- return ""
-}
-
-func (m *Verifiers_GerritCQAbility) GetDryRunAccessList() string {
- if m != nil {
- return m.DryRunAccessList
- }
- return ""
-}
-
-func (m *Verifiers_GerritCQAbility) GetAllowSubmitWithOpenDeps() bool {
- if m != nil {
- return m.AllowSubmitWithOpenDeps
- }
- return false
-}
-
-type Verifiers_TreeStatus struct {
- // Required. URL of the project tree status app.
- Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_TreeStatus) Reset() { *m = Verifiers_TreeStatus{} }
-func (m *Verifiers_TreeStatus) String() string { return proto.CompactTextString(m) }
-func (*Verifiers_TreeStatus) ProtoMessage() {}
-func (*Verifiers_TreeStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{3, 1}
-}
-
-func (m *Verifiers_TreeStatus) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_TreeStatus.Unmarshal(m, b)
-}
-func (m *Verifiers_TreeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_TreeStatus.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_TreeStatus) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_TreeStatus.Merge(m, src)
-}
-func (m *Verifiers_TreeStatus) XXX_Size() int {
- return xxx_messageInfo_Verifiers_TreeStatus.Size(m)
-}
-func (m *Verifiers_TreeStatus) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_TreeStatus.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_TreeStatus proto.InternalMessageInfo
-
-func (m *Verifiers_TreeStatus) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
-}
-
-type Verifiers_Tryjob struct {
- // Builders on which tryjobs should be triggered.
- Builders []*Verifiers_Tryjob_Builder `protobuf:"bytes,1,rep,name=builders,proto3" json:"builders,omitempty"`
- // Optional, defaulting to no retries whatsoever.
- RetryConfig *Verifiers_Tryjob_RetryConfig `protobuf:"bytes,2,opt,name=retry_config,json=retryConfig,proto3" json:"retry_config,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_Tryjob) Reset() { *m = Verifiers_Tryjob{} }
-func (m *Verifiers_Tryjob) String() string { return proto.CompactTextString(m) }
-func (*Verifiers_Tryjob) ProtoMessage() {}
-func (*Verifiers_Tryjob) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{3, 2}
-}
-
-func (m *Verifiers_Tryjob) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_Tryjob.Unmarshal(m, b)
-}
-func (m *Verifiers_Tryjob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_Tryjob.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_Tryjob) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_Tryjob.Merge(m, src)
-}
-func (m *Verifiers_Tryjob) XXX_Size() int {
- return xxx_messageInfo_Verifiers_Tryjob.Size(m)
-}
-func (m *Verifiers_Tryjob) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_Tryjob.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_Tryjob proto.InternalMessageInfo
-
-func (m *Verifiers_Tryjob) GetBuilders() []*Verifiers_Tryjob_Builder {
- if m != nil {
- return m.Builders
- }
- return nil
-}
-
-func (m *Verifiers_Tryjob) GetRetryConfig() *Verifiers_Tryjob_RetryConfig {
- if m != nil {
- return m.RetryConfig
- }
- return nil
-}
-
-type Verifiers_Tryjob_Builder struct {
- // Required. Name of the builder as <project>/<bucket>/<builder>
- //
- // Examples:
- // "chromium/try/linux-tester"
- // "other-project/try/shared-try-builder"
- //
- // For legacy buckets on buildbot, use * as project placeholder, e.g.,
- // "*/master.tryserver.example/linux-tester"
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // Optional. If true, a fresh build will be required for each CQ attempt.
- //
- // Default is false, meaning CQ may re-use a successful build
- // triggered before current CQ attempt started.
- //
- // This option is typically used for builders which run depot_tools'
- // PRESUBMIT scripts, which are supposed to be quick to run and provide
- // additional OWNERS, lint, etc checks which are useful to run against
- // the latest revision of the CL's target branch.
- DisableReuse bool `protobuf:"varint,2,opt,name=disable_reuse,json=disableReuse,proto3" json:"disable_reuse,omitempty"`
- // Optional name of a builder (aka parent) which will trigger this builder
- // (aka child).
- //
- // If `triggered_by` is not specified (default), CQ will trigger this
- // builder directly.
- //
- // Else, CQ will wait for `triggered_by` (parent) builder to trigger
- // (possibly, indirectly) this (child) builder.
- // Conditions:
- // * `triggered_by` (parent) builder must set a special property
- // `triggered_build_ids` upon successful completion with value set
- // to a list of triggered Buildbucket build IDs,
- // corresponding to each triggered build. One or more of the IDs must
- // correspond to this (child) builder, which will then be waited for
- // by CQ.
- // * parent->child relationship graph must be a forest (set of a trees).
- // However, grandparent->parent->child triggering structure isn't well
- // tested. Please, talk to CQ maintainers to discuss your use case if you
- // actually need it.
- //
- // Failure/Retry semantics:
- // * If `triggered_by` (parent) builder succeeds, but doesn't set
- // the right `triggered_build_ids` s.t. CQ can't find this (child)
- // builder among triggered builds, then CQ will wait till
- // TRYJOB_PENDING_TIMEOUT is reached, currently hardcoded at 2 hours.
- // TODO(tandrii,sergiyb): improve this.
- // * If this (child) builder fails and CQ still has retry budget,
- // CQ will retry a parent builder.
- //
- // For example, given config:
- // builder { name: "*/m/mac_compiler" }
- // builder { name: "*/m/mac_tester_10.12"
- // triggered_by: "*/m/mac_compiler" }
- // builder { name: "*/m/mac_tester_10.13"
- // triggered_by: "*/m/mac_compiler" }
- // CQ will trigger and wait for "mac_compiler" to succeed. Then, it'll
- // check its `triggered_build_ids` and find which ones correspond to
- // "mac_tester_10.12" and "mac_tester_10.13" and wait for each to
- // complete. If say "mac_tester_10.12" fails, CQ will retry
- // "mac_compiler" and expect it to trigger new builds for
- // "mac_tester_10.12" and "mac_tester_10.13".
- TriggeredBy string `protobuf:"bytes,3,opt,name=triggered_by,json=triggeredBy,proto3" json:"triggered_by,omitempty"`
- // Optional. When this field is present, it marks given builder as
- // experimental. It is only triggered 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,proto3" 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.
- EquivalentTo *Verifiers_Tryjob_EquivalentBuilder `protobuf:"bytes,5,opt,name=equivalent_to,json=equivalentTo,proto3" json:"equivalent_to,omitempty"`
- // Optional. Require this builder only if location_regexp matches a file in
- // this CL.
- //
- // This means:
- // * If specified and no file in a CL matches any of the location_regexp,
- // then CQ will not care about this builder.
- // * If a file in a CL matches any location_regexp_exclude, then this file
- // won't be considered when matching location_regexp.
- //
- // If no location_regexp is not specified (default),
- // builder will be used on all CLs, even those which are not modifying any
- // file (just commit description changes).
- // TODO(tandrii): CQ shouldn't process such CLs https://crbug.com/892462,
- // which would allow to change default location_regexp to '.*', ie matching
- // any file in any Gerrit project.
- //
- // The location_regexp is matches are done against the following string:
- // <gerrit_url>/<gerrit_project_name>/+/<cl_file_path>
- // File path must be relative to root of the repo, and it uses Unix /
- // directory separators.
- //
- // The comparison is a full match; the pattern is implicitly anchored with
- // "^" and "$", so there is no need add them.
- //
- // Touching a file means either adding, modifying or removing it.
- //
- // These options currently can not be combined with the following other options:
- // * experiment_percentage
- // * triggered_by
- // * GerritCQAbility.allow_submit_with_open_deps
- // If you need to combine them, please talk to CQ owners.
- //
- // Examples:
- //
- // location_regexp:
- // "https://chromium-review.googlesource.com/chromium/src/[+]/third_party/WebKit/.+"
- // will enable builder for all CLs touching any file in
- // third_party/WebKit directory of the chromium/src repo, but not
- // directory itself.
- //
- // location_regexp: "https://example.com/repo/[+]/.+"
- // location_regexp_exclude: "https://example.com/repo/[+]/all/one.txt"
- // will match a CL which touches at least one file other than
- // 'one.txt' inside all/ directory of the Gerrit project "repo".
- //
- // location_regexp_exclude: "https://example.com/.+/[+]/one.txt"
- // will match a CL which touches at least one file other than
- // 'one.txt' in any repository OR belongs to any other Gerrit server.
- // Note, in this case location_regexp defaults to ".*".
- LocationRegexp []string `protobuf:"bytes,6,rep,name=location_regexp,json=locationRegexp,proto3" json:"location_regexp,omitempty"`
- LocationRegexpExclude []string `protobuf:"bytes,7,rep,name=location_regexp_exclude,json=locationRegexpExclude,proto3" json:"location_regexp_exclude,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_Tryjob_Builder) Reset() { *m = Verifiers_Tryjob_Builder{} }
-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_dfc3c1383080898a, []int{3, 2, 0}
-}
-
-func (m *Verifiers_Tryjob_Builder) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_Tryjob_Builder.Unmarshal(m, b)
-}
-func (m *Verifiers_Tryjob_Builder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_Tryjob_Builder.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_Tryjob_Builder) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_Tryjob_Builder.Merge(m, src)
-}
-func (m *Verifiers_Tryjob_Builder) XXX_Size() int {
- return xxx_messageInfo_Verifiers_Tryjob_Builder.Size(m)
-}
-func (m *Verifiers_Tryjob_Builder) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_Tryjob_Builder.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_Tryjob_Builder proto.InternalMessageInfo
-
-func (m *Verifiers_Tryjob_Builder) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Verifiers_Tryjob_Builder) GetDisableReuse() bool {
- if m != nil {
- return m.DisableReuse
- }
- return false
-}
-
-func (m *Verifiers_Tryjob_Builder) GetTriggeredBy() string {
- if m != nil {
- return m.TriggeredBy
- }
- return ""
-}
-
-func (m *Verifiers_Tryjob_Builder) GetExperimentPercentage() float32 {
- if m != nil {
- return m.ExperimentPercentage
- }
- return 0
-}
-
-func (m *Verifiers_Tryjob_Builder) GetEquivalentTo() *Verifiers_Tryjob_EquivalentBuilder {
- if m != nil {
- return m.EquivalentTo
- }
- return nil
-}
-
-func (m *Verifiers_Tryjob_Builder) GetLocationRegexp() []string {
- if m != nil {
- return m.LocationRegexp
- }
- return nil
-}
-
-func (m *Verifiers_Tryjob_Builder) GetLocationRegexpExclude() []string {
- if m != nil {
- return m.LocationRegexpExclude
- }
- return nil
-}
-
-type Verifiers_Tryjob_EquivalentBuilder struct {
- // Required. Name of this builder.
- // Format is the same in the same format as Builder.name.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // Percentage expressing probability of CQ triggering this builder instead
- // of the builder to which this builder is equilvanet to.
- //
- // A choice itself is made deterministicly based on CL alone, hereby
- // all CQ attempts on all patchsets of a given CL will trigger 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
- // which of the two builders to trigger will be made only for CLs owned by
- // whitelisted group.
- //
- // If not specified, defaults to 0, meaning this builder is never
- // triggered by CQ, but an existing build of can be re-used by CQ.
- //
- // To illustrate, suppose percentage=10. Then,
- // Without owner_whitelist_group,
- // ~10% of all CQ attempts will trigger 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 trigger this builder.
- Percentage float32 `protobuf:"fixed32,2,opt,name=percentage,proto3" json:"percentage,omitempty"`
- // If specified, limits the builder to CL owners in this group.
- OwnerWhitelistGroup string `protobuf:"bytes,3,opt,name=owner_whitelist_group,json=ownerWhitelistGroup,proto3" json:"owner_whitelist_group,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_Tryjob_EquivalentBuilder) Reset() { *m = Verifiers_Tryjob_EquivalentBuilder{} }
-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_dfc3c1383080898a, []int{3, 2, 1}
-}
-
-func (m *Verifiers_Tryjob_EquivalentBuilder) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_Tryjob_EquivalentBuilder.Unmarshal(m, b)
-}
-func (m *Verifiers_Tryjob_EquivalentBuilder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_Tryjob_EquivalentBuilder.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_Tryjob_EquivalentBuilder) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_Tryjob_EquivalentBuilder.Merge(m, src)
-}
-func (m *Verifiers_Tryjob_EquivalentBuilder) XXX_Size() int {
- return xxx_messageInfo_Verifiers_Tryjob_EquivalentBuilder.Size(m)
-}
-func (m *Verifiers_Tryjob_EquivalentBuilder) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_Tryjob_EquivalentBuilder.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_Tryjob_EquivalentBuilder proto.InternalMessageInfo
-
-func (m *Verifiers_Tryjob_EquivalentBuilder) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Verifiers_Tryjob_EquivalentBuilder) GetPercentage() float32 {
- if m != nil {
- return m.Percentage
- }
- return 0
-}
-
-func (m *Verifiers_Tryjob_EquivalentBuilder) GetOwnerWhitelistGroup() string {
- if m != nil {
- return m.OwnerWhitelistGroup
- }
- return ""
-}
-
-// Collection of parameters for deciding whether to retry a single build.
-// If parameter is not specified, its value defaults to 0 (per proto3).
-// Thus, omitting all parameters means no retries of any kind.
-type Verifiers_Tryjob_RetryConfig struct {
- // Retry quota for a single tryjob.
- SingleQuota int32 `protobuf:"varint,1,opt,name=single_quota,json=singleQuota,proto3" json:"single_quota,omitempty"`
- // Retry quota for all tryjobs in a CL.
- GlobalQuota int32 `protobuf:"varint,2,opt,name=global_quota,json=globalQuota,proto3" json:"global_quota,omitempty"`
- // The weight assigned to each tryjob failure.
- FailureWeight int32 `protobuf:"varint,3,opt,name=failure_weight,json=failureWeight,proto3" json:"failure_weight,omitempty"`
- // The weight assigned to each transient failure.
- TransientFailureWeight int32 `protobuf:"varint,4,opt,name=transient_failure_weight,json=transientFailureWeight,proto3" json:"transient_failure_weight,omitempty"`
- // The weight assigned to tryjob timeouts.
- TimeoutWeight int32 `protobuf:"varint,5,opt,name=timeout_weight,json=timeoutWeight,proto3" json:"timeout_weight,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_Tryjob_RetryConfig) Reset() { *m = Verifiers_Tryjob_RetryConfig{} }
-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_dfc3c1383080898a, []int{3, 2, 2}
-}
-
-func (m *Verifiers_Tryjob_RetryConfig) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_Tryjob_RetryConfig.Unmarshal(m, b)
-}
-func (m *Verifiers_Tryjob_RetryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_Tryjob_RetryConfig.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_Tryjob_RetryConfig) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_Tryjob_RetryConfig.Merge(m, src)
-}
-func (m *Verifiers_Tryjob_RetryConfig) XXX_Size() int {
- return xxx_messageInfo_Verifiers_Tryjob_RetryConfig.Size(m)
-}
-func (m *Verifiers_Tryjob_RetryConfig) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_Tryjob_RetryConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_Tryjob_RetryConfig proto.InternalMessageInfo
-
-func (m *Verifiers_Tryjob_RetryConfig) GetSingleQuota() int32 {
- if m != nil {
- return m.SingleQuota
- }
- return 0
-}
-
-func (m *Verifiers_Tryjob_RetryConfig) GetGlobalQuota() int32 {
- if m != nil {
- return m.GlobalQuota
- }
- return 0
-}
-
-func (m *Verifiers_Tryjob_RetryConfig) GetFailureWeight() int32 {
- if m != nil {
- return m.FailureWeight
- }
- return 0
-}
-
-func (m *Verifiers_Tryjob_RetryConfig) GetTransientFailureWeight() int32 {
- if m != nil {
- return m.TransientFailureWeight
- }
- return 0
-}
-
-func (m *Verifiers_Tryjob_RetryConfig) GetTimeoutWeight() int32 {
- if m != nil {
- return m.TimeoutWeight
- }
- return 0
-}
-
-// Deprecator is for internal use in CQ.
-type Verifiers_Deprecator struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_Deprecator) Reset() { *m = Verifiers_Deprecator{} }
-func (m *Verifiers_Deprecator) String() string { return proto.CompactTextString(m) }
-func (*Verifiers_Deprecator) ProtoMessage() {}
-func (*Verifiers_Deprecator) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{3, 3}
-}
-
-func (m *Verifiers_Deprecator) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_Deprecator.Unmarshal(m, b)
-}
-func (m *Verifiers_Deprecator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_Deprecator.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_Deprecator) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_Deprecator.Merge(m, src)
-}
-func (m *Verifiers_Deprecator) XXX_Size() int {
- return xxx_messageInfo_Verifiers_Deprecator.Size(m)
-}
-func (m *Verifiers_Deprecator) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_Deprecator.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_Deprecator proto.InternalMessageInfo
-
-// Fake is for internal use in CQ.
-type Verifiers_Fake struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- EventualState string `protobuf:"bytes,2,opt,name=eventual_state,json=eventualState,proto3" json:"eventual_state,omitempty"`
- Delay int32 `protobuf:"varint,3,opt,name=delay,proto3" json:"delay,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Verifiers_Fake) Reset() { *m = Verifiers_Fake{} }
-func (m *Verifiers_Fake) String() string { return proto.CompactTextString(m) }
-func (*Verifiers_Fake) ProtoMessage() {}
-func (*Verifiers_Fake) Descriptor() ([]byte, []int) {
- return fileDescriptor_dfc3c1383080898a, []int{3, 4}
-}
-
-func (m *Verifiers_Fake) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Verifiers_Fake.Unmarshal(m, b)
-}
-func (m *Verifiers_Fake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Verifiers_Fake.Marshal(b, m, deterministic)
-}
-func (m *Verifiers_Fake) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Verifiers_Fake.Merge(m, src)
-}
-func (m *Verifiers_Fake) XXX_Size() int {
- return xxx_messageInfo_Verifiers_Fake.Size(m)
-}
-func (m *Verifiers_Fake) XXX_DiscardUnknown() {
- xxx_messageInfo_Verifiers_Fake.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Verifiers_Fake proto.InternalMessageInfo
-
-func (m *Verifiers_Fake) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Verifiers_Fake) GetEventualState() string {
- if m != nil {
- return m.EventualState
- }
- return ""
-}
-
-func (m *Verifiers_Fake) GetDelay() int32 {
- if m != nil {
- return m.Delay
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*Config)(nil), "cq.config.Config")
- proto.RegisterType((*SubmitOptions)(nil), "cq.config.SubmitOptions")
- 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")
- proto.RegisterType((*Verifiers)(nil), "cq.config.Verifiers")
- proto.RegisterType((*Verifiers_GerritCQAbility)(nil), "cq.config.Verifiers.GerritCQAbility")
- proto.RegisterType((*Verifiers_TreeStatus)(nil), "cq.config.Verifiers.TreeStatus")
- proto.RegisterType((*Verifiers_Tryjob)(nil), "cq.config.Verifiers.Tryjob")
- proto.RegisterType((*Verifiers_Tryjob_Builder)(nil), "cq.config.Verifiers.Tryjob.Builder")
- proto.RegisterType((*Verifiers_Tryjob_EquivalentBuilder)(nil), "cq.config.Verifiers.Tryjob.EquivalentBuilder")
- proto.RegisterType((*Verifiers_Tryjob_RetryConfig)(nil), "cq.config.Verifiers.Tryjob.RetryConfig")
- proto.RegisterType((*Verifiers_Deprecator)(nil), "cq.config.Verifiers.Deprecator")
- proto.RegisterType((*Verifiers_Fake)(nil), "cq.config.Verifiers.Fake")
-}
-
-func init() { proto.RegisterFile("cq.proto", fileDescriptor_dfc3c1383080898a) }
-
-var fileDescriptor_dfc3c1383080898a = []byte{
- // 1008 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x6e, 0xdb, 0x46,
- 0x13, 0x85, 0x14, 0x59, 0x96, 0x86, 0x92, 0x1c, 0x6f, 0xec, 0x44, 0x1f, 0x8d, 0xf8, 0x73, 0x9d,
- 0x18, 0xf1, 0x8d, 0x19, 0x40, 0x46, 0x8b, 0xa2, 0x0d, 0x90, 0xfa, 0x27, 0x49, 0x51, 0x14, 0x88,
- 0xb3, 0x36, 0x6a, 0xa0, 0x37, 0x0b, 0x8a, 0x1a, 0x51, 0x9b, 0x50, 0x5c, 0x6a, 0xb9, 0xb4, 0x2d,
- 0xf4, 0x3d, 0x7a, 0xd3, 0xeb, 0xbe, 0x43, 0xaf, 0xfb, 0x02, 0x7d, 0x80, 0xf6, 0x61, 0x8a, 0xfd,
- 0x11, 0x25, 0x3b, 0xaa, 0xef, 0xb8, 0x67, 0xce, 0xd9, 0x9d, 0x39, 0x3b, 0xb3, 0x84, 0x46, 0x34,
- 0x09, 0x32, 0x29, 0x94, 0x20, 0xcd, 0x68, 0x12, 0x44, 0x22, 0x1d, 0xf2, 0xd8, 0xdf, 0x8e, 0x85,
- 0x88, 0x13, 0x7c, 0x69, 0x02, 0xfd, 0x62, 0xf8, 0x72, 0x50, 0xc8, 0x50, 0x71, 0x91, 0x5a, 0xea,
- 0xee, 0x3f, 0x15, 0xa8,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c, 0x85, 0xbb, 0xd6, 0x37, 0x93, 0xf3, 0x34, 0x4e, 0x90,
- 0x4d, 0x0a, 0xa1, 0x42, 0xf7, 0xf4, 0x7b, 0x16, 0xfb, 0xa0, 0x21, 0x4d, 0x89, 0x13, 0xd1, 0x0f,
- 0x13, 0x47, 0xa9, 0x5a, 0x8a, 0xc5, 0x2c, 0x65, 0x0f, 0x3a, 0xc3, 0x90, 0x27, 0x85, 0x44, 0x76,
- 0x8d, 0x3c, 0x1e, 0x29, 0x93, 0xc2, 0x0a, 0x6d, 0x3b, 0xf4, 0xd2, 0x80, 0xe4, 0x6b, 0xe8, 0x2a,
- 0x19, 0xa6, 0x39, 0xd7, 0xb7, 0x75, 0x47, 0x50, 0x33, 0x82, 0xc7, 0x65, 0xfc, 0xed, 0x2d, 0xe5,
- 0x1e, 0x74, 0xf4, 0x4f, 0x57, 0x14, 0x6a, 0xc6, 0x5f, 0xb1, 0x07, 0x38, 0xd4, 0xd2, 0xfc, 0x16,
- 0xc0, 0xfc, 0x55, 0xf1, 0x2f, 0xa1, 0xa6, 0x1f, 0x8a, 0xa5, 0xde, 0xee, 0x41, 0x07, 0xaf, 0x30,
- 0x55, 0x45, 0x98, 0x98, 0x17, 0x12, 0xdd, 0xd8, 0xb7, 0x67, 0xa8, 0x1e, 0x54, 0x24, 0x1b, 0xb0,
- 0x62, 0xff, 0x79, 0xb6, 0x1e, 0xbb, 0x38, 0x6e, 0xfc, 0x5c, 0xb7, 0xdd, 0xd5, 0xaf, 0x9b, 0x9f,
- 0xdf, 0xe1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0x0c, 0xab, 0xa5, 0x64, 0x08, 0x00, 0x00,
-}
diff --git a/go/cq/generate/main.go b/go/cq/generate/main.go
deleted file mode 100644
index 82936b9..0000000
--- a/go/cq/generate/main.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package main
-
-import (
- "context"
- "fmt"
- "os"
- "path"
-
- "go.skia.org/infra/go/common"
- "go.skia.org/infra/go/exec"
- "go.skia.org/infra/go/gitiles"
- "go.skia.org/infra/go/sklog"
- "go.skia.org/infra/go/util"
-)
-
-const (
- PROTO_FILE_PATH = "cq/api/config/v2/cq.proto"
- PROTO_REPO = "https://chromium.googlesource.com/infra/luci/luci-go/"
-)
-
-// findCheckoutRoot attempts to find the root of the checkout, assuming that
-// this program is being run from somewhere inside the checkout.
-func findCheckoutRoot() (string, error) {
- cwd, err := os.Getwd()
- if err != nil {
- return "", err
- }
- for cwd != "." && cwd != "/" {
- if _, err := os.Stat(path.Join(cwd, ".git")); err == nil {
- return cwd, nil
- }
- cwd = path.Dir(cwd)
- }
- return "", fmt.Errorf("Unable to find checkout root.")
-}
-
-func main() {
- common.Init()
-
- root, err := findCheckoutRoot()
- if err != nil {
- sklog.Fatal(err)
- }
- cqDir := path.Join(root, "go", "cq")
- dst := path.Join(cqDir, path.Base(PROTO_FILE_PATH))
-
- // Download the most recent version of the proto file.
- if err := gitiles.NewRepo(PROTO_REPO, nil).DownloadFile(context.Background(), PROTO_FILE_PATH, dst); err != nil {
- sklog.Fatal(err)
- }
- defer util.Remove(dst)
-
- // Regenerate project_cfg.pb.go from the .proto file.
- if output, err := exec.RunCwd(context.Background(), cqDir, "protoc", "--go_out=plugins=grpc:.", dst, "--proto_path", cqDir); err != nil {
- sklog.Fatalf("Error: %s\n\n%s", err, output)
- }
-}
diff --git a/go/cq/update.go b/go/cq/update.go
index 6efb719..0cc9cdd 100644
--- a/go/cq/update.go
+++ b/go/cq/update.go
@@ -7,6 +7,7 @@
"strings"
"github.com/gogo/protobuf/proto"
+ "go.chromium.org/luci/cq/api/config/v2"
)
const (
@@ -18,9 +19,9 @@
// WithUpdateCQConfig parses the given bytes as a Config, runs the given
// function to modify the Config, then returns the updated bytes.
-func WithUpdateCQConfig(oldCfgBytes []byte, fn func(*Config) error) ([]byte, error) {
+func WithUpdateCQConfig(oldCfgBytes []byte, fn func(*config.Config) error) ([]byte, error) {
// Parse the Config.
- var cfg Config
+ var cfg config.Config
if err := proto.UnmarshalText(string(oldCfgBytes), &cfg); err != nil {
return nil, fmt.Errorf("Failed to parse config proto: %s", err)
}
@@ -48,7 +49,7 @@
// branch based on a given existing branch. Optionally, include experimental
// tryjobs, include the tree-is-open check, and exclude trybots matching regular
// expressions.
-func CloneBranch(cfg *Config, oldBranch, newBranch string, includeExperimental, includeTreeCheck bool, excludeTrybotRegexp []*regexp.Regexp) error {
+func CloneBranch(cfg *config.Config, oldBranch, newBranch string, includeExperimental, includeTreeCheck bool, excludeTrybotRegexp []*regexp.Regexp) error {
// Find the CQ config for the old branch.
oldRef := fmt.Sprintf("refs/heads/%s", oldBranch)
oldCg, oldGerrit, oldProject, err := MatchConfigGroup(cfg, oldRef)
@@ -60,11 +61,11 @@
}
// Create the CQ config for the new branch.
- newCg := &ConfigGroup{
- Gerrit: []*ConfigGroup_Gerrit{
+ newCg := &config.ConfigGroup{
+ Gerrit: []*config.ConfigGroup_Gerrit{
{
Url: oldGerrit.Url,
- Projects: []*ConfigGroup_Gerrit_Project{
+ Projects: []*config.ConfigGroup_Gerrit_Project{
{
Name: oldProject.Name,
RefRegexp: []string{
@@ -76,16 +77,15 @@
},
}
if oldCg.Verifiers != nil {
- newCg.Verifiers = &Verifiers{
+ newCg.Verifiers = &config.Verifiers{
GerritCqAbility: oldCg.Verifiers.GerritCqAbility,
- Deprecator: oldCg.Verifiers.Deprecator,
Fake: oldCg.Verifiers.Fake,
}
if includeTreeCheck {
newCg.Verifiers.TreeStatus = oldCg.Verifiers.TreeStatus
}
if oldCg.Verifiers.Tryjob != nil {
- tryjobs := make([]*Verifiers_Tryjob_Builder, 0, len(oldCg.Verifiers.Tryjob.Builders))
+ tryjobs := make([]*config.Verifiers_Tryjob_Builder, 0, len(oldCg.Verifiers.Tryjob.Builders))
for _, tj := range oldCg.Verifiers.Tryjob.Builders {
exclude := false
for _, re := range excludeTrybotRegexp {
@@ -101,7 +101,7 @@
tryjobs = append(tryjobs, tj)
}
}
- newCg.Verifiers.Tryjob = &Verifiers_Tryjob{
+ newCg.Verifiers.Tryjob = &config.Verifiers_Tryjob{
Builders: tryjobs,
RetryConfig: oldCg.Verifiers.Tryjob.RetryConfig,
}
@@ -113,12 +113,12 @@
// DeleteBranch updates the given CQ config to delete the config matching the
// given branch.
-func DeleteBranch(cfg *Config, branch string) error {
+func DeleteBranch(cfg *config.Config, branch string) error {
cg, _, _, err := MatchConfigGroup(cfg, fmt.Sprintf("refs/heads/%s", branch))
if err != nil {
return err
}
- newGroups := make([]*ConfigGroup, 0, len(cfg.ConfigGroups))
+ newGroups := make([]*config.ConfigGroup, 0, len(cfg.ConfigGroups))
for _, g := range cfg.ConfigGroups {
if g != cg {
newGroups = append(newGroups, g)
diff --git a/go/supported_branches/cmd/new-branch/main.go b/go/supported_branches/cmd/new-branch/main.go
index f54e0ea..41875b4 100644
--- a/go/supported_branches/cmd/new-branch/main.go
+++ b/go/supported_branches/cmd/new-branch/main.go
@@ -10,6 +10,7 @@
"regexp"
"strings"
+ cq_config "go.chromium.org/luci/cq/api/config/v2"
"go.skia.org/infra/go/auth"
"go.skia.org/infra/go/common"
"go.skia.org/infra/go/cq"
@@ -80,7 +81,7 @@
if err := repo.ReadFileAtRef(ctx, cq.CQ_CFG_FILE, baseCommit, &buf); err != nil {
sklog.Fatal(err)
}
- newCfgBytes, err := cq.WithUpdateCQConfig(buf.Bytes(), func(cfg *cq.Config) error {
+ newCfgBytes, err := cq.WithUpdateCQConfig(buf.Bytes(), func(cfg *cq_config.Config) error {
cg, _, _, err := cq.MatchConfigGroup(cfg, newRef)
if err != nil {
return err