import "go.chromium.org/chromiumos/infra/proto/go/test_platform/migration/scheduler"
var Backend_name = map[int32]string{ 0: "BACKEND_UNSPECIFIED", 1: "BACKEND_AUTOTEST", 2: "BACKEND_SKYLAB", }
var Backend_value = map[string]int32{ "BACKEND_UNSPECIFIED": 0, "BACKEND_AUTOTEST": 1, "BACKEND_SKYLAB": 2, }
const ( Backend_BACKEND_UNSPECIFIED Backend = 0 Backend_BACKEND_AUTOTEST Backend = 1 Backend_BACKEND_SKYLAB Backend = 2 )
type Request struct { Scheduling *test_platform.Request_Params_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"` Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` BuildTarget *chromiumos.BuildTarget `protobuf:"bytes,3,opt,name=build_target,json=buildTarget,proto3" json:"build_target,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request is a subset of test_platform.Request that is relevant to the scheduler backend traffic splitting decision.
func (m *Request) GetBuildTarget() *chromiumos.BuildTarget
func (m *Request) GetScheduling() *test_platform.Request_Params_Scheduling
type RequestMod struct { Scheduling *test_platform.Request_Params_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
RequestMod contains the test_platform.Requset arguments that must be overridden when forwarding a request to the chosen scheduler backend.
func (*RequestMod) Descriptor() ([]byte, []int)
func (m *RequestMod) GetScheduling() *test_platform.Request_Params_Scheduling
func (*RequestMod) ProtoMessage()
func (m *RequestMod) Reset()
func (m *RequestMod) String() string
func (m *RequestMod) XXX_DiscardUnknown()
func (m *RequestMod) XXX_Merge(src proto.Message)
func (m *RequestMod) XXX_Size() int
func (m *RequestMod) XXX_Unmarshal(b []byte) error
type Rule struct { Request *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` Backend Backend `protobuf:"varint,2,opt,name=backend,proto3,enum=test_platform.migration.scheduler.Backend" json:"backend,omitempty"` RequestMod *RequestMod `protobuf:"bytes,3,opt,name=request_mod,json=requestMod,proto3" json:"request_mod,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (m *Rule) GetRequestMod() *RequestMod
type SuiteOverride struct { // Incoming request must target this suite, in addition to the requirements // of the rule specified below. Suite *test_platform.Request_Suite `protobuf:"bytes,1,opt,name=suite,proto3" json:"suite,omitempty"` Rule *Rule `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SuiteOverride provides per-suite overrides for the traffic split laid down by the basic rules.
func (*SuiteOverride) Descriptor() ([]byte, []int)
func (m *SuiteOverride) GetRule() *Rule
func (m *SuiteOverride) GetSuite() *test_platform.Request_Suite
func (*SuiteOverride) ProtoMessage()
func (m *SuiteOverride) Reset()
func (m *SuiteOverride) String() string
func (m *SuiteOverride) XXX_DiscardUnknown()
func (m *SuiteOverride) XXX_Merge(src proto.Message)
func (m *SuiteOverride) XXX_Size() int
func (m *SuiteOverride) XXX_Unmarshal(b []byte) error
type TrafficSplit struct { // Rules are expected to be exhaustive. If an incoming request does not match // any available rule, the traffic splitter will fail. // // This policy prevents requests for newly deployed models / pools from getting // scheduled on the incorrect scheduler and then timing out due to lack of // devices. Rules []*Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // Unlike rules, suite overrides are only specified for suites that need // different handling from the rule that otherwise matches the request. SuiteOverrides []*SuiteOverride `protobuf:"bytes,2,rep,name=suite_overrides,json=suiteOverrides,proto3" json:"suite_overrides,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The cros_test_platform traffic splitting stage interprets this config in two phases. 1. First, the request is matched to any of the rules in the suite_overrides,
including the requested suite. If matching rules are found, second phase is skipped.
2. Next, the request is matched against the base rules (exluding suite name)
If no matching rules are found, the steps fails.
If multiple rules are found, they *must agree on the traffic splitting decision* including any pool overrides. In case of conflicting rules, the step fails.
func (*TrafficSplit) Descriptor() ([]byte, []int)
func (m *TrafficSplit) GetRules() []*Rule
func (m *TrafficSplit) GetSuiteOverrides() []*SuiteOverride
func (*TrafficSplit) ProtoMessage()
func (m *TrafficSplit) Reset()
func (m *TrafficSplit) String() string
func (m *TrafficSplit) XXX_DiscardUnknown()
func (m *TrafficSplit) XXX_Merge(src proto.Message)
func (m *TrafficSplit) XXX_Size() int
func (m *TrafficSplit) XXX_Unmarshal(b []byte) error
Package scheduler imports 5 packages (graph). Updated 2021-01-26. Refresh now. Tools for package owners.