swarmingV1

package
v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSwarmingPriority = 100

DefaultSwarmingPriority is the priority used if Parameters.scheduling.priority == 0.

Variables

View Source
var File_go_chromium_org_luci_dm_api_distributor_swarming_v1_cipd_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_dm_api_distributor_swarming_v1_config_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_dm_api_distributor_swarming_v1_isolate_ref_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_dm_api_distributor_swarming_v1_params_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_dm_api_distributor_swarming_v1_result_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CipdPackage

type CipdPackage struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*CipdPackage) Descriptor deprecated

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

Deprecated: Use CipdPackage.ProtoReflect.Descriptor instead.

func (*CipdPackage) GetName

func (x *CipdPackage) GetName() string

func (*CipdPackage) GetVersion

func (x *CipdPackage) GetVersion() string

func (*CipdPackage) Normalize

func (p *CipdPackage) Normalize() error

Normalize normalizes and checks for input violations.

func (*CipdPackage) ProtoMessage

func (*CipdPackage) ProtoMessage()

func (*CipdPackage) ProtoReflect

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

func (*CipdPackage) Reset

func (x *CipdPackage) Reset()

func (*CipdPackage) String

func (x *CipdPackage) String() string

func (*CipdPackage) ToCipdPackage

func (c *CipdPackage) ToCipdPackage() *swarm.SwarmingRpcsCipdPackage

ToCipdPackage converts this to a swarming api SwarmingRpcsCipdPackage.

type CipdSpec

type CipdSpec struct {

	// Server to use for cipd packages. Required (though it may be specified
	// by the quest's designated distributor config). This must be
	// scheme://<hostname>, e.g. "https://example.appspot.com". The only
	// supported schemes are http and https.
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// Specifies the CIPD package to use for the job to obtain the actual CIPD
	// client binary. You usually want to omit this.
	Client *CipdPackage `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"`
	// A mapping from path-to-install to a list of cipd packages to install at
	// that location. To install packages in the root of the job, use the path
	// ”.
	ByPath map[string]*CipdSpec_CipdPackages `` /* 167-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CipdSpec) Descriptor deprecated

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

Deprecated: Use CipdSpec.ProtoReflect.Descriptor instead.

func (*CipdSpec) GetByPath

func (x *CipdSpec) GetByPath() map[string]*CipdSpec_CipdPackages

func (*CipdSpec) GetClient

func (x *CipdSpec) GetClient() *CipdPackage

func (*CipdSpec) GetServer

func (x *CipdSpec) GetServer() string

func (*CipdSpec) Normalize

func (c *CipdSpec) Normalize() error

Normalize normalizes and checks for input violations.

func (*CipdSpec) ProtoMessage

func (*CipdSpec) ProtoMessage()

func (*CipdSpec) ProtoReflect

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

func (*CipdSpec) Reset

func (x *CipdSpec) Reset()

func (*CipdSpec) String

func (x *CipdSpec) String() string

func (*CipdSpec) ToCipdInput

func (c *CipdSpec) ToCipdInput() *swarm.SwarmingRpcsCipdInput

ToCipdInput converts this to a swarming api SwarmingRpcsCipdInput.

type CipdSpec_CipdPackages

type CipdSpec_CipdPackages struct {
	Pkg []*CipdPackage `protobuf:"bytes,1,rep,name=pkg,proto3" json:"pkg,omitempty"`
	// contains filtered or unexported fields
}

func (*CipdSpec_CipdPackages) Descriptor deprecated

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

Deprecated: Use CipdSpec_CipdPackages.ProtoReflect.Descriptor instead.

func (*CipdSpec_CipdPackages) GetPkg

func (x *CipdSpec_CipdPackages) GetPkg() []*CipdPackage

func (*CipdSpec_CipdPackages) ProtoMessage

func (*CipdSpec_CipdPackages) ProtoMessage()

func (*CipdSpec_CipdPackages) ProtoReflect

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

func (*CipdSpec_CipdPackages) Reset

func (x *CipdSpec_CipdPackages) Reset()

func (*CipdSpec_CipdPackages) String

func (x *CipdSpec_CipdPackages) String() string

type Config

type Config struct {
	Swarming *Config_Swarming `protobuf:"bytes,1,opt,name=swarming,proto3" json:"swarming,omitempty"`
	Isolate  *Config_Isolate  `protobuf:"bytes,2,opt,name=isolate,proto3" json:"isolate,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetIsolate

func (x *Config) GetIsolate() *Config_Isolate

func (*Config) GetSwarming

func (x *Config) GetSwarming() *Config_Swarming

func (*Config) Normalize

func (c *Config) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Config_Isolate

type Config_Isolate struct {

	// The host of the isolate service, e.g. isolateserver.appspot.com.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// The default assumed expiration period for execution results.
	Expiration *durationpb.Duration `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

func (*Config_Isolate) Descriptor deprecated

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

Deprecated: Use Config_Isolate.ProtoReflect.Descriptor instead.

func (*Config_Isolate) GetExpiration

func (x *Config_Isolate) GetExpiration() *durationpb.Duration

func (*Config_Isolate) GetUrl

func (x *Config_Isolate) GetUrl() string

func (*Config_Isolate) Normalize

func (i *Config_Isolate) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Config_Isolate) ProtoMessage

func (*Config_Isolate) ProtoMessage()

func (*Config_Isolate) ProtoReflect

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

func (*Config_Isolate) Reset

func (x *Config_Isolate) Reset()

func (*Config_Isolate) String

func (x *Config_Isolate) String() string

type Config_Swarming

type Config_Swarming struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*Config_Swarming) Descriptor deprecated

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

Deprecated: Use Config_Swarming.ProtoReflect.Descriptor instead.

func (*Config_Swarming) GetUrl

func (x *Config_Swarming) GetUrl() string

func (*Config_Swarming) Normalize

func (s *Config_Swarming) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Config_Swarming) ProtoMessage

func (*Config_Swarming) ProtoMessage()

func (*Config_Swarming) ProtoReflect

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

func (*Config_Swarming) Reset

func (x *Config_Swarming) Reset()

func (*Config_Swarming) String

func (x *Config_Swarming) String() string

type IsolatedRef

type IsolatedRef struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Server string `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

func (*IsolatedRef) Descriptor deprecated

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

Deprecated: Use IsolatedRef.ProtoReflect.Descriptor instead.

func (*IsolatedRef) GetId

func (x *IsolatedRef) GetId() string

func (*IsolatedRef) GetServer

func (x *IsolatedRef) GetServer() string

func (*IsolatedRef) ProtoMessage

func (*IsolatedRef) ProtoMessage()

func (*IsolatedRef) ProtoReflect

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

func (*IsolatedRef) Reset

func (x *IsolatedRef) Reset()

func (*IsolatedRef) String

func (x *IsolatedRef) String() string

type Parameters

type Parameters struct {
	Scheduling *Parameters_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"`
	Meta       *Parameters_Meta       `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"`
	Job        *Parameters_Job        `protobuf:"bytes,3,opt,name=job,proto3" json:"job,omitempty"`
	// contains filtered or unexported fields
}

Parameters represents the set of swarming parameters that the Swarming v1 distributor can interpret for use with a Swarming v1 compatible service.

func (*Parameters) Descriptor deprecated

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

Deprecated: Use Parameters.ProtoReflect.Descriptor instead.

func (*Parameters) GetJob

func (x *Parameters) GetJob() *Parameters_Job

func (*Parameters) GetMeta

func (x *Parameters) GetMeta() *Parameters_Meta

func (*Parameters) GetScheduling

func (x *Parameters) GetScheduling() *Parameters_Scheduling

func (*Parameters) Normalize

func (p *Parameters) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Parameters) ProtoMessage

func (*Parameters) ProtoMessage()

func (*Parameters) ProtoReflect

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

func (*Parameters) Reset

func (x *Parameters) Reset()

func (*Parameters) String

func (x *Parameters) String() string

type Parameters_Job

type Parameters_Job struct {
	Inputs *Parameters_Job_Inputs `protobuf:"bytes,1,opt,name=inputs,proto3" json:"inputs,omitempty"`
	// This is the "argv" to run with this job. This includes substitution
	// paramters defined by swarming's run_isolated.py script:
	//   https://github.com/luci/luci-py/blob/master/client/run_isolated.py
	//
	// Additionally, DM provides the following substitutions:
	//   ${DM.PREVIOUS.EXECUTION.STATE:PATH} - the path to a JSONPB encoding of
	//     the swarming_v1.Result from the previous Execution of this Attempt.
	//   ${DM.QUEST.DATA.DESC:PATH} - the path to the
	//     dm.Quest.Data.Desc JSONPB for the quest that this execution is part
	//     of.
	//   ${DM.HOST} - the hostname to use to access DM's pRPC API.
	//
	// DM also provides a JSONPB encoded dm.Execution.Auth via the LUCI_CONTEXT
	// swarming.secret_bytes value. See:
	//   https://github.com/luci/luci-py/blob/master/client/LUCI_CONTEXT.md
	//
	// Command MUST be specified; specifying a command in any of the isolated
	// inputs WILL NOT DO ANYTHING.
	Command []string `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"`
	// Environment variables for the executions.
	Env map[string]string `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Parameters_Job) Descriptor deprecated

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

Deprecated: Use Parameters_Job.ProtoReflect.Descriptor instead.

func (*Parameters_Job) GetCommand

func (x *Parameters_Job) GetCommand() []string

func (*Parameters_Job) GetEnv

func (x *Parameters_Job) GetEnv() map[string]string

func (*Parameters_Job) GetInputs

func (x *Parameters_Job) GetInputs() *Parameters_Job_Inputs

func (*Parameters_Job) Normalize

func (j *Parameters_Job) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Parameters_Job) ProtoMessage

func (*Parameters_Job) ProtoMessage()

func (*Parameters_Job) ProtoReflect

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

func (*Parameters_Job) Reset

func (x *Parameters_Job) Reset()

func (*Parameters_Job) String

func (x *Parameters_Job) String() string

type Parameters_Job_Inputs

type Parameters_Job_Inputs struct {

	// 0 or more isolated IDs that will be 'included' together into the final
	// job .isolated sent to swarming.
	//
	// The "server" value must either be omitted, or equal the isolate server
	// defined by this distributor's config (the `isolate.host` field,
	// prepended with "https://").
	Isolated []*IsolatedRef `protobuf:"bytes,1,rep,name=isolated,proto3" json:"isolated,omitempty"`
	// CIPD packages to use for the job. These specs may contain templated
	// parameters for package names or non-instance_ids for the package
	// versions. The first successful execution for each attempt will
	// resolve+snapshot all package names and versions. These package names
	// and versions will be used for all subsequent executions of that
	// attempt.
	Cipd *CipdSpec `protobuf:"bytes,2,opt,name=cipd,proto3" json:"cipd,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameters_Job_Inputs) Descriptor deprecated

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

Deprecated: Use Parameters_Job_Inputs.ProtoReflect.Descriptor instead.

func (*Parameters_Job_Inputs) GetCipd

func (x *Parameters_Job_Inputs) GetCipd() *CipdSpec

func (*Parameters_Job_Inputs) GetIsolated

func (x *Parameters_Job_Inputs) GetIsolated() []*IsolatedRef

func (*Parameters_Job_Inputs) Normalize

func (i *Parameters_Job_Inputs) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Parameters_Job_Inputs) ProtoMessage

func (*Parameters_Job_Inputs) ProtoMessage()

func (*Parameters_Job_Inputs) ProtoReflect

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

func (*Parameters_Job_Inputs) Reset

func (x *Parameters_Job_Inputs) Reset()

func (*Parameters_Job_Inputs) String

func (x *Parameters_Job_Inputs) String() string

type Parameters_Meta

type Parameters_Meta struct {

	// The 'human readable' name prefix for Executions of this quest. DM will
	// automatically prepend this to the execution ID. So if this was "cool
	// job", the swarming task name would be
	//   "cool job / <quest_ID>|<attempt>|<execution>"
	NamePrefix string `protobuf:"bytes,1,opt,name=name_prefix,json=namePrefix,proto3" json:"name_prefix,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameters_Meta) Descriptor deprecated

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

Deprecated: Use Parameters_Meta.ProtoReflect.Descriptor instead.

func (*Parameters_Meta) GetNamePrefix

func (x *Parameters_Meta) GetNamePrefix() string

func (*Parameters_Meta) Normalize

func (m *Parameters_Meta) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Parameters_Meta) ProtoMessage

func (*Parameters_Meta) ProtoMessage()

func (*Parameters_Meta) ProtoReflect

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

func (*Parameters_Meta) Reset

func (x *Parameters_Meta) Reset()

func (*Parameters_Meta) String

func (x *Parameters_Meta) String() string

type Parameters_Scheduling

type Parameters_Scheduling struct {

	// Priority adjusts the scheduling preference for Executions. The higher the
	// priority number, the longer it will take to schedule, and vice versa (ala
	// `nice`).
	//
	// A value of 0 (default) corresponds to a default priority (currently 100).
	// Other values correspond directly to the swarming task Priority.
	//
	// THIS MEANS THAT PRIORITY 0 IS NOT PERMITTED HERE! If you want 0, use
	// 1 instead.
	//
	// This must be <= 255.
	Priority uint32 `protobuf:"varint,1,opt,name=priority,proto3" json:"priority,omitempty"`
	// These specifiy the profile of the machine to use for Execuions of this
	// quest. These can indicate OS, number of cores, amount of ram, GPU type,
	// pool, etc. See the swarming service instance for available dimensions.
	Dimensions map[string]string `` /* 161-byte string literal not displayed */
	// These dimensions will be snapshotted from the first execution of each
	// attempt, and will be subsequently re-used for all following executions of
	// that attempt.
	//
	// The most-specific value for these dimensions will be taken for tasks
	// where a given dimension has multiple values.
	SnapshotDimensions []string `protobuf:"bytes,3,rep,name=snapshot_dimensions,json=snapshotDimensions,proto3" json:"snapshot_dimensions,omitempty"`
	// This indicates the maximum amount of time that an Execution may run
	// without emitting IO on stdout/err. 0 means 'no timeout'.
	IoTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=io_timeout,json=ioTimeout,proto3" json:"io_timeout,omitempty"`
	// contains filtered or unexported fields
}

These parameters affect how the Executions for this Quest are scheduled.

func (*Parameters_Scheduling) Descriptor deprecated

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

Deprecated: Use Parameters_Scheduling.ProtoReflect.Descriptor instead.

func (*Parameters_Scheduling) GetDimensions

func (x *Parameters_Scheduling) GetDimensions() map[string]string

func (*Parameters_Scheduling) GetIoTimeout

func (x *Parameters_Scheduling) GetIoTimeout() *durationpb.Duration

func (*Parameters_Scheduling) GetPriority

func (x *Parameters_Scheduling) GetPriority() uint32

func (*Parameters_Scheduling) GetSnapshotDimensions

func (x *Parameters_Scheduling) GetSnapshotDimensions() []string

func (*Parameters_Scheduling) Normalize

func (s *Parameters_Scheduling) Normalize() (err error)

Normalize normalizes and checks for input violations.

func (*Parameters_Scheduling) ProtoMessage

func (*Parameters_Scheduling) ProtoMessage()

func (*Parameters_Scheduling) ProtoReflect

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

func (*Parameters_Scheduling) Reset

func (x *Parameters_Scheduling) Reset()

func (*Parameters_Scheduling) String

func (x *Parameters_Scheduling) String() string

type Result

type Result struct {
	ExitCode int64 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// The isolated hash of the output directory
	IsolatedOutdir *IsolatedRef `protobuf:"bytes,2,opt,name=isolated_outdir,json=isolatedOutdir,proto3" json:"isolated_outdir,omitempty"`
	// The pinned cipd packages that this task actually used.
	CipdPins *CipdSpec `protobuf:"bytes,3,opt,name=cipd_pins,json=cipdPins,proto3" json:"cipd_pins,omitempty"`
	// The captured snapshot dimensions that the bot actually had.
	SnapshotDimensions map[string]string `` /* 203-byte string literal not displayed */
	// contains filtered or unexported fields
}

This is the swarming-specific result for Executions run via swarming.

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCipdPins

func (x *Result) GetCipdPins() *CipdSpec

func (*Result) GetExitCode

func (x *Result) GetExitCode() int64

func (*Result) GetIsolatedOutdir

func (x *Result) GetIsolatedOutdir() *IsolatedRef

func (*Result) GetSnapshotDimensions

func (x *Result) GetSnapshotDimensions() map[string]string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

Jump to

Keyboard shortcuts

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