execution

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package execution provides end-to-end execution of pre-enumerated cros_test_platform requests via the Skylab task running infrastructure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGlobalTimeoutError

func IsGlobalTimeoutError(ctx context.Context, err error) bool

IsGlobalTimeoutError checks whether an error returned from an execution is a result fo hitting the overall timeout.

func Run

Run runs an execution until success.

Run may be aborted by cancelling the supplied context.

Types

type Args

type Args struct {
	// Used to get inputs from and send updates to a buildbucket Build.
	// See https://godoc.org/go.chromium.org/luci/luciexe
	Build *bbpb.Build
	Send  exe.BuildSender

	Request *steps.ExecuteRequests

	WorkerConfig *config.Config_SkylabWorker
	ParentTaskID string
	Deadline     time.Time
}

Args bundles together the arguments for an execution.

type RequestTaskSet

type RequestTaskSet struct {
	// contains filtered or unexported fields
}

RequestTaskSet encapsulates the running state of the set of tasks for one cros_test_platform request.

func NewRequestTaskSet

func NewRequestTaskSet(
	name string,
	buildInstance *bbpb.Build,
	workerConfig *config.Config_SkylabWorker,
	tc *TaskSetConfig,
	params *test_platform.Request_Params,
	tests []*steps.EnumerationResponse_AutotestInvocation) (*RequestTaskSet, error)

NewRequestTaskSet creates a new RequestTaskSet.

func (*RequestTaskSet) CheckTasksAndRetry

func (r *RequestTaskSet) CheckTasksAndRetry(ctx context.Context, c trservice.Client) (bool, error)

CheckTasksAndRetry checks the status of currently running tasks for this request and retries failed tasks when allowed.

Returns whether all tasks are complete (so future calls to this function are unnecessary)

func (*RequestTaskSet) Close

func (r *RequestTaskSet) Close()

Close notifies that all execution for this request has completed.

Finalize must be called exactly once to clean up state. It is an error to call any methods except Response() on a Close()ed instance.

func (*RequestTaskSet) LaunchTasks

func (r *RequestTaskSet) LaunchTasks(ctx context.Context, c trservice.Client) error

LaunchTasks launches initial tasks for all the tests in this request.

func (*RequestTaskSet) Response

func (r *RequestTaskSet) Response() *steps.ExecuteResponse

Response returns the current response for this request.

type TaskSetConfig

type TaskSetConfig struct {
	ParentTaskID        string
	ParentBuildID       int64
	RequestUID          string
	Deadline            time.Time
	StatusUpdateChannel *config.Config_PubSub
}

TaskSetConfig is a wrapper for the parameters common to the testTaskSets.

Directories

Path Synopsis
Package args contains the logic for assembling all data required for creating an individual task request.
Package args contains the logic for assembling all data required for creating an individual task request.
Package build provides a way to update the buildbucket Build proto during execution.
Package build provides a way to update the buildbucket Build proto during execution.
Package response provides a way to accumulate and summarize the response for a request.
Package response provides a way to accumulate and summarize the response for a request.
Package retry provides a way to determine when a task should be retried.
Package retry provides a way to determine when a task should be retried.
Package testrunner exposes a way to interact with test_runner builds.
Package testrunner exposes a way to interact with test_runner builds.
service
Package service implements a skylab.Client using calls to BuildBucket.
Package service implements a skylab.Client using calls to BuildBucket.
Package types contains types common to execution sub-packages.
Package types contains types common to execution sub-packages.

Jump to

Keyboard shortcuts

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