Documentation
¶
Overview ¶
Package data handles data.
Index ¶
- func FormatErrMsg(errorMessage string, errorType skylab_test_runner.TestRunnerErrorType) string
- func Wrap(c *config.Config_SkylabWorker) worker.Environment
- type AlStateInfo
- type BotParamsRejectedError
- type BuildRequest
- type ByAttempt
- type ContainerInfo
- type ContainerInfoMap
- type DevicesInfo
- type EnumerationError
- type FilterStateKeeper
- type MiddleOutResponse
- type PrePostFilterStateKeeper
- type SuiteLimitsError
- type TestResults
- type TrRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatErrMsg ¶
func FormatErrMsg(errorMessage string, errorType skylab_test_runner.TestRunnerErrorType) string
func Wrap ¶
func Wrap(c *config.Config_SkylabWorker) worker.Environment
Types ¶
type AlStateInfo ¶
type AlStateInfo struct { IsAlRun bool DoneTesting bool TreeClosed bool // Input test job that should not change during execution and only be used as reader InputTestJob *common.TestJobMessage // Current state that will be changed by cmds during execution CurrentTestJob *common.TestJobMessage CurrentTestJobEvent *common.TestJobEventMessage TestJobEventPubSubClient *pubsub.Client // WorkUnitTrees is a map that points to the head of each ATP request's // beginning node. // // NOTE: For the time being this map will only contain one tree until we // begin to support multiple ATP requests per CTP build. WorkUnitTrees map[string]*androidapi.WorkUnitTree // ATP is the instantiated ATP service API that we will reuse throughout the // build. ATP *androidapi.Service BuildID string GenerateInvocation bool WorkUnitsOnly bool ATPWorkUnit *androidbuildinternal.WorkUnit ATPInvocation *androidbuildinternal.Invocation Top *androidapi.WorkUnitNode }
AlStateInfo captures the state info for Al runs
func (*AlStateInfo) CloseWUTree ¶
func (a *AlStateInfo) CloseWUTree(ctx context.Context, service *androidapi.Service, errorMsg, errorName string) error
func (*AlStateInfo) GetWorkUnitTree ¶
func (a *AlStateInfo) GetWorkUnitTree() *androidapi.WorkUnitTree
GetWorkUnitTree fetches the ATP work unit tree if one exists and is being tracked.
type BotParamsRejectedError ¶
func (*BotParamsRejectedError) Error ¶
func (e *BotParamsRejectedError) Error() string
type BuildRequest ¶
type BuildRequest struct { Key string ShardNum int ScheduleBuildRequest *buildbucketpb.ScheduleBuildRequest OriginalTrReq *TrRequest SuiteInfo *api.SuiteInfo Err error }
type ByAttempt ¶
type ByAttempt []*TestResults
type ContainerInfo ¶
type ContainerInfo struct { ImageKey string Request *api.ContainerRequest ImageInfo *buildapi.ContainerImageInfo ServiceEndpoint *labapi.IpEndpoint }
ContainerInfo represents all container related info.
func (*ContainerInfo) GetEndpointString ¶
func (contInfo *ContainerInfo) GetEndpointString() (string, error)
GetEndpointString gets the service endpoint in string where the container service is running.
func (*ContainerInfo) GetImagePath ¶
func (contInfo *ContainerInfo) GetImagePath() (string, error)
GetImagePath gets the container image path.
func (*ContainerInfo) GetKey ¶
func (contInfo *ContainerInfo) GetKey() string
GetKey gets the image key.
type ContainerInfoMap ¶
type ContainerInfoMap struct {
// contains filtered or unexported fields
}
func NewContainerInfoMap ¶
func NewContainerInfoMap() *ContainerInfoMap
func (*ContainerInfoMap) Get ¶
func (c *ContainerInfoMap) Get(key string) (*ContainerInfo, error)
func (*ContainerInfoMap) Set ¶
func (c *ContainerInfoMap) Set(key string, contInfo *ContainerInfo)
type DevicesInfo ¶
type EnumerationError ¶
type EnumerationError struct {
SuiteName string
}
func (*EnumerationError) Error ¶
func (e *EnumerationError) Error() string
type FilterStateKeeper ¶
type FilterStateKeeper struct { interfaces.StateKeeper CtpReq *testapi.CTPRequest InitialInternalTestPlan *testapi.InternalTestplan TestPlanStates []*testapi.InternalTestplan Scheduler testapi.SchedulerInfo_Scheduler SuiteTestResults map[string]*TestResults BuildsMap map[string]*BuildRequest Config *config.Config DockerKeyFile string CTPversion string Environment string IsPartnerRun bool // For V1 req, it will be key provided with input, // for direct v2, this will be index of the request. // Cannot use suite here coz two different suites can be present with different // suite metadata in the request. RequestKey string // Al run related AlStateInfo *AlStateInfo IsAlRun bool // Build related BuildState *build.State // Container info queue ContainerInfoQueue *list.List // Dictionaries ContainerMetadataMap map[string]*buildapi.ContainerImageInfo ContainerInfoMap *ContainerInfoMap // Tools and their related dependencies Ctr *crostoolrunner.CrosToolRunner MiddledOutResp *MiddleOutResponse // BQ Client for writing CTP level task info to. BQClient *bigquery.Client ExecutionError error }
FilterStateKeeper represents all the data pre local test execution flow requires.
type MiddleOutResponse ¶
type PrePostFilterStateKeeper ¶
type PrePostFilterStateKeeper struct { interfaces.StateKeeper // Requests CtpV1Requests map[string]*test_platform.Request CtpV2Request *api.CTPv2Request // Direct Ctpv2 Request V1KeyToCTPv2Req map[string]*api.CTPRequest // V2 reqs converted from V1 RequestToTargetChainMap map[string]map[string]string ExecuteResponses *steps.ExecuteResponses DddTrackerMap map[string]bool // v1 request key 3d bool map IsPartnerRun bool // Al run related AlStateInfo *AlStateInfo // Results AllTestResults map[string][]*TestResults // Tools and their related dependencies Ctr *crostoolrunner.CrosToolRunner DockerKeyFileLocation string // BQ Client for writing CTP level task info to. BQClient *bigquery.Client BuildState *build.State }
PrePostFilterStateKeeper represents all the data pre and post filter execution flow requires.
type SuiteLimitsError ¶
func (*SuiteLimitsError) Error ¶
func (e *SuiteLimitsError) Error() string
type TestResults ¶
type TestResults struct { Suite string ShardIndex int Key string // [board-model-variant]-shard-%d TopLevelError error Results *skylab_test_runner.Result Attempt int // 0 means no retry BuildURL string BuildID int64 RequestKey string // this is used to link back the results to original request Name string TestCases []*api.TestCase_Id IsALRun bool // For ATP reporting CreationTimestamp time.Time StartTimestamp time.Time EndTimestamp time.Time }
func (*TestResults) GetFailureErr ¶
func (t *TestResults) GetFailureErr() error
func (*TestResults) GetProvisionErrIfAny ¶
func (t *TestResults) GetProvisionErrIfAny() error
func (*TestResults) GetTestCounts ¶
func (t *TestResults) GetTestCounts() (int, int, int)
func (*TestResults) GetTestRunnerErr ¶
func (t *TestResults) GetTestRunnerErr() error
type TrRequest ¶
type TrRequest struct { NewReq *api.SchedulingUnitOptions Tcs []*api.TestCase_Id DevicesInfo *DevicesInfo // TODO; when HwRequirements is fully deprecated, remove this. Req *api.HWRequirements }
TrRequest represents the what will become a TR request: Where it will be 1 request that contains 1 --> many tests. This request will be built up to contain all needed information to make a Tr(v2) request.