scheduler

package
v0.0.0-...-ec43a0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Backend_name = map[int32]string{
		0: "BACKEND_UNSPECIFIED",
		1: "BACKEND_AUTOTEST",
		2: "BACKEND_SKYLAB",
	}
	Backend_value = map[string]int32{
		"BACKEND_UNSPECIFIED": 0,
		"BACKEND_AUTOTEST":    1,
		"BACKEND_SKYLAB":      2,
	}
)

Enum value maps for Backend.

View Source
var File_test_platform_migration_scheduler_traffic_split_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Backend

type Backend int32
const (
	Backend_BACKEND_UNSPECIFIED Backend = 0
	Backend_BACKEND_AUTOTEST    Backend = 1
	Backend_BACKEND_SKYLAB      Backend = 2
)

func (Backend) Descriptor

func (Backend) Descriptor() protoreflect.EnumDescriptor

func (Backend) Enum

func (x Backend) Enum() *Backend

func (Backend) EnumDescriptor deprecated

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

Deprecated: Use Backend.Descriptor instead.

func (Backend) Number

func (x Backend) Number() protoreflect.EnumNumber

func (Backend) String

func (x Backend) String() string

func (Backend) Type

func (Backend) Type() protoreflect.EnumType

type Request

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"`
	// contains filtered or unexported fields
}

Request is a subset of test_platform.Request that is relevant to the scheduler backend traffic splitting decision.

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetBuildTarget

func (x *Request) GetBuildTarget() *chromiumos.BuildTarget

func (*Request) GetModel

func (x *Request) GetModel() string

func (*Request) GetScheduling

func (x *Request) GetScheduling() *test_platform.Request_Params_Scheduling

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type RequestMod

type RequestMod struct {
	Scheduling *test_platform.Request_Params_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"`
	// contains filtered or unexported fields
}

RequestMod contains the test_platform.Requset arguments that must be overridden when forwarding a request to the chosen scheduler backend.

func (*RequestMod) Descriptor deprecated

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

Deprecated: Use RequestMod.ProtoReflect.Descriptor instead.

func (*RequestMod) GetScheduling

func (*RequestMod) ProtoMessage

func (*RequestMod) ProtoMessage()

func (*RequestMod) ProtoReflect

func (x *RequestMod) ProtoReflect() protoreflect.Message

func (*RequestMod) Reset

func (x *RequestMod) Reset()

func (*RequestMod) String

func (x *RequestMod) String() string

type Rule

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"`
	// contains filtered or unexported fields
}

func (*Rule) Descriptor deprecated

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

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetBackend

func (x *Rule) GetBackend() Backend

func (*Rule) GetRequest

func (x *Rule) GetRequest() *Request

func (*Rule) GetRequestMod

func (x *Rule) GetRequestMod() *RequestMod

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type SuiteOverride

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"`
	// contains filtered or unexported fields
}

SuiteOverride provides per-suite overrides for the traffic split laid down by the basic rules.

func (*SuiteOverride) Descriptor deprecated

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

Deprecated: Use SuiteOverride.ProtoReflect.Descriptor instead.

func (*SuiteOverride) GetRule

func (x *SuiteOverride) GetRule() *Rule

func (*SuiteOverride) GetSuite

func (x *SuiteOverride) GetSuite() *test_platform.Request_Suite

func (*SuiteOverride) ProtoMessage

func (*SuiteOverride) ProtoMessage()

func (*SuiteOverride) ProtoReflect

func (x *SuiteOverride) ProtoReflect() protoreflect.Message

func (*SuiteOverride) Reset

func (x *SuiteOverride) Reset()

func (*SuiteOverride) String

func (x *SuiteOverride) String() string

type TrafficSplit

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"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use TrafficSplit.ProtoReflect.Descriptor instead.

func (*TrafficSplit) GetRules

func (x *TrafficSplit) GetRules() []*Rule

func (*TrafficSplit) GetSuiteOverrides

func (x *TrafficSplit) GetSuiteOverrides() []*SuiteOverride

func (*TrafficSplit) ProtoMessage

func (*TrafficSplit) ProtoMessage()

func (*TrafficSplit) ProtoReflect

func (x *TrafficSplit) ProtoReflect() protoreflect.Message

func (*TrafficSplit) Reset

func (x *TrafficSplit) Reset()

func (*TrafficSplit) String

func (x *TrafficSplit) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL