luci: go.chromium.org/luci/cq/api/bigquery Index | Files

package bigquery

import "go.chromium.org/luci/cq/api/bigquery"

Index

Package Files

attempt.pb.go gen.go

Variables

var AttemptStatus_name = map[int32]string{
    0:  "ATTEMPT_STATUS_UNSPECIFIED",
    1:  "STARTED",
    2:  "SUCCESS",
    3:  "ABORTED",
    4:  "FAILURE",
    5:  "INFRA_FAILURE",
}
var AttemptStatus_value = map[string]int32{
    "ATTEMPT_STATUS_UNSPECIFIED": 0,
    "STARTED":                    1,
    "SUCCESS":                    2,
    "ABORTED":                    3,
    "FAILURE":                    4,
    "INFRA_FAILURE":              5,
}
var AttemptSubstatus_name = map[int32]string{
    0:  "ATTEMPT_SUBSTATUS_UNSPECIFIED",
    1:  "NO_SUBSTATUS",
    2:  "FAILED_TRYJOBS",
    3:  "FAILED_LINT",
    4:  "UNAPPROVED",
    5:  "PERMISSION_DENIED",
    6:  "UNSATISFIED_DEPENDENCY",
    7:  "MANUAL_CANCEL",
    8:  "BUILDBUCKET_MISCONFIGURATION",
}
var AttemptSubstatus_value = map[string]int32{
    "ATTEMPT_SUBSTATUS_UNSPECIFIED": 0,
    "NO_SUBSTATUS":                  1,
    "FAILED_TRYJOBS":                2,
    "FAILED_LINT":                   3,
    "UNAPPROVED":                    4,
    "PERMISSION_DENIED":             5,
    "UNSATISFIED_DEPENDENCY":        6,
    "MANUAL_CANCEL":                 7,
    "BUILDBUCKET_MISCONFIGURATION":  8,
}
var Build_Origin_name = map[int32]string{
    0:  "ORIGIN_UNSPECIFIED",
    1:  "NOT_REUSABLE",
    2:  "NOT_REUSED",
    3:  "REUSED",
}
var Build_Origin_value = map[string]int32{
    "ORIGIN_UNSPECIFIED": 0,
    "NOT_REUSABLE":       1,
    "NOT_REUSED":         2,
    "REUSED":             3,
}
var GerritChange_SubmitStatus_name = map[int32]string{
    0:  "SUBMIT_STATUS_UNSPECIFIED",
    1:  "PENDING",
    2:  "UNKNOWN",
    3:  "FAILURE",
    4:  "SUCCESS",
}
var GerritChange_SubmitStatus_value = map[string]int32{
    "SUBMIT_STATUS_UNSPECIFIED": 0,
    "PENDING":                   1,
    "UNKNOWN":                   2,
    "FAILURE":                   3,
    "SUCCESS":                   4,
}
var Mode_name = map[int32]string{
    0:  "MODE_UNSPECIFIED",
    1:  "DRY_RUN",
    2:  "FULL_RUN",
}
var Mode_value = map[string]int32{
    "MODE_UNSPECIFIED": 0,
    "DRY_RUN":          1,
    "FULL_RUN":         2,
}

type Attempt Uses

type Attempt struct {
    // The opaque key unique to this Attempt.
    Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    // The LUCI project that this Attempt belongs to.
    Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    // An opaque key that is unique for a given set of Gerrit change patchsets.
    // (or, equivalently, buildsets). The same cl_group_key will be used if
    // another Attempt is made for the same set of changes at a different time.
    ClGroupKey string `protobuf:"bytes,3,opt,name=cl_group_key,json=clGroupKey,proto3" json:"cl_group_key,omitempty"`
    // Similar to cl_group_key, except the key will be the same when the
    // earliest_equivalent_patchset values are the same, even if the patchset
    // values are different.
    //
    // For example, when a new "trivial" patchset is uploaded, then the
    // cl_group_key will change but the equivalent_cl_group_key will stay the
    // same.
    EquivalentClGroupKey string `protobuf:"bytes,4,opt,name=equivalent_cl_group_key,json=equivalentClGroupKey,proto3" json:"equivalent_cl_group_key,omitempty"`
    // The time when the Attempt started (trigger time of the last CL triggered).
    StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
    // The time when the Attempt ended (released by CQ).
    EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
    // Gerrit changes, with specific patchsets, in this Attempt.
    // There should be one or more.
    GerritChanges []*GerritChange `protobuf:"bytes,7,rep,name=gerrit_changes,json=gerritChanges,proto3" json:"gerrit_changes,omitempty"`
    // Relevant builds as of this Attempt's end time.
    //
    // While Attempt is processed, CQ may consider more builds than included here.
    //
    // For example, the following builds will be not be included:
    //   * builds triggered before this Attempt started, considered temporarily by
    //     CQ, but then ignored because they ultimately failed such that CQ had to
    //     trigger new builds instead.
    //   * successful builds which were fresh enough at the Attempt start time,
    //     but which were ignored after they became too old for consideration such
    //     that CQ had to trigger new builds instead.
    //   * builds triggered as part of this Attempt, which were later removed from
    //     project CQ config and hence were no longer required by CQ by Attempt
    //     end time.
    //   * builds triggered as part of this Attempt that failed and were retried.
    //     The latest retried build will be included, however.
    Builds []*Build `protobuf:"bytes,8,rep,name=builds,proto3" json:"builds,omitempty"`
    // Final status of the Attempt.
    Status AttemptStatus `protobuf:"varint,9,opt,name=status,proto3,enum=bigquery.AttemptStatus" json:"status,omitempty"`
    // A more fine-grained status the explains more details about the status.
    Substatus            AttemptSubstatus `protobuf:"varint,10,opt,name=substatus,proto3,enum=bigquery.AttemptSubstatus" json:"substatus,omitempty"`
    XXX_NoUnkeyedLiteral struct{}         `json:"-"`
    XXX_unrecognized     []byte           `json:"-"`
    XXX_sizecache        int32            `json:"-"`
}

Attempt includes the state of one CQ attempt.

An attempt involves doing checks for one or more CLs that could potentially be submitted together.

func (*Attempt) Descriptor Uses

func (*Attempt) Descriptor() ([]byte, []int)

func (*Attempt) GetBuilds Uses

func (m *Attempt) GetBuilds() []*Build

func (*Attempt) GetClGroupKey Uses

func (m *Attempt) GetClGroupKey() string

func (*Attempt) GetEndTime Uses

func (m *Attempt) GetEndTime() *timestamp.Timestamp

func (*Attempt) GetEquivalentClGroupKey Uses

func (m *Attempt) GetEquivalentClGroupKey() string

func (*Attempt) GetGerritChanges Uses

func (m *Attempt) GetGerritChanges() []*GerritChange

func (*Attempt) GetKey Uses

func (m *Attempt) GetKey() string

func (*Attempt) GetProject Uses

func (m *Attempt) GetProject() string

func (*Attempt) GetStartTime Uses

func (m *Attempt) GetStartTime() *timestamp.Timestamp

func (*Attempt) GetStatus Uses

func (m *Attempt) GetStatus() AttemptStatus

func (*Attempt) GetSubstatus Uses

func (m *Attempt) GetSubstatus() AttemptSubstatus

func (*Attempt) ProtoMessage Uses

func (*Attempt) ProtoMessage()

func (*Attempt) Reset Uses

func (m *Attempt) Reset()

func (*Attempt) String Uses

func (m *Attempt) String() string

func (*Attempt) XXX_DiscardUnknown Uses

func (m *Attempt) XXX_DiscardUnknown()

func (*Attempt) XXX_Marshal Uses

func (m *Attempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Attempt) XXX_Merge Uses

func (m *Attempt) XXX_Merge(src proto.Message)

func (*Attempt) XXX_Size Uses

func (m *Attempt) XXX_Size() int

func (*Attempt) XXX_Unmarshal Uses

func (m *Attempt) XXX_Unmarshal(b []byte) error

type AttemptStatus Uses

type AttemptStatus int32
const (
    // Default, never set.
    AttemptStatus_ATTEMPT_STATUS_UNSPECIFIED AttemptStatus = 0
    // Started but not completed. Used by CQ API, TBD.
    AttemptStatus_STARTED AttemptStatus = 1
    // Ready to submit, all checks passed.
    AttemptStatus_SUCCESS AttemptStatus = 2
    // Attempt stopped before completion, due to some external event and not
    // a failure of the CLs to pass all tests. For example, this may happen
    // when a new patchset is uploaded, a CL is deleted, etc.
    AttemptStatus_ABORTED AttemptStatus = 3
    // Completed and failed some check. This may happen when a build failed,
    // footer syntax was incorrect, or CL was not approved.
    AttemptStatus_FAILURE AttemptStatus = 4
    // Failure in CQ itself caused the Attempt to be dropped.
    AttemptStatus_INFRA_FAILURE AttemptStatus = 5
)

func (AttemptStatus) EnumDescriptor Uses

func (AttemptStatus) EnumDescriptor() ([]byte, []int)

func (AttemptStatus) String Uses

func (x AttemptStatus) String() string

type AttemptSubstatus Uses

type AttemptSubstatus int32
const (
    // Default, never set.
    AttemptSubstatus_ATTEMPT_SUBSTATUS_UNSPECIFIED AttemptSubstatus = 0
    // There is no more detailed status set.
    AttemptSubstatus_NO_SUBSTATUS AttemptSubstatus = 1
    // Failed at least one critical tryjob.
    AttemptSubstatus_FAILED_TRYJOBS AttemptSubstatus = 2
    // Failed an initial quick check of CL and CL description state.
    AttemptSubstatus_FAILED_LINT AttemptSubstatus = 3
    // A CL didn't get sufficient approval for submitting via CQ.
    AttemptSubstatus_UNAPPROVED AttemptSubstatus = 4
    // A CL triggerer doesn't have permission to trigger CQ.
    AttemptSubstatus_PERMISSION_DENIED AttemptSubstatus = 5
    // There was a problem with a dependency CL, e.g. some dependencies
    // were not submitted or not grouped together in this attempt.
    AttemptSubstatus_UNSATISFIED_DEPENDENCY AttemptSubstatus = 6
    // Aborted because of a manual cancelation.
    AttemptSubstatus_MANUAL_CANCEL AttemptSubstatus = 7
    // A request to buildbucket failed because CQ didn't have permission to
    // trigger builds.
    AttemptSubstatus_BUILDBUCKET_MISCONFIGURATION AttemptSubstatus = 8
)

func (AttemptSubstatus) EnumDescriptor Uses

func (AttemptSubstatus) EnumDescriptor() ([]byte, []int)

func (AttemptSubstatus) String Uses

func (x AttemptSubstatus) String() string

type Build Uses

type Build struct {
    // Buildbucket build ID, unique per Buildbucket instance.
    Id  int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
    // Buildbucket host, e.g. "cr-buildbucket.appspot.com".
    Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
    // Information about whether this build was triggered previously and reused,
    // or triggered because there was no reusable build, or because builds by
    // this builder are all not reusable.
    Origin Build_Origin `protobuf:"varint,3,opt,name=origin,proto3,enum=bigquery.Build_Origin" json:"origin,omitempty"`
    // Whether this build must pass in order for the CLs to be considered
    // ready to submit. True means this build must pass, false means this
    // build is "optional", and this build should not be used to assess
    // the correctness of the CLs in the Attempt.
    Critical             bool     `protobuf:"varint,4,opt,name=critical,proto3" json:"critical,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Build represents one tryjob Buildbucket build.

See also: Build in buildbucket/proto/build.proto.

func (*Build) Descriptor Uses

func (*Build) Descriptor() ([]byte, []int)

func (*Build) GetCritical Uses

func (m *Build) GetCritical() bool

func (*Build) GetHost Uses

func (m *Build) GetHost() string

func (*Build) GetId Uses

func (m *Build) GetId() int64

func (*Build) GetOrigin Uses

func (m *Build) GetOrigin() Build_Origin

func (*Build) ProtoMessage Uses

func (*Build) ProtoMessage()

func (*Build) Reset Uses

func (m *Build) Reset()

func (*Build) String Uses

func (m *Build) String() string

func (*Build) XXX_DiscardUnknown Uses

func (m *Build) XXX_DiscardUnknown()

func (*Build) XXX_Marshal Uses

func (m *Build) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Build) XXX_Merge Uses

func (m *Build) XXX_Merge(src proto.Message)

func (*Build) XXX_Size Uses

func (m *Build) XXX_Size() int

func (*Build) XXX_Unmarshal Uses

func (m *Build) XXX_Unmarshal(b []byte) error

type Build_Origin Uses

type Build_Origin int32
const (
    // Default. Never set.
    Build_ORIGIN_UNSPECIFIED Build_Origin = 0
    // Build was triggered as part of this attempt
    // because reuse was disabled for its builder.
    Build_NOT_REUSABLE Build_Origin = 1
    // Build was triggered as part of this attempt,
    // but if there was an already existing build it would have been reused.
    Build_NOT_REUSED Build_Origin = 2
    // Build was reused.
    Build_REUSED Build_Origin = 3
)

func (Build_Origin) EnumDescriptor Uses

func (Build_Origin) EnumDescriptor() ([]byte, []int)

func (Build_Origin) String Uses

func (x Build_Origin) String() string

type GerritChange Uses

type GerritChange struct {
    // Gerrit hostname, e.g. "chromium-review.googlesource.com".
    Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
    // Gerrit project, e.g. "chromium/src".
    Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    // Change number, e.g. 12345.
    Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"`
    // Patch set number, e.g. 1.
    Patchset int64 `protobuf:"varint,4,opt,name=patchset,proto3" json:"patchset,omitempty"`
    // The earliest patchset of the CL that is considered equivalent to the
    // patchset above.
    EarliestEquivalentPatchset int64 `protobuf:"varint,5,opt,name=earliest_equivalent_patchset,json=earliestEquivalentPatchset,proto3" json:"earliest_equivalent_patchset,omitempty"`
    // The time that the CQ was triggered for this CL in this Attempt.
    TriggerTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=trigger_time,json=triggerTime,proto3" json:"trigger_time,omitempty"`
    // CQ Mode for this CL, e.g. dry run or full run.
    Mode Mode `protobuf:"varint,7,opt,name=mode,proto3,enum=bigquery.Mode" json:"mode,omitempty"`
    // Whether CQ tried to submit this change and the result of the operation.
    SubmitStatus         GerritChange_SubmitStatus `protobuf:"varint,8,opt,name=submit_status,json=submitStatus,proto3,enum=bigquery.GerritChange_SubmitStatus" json:"submit_status,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
    XXX_unrecognized     []byte                    `json:"-"`
    XXX_sizecache        int32                     `json:"-"`
}

GerritChange represents one revision (patchset) of one Gerrit change in an Attempt.

See also: GerritChange in buildbucket/proto/common.proto.

func (*GerritChange) Descriptor Uses

func (*GerritChange) Descriptor() ([]byte, []int)

func (*GerritChange) GetChange Uses

func (m *GerritChange) GetChange() int64

func (*GerritChange) GetEarliestEquivalentPatchset Uses

func (m *GerritChange) GetEarliestEquivalentPatchset() int64

func (*GerritChange) GetHost Uses

func (m *GerritChange) GetHost() string

func (*GerritChange) GetMode Uses

func (m *GerritChange) GetMode() Mode

func (*GerritChange) GetPatchset Uses

func (m *GerritChange) GetPatchset() int64

func (*GerritChange) GetProject Uses

func (m *GerritChange) GetProject() string

func (*GerritChange) GetSubmitStatus Uses

func (m *GerritChange) GetSubmitStatus() GerritChange_SubmitStatus

func (*GerritChange) GetTriggerTime Uses

func (m *GerritChange) GetTriggerTime() *timestamp.Timestamp

func (*GerritChange) ProtoMessage Uses

func (*GerritChange) ProtoMessage()

func (*GerritChange) Reset Uses

func (m *GerritChange) Reset()

func (*GerritChange) String Uses

func (m *GerritChange) String() string

func (*GerritChange) XXX_DiscardUnknown Uses

func (m *GerritChange) XXX_DiscardUnknown()

func (*GerritChange) XXX_Marshal Uses

func (m *GerritChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GerritChange) XXX_Merge Uses

func (m *GerritChange) XXX_Merge(src proto.Message)

func (*GerritChange) XXX_Size Uses

func (m *GerritChange) XXX_Size() int

func (*GerritChange) XXX_Unmarshal Uses

func (m *GerritChange) XXX_Unmarshal(b []byte) error

type GerritChange_SubmitStatus Uses

type GerritChange_SubmitStatus int32
const (
    // Default. Never set.
    GerritChange_SUBMIT_STATUS_UNSPECIFIED GerritChange_SubmitStatus = 0
    // CQ didn't try submitting this CL.
    //
    // Includes a case where CQ tried submitting the CL, but submission failed
    // due to transient error leaving CL as is, and CQ didn't try again.
    GerritChange_PENDING GerritChange_SubmitStatus = 1
    // CQ tried to submit, but got presumably transient errors and couldn't
    // ascertain whether submission was successful.
    //
    // It's possible that change was actually submitted, but CQ didn't receive
    // a confirmation from Gerrit and follow up checks of the change status
    // failed, too.
    GerritChange_UNKNOWN GerritChange_SubmitStatus = 2
    // CQ tried to submit, but Gerrit rejected the submission because this
    // Change can't be submitted.
    // Typically, this is because a rebase conflict needs to be resolved,
    // or rarely because the change needs some kind of approval.
    GerritChange_FAILURE GerritChange_SubmitStatus = 3
    // CQ submitted this change (aka "merged" in Gerrit jargon).
    //
    // Submission of Gerrit CLs in an Attempt is not an atomic operation,
    // so it's possible that only some of the GerritChanges are submitted.
    GerritChange_SUCCESS GerritChange_SubmitStatus = 4
)

func (GerritChange_SubmitStatus) EnumDescriptor Uses

func (GerritChange_SubmitStatus) EnumDescriptor() ([]byte, []int)

func (GerritChange_SubmitStatus) String Uses

func (x GerritChange_SubmitStatus) String() string

type Mode Uses

type Mode int32
const (
    // Default, never set.
    Mode_MODE_UNSPECIFIED Mode = 0
    // Run all tests but do not submit.
    Mode_DRY_RUN Mode = 1
    // Run all tests and potentially submit.
    Mode_FULL_RUN Mode = 2
)

func (Mode) EnumDescriptor Uses

func (Mode) EnumDescriptor() ([]byte, []int)

func (Mode) String Uses

func (x Mode) String() string

Package bigquery imports 4 packages (graph). Updated 2020-02-22. Refresh now. Tools for package owners.