Documentation
¶
Overview ¶
Package execution provides end-to-end execution of pre-enumerated cros_test_platform requests via the Skylab task running infrastructure.
Index ¶
- Constants
- Variables
- func IsGlobalTimeoutError(ctx context.Context, err error) bool
- func Run(ctx context.Context, c trservice.Client, args Args, inputPath string) (map[string]*steps.ExecuteResponse, error)
- type Args
- type RequestTaskSet
- func (r *RequestTaskSet) CheckTasksAndRetry(ctx context.Context, c trservice.Client, taskSetName string, ...) (bool, error)
- func (r *RequestTaskSet) Close()
- func (r *RequestTaskSet) GetMilestone(iid types.InvocationID) (int64, error)
- func (r *RequestTaskSet) GetSuiteName(iid types.InvocationID) (string, error)
- func (r *RequestTaskSet) GetTestRunnerPool(iid types.InvocationID) (string, error)
- func (r *RequestTaskSet) LaunchTasks(ctx context.Context, c trservice.Client) error
- func (r *RequestTaskSet) Response() *steps.ExecuteResponse
- type TaskSetConfig
Constants ¶
const (
RetryCountOnTransientError = 5
)
Retry count on transient errors
Variables ¶
var MilestoneFormatError = errors.New("RequestTaskSet: image filed incofrectly formed, milestone could not be determined.")
var MilestoneNotFoundError = errors.New("RequestTaskSet: No milestone found")
Functions ¶
func IsGlobalTimeoutError ¶
IsGlobalTimeoutError checks whether an error returned from an execution is a result fo hitting the overall timeout.
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 SwarmingPool string }
Args bundles together the arguments for an execution.
type RequestTaskSet ¶
type RequestTaskSet struct { SuiteLimitExceptionGranted bool // 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, pool string, ) (*RequestTaskSet, error)
NewRequestTaskSet creates a new RequestTaskSet.
func (*RequestTaskSet) CheckTasksAndRetry ¶
func (r *RequestTaskSet) CheckTasksAndRetry(ctx context.Context, c trservice.Client, taskSetName string, logChan chan trackingMetric) (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) GetMilestone ¶
func (r *RequestTaskSet) GetMilestone(iid types.InvocationID) (int64, error)
GetMilestone returns the milestone requirement of the invocation run.
func (*RequestTaskSet) GetSuiteName ¶
func (r *RequestTaskSet) GetSuiteName(iid types.InvocationID) (string, error)
GetSuiteName returns the testing suite in the of the given request.
func (*RequestTaskSet) GetTestRunnerPool ¶
func (r *RequestTaskSet) GetTestRunnerPool(iid types.InvocationID) (string, error)
GetSuiteName returns the HW pool testrunner will use for testing.
func (*RequestTaskSet) LaunchTasks ¶
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.
Source Files
¶
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. |