Documentation
¶
Index ¶
- Variables
- type MergeRequest
- func (*MergeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MergeRequest) GetId() string
- func (x *MergeRequest) GetQueueName() string
- func (x *MergeRequest) GetSteps() []*MergeStep
- func (*MergeRequest) ProtoMessage()
- func (x *MergeRequest) ProtoReflect() protoreflect.Message
- func (x *MergeRequest) Reset()
- func (x *MergeRequest) String() string
- type MergeResult
- func (*MergeResult) Descriptor() ([]byte, []int)deprecated
- func (x *MergeResult) GetId() string
- func (x *MergeResult) GetOutcome() Outcome
- func (x *MergeResult) GetQueueName() string
- func (x *MergeResult) GetReason() string
- func (x *MergeResult) GetSteps() []*StepResult
- func (*MergeResult) ProtoMessage()
- func (x *MergeResult) ProtoReflect() protoreflect.Message
- func (x *MergeResult) Reset()
- func (x *MergeResult) String() string
- type MergeStep
- func (*MergeStep) Descriptor() ([]byte, []int)deprecated
- func (x *MergeStep) GetChange() *protopb.Change
- func (x *MergeStep) GetStepId() string
- func (x *MergeStep) GetStrategy() protopb1.Strategy
- func (*MergeStep) ProtoMessage()
- func (x *MergeStep) ProtoReflect() protoreflect.Message
- func (x *MergeStep) Reset()
- func (x *MergeStep) String() string
- type Outcome
- type StepOutput
- type StepResult
- func (*StepResult) Descriptor() ([]byte, []int)deprecated
- func (x *StepResult) GetOutputs() []*StepOutput
- func (x *StepResult) GetReason() string
- func (x *StepResult) GetStepId() string
- func (*StepResult) ProtoMessage()
- func (x *StepResult) ProtoReflect() protoreflect.Message
- func (x *StepResult) Reset()
- func (x *StepResult) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Outcome_name = map[int32]string{ 0: "OUTCOME_UNSPECIFIED", 1: "SUCCEEDED", 2: "FAILED", } Outcome_value = map[string]int32{ "OUTCOME_UNSPECIFIED": 0, "SUCCEEDED": 1, "FAILED": 2, } )
Enum value maps for Outcome.
var File_merge_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type MergeRequest ¶
type MergeRequest struct {
// id is the client-owned correlation id for this request (one per request).
// Runway echoes it back on the result unchanged.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// queue_name is the caller-provided queue name the request belongs to.
// Runway resolves the merge target and provider config per-queue from this
// name; no target ref is passed.
QueueName string `protobuf:"bytes,2,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
// steps is the ordered application sequence: in-flight steps first, the
// candidate last. A single-element list expresses "candidate vs merge
// target".
Steps []*MergeStep `protobuf:"bytes,3,rep,name=steps,proto3" json:"steps,omitempty"`
// contains filtered or unexported fields
}
MergeRequest is the payload a client publishes to one of Runway's merge queues: the merge-conflict-check topic for a dry-run check, the merge topic for a committing merge. The id is owned by the client so it can record the in-flight work before publishing and correlate the asynchronous result; Runway echoes it back unchanged.
func (*MergeRequest) Descriptor
deprecated
func (*MergeRequest) Descriptor() ([]byte, []int)
Deprecated: Use MergeRequest.ProtoReflect.Descriptor instead.
func (*MergeRequest) GetId ¶
func (x *MergeRequest) GetId() string
func (*MergeRequest) GetQueueName ¶
func (x *MergeRequest) GetQueueName() string
func (*MergeRequest) GetSteps ¶
func (x *MergeRequest) GetSteps() []*MergeStep
func (*MergeRequest) ProtoMessage ¶
func (*MergeRequest) ProtoMessage()
func (*MergeRequest) ProtoReflect ¶
func (x *MergeRequest) ProtoReflect() protoreflect.Message
func (*MergeRequest) Reset ¶
func (x *MergeRequest) Reset()
func (*MergeRequest) String ¶
func (x *MergeRequest) String() string
type MergeResult ¶
type MergeResult struct {
// id echoes the client-owned correlation id from the request.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// outcome is SUCCEEDED if the whole ordered step sequence applied cleanly
// (mergeable for a dry-run check, merged for a committing merge), FAILED
// otherwise.
Outcome Outcome `protobuf:"varint,2,opt,name=outcome,proto3,enum=uber.runway.messagequeue.Outcome" json:"outcome,omitempty"`
// reason is a human-readable explanation when outcome is FAILED. Empty on
// success.
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
// steps optionally reports per-step outcomes, in request order. A committing
// merge populates each step's outputs with the revisions it produced; a
// dry-run check leaves them empty.
Steps []*StepResult `protobuf:"bytes,4,rep,name=steps,proto3" json:"steps,omitempty"`
// queue_name echoes the caller-provided queue name from the request, so the
// consumer can route the result by queue without loading state first.
QueueName string `protobuf:"bytes,5,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
// contains filtered or unexported fields
}
MergeResult is the payload Runway publishes to the corresponding signal queue (merge-conflict-check-signal for a check, merge-signal for a merge) once a request completes.
func (*MergeResult) Descriptor
deprecated
func (*MergeResult) Descriptor() ([]byte, []int)
Deprecated: Use MergeResult.ProtoReflect.Descriptor instead.
func (*MergeResult) GetId ¶
func (x *MergeResult) GetId() string
func (*MergeResult) GetOutcome ¶
func (x *MergeResult) GetOutcome() Outcome
func (*MergeResult) GetQueueName ¶
func (x *MergeResult) GetQueueName() string
func (*MergeResult) GetReason ¶
func (x *MergeResult) GetReason() string
func (*MergeResult) GetSteps ¶
func (x *MergeResult) GetSteps() []*StepResult
func (*MergeResult) ProtoMessage ¶
func (*MergeResult) ProtoMessage()
func (*MergeResult) ProtoReflect ¶
func (x *MergeResult) ProtoReflect() protoreflect.Message
func (*MergeResult) Reset ¶
func (x *MergeResult) Reset()
func (*MergeResult) String ¶
func (x *MergeResult) String() string
type MergeStep ¶
type MergeStep struct {
// step_id is an opaque, caller-assigned identifier for this step. Runway
// treats it as an attribution token only -- it echoes it back per-step in
// StepResult so a multi-step result is attributable -- and never interprets
// its contents.
StepId string `protobuf:"bytes,1,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"`
// change is the code change to apply for this step. It may carry multiple
// URIs, which are a stack: each URI is its own unit of change, applied in
// the order given, each on top of the last.
Change *protopb.Change `protobuf:"bytes,2,opt,name=change,proto3" json:"change,omitempty"`
// strategy is how this step's change is integrated into the merge target.
// It applies to every URI the change carries, the same way to each, so a
// step is never a mix of strategies. PROMOTE is the exception that admits
// only a single URI.
Strategy protopb1.Strategy `protobuf:"varint,3,opt,name=strategy,proto3,enum=uber.base.mergestrategy.Strategy" json:"strategy,omitempty"`
// contains filtered or unexported fields
}
MergeStep is one step of an ordered merge: a single change applied with a strategy. Runway applies the steps of a request in order on top of the merge target; the ordering encodes the base-layering (earlier steps are the in-flight base, the last step is the candidate). A change may contain multiple URIs (e.g. stacked PRs that land together).
func (*MergeStep) Descriptor
deprecated
func (*MergeStep) GetStrategy ¶
func (*MergeStep) ProtoMessage ¶
func (*MergeStep) ProtoMessage()
func (*MergeStep) ProtoReflect ¶
func (x *MergeStep) ProtoReflect() protoreflect.Message
type Outcome ¶
type Outcome int32
Outcome is the overall result of applying a MergeRequest's ordered step sequence.
const ( // OUTCOME_UNSPECIFIED is the zero value; a well-formed result never uses it. Outcome_OUTCOME_UNSPECIFIED Outcome = 0 // SUCCEEDED means the whole sequence applied cleanly: mergeable for a // dry-run check, merged for a committing merge. Outcome_SUCCEEDED Outcome = 1 // FAILED means the sequence could not be applied: a conflict for a dry-run // check, a failed apply for a committing merge. Outcome_FAILED Outcome = 2 )
func (Outcome) Descriptor ¶
func (Outcome) Descriptor() protoreflect.EnumDescriptor
func (Outcome) EnumDescriptor
deprecated
func (Outcome) Number ¶
func (x Outcome) Number() protoreflect.EnumNumber
func (Outcome) Type ¶
func (Outcome) Type() protoreflect.EnumType
type StepOutput ¶
type StepOutput struct {
// id is the VCS-neutral revision identifier -- a git commit SHA, a Mercurial
// changeset hash, a Subversion revision number, a Perforce changelist, and so
// on.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // (room to grow: author, committed_at, parent, ...)
// contains filtered or unexported fields
}
StepOutput is a single output a merge step produced on the merge target.
func (*StepOutput) Descriptor
deprecated
func (*StepOutput) Descriptor() ([]byte, []int)
Deprecated: Use StepOutput.ProtoReflect.Descriptor instead.
func (*StepOutput) GetId ¶
func (x *StepOutput) GetId() string
func (*StepOutput) ProtoMessage ¶
func (*StepOutput) ProtoMessage()
func (*StepOutput) ProtoReflect ¶
func (x *StepOutput) ProtoReflect() protoreflect.Message
func (*StepOutput) Reset ¶
func (x *StepOutput) Reset()
func (*StepOutput) String ¶
func (x *StepOutput) String() string
type StepResult ¶
type StepResult struct {
// step_id echoes the step_id of the step this result is for.
StepId string `protobuf:"bytes,1,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"`
// outputs are the revisions this step produced on the merge target, in
// application order (the order the step created them on the target). Empty
// for a dry-run check, for a change already present on the target, or for a
// step that failed to apply.
Outputs []*StepOutput `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
// reason is a human-readable explanation when the step failed to apply.
// Empty on success.
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
// contains filtered or unexported fields
}
StepResult reports what happened to a single MergeStep, so a multi-step result is attributable to the step that produced (or failed to produce) it.
func (*StepResult) Descriptor
deprecated
func (*StepResult) Descriptor() ([]byte, []int)
Deprecated: Use StepResult.ProtoReflect.Descriptor instead.
func (*StepResult) GetOutputs ¶
func (x *StepResult) GetOutputs() []*StepOutput
func (*StepResult) GetReason ¶
func (x *StepResult) GetReason() string
func (*StepResult) GetStepId ¶
func (x *StepResult) GetStepId() string
func (*StepResult) ProtoMessage ¶
func (*StepResult) ProtoMessage()
func (*StepResult) ProtoReflect ¶
func (x *StepResult) ProtoReflect() protoreflect.Message
func (*StepResult) Reset ¶
func (x *StepResult) Reset()
func (*StepResult) String ¶
func (x *StepResult) String() string