args

package
v0.0.0-...-6700e38 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Overview

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.

Index

Constants

View Source
const (
	ChromeOSImageBucketDefault = "chromeos-image-archive"
)

Variables

This section is empty.

Functions

func ShouldRunViaTrv2

func ShouldRunViaTrv2(ctx context.Context, suite string) bool

ShouldRunViaTrv2 decides if the request should run via trv2 flow based on provided suite.

func ShouldTranslateTrv2Req

func ShouldTranslateTrv2Req(ctx context.Context, suite string) bool

ShouldTranslateTrv2Req decides if the trv2 req should be translated.

Types

type Generator

type Generator struct {
	// Invocation describes test harness-level data and metadata.
	Invocation *steps.EnumerationResponse_AutotestInvocation
	// Params describes scheduling parameters and task-level metadata.
	Params *test_platform.Request_Params
	// WorkerConfig describes the skylab_swarming_worker-specific environment.
	WorkerConfig *config.Config_SkylabWorker
	// ParentTaskID is the Swarming ID of the CTP task.
	ParentTaskID string
	// ParentBuildID is the Buildbucket ID of the CTP build.
	ParentBuildID int64
	// ParentRequestUID is the UID of the CTP request which kicked off this
	// test run. This is needed for the analytics usage. Test execution
	// does not require this parameter.
	ParentRequestUID string
	Deadline         time.Time
	// PubSub channel to send test_runner status updates.
	StatusUpdateChannel *config.Config_PubSub
	// Experiments to pass on to test_runner builders.
	Experiments []string
	// The Gerrit Changes associated with the test_runner invocation.
	GerritChanges []*bbpb.GerritChange
	// What swarming pool the test runner build should run in. If not provided,
	// assumed to be `ChromeOSSkylab`
	SwarmingPool string
	// Current build instance
	BuildInstance *bbpb.Build
}

Generator defines the set of inputs for creating a request.Args object.

func (*Generator) CheckConsistency

func (g *Generator) CheckConsistency() error

CheckConsistency checks the internal consistency of the various inputs to the argument generation logic.

func (*Generator) DepsToSwarmngLabels

func (g *Generator) DepsToSwarmngLabels(dims []string) []string

DepsToSwarmngLabels converts test deps to swarming dims.

func (*Generator) GenerateArgs

func (g *Generator) GenerateArgs(ctx context.Context) (request.Args, error)

GenerateArgs generates request.Args, combining all the inputs to argsGenerator.

type RetryModifier

type RetryModifier struct {
	// RetryNumber represents how many retries this build has performed.
	RetryNumber int32
	// PrevTestCaseResults represents the test case results from the build that is being retried.
	PrevTestCaseResults map[string]test_platform.TaskState_Verdict
}

RetryModifier defines the inputs for modifying a retry attempt's arguments.

func (*RetryModifier) ModifyArgs

func (rm *RetryModifier) ModifyArgs(ctx context.Context, args request.Args) error

ModifyArgs injects the Retry modifications into the arguments

Jump to

Keyboard shortcuts

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