configpb

package
v0.0.0-...-a70aae3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Pool_SchedulingAlgorithm_name = map[int32]string{
		0: "SCHEDULING_ALGORITHM_UNKNOWN",
		1: "SCHEDULING_ALGORITHM_FIFO",
		2: "SCHEDULING_ALGORITHM_LIFO",
	}
	Pool_SchedulingAlgorithm_value = map[string]int32{
		"SCHEDULING_ALGORITHM_UNKNOWN": 0,
		"SCHEDULING_ALGORITHM_FIFO":    1,
		"SCHEDULING_ALGORITHM_LIFO":    2,
	}
)

Enum value maps for Pool_SchedulingAlgorithm.

View Source
var (
	Pool_RBEMigration_BotModeAllocation_BotMode_name = map[int32]string{
		0: "UNKNOWN",
		1: "SWARMING",
		2: "HYBRID",
		3: "RBE",
	}
	Pool_RBEMigration_BotModeAllocation_BotMode_value = map[string]int32{
		"UNKNOWN":  0,
		"SWARMING": 1,
		"HYBRID":   2,
		"RBE":      3,
	}
)

Enum value maps for Pool_RBEMigration_BotModeAllocation_BotMode.

View Source
var (
	RealmPermission_name = map[int32]string{
		0:  "REALM_PERMISSION_UNSPECIFIED",
		1:  "REALM_PERMISSION_POOLS_CREATE_TASK",
		4:  "REALM_PERMISSION_POOLS_LIST_TASKS",
		5:  "REALM_PERMISSION_POOLS_CANCEL_TASK",
		6:  "REALM_PERMISSION_POOLS_CREATE_BOT",
		7:  "REALM_PERMISSION_POOLS_LIST_BOTS",
		8:  "REALM_PERMISSION_POOLS_TERMINATE_BOT",
		9:  "REALM_PERMISSION_POOLS_DELETE_BOT",
		2:  "REALM_PERMISSION_TASKS_CREATE_IN_REALM",
		3:  "REALM_PERMISSION_TASKS_ACT_AS",
		10: "REALM_PERMISSION_TASKS_GET",
		11: "REALM_PERMISSION_TASKS_CANCEL",
	}
	RealmPermission_value = map[string]int32{
		"REALM_PERMISSION_UNSPECIFIED":           0,
		"REALM_PERMISSION_POOLS_CREATE_TASK":     1,
		"REALM_PERMISSION_POOLS_LIST_TASKS":      4,
		"REALM_PERMISSION_POOLS_CANCEL_TASK":     5,
		"REALM_PERMISSION_POOLS_CREATE_BOT":      6,
		"REALM_PERMISSION_POOLS_LIST_BOTS":       7,
		"REALM_PERMISSION_POOLS_TERMINATE_BOT":   8,
		"REALM_PERMISSION_POOLS_DELETE_BOT":      9,
		"REALM_PERMISSION_TASKS_CREATE_IN_REALM": 2,
		"REALM_PERMISSION_TASKS_ACT_AS":          3,
		"REALM_PERMISSION_TASKS_GET":             10,
		"REALM_PERMISSION_TASKS_CANCEL":          11,
	}
)

Enum value maps for RealmPermission.

View Source
var File_go_chromium_org_luci_swarming_proto_config_bots_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_swarming_proto_config_config_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_swarming_proto_config_pools_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_swarming_proto_config_realms_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuthSettings

type AuthSettings struct {

	// Members of this group have full administrative access.
	//
	// Grants:
	// - config view and edit
	// - delete any bot
	// - all of bot_bootstrap_group membership
	// - all of privileged_users_group membership
	AdminsGroup string `protobuf:"bytes,1,opt,name=admins_group,json=adminsGroup,proto3" json:"admins_group,omitempty"`
	// Members of this group can fetch swarming bot code and bootstrap bots.
	//
	// Grants:
	// - bot create: create a token to anonymously fetch the bot code.
	BotBootstrapGroup string `protobuf:"bytes,2,opt,name=bot_bootstrap_group,json=botBootstrapGroup,proto3" json:"bot_bootstrap_group,omitempty"`
	// Members of this group can schedule tasks and see everyone else's tasks.
	//
	// Grants:
	// - cancel any task
	// - edit (terminate) any bot
	// - all of view_all_bots_group membership
	// - all of view_all_tasks_group membership
	PrivilegedUsersGroup string `protobuf:"bytes,3,opt,name=privileged_users_group,json=privilegedUsersGroup,proto3" json:"privileged_users_group,omitempty"`
	// Members of this group can schedule tasks and see only their own tasks.
	//
	// Grants:
	// - create a task
	// - view and edit own task
	UsersGroup string `protobuf:"bytes,4,opt,name=users_group,json=usersGroup,proto3" json:"users_group,omitempty"`
	// Members of this group can view all bots. This is a read-only group.
	//
	// Grants:
	// - view all bots
	ViewAllBotsGroup string `protobuf:"bytes,5,opt,name=view_all_bots_group,json=viewAllBotsGroup,proto3" json:"view_all_bots_group,omitempty"`
	// Members of this group can view all tasks. This is a read-only group.
	//
	// Grants:
	// - view all tasks
	ViewAllTasksGroup string `protobuf:"bytes,6,opt,name=view_all_tasks_group,json=viewAllTasksGroup,proto3" json:"view_all_tasks_group,omitempty"`
	// List of Realm permissions enforced by default.
	// This field will be deprecated after migration.
	EnforcedRealmPermissions []RealmPermission `` /* 180-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AuthSettings) Descriptor deprecated

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

Deprecated: Use AuthSettings.ProtoReflect.Descriptor instead.

func (*AuthSettings) GetAdminsGroup

func (x *AuthSettings) GetAdminsGroup() string

func (*AuthSettings) GetBotBootstrapGroup

func (x *AuthSettings) GetBotBootstrapGroup() string

func (*AuthSettings) GetEnforcedRealmPermissions

func (x *AuthSettings) GetEnforcedRealmPermissions() []RealmPermission

func (*AuthSettings) GetPrivilegedUsersGroup

func (x *AuthSettings) GetPrivilegedUsersGroup() string

func (*AuthSettings) GetUsersGroup

func (x *AuthSettings) GetUsersGroup() string

func (*AuthSettings) GetViewAllBotsGroup

func (x *AuthSettings) GetViewAllBotsGroup() string

func (*AuthSettings) GetViewAllTasksGroup

func (x *AuthSettings) GetViewAllTasksGroup() string

func (*AuthSettings) ProtoMessage

func (*AuthSettings) ProtoMessage()

func (*AuthSettings) ProtoReflect

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

func (*AuthSettings) Reset

func (x *AuthSettings) Reset()

func (*AuthSettings) String

func (x *AuthSettings) String() string

type BotAuth

type BotAuth struct {

	// If true, log an error (but proceed) if this method didn't succeed.
	//
	// This field is totally optional and makes sense only when there are more
	// than one auth method. Affects only logging levels.
	//
	// Doesn't apply to methods that were skipped because some method before them
	// succeeded. Thus methods that have 'log_if_failed' should be in front of
	// BotGroup.auth list.
	//
	// This is useful when migrating from one auth method to another to verify
	// the new method is used in 100% of cases, while still keeping a fallback
	// to an old method.
	LogIfFailed bool `protobuf:"varint,5,opt,name=log_if_failed,json=logIfFailed,proto3" json:"log_if_failed,omitempty"`
	// If true, the bot should provide valid X-Luci-Machine-Token header.
	//
	// The machine FQDN embedded in the token should have hostname equal to the
	// bot_id.
	RequireLuciMachineToken bool `` /* 135-byte string literal not displayed */
	// If set, the bot should use OAuth access token belonging to any of these
	// service accounts.
	//
	// The token should have "https://www.googleapis.com/auth/userinfo.email"
	// scope.
	RequireServiceAccount []string `` /* 126-byte string literal not displayed */
	// If set, the bot should provide valid X-Luci-Gce-Vm-Token header.
	//
	// This header should contain JWT with signed VM metadata with the following
	// expectations:
	//   - Audience matches https://[*-dot-]<app>.appspot.com
	//   - google.compute_engine.project_id field matches the value of 'project'.
	//   - instance_name matches bot_id reported by the bot (case insensitive).
	RequireGceVmToken *BotAuth_GCE `protobuf:"bytes,4,opt,name=require_gce_vm_token,json=requireGceVmToken,proto3" json:"require_gce_vm_token,omitempty"`
	// If set, defines an IP whitelist name (in auth_service database) with a set
	// of IPs allowed to be used by the bots in this group.
	//
	// Works in conjunction with other checks, e.g. if require_luci_machine_token
	// is true, both valid X-Luci-Machine-Token and a whitelisted IP are needed to
	// successfully authenticate.
	//
	// Can also be used on its own (when all other fields are empty). In that case
	// the IP whitelist is the primary authentication mechanism. Note that in this
	// case all bots that share the IP whitelist are effectively in a single trust
	// domain (any bot can pretend to be some other bot).
	IpWhitelist string `protobuf:"bytes,3,opt,name=ip_whitelist,json=ipWhitelist,proto3" json:"ip_whitelist,omitempty"`
	// contains filtered or unexported fields
}

Defines what kind of authentication to perform when handling requests from bots belonging to some bot group.

The following combinations are valid:

  • Either one of require_* alone.
  • IP whitelist alone.
  • IP + require_luci_machine_token: requires both to pass.
  • IP + require_service_account: requires both to pass.
  • IP + require_gce_vm_token: requires both to pass.

Next ID: 6.

func (*BotAuth) Descriptor deprecated

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

Deprecated: Use BotAuth.ProtoReflect.Descriptor instead.

func (*BotAuth) GetIpWhitelist

func (x *BotAuth) GetIpWhitelist() string

func (*BotAuth) GetLogIfFailed

func (x *BotAuth) GetLogIfFailed() bool

func (*BotAuth) GetRequireGceVmToken

func (x *BotAuth) GetRequireGceVmToken() *BotAuth_GCE

func (*BotAuth) GetRequireLuciMachineToken

func (x *BotAuth) GetRequireLuciMachineToken() bool

func (*BotAuth) GetRequireServiceAccount

func (x *BotAuth) GetRequireServiceAccount() []string

func (*BotAuth) ProtoMessage

func (*BotAuth) ProtoMessage()

func (*BotAuth) ProtoReflect

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

func (*BotAuth) Reset

func (x *BotAuth) Reset()

func (*BotAuth) String

func (x *BotAuth) String() string

type BotAuth_GCE

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

See require_gce_vm_token below.

func (*BotAuth_GCE) Descriptor deprecated

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

Deprecated: Use BotAuth_GCE.ProtoReflect.Descriptor instead.

func (*BotAuth_GCE) GetProject

func (x *BotAuth_GCE) GetProject() string

func (*BotAuth_GCE) ProtoMessage

func (*BotAuth_GCE) ProtoMessage()

func (*BotAuth_GCE) ProtoReflect

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

func (*BotAuth_GCE) Reset

func (x *BotAuth_GCE) Reset()

func (*BotAuth_GCE) String

func (x *BotAuth_GCE) String() string

type BotDeployment

type BotDeployment struct {

	// The bot package to use on majority of bots.
	Stable *BotDeployment_BotPackage `protobuf:"bytes,1,opt,name=stable,proto3" json:"stable,omitempty"`
	// The bot package to use on a canary subset of bots.
	Canary *BotDeployment_BotPackage `protobuf:"bytes,2,opt,name=canary,proto3" json:"canary,omitempty"`
	// Percent of bots to put into the canary set.
	CanaryPercent int32 `protobuf:"varint,3,opt,name=canary_percent,json=canaryPercent,proto3" json:"canary_percent,omitempty"`
	// contains filtered or unexported fields
}

Configuration of the bot deployment process.

func (*BotDeployment) Descriptor deprecated

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

Deprecated: Use BotDeployment.ProtoReflect.Descriptor instead.

func (*BotDeployment) GetCanary

func (x *BotDeployment) GetCanary() *BotDeployment_BotPackage

func (*BotDeployment) GetCanaryPercent

func (x *BotDeployment) GetCanaryPercent() int32

func (*BotDeployment) GetStable

func (x *BotDeployment) GetStable() *BotDeployment_BotPackage

func (*BotDeployment) ProtoMessage

func (*BotDeployment) ProtoMessage()

func (*BotDeployment) ProtoReflect

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

func (*BotDeployment) Reset

func (x *BotDeployment) Reset()

func (*BotDeployment) String

func (x *BotDeployment) String() string

type BotDeployment_BotPackage

type BotDeployment_BotPackage struct {

	// The CIPD server URL, e.g. "https://chrome-infra-packages.appspot.com".
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// The CIPD package with the Swarming bot e.g. "infra/luci/swarming_bot".
	Pkg string `protobuf:"bytes,2,opt,name=pkg,proto3" json:"pkg,omitempty"`
	// The version of the package to use e.g. "git_revision:XXX".
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*BotDeployment_BotPackage) Descriptor deprecated

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

Deprecated: Use BotDeployment_BotPackage.ProtoReflect.Descriptor instead.

func (*BotDeployment_BotPackage) GetPkg

func (x *BotDeployment_BotPackage) GetPkg() string

func (*BotDeployment_BotPackage) GetServer

func (x *BotDeployment_BotPackage) GetServer() string

func (*BotDeployment_BotPackage) GetVersion

func (x *BotDeployment_BotPackage) GetVersion() string

func (*BotDeployment_BotPackage) ProtoMessage

func (*BotDeployment_BotPackage) ProtoMessage()

func (*BotDeployment_BotPackage) ProtoReflect

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

func (*BotDeployment_BotPackage) Reset

func (x *BotDeployment_BotPackage) Reset()

func (*BotDeployment_BotPackage) String

func (x *BotDeployment_BotPackage) String() string

type BotGroup

type BotGroup struct {

	// Explicit enumeration of bot IDs belonging to this group.
	//
	// It supports subset of bash brace expansion syntax, in particular ranges
	// and lists. For example:
	//   - vm{1..3}-m1 will expand into vm1-m1, vm2-m1 and vm3-m1.
	//   - vm{100,150,200}-m1 will expand into vm100-m1, vm150-m1 and vm200-m1.
	//
	// There can be only one "{...}" section in the string.
	BotId []string `protobuf:"bytes,1,rep,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// A prefix to match against bot ID string.
	BotIdPrefix []string `protobuf:"bytes,2,rep,name=bot_id_prefix,json=botIdPrefix,proto3" json:"bot_id_prefix,omitempty"`
	// Defines authentication methods for bots from this group.
	//
	// Evaluated sequentially until first match.
	Auth []*BotAuth `protobuf:"bytes,20,rep,name=auth,proto3" json:"auth,omitempty"`
	// Emails of owners of these bots. Optional.
	Owners []string `protobuf:"bytes,21,rep,name=owners,proto3" json:"owners,omitempty"`
	// List of dimensions to assign to these bots.
	//
	// Each dimension is a "<key>:<value>" pair.
	Dimensions []string `protobuf:"bytes,22,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
	// Path to an additional config script to inject into the swarming bot upon
	// handshake.
	//
	// The path is relative to 'scripts/' directory in the service config repo.
	BotConfigScript string `protobuf:"bytes,23,opt,name=bot_config_script,json=botConfigScript,proto3" json:"bot_config_script,omitempty"`
	// The revision of the config script to inject into the swarming bot upon
	// handshake.
	//
	// The field is filled when the bots.cfg gets loaded.
	BotConfigScriptRev string `protobuf:"bytes,26,opt,name=bot_config_script_rev,json=botConfigScriptRev,proto3" json:"bot_config_script_rev,omitempty"`
	// The actual body of the config script to inject into the swarming bot upon
	// handshake (in whatever encoding it happened to be in the config repo).
	//
	// For internal use (unless you fancy writing python scripts as single line
	// escaped text proto string). If present, overrides 'bot_config_script'.
	BotConfigScriptContent []byte `` /* 132-byte string literal not displayed */
	// A service account to use on bots when authenticating calls to various
	// system-level services (like Isolate and CIPD), required for correct
	// operation of the bot.
	//
	// Tasks will be able to access this account too, but it is not recommended
	// and should be used extremely rare.
	//
	// If set to a service account email (*@*.iam.gserviceaccount.com), bots will
	// use this account, generating access token through Swarming server. For this
	// to work, the server account (<app-id>@appspot.gserviceaccount.com) must
	// have "serviceAccountActor" IAM role set on the account.
	//
	// If set to a special string "bot", bots will use exact same token they use
	// when authenticating calls to Swarming server itself. This works only if
	// bots use OAuth for authentication (see 'require_service_account' in
	// BotAuth). This mode exists for cases when proliferation of various service
	// accounts is undesirable. Note that in this mode Swarming processes won't be
	// able to request a system account token with some new scopes: they get exact
	// same token as returned by get_authentication_headers bot_config.py hook.
	//
	// If not set, bots will not use authentication at all.
	SystemServiceAccount string `protobuf:"bytes,24,opt,name=system_service_account,json=systemServiceAccount,proto3" json:"system_service_account,omitempty"`
	// The cloud project id where the bot saves its logs.
	// For GCE bots, it is the same cloud project where the bots reside.
	// For non-GCE bots, it is the cloud project where the logs are being sent to.
	LogsCloudProject string                 `protobuf:"bytes,27,opt,name=logs_cloud_project,json=logsCloudProject,proto3" json:"logs_cloud_project,omitempty"`
	RbeMigration     *BotGroup_RBEMigration `protobuf:"bytes,28,opt,name=rbe_migration,json=rbeMigration,proto3" json:"rbe_migration,omitempty"`
	// contains filtered or unexported fields
}

A group of bots that share authentication method, dimensions and owners.

Union of bot_id and bot_id_prefix define a set of bots that belong to this group. The rest of the fields define properties of this group.

If bot_id and bot_id_prefix are both missing, the group defines all bots that didn't fit into other groups. There can be only one such "default" group.

NOTE: Swarming allows 'derivative' bots where multiple bots run on the same host machine in some sort of container (such as Docker containers) and SHARE A SINGLE CREDENTIAL. These bots have hostnames such as 'hostmachine--001', where the "--001" suffix indicates which of the contained bots on 'hostmachine' it is. When Swarming checks the bot affiliation for this contained machine, it checks ONLY the 'hostmachine' portion. This means that if your contained bot is 'vm10-vlan2--001', it would match:

`bot_id: "vm10-vlan2`
`bot_id: "vm{0...100}-vlan2`
`bot_id_prefix: "vm10-vlan`

but would NOT match:

`bot_id: "vm10-vlan2--001`
`bot_id_prefix: "vm10-vlan2-`
`bot_id_prefix: "vm10-vlan2--`

TODO(vadimsh): Introduce explicit field "use_as_default" instead.

func (*BotGroup) Descriptor deprecated

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

Deprecated: Use BotGroup.ProtoReflect.Descriptor instead.

func (*BotGroup) GetAuth

func (x *BotGroup) GetAuth() []*BotAuth

func (*BotGroup) GetBotConfigScript

func (x *BotGroup) GetBotConfigScript() string

func (*BotGroup) GetBotConfigScriptContent

func (x *BotGroup) GetBotConfigScriptContent() []byte

func (*BotGroup) GetBotConfigScriptRev

func (x *BotGroup) GetBotConfigScriptRev() string

func (*BotGroup) GetBotId

func (x *BotGroup) GetBotId() []string

func (*BotGroup) GetBotIdPrefix

func (x *BotGroup) GetBotIdPrefix() []string

func (*BotGroup) GetDimensions

func (x *BotGroup) GetDimensions() []string

func (*BotGroup) GetLogsCloudProject

func (x *BotGroup) GetLogsCloudProject() string

func (*BotGroup) GetOwners

func (x *BotGroup) GetOwners() []string

func (*BotGroup) GetRbeMigration

func (x *BotGroup) GetRbeMigration() *BotGroup_RBEMigration

func (*BotGroup) GetSystemServiceAccount

func (x *BotGroup) GetSystemServiceAccount() string

func (*BotGroup) ProtoMessage

func (*BotGroup) ProtoMessage()

func (*BotGroup) ProtoReflect

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

func (*BotGroup) Reset

func (x *BotGroup) Reset()

func (*BotGroup) String

func (x *BotGroup) String() string

type BotGroup_RBEMigration

type BotGroup_RBEMigration struct {

	// Approximate percent of bots in this bot group to switch to the RBE mode.
	//
	// A bot is in the RBE mode if `hash(bot_id) % 100 <= rbe_mode_percent`.
	RbeModePercent int32 `protobuf:"varint,1,opt,name=rbe_mode_percent,json=rbeModePercent,proto3" json:"rbe_mode_percent,omitempty"`
	// Bots to put into the RBE mode regardless of `rbe_mode_percent`.
	//
	// Useful to force the RBE mode on a particular bot.
	EnableRbeOn []string `protobuf:"bytes,2,rep,name=enable_rbe_on,json=enableRbeOn,proto3" json:"enable_rbe_on,omitempty"`
	// Bots to exclude from the RBE mode regardless of `rbe_mode_percent`.
	//
	// Useful to exclude problematic bots from the RBE mode.
	DisableRbeOn []string `protobuf:"bytes,3,rep,name=disable_rbe_on,json=disableRbeOn,proto3" json:"disable_rbe_on,omitempty"`
	// If true consume tasks from both Swarming and RBE schedulers at the same
	// time (in an interleaved kind of way).
	//
	// Useful when migrating small bot pools. In this mode task ordering and
	// priority may not be respected (if tasks end up in different schedulers)
	// and there may be higher scheduling delays.
	HybridMode bool `protobuf:"varint,4,opt,name=hybrid_mode,json=hybridMode,proto3" json:"hybrid_mode,omitempty"`
	// contains filtered or unexported fields
}

Settings controlling migration to the RBE Scheduler.

They are used only if all pools the bot belongs to are associated with an RBE instance, and it is the same instance for all pools.

TODO(vadimsh): Remove when no longer used. Replace by BotModeAllocation in Pool.RBEMigration.

func (*BotGroup_RBEMigration) Descriptor deprecated

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

Deprecated: Use BotGroup_RBEMigration.ProtoReflect.Descriptor instead.

func (*BotGroup_RBEMigration) GetDisableRbeOn

func (x *BotGroup_RBEMigration) GetDisableRbeOn() []string

func (*BotGroup_RBEMigration) GetEnableRbeOn

func (x *BotGroup_RBEMigration) GetEnableRbeOn() []string

func (*BotGroup_RBEMigration) GetHybridMode

func (x *BotGroup_RBEMigration) GetHybridMode() bool

func (*BotGroup_RBEMigration) GetRbeModePercent

func (x *BotGroup_RBEMigration) GetRbeModePercent() int32

func (*BotGroup_RBEMigration) ProtoMessage

func (*BotGroup_RBEMigration) ProtoMessage()

func (*BotGroup_RBEMigration) ProtoReflect

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

func (*BotGroup_RBEMigration) Reset

func (x *BotGroup_RBEMigration) Reset()

func (*BotGroup_RBEMigration) String

func (x *BotGroup_RBEMigration) String() string

type BotMonitoring

type BotMonitoring struct {

	// Name is used by Pool to describe how to monitor bots in this pool.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Dimension keys to be used to bucket the bots.
	//
	// The algorithm for a key with multiple values is:
	//
	//	def simplify(values):
	//	  values = sorted(values)
	//	  return '|'.join(
	//	      v for i, v in enumerate(values)
	//	      if not any(v.startswith(value) for v in values[i+1:]))
	//
	// For example, if 'os' is specified and a bot has the values
	// ['Linux', 'Ubuntu', 'Ubuntu-16.04'], the bucket value used for this bot
	// will be 'Linux|Ubuntu-16.04'.
	//
	// Then whole algorithm then works for each key:
	//
	//	def bucket(keys, bot_dimensions):
	//	  return ';'.join(
	//	      '%s:%s' % (key, simplify(bot_dimensions.get(values, []))
	//	      for key in keys)
	//
	// so the end result may look like: 'os:Linux|Ubuntu-16.04;pool:Testers'.
	//
	// More precisely, when this is used, the other bot dimensions are ignored.
	// 'pool' is always implicit.
	DimensionKey []string `protobuf:"bytes,2,rep,name=dimension_key,json=dimensionKey,proto3" json:"dimension_key,omitempty"`
	// contains filtered or unexported fields
}

Defines about how to monitor bots.

func (*BotMonitoring) Descriptor deprecated

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

Deprecated: Use BotMonitoring.ProtoReflect.Descriptor instead.

func (*BotMonitoring) GetDimensionKey

func (x *BotMonitoring) GetDimensionKey() []string

func (*BotMonitoring) GetName

func (x *BotMonitoring) GetName() string

func (*BotMonitoring) ProtoMessage

func (*BotMonitoring) ProtoMessage()

func (*BotMonitoring) ProtoReflect

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

func (*BotMonitoring) Reset

func (x *BotMonitoring) Reset()

func (*BotMonitoring) String

func (x *BotMonitoring) String() string

type BotsCfg

type BotsCfg struct {

	// List of dimension names that are provided by the server.
	//
	// If bot attempts to set such dimension, it'll be ignored. Trusted dimensions
	// are defined through bot_group configs below. Swarming users can trust such
	// dimensions, since they are set by the server based on validated credentials
	// (unlike other dimensions that can be arbitrary defined by the bot itself).
	TrustedDimensions []string `protobuf:"bytes,1,rep,name=trusted_dimensions,json=trustedDimensions,proto3" json:"trusted_dimensions,omitempty"`
	// A list of groups of bots. Each group defines a bunch of bots that all
	// have same dimensions and authenticate in the same way.
	//
	// The order of entries here is irrelevant. The server uses the following
	// search algorithm when trying to pick a group for a bot with some bot_id:
	//  1. First it tries to find a direct match: a group that lists the bot in
	//     bot_id field.
	//  2. Next it tries to find a group with matching bot_id_prefix. The config
	//     validation process makes sure prefixes do not "intersect", so there
	//     will be at most one matching group.
	//  3. Finally, if there's a group with no defined bot_id or bot_id_prefix
	//     fields (the "default" group), the bot is categorized to that group.
	//     If there's no such group, the connection from the bot is rejected.
	//     Config validation process ensures there can be only one such group.
	BotGroup []*BotGroup `protobuf:"bytes,2,rep,name=bot_group,json=botGroup,proto3" json:"bot_group,omitempty"`
	// contains filtered or unexported fields
}

Schema for bots.cfg service config file in luci-config.

It defines a function bot_id => (required credentials, trusted_dimensions, config), where

  • "bot_id" is identifier of a bot as sent by the bot itself (usually machine hostname, short one, not FQDN)
  • "required credentials" describes how server should authenticate calls from the bot.
  • "trusted_dimensions" is a set of dimension set by the server itself. Such dimensions can't be spoofed by the bot.
  • "config" is any additional bot configuration.

Connections from bots that do not appear in this config are rejected.

The default config (used if bots.cfg is missing) represents IP-whitelist only authentication, as was used before bots.cfg was implemented:

bot_group {
  auth {
    ip_whitelist: "<swarming-app-id>-bots"
  }
}

func (*BotsCfg) Descriptor deprecated

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

Deprecated: Use BotsCfg.ProtoReflect.Descriptor instead.

func (*BotsCfg) GetBotGroup

func (x *BotsCfg) GetBotGroup() []*BotGroup

func (*BotsCfg) GetTrustedDimensions

func (x *BotsCfg) GetTrustedDimensions() []string

func (*BotsCfg) ProtoMessage

func (*BotsCfg) ProtoMessage()

func (*BotsCfg) ProtoReflect

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

func (*BotsCfg) Reset

func (x *BotsCfg) Reset()

func (*BotsCfg) String

func (x *BotsCfg) String() string

type CASSettings

type CASSettings struct {

	// Host of the CAS viewer.
	// Must start with "https://" or "http://",
	// e.g. "https://cas-viewer.appspot.com".
	ViewerServer string `protobuf:"bytes,1,opt,name=viewer_server,json=viewerServer,proto3" json:"viewer_server,omitempty"`
	// contains filtered or unexported fields
}

Settings for CAS integration.

func (*CASSettings) Descriptor deprecated

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

Deprecated: Use CASSettings.ProtoReflect.Descriptor instead.

func (*CASSettings) GetViewerServer

func (x *CASSettings) GetViewerServer() string

func (*CASSettings) ProtoMessage

func (*CASSettings) ProtoMessage()

func (*CASSettings) ProtoReflect

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

func (*CASSettings) Reset

func (x *CASSettings) Reset()

func (*CASSettings) String

func (x *CASSettings) String() string

type CipdPackage

type CipdPackage struct {

	// A template of a full CIPD package name, e.g.
	// "infra/tools/cipd/${platform}"
	// See also cipd.ALL_PARAMS.
	PackageName string `protobuf:"bytes,1,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
	// Valid package version for all packages matched by package name.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

A CIPD package.

func (*CipdPackage) Descriptor deprecated

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

Deprecated: Use CipdPackage.ProtoReflect.Descriptor instead.

func (*CipdPackage) GetPackageName

func (x *CipdPackage) GetPackageName() string

func (*CipdPackage) GetVersion

func (x *CipdPackage) GetVersion() string

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

type CipdSettings

type CipdSettings struct {

	// URL of the default CIPD server to use if it is not specified in a task.
	// Must start with "https://" or "http://",
	// e.g. "https://chrome-infra-packages.appspot.com".
	DefaultServer string `protobuf:"bytes,1,opt,name=default_server,json=defaultServer,proto3" json:"default_server,omitempty"`
	// Package of the default CIPD client to use if it is not specified in a
	// task.
	DefaultClientPackage *CipdPackage `protobuf:"bytes,2,opt,name=default_client_package,json=defaultClientPackage,proto3" json:"default_client_package,omitempty"`
	// contains filtered or unexported fields
}

Settings for Swarming-CIPD integration.

func (*CipdSettings) Descriptor deprecated

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

Deprecated: Use CipdSettings.ProtoReflect.Descriptor instead.

func (*CipdSettings) GetDefaultClientPackage

func (x *CipdSettings) GetDefaultClientPackage() *CipdPackage

func (*CipdSettings) GetDefaultServer

func (x *CipdSettings) GetDefaultServer() string

func (*CipdSettings) ProtoMessage

func (*CipdSettings) ProtoMessage()

func (*CipdSettings) ProtoReflect

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

func (*CipdSettings) Reset

func (x *CipdSettings) Reset()

func (*CipdSettings) String

func (x *CipdSettings) String() string

type ExternalSchedulerConfig

type ExternalSchedulerConfig struct {

	// Service address of external scheduler.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Scheduler id within the external scheduler service to use. This value
	// is opaque to swarming.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Dimensions is a list of dimension strings in "key:value" format (e.g.
	// ["os:foo", "featureX:bar"]) that determines eligibility for a bot or task
	// to use this external scheduler. In particular:
	// - a bot will be eligible if it contains all of these dimensions.
	// - a task will be eligible if all its slices contain all these dimensions.
	//
	// Note of care: if this list is empty, that means all requests in the pool
	// are eligible to be forwarded to it.
	//
	// Note: To be deprecated, in favor of: any_dimensions and all_dimensions.
	Dimensions []string `protobuf:"bytes,3,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
	// If not enabled, this external scheduler config will be ignored. This
	// makes it safer to add new configs (the naive approach of adding a config
	// with empty dimentions list would cause all requests to be routed to
	// that config).
	Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Deprecated: Marked as deprecated in go.chromium.org/luci/swarming/proto/config/pools.proto.
	FallbackWhenEmpty bool `protobuf:"varint,5,opt,name=fallback_when_empty,json=fallbackWhenEmpty,proto3" json:"fallback_when_empty,omitempty"`
	// A task or bot must have all of these dimensions in order to match this
	// dimension set.
	//
	// Note: Support not yet implemented.
	AllDimensions []string `protobuf:"bytes,6,rep,name=all_dimensions,json=allDimensions,proto3" json:"all_dimensions,omitempty"`
	// If any_dimensions is defined, a task or bot must have any of these
	// dimensions in order to match this dimension set.
	//
	// Note: Support not yet implemented.
	AnyDimensions []string `protobuf:"bytes,7,rep,name=any_dimensions,json=anyDimensions,proto3" json:"any_dimensions,omitempty"`
	// If true, allows the swarming native scheduler to reap tasks that would
	// otherwise be owned by this external scheduler, if the external scheduler
	// returns no results.
	//
	// This field should be enabled temporarily when first turning on a new
	// external scheduler config, to allow tasks that existing prior to that time
	// to still have a chance to run. After prior tasks have aged out of the
	// system, this flag should be disabled, to get stricter consistency between
	// swarming's state and external scheduler's state.
	AllowEsFallback bool `protobuf:"varint,8,opt,name=allow_es_fallback,json=allowEsFallback,proto3" json:"allow_es_fallback,omitempty"`
	// contains filtered or unexported fields
}

Describes an external scheduler used by a particular swarming pool and dimension set, via the external scheduler API.

func (*ExternalSchedulerConfig) Descriptor deprecated

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

Deprecated: Use ExternalSchedulerConfig.ProtoReflect.Descriptor instead.

func (*ExternalSchedulerConfig) GetAddress

func (x *ExternalSchedulerConfig) GetAddress() string

func (*ExternalSchedulerConfig) GetAllDimensions

func (x *ExternalSchedulerConfig) GetAllDimensions() []string

func (*ExternalSchedulerConfig) GetAllowEsFallback

func (x *ExternalSchedulerConfig) GetAllowEsFallback() bool

func (*ExternalSchedulerConfig) GetAnyDimensions

func (x *ExternalSchedulerConfig) GetAnyDimensions() []string

func (*ExternalSchedulerConfig) GetDimensions

func (x *ExternalSchedulerConfig) GetDimensions() []string

func (*ExternalSchedulerConfig) GetEnabled

func (x *ExternalSchedulerConfig) GetEnabled() bool

func (*ExternalSchedulerConfig) GetFallbackWhenEmpty deprecated

func (x *ExternalSchedulerConfig) GetFallbackWhenEmpty() bool

Deprecated: Marked as deprecated in go.chromium.org/luci/swarming/proto/config/pools.proto.

func (*ExternalSchedulerConfig) GetId

func (x *ExternalSchedulerConfig) GetId() string

func (*ExternalSchedulerConfig) ProtoMessage

func (*ExternalSchedulerConfig) ProtoMessage()

func (*ExternalSchedulerConfig) ProtoReflect

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

func (*ExternalSchedulerConfig) Reset

func (x *ExternalSchedulerConfig) Reset()

func (*ExternalSchedulerConfig) String

func (x *ExternalSchedulerConfig) String() string

type ExternalServices

type ExternalServices struct {
	Cipd *ExternalServices_CIPD `protobuf:"bytes,2,opt,name=cipd,proto3" json:"cipd,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalServices) Descriptor deprecated

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

Deprecated: Use ExternalServices.ProtoReflect.Descriptor instead.

func (*ExternalServices) GetCipd

func (*ExternalServices) ProtoMessage

func (*ExternalServices) ProtoMessage()

func (*ExternalServices) ProtoReflect

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

func (*ExternalServices) Reset

func (x *ExternalServices) Reset()

func (*ExternalServices) String

func (x *ExternalServices) String() string

type ExternalServices_CIPD

type ExternalServices_CIPD struct {

	// (required) URL of the default CIPD server to use, if it is not specified
	// in the task.
	//
	// Must start with "https://" or "http://".
	//
	// e.g. "https://chrome-infra-packages.appspot.com"
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// (required) The version of the cipd client to use. This is likely the
	// 'infra/tools/cipd/${platform}' package, but because it's part of the
	// bootstrap needs special logic to handle its installation.
	ClientPackage *CipdPackage `protobuf:"bytes,3,opt,name=client_package,json=clientPackage,proto3" json:"client_package,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalServices_CIPD) Descriptor deprecated

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

Deprecated: Use ExternalServices_CIPD.ProtoReflect.Descriptor instead.

func (*ExternalServices_CIPD) GetClientPackage

func (x *ExternalServices_CIPD) GetClientPackage() *CipdPackage

func (*ExternalServices_CIPD) GetServer

func (x *ExternalServices_CIPD) GetServer() string

func (*ExternalServices_CIPD) ProtoMessage

func (*ExternalServices_CIPD) ProtoMessage()

func (*ExternalServices_CIPD) ProtoReflect

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

func (*ExternalServices_CIPD) Reset

func (x *ExternalServices_CIPD) Reset()

func (*ExternalServices_CIPD) String

func (x *ExternalServices_CIPD) String() string

type Pool

type Pool struct {

	// Names of the pools this config applies to.
	//
	// Tasks target the pool by specifying its name as 'pool' dimension, thus
	// names here should be valid dimension value.
	Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`
	// Contact information for people that own this pool.
	//
	// Not used in any ACLs, just informational field.
	Owners []string `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners,omitempty"`
	// Defines who can schedule tasks in this pool.
	//
	// The checks here act as a second authorization layer, consulted after the
	// first server-global one (defined based on groups set in settings.cfg, see
	// AuthSettings in config.proto).
	Schedulers *Schedulers `protobuf:"bytes,3,opt,name=schedulers,proto3" json:"schedulers,omitempty"`
	// Types that are assignable to TaskDeploymentScheme:
	//
	//	*Pool_TaskTemplateDeployment
	//	*Pool_TaskTemplateDeploymentInline
	TaskDeploymentScheme isPool_TaskDeploymentScheme `protobuf_oneof:"task_deployment_scheme"`
	// Refer to one bot_monitoring at the file level by name.
	BotMonitoring string `protobuf:"bytes,8,opt,name=bot_monitoring,json=botMonitoring,proto3" json:"bot_monitoring,omitempty"`
	// If specified, this is the description of the external schedulers to be used
	// for tasks and bots for this pool that match the dimension set of a scheduler.
	// For a given task or bot, the first entry in this list that matches based on
	// dimension eligibility will be used.
	ExternalSchedulers []*ExternalSchedulerConfig `protobuf:"bytes,9,rep,name=external_schedulers,json=externalSchedulers,proto3" json:"external_schedulers,omitempty"`
	// Realm name that the pool is associated with.
	//
	// e.g.
	// 'infra:pool/flex/try' for 'luci.flex.try' pool
	//
	// See also
	// https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/server/auth/service/protocol/components/auth/proto/realms.proto
	Realm string `protobuf:"bytes,10,opt,name=realm,proto3" json:"realm,omitempty"`
	// Enforcements of permissions can be controlled by pool during migration
	// from legacy ACLs configs to Realms configs.
	//
	// When scheduling tasks:
	//   - If a task doesn't have a realm (i.e. it is a legacy task), it will be
	//     assigned `default_task_realm` and only permissions listed here will be
	//     enforced. If some permission is not enforced, Swarming will use a
	//     legacy ACL check for it instead.
	//   - If a task has a realm (i.e. it is a modern task aware of realms), all
	//     permissions will always be enforced for it. Legacy ACLs will not be
	//     used at all.
	//
	// This field is not used for permissions not related to task scheduling.
	//
	// This field will be deprecated after migration. All scheduling permissions
	// will be enforced at all times.
	EnforcedRealmPermissions []RealmPermission `` /* 181-byte string literal not displayed */
	// Realm name to use for tasks if they don't have a realm associated.
	DefaultTaskRealm    string                   `protobuf:"bytes,12,opt,name=default_task_realm,json=defaultTaskRealm,proto3" json:"default_task_realm,omitempty"`
	RbeMigration        *Pool_RBEMigration       `protobuf:"bytes,13,opt,name=rbe_migration,json=rbeMigration,proto3" json:"rbe_migration,omitempty"`
	SchedulingAlgorithm Pool_SchedulingAlgorithm `` /* 166-byte string literal not displayed */
	// contains filtered or unexported fields
}

Properties of a single pool or a bunch of identically configured pools.

In particular contains authorization configuration.

func (*Pool) Descriptor deprecated

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

Deprecated: Use Pool.ProtoReflect.Descriptor instead.

func (*Pool) GetBotMonitoring

func (x *Pool) GetBotMonitoring() string

func (*Pool) GetDefaultTaskRealm

func (x *Pool) GetDefaultTaskRealm() string

func (*Pool) GetEnforcedRealmPermissions

func (x *Pool) GetEnforcedRealmPermissions() []RealmPermission

func (*Pool) GetExternalSchedulers

func (x *Pool) GetExternalSchedulers() []*ExternalSchedulerConfig

func (*Pool) GetName

func (x *Pool) GetName() []string

func (*Pool) GetOwners

func (x *Pool) GetOwners() []string

func (*Pool) GetRbeMigration

func (x *Pool) GetRbeMigration() *Pool_RBEMigration

func (*Pool) GetRealm

func (x *Pool) GetRealm() string

func (*Pool) GetSchedulers

func (x *Pool) GetSchedulers() *Schedulers

func (*Pool) GetSchedulingAlgorithm

func (x *Pool) GetSchedulingAlgorithm() Pool_SchedulingAlgorithm

func (*Pool) GetTaskDeploymentScheme

func (m *Pool) GetTaskDeploymentScheme() isPool_TaskDeploymentScheme

func (*Pool) GetTaskTemplateDeployment

func (x *Pool) GetTaskTemplateDeployment() string

func (*Pool) GetTaskTemplateDeploymentInline

func (x *Pool) GetTaskTemplateDeploymentInline() *TaskTemplateDeployment

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) ProtoReflect

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

func (*Pool) Reset

func (x *Pool) Reset()

func (*Pool) String

func (x *Pool) String() string

type Pool_RBEMigration

type Pool_RBEMigration struct {

	// An RBE instance to send tasks to.
	RbeInstance string `protobuf:"bytes,1,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	// Approximate percent of tasks targeting this pool to send to RBE.
	//
	// The decision is done randomly when the task is scheduled.
	//
	// Additionally tasks that have `rbe:require` tag will always use RBE and
	// tasks that have `rbe:prevent` tag will never use RBE. If both tags are
	// set, `rbe:prevent` takes precedence.
	RbeModePercent    int32                                  `protobuf:"varint,2,opt,name=rbe_mode_percent,json=rbeModePercent,proto3" json:"rbe_mode_percent,omitempty"`
	BotModeAllocation []*Pool_RBEMigration_BotModeAllocation `protobuf:"bytes,3,rep,name=bot_mode_allocation,json=botModeAllocation,proto3" json:"bot_mode_allocation,omitempty"`
	// contains filtered or unexported fields
}

Settings controlling migration to the RBE Scheduler.

func (*Pool_RBEMigration) Descriptor deprecated

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

Deprecated: Use Pool_RBEMigration.ProtoReflect.Descriptor instead.

func (*Pool_RBEMigration) GetBotModeAllocation

func (x *Pool_RBEMigration) GetBotModeAllocation() []*Pool_RBEMigration_BotModeAllocation

func (*Pool_RBEMigration) GetRbeInstance

func (x *Pool_RBEMigration) GetRbeInstance() string

func (*Pool_RBEMigration) GetRbeModePercent

func (x *Pool_RBEMigration) GetRbeModePercent() int32

func (*Pool_RBEMigration) ProtoMessage

func (*Pool_RBEMigration) ProtoMessage()

func (*Pool_RBEMigration) ProtoReflect

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

func (*Pool_RBEMigration) Reset

func (x *Pool_RBEMigration) Reset()

func (*Pool_RBEMigration) String

func (x *Pool_RBEMigration) String() string

type Pool_RBEMigration_BotModeAllocation

type Pool_RBEMigration_BotModeAllocation struct {
	Mode    Pool_RBEMigration_BotModeAllocation_BotMode `` /* 127-byte string literal not displayed */
	Percent int32                                       `protobuf:"varint,2,opt,name=percent,proto3" json:"percent,omitempty"`
	// contains filtered or unexported fields
}

Distribution of bots in this pool across migration modes. Percents must sum up to 100.

Bots are assigned the corresponding mode based on hash of their ID modulo 100. The full space of such IDs always looks like this:

[---SWARMING---|---HYBRID---|---RBE---]

Where width of sections are defined by `percent` below. In other words, there are two boundaries that can be moved:

  1. SWARMING <-> HYBRID.
  2. HYBRID <-> RBE.

Migration starts with all bots being SWARMING, then SWARMING <-> HYBRID boundary is moved until all bots are HYBRID. Then HYBRID <-> RBE boundary is moved until all bots are RBE.

If a bot belongs to multiple pools (should be rare), the mode is derived to be compatible across all bot's pools:

  1. All pools indicate the bot should be in SWARMING => use SWARMING.
  2. All pools indicate the bot should be in RBE => use RBE.
  3. Otherwise use HYBRID.

func (*Pool_RBEMigration_BotModeAllocation) Descriptor deprecated

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

Deprecated: Use Pool_RBEMigration_BotModeAllocation.ProtoReflect.Descriptor instead.

func (*Pool_RBEMigration_BotModeAllocation) GetMode

func (*Pool_RBEMigration_BotModeAllocation) GetPercent

func (*Pool_RBEMigration_BotModeAllocation) ProtoMessage

func (*Pool_RBEMigration_BotModeAllocation) ProtoMessage()

func (*Pool_RBEMigration_BotModeAllocation) ProtoReflect

func (*Pool_RBEMigration_BotModeAllocation) Reset

func (*Pool_RBEMigration_BotModeAllocation) String

type Pool_RBEMigration_BotModeAllocation_BotMode

type Pool_RBEMigration_BotModeAllocation_BotMode int32
const (
	Pool_RBEMigration_BotModeAllocation_UNKNOWN  Pool_RBEMigration_BotModeAllocation_BotMode = 0
	Pool_RBEMigration_BotModeAllocation_SWARMING Pool_RBEMigration_BotModeAllocation_BotMode = 1
	Pool_RBEMigration_BotModeAllocation_HYBRID   Pool_RBEMigration_BotModeAllocation_BotMode = 2
	Pool_RBEMigration_BotModeAllocation_RBE      Pool_RBEMigration_BotModeAllocation_BotMode = 3
)

func (Pool_RBEMigration_BotModeAllocation_BotMode) Descriptor

func (Pool_RBEMigration_BotModeAllocation_BotMode) Enum

func (Pool_RBEMigration_BotModeAllocation_BotMode) EnumDescriptor deprecated

func (Pool_RBEMigration_BotModeAllocation_BotMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Pool_RBEMigration_BotModeAllocation_BotMode.Descriptor instead.

func (Pool_RBEMigration_BotModeAllocation_BotMode) Number

func (Pool_RBEMigration_BotModeAllocation_BotMode) String

func (Pool_RBEMigration_BotModeAllocation_BotMode) Type

type Pool_SchedulingAlgorithm

type Pool_SchedulingAlgorithm int32

Controls the scheduling algorithm used by Swarming to schedule tasks. _gen_queue_number() in server/task_to_run.py uses this to control the queue_number of a task, which the ordering of tasks to run is based on.

const (
	// Unknown or unspecified scheduling algorithm.
	Pool_SCHEDULING_ALGORITHM_UNKNOWN Pool_SchedulingAlgorithm = 0
	// First in first out (FIFO) scheduling algorithm.
	//
	// First task that comes in is scheduled first.
	Pool_SCHEDULING_ALGORITHM_FIFO Pool_SchedulingAlgorithm = 1
	// Last in first out (LIFO) scheduling algorithm.
	//
	// Last task that comes in is scheduled first.
	Pool_SCHEDULING_ALGORITHM_LIFO Pool_SchedulingAlgorithm = 2
)

func (Pool_SchedulingAlgorithm) Descriptor

func (Pool_SchedulingAlgorithm) Enum

func (Pool_SchedulingAlgorithm) EnumDescriptor deprecated

func (Pool_SchedulingAlgorithm) EnumDescriptor() ([]byte, []int)

Deprecated: Use Pool_SchedulingAlgorithm.Descriptor instead.

func (Pool_SchedulingAlgorithm) Number

func (Pool_SchedulingAlgorithm) String

func (x Pool_SchedulingAlgorithm) String() string

func (Pool_SchedulingAlgorithm) Type

type Pool_TaskTemplateDeployment

type Pool_TaskTemplateDeployment struct {
	// Most Pools will include a task_template_deployment by name.
	TaskTemplateDeployment string `protobuf:"bytes,6,opt,name=task_template_deployment,json=taskTemplateDeployment,proto3,oneof"`
}

type Pool_TaskTemplateDeploymentInline

type Pool_TaskTemplateDeploymentInline struct {
	// However, pools which substantially differ from other ones can define an
	// entire deployment inline without putting it in the shared namespace.
	//
	// The name fields in this deployment and any embedded task_templates must
	// not be specified.
	TaskTemplateDeploymentInline *TaskTemplateDeployment `protobuf:"bytes,7,opt,name=task_template_deployment_inline,json=taskTemplateDeploymentInline,proto3,oneof"`
}

type PoolsCfg

type PoolsCfg struct {

	// List of all defined pools.
	Pool []*Pool `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"`
	// Configures the default isolate and CIPD services to use for all pools on
	// this server.
	DefaultExternalServices *ExternalServices `` /* 132-byte string literal not displayed */
	// This is the "shared namespace" of task templates.
	//
	// Task templates allow pools to specify some property defaults (particularly
	// around caches, CIPD packages and Environment variables) for tasks created
	// within the pool. These templates can have 'include' statements, and those
	// include statements draw from this namespace.
	//
	// Swarming will do a 2-pass parse of these so order doesn't matter (i.e. If
	// A includes B, but is defined B-then-A, it's not an error).
	TaskTemplate []*TaskTemplate `protobuf:"bytes,3,rep,name=task_template,json=taskTemplate,proto3" json:"task_template,omitempty"`
	// This is the "shared namespace" of deployments.
	//
	// When pools specify a task_template_deployment, it draws from this
	// namespace.
	TaskTemplateDeployment []*TaskTemplateDeployment `` /* 129-byte string literal not displayed */
	// Defines about how to monitor bots in a pool. Each pool above may refer to
	// one of the BotMonitoring message by name, which permits reusing
	// BotMonitoring definitions.
	BotMonitoring []*BotMonitoring `protobuf:"bytes,5,rep,name=bot_monitoring,json=botMonitoring,proto3" json:"bot_monitoring,omitempty"`
	// contains filtered or unexported fields
}

Schema for pools.cfg service config file in luci-config.

It defined a set of Pool objects, each one corresponding to a single Swarming pool dimension. Each Swarming task resided in some pool, and each Swarming bot belongs to at least one pool.

Pools are used to isolate groups of tasks/bots from each other for security and capacity reasons. Two different pools should not interfere with each other at all (unless explicitly configured to share bots or accounts).

func (*PoolsCfg) Descriptor deprecated

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

Deprecated: Use PoolsCfg.ProtoReflect.Descriptor instead.

func (*PoolsCfg) GetBotMonitoring

func (x *PoolsCfg) GetBotMonitoring() []*BotMonitoring

func (*PoolsCfg) GetDefaultExternalServices

func (x *PoolsCfg) GetDefaultExternalServices() *ExternalServices

func (*PoolsCfg) GetPool

func (x *PoolsCfg) GetPool() []*Pool

func (*PoolsCfg) GetTaskTemplate

func (x *PoolsCfg) GetTaskTemplate() []*TaskTemplate

func (*PoolsCfg) GetTaskTemplateDeployment

func (x *PoolsCfg) GetTaskTemplateDeployment() []*TaskTemplateDeployment

func (*PoolsCfg) ProtoMessage

func (*PoolsCfg) ProtoMessage()

func (*PoolsCfg) ProtoReflect

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

func (*PoolsCfg) Reset

func (x *PoolsCfg) Reset()

func (*PoolsCfg) String

func (x *PoolsCfg) String() string

type RealmPermission

type RealmPermission int32

Realm permissions used in Swarming. The enums are converted to string names using get_permission_name in server/realms.py NEXT_ID: 12

const (
	RealmPermission_REALM_PERMISSION_UNSPECIFIED RealmPermission = 0
	// Permission 'swarming.pools.createTask'
	// This is required to create a task in the pool.
	// It will be checked at the new task API.
	RealmPermission_REALM_PERMISSION_POOLS_CREATE_TASK RealmPermission = 1
	// Permission 'swarming.pools.listTasks'
	// This is required to list/count tasks in the pool.
	// It will be checked at tasks list/count APIs.
	RealmPermission_REALM_PERMISSION_POOLS_LIST_TASKS RealmPermission = 4
	// Permission 'swarming.pools.cancelTask'
	// This is required to cancel a task in the pool.
	// It will be checked at task cancel APIs.
	RealmPermission_REALM_PERMISSION_POOLS_CANCEL_TASK RealmPermission = 5
	// Permission 'swarming.pools.createBot'
	// This is required to create a bot in the pool.
	// It will be checked at bot bootstrap, bot code APIs.
	RealmPermission_REALM_PERMISSION_POOLS_CREATE_BOT RealmPermission = 6
	// Permission 'swarming.pools.listBots'
	// This is required to list/count bots in the pool.
	// It will be checked at bots list/count APIs.
	RealmPermission_REALM_PERMISSION_POOLS_LIST_BOTS RealmPermission = 7
	// Permission 'swarming.pools.terminateBot'
	// This is required to terminate a bot in the pool.
	// It will be checked at bot terminate API.
	RealmPermission_REALM_PERMISSION_POOLS_TERMINATE_BOT RealmPermission = 8
	// Permission 'swarming.pools.deleteBot'
	// This is required to delete a bot in the pool.
	// It will be checked at bot delete API.
	RealmPermission_REALM_PERMISSION_POOLS_DELETE_BOT RealmPermission = 9
	// Permission 'swarming.tasks.createInRealm'
	// This is required to create a task in the realm.
	// It will be checked at the new task API.
	RealmPermission_REALM_PERMISSION_TASKS_CREATE_IN_REALM RealmPermission = 2
	// Permission 'swarming.tasks.actAs'
	// This is required to use a task service account in the realm.
	// It will be checked at the new task API.
	RealmPermission_REALM_PERMISSION_TASKS_ACT_AS RealmPermission = 3
	// Permission 'swarming.tasks.get'
	// This is required to get task request, result, outputs.
	// It will be checked at task request, result, stdout GET APIs.
	RealmPermission_REALM_PERMISSION_TASKS_GET RealmPermission = 10
	// Permission 'swarming.tasks.cancel'
	// This is required to cancel a task.
	// It will be checked at task cancel API.
	RealmPermission_REALM_PERMISSION_TASKS_CANCEL RealmPermission = 11
)

func (RealmPermission) Descriptor

func (RealmPermission) Enum

func (x RealmPermission) Enum() *RealmPermission

func (RealmPermission) EnumDescriptor deprecated

func (RealmPermission) EnumDescriptor() ([]byte, []int)

Deprecated: Use RealmPermission.Descriptor instead.

func (RealmPermission) Number

func (RealmPermission) String

func (x RealmPermission) String() string

func (RealmPermission) Type

type ResultDBSettings

type ResultDBSettings struct {

	// URL of the ResultDB server to use.
	// Must start with "https://" or "http://",
	// e.g. "https://results.api.cr.dev".
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

Settings for Swarming-ResultDB integration.

func (*ResultDBSettings) Descriptor deprecated

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

Deprecated: Use ResultDBSettings.ProtoReflect.Descriptor instead.

func (*ResultDBSettings) GetServer

func (x *ResultDBSettings) GetServer() string

func (*ResultDBSettings) ProtoMessage

func (*ResultDBSettings) ProtoMessage()

func (*ResultDBSettings) ProtoReflect

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

func (*ResultDBSettings) Reset

func (x *ResultDBSettings) Reset()

func (*ResultDBSettings) String

func (x *ResultDBSettings) String() string

type Schedulers

type Schedulers struct {

	// Emails of individual end-users.
	//
	// Useful to avoid creating one-person groups.
	User []string `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"`
	// List of groups with end-users.
	Group []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	// See TrustedDelegation comment.
	TrustedDelegation []*TrustedDelegation `protobuf:"bytes,3,rep,name=trusted_delegation,json=trustedDelegation,proto3" json:"trusted_delegation,omitempty"`
	// contains filtered or unexported fields
}

Defines who can schedule tasks in a pool.

func (*Schedulers) Descriptor deprecated

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

Deprecated: Use Schedulers.ProtoReflect.Descriptor instead.

func (*Schedulers) GetGroup

func (x *Schedulers) GetGroup() []string

func (*Schedulers) GetTrustedDelegation

func (x *Schedulers) GetTrustedDelegation() []*TrustedDelegation

func (*Schedulers) GetUser

func (x *Schedulers) GetUser() []string

func (*Schedulers) ProtoMessage

func (*Schedulers) ProtoMessage()

func (*Schedulers) ProtoReflect

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

func (*Schedulers) Reset

func (x *Schedulers) Reset()

func (*Schedulers) String

func (x *Schedulers) String() string

type SettingsCfg

type SettingsCfg struct {

	// id to inject into pages if applicable.
	GoogleAnalytics string `protobuf:"bytes,1,opt,name=google_analytics,json=googleAnalytics,proto3" json:"google_analytics,omitempty"`
	// The number of seconds an old task can be deduped from.
	// Default is one week: 7*24*60*60 = 604800
	ReusableTaskAgeSecs int32 `protobuf:"varint,2,opt,name=reusable_task_age_secs,json=reusableTaskAgeSecs,proto3" json:"reusable_task_age_secs,omitempty"`
	// The amount of time that has to pass before a machine is considered dead.
	// Default is 600 (10 minutes).
	BotDeathTimeoutSecs int32 `protobuf:"varint,3,opt,name=bot_death_timeout_secs,json=botDeathTimeoutSecs,proto3" json:"bot_death_timeout_secs,omitempty"`
	// Enable ts_mon based monitoring.
	EnableTsMonitoring bool `protobuf:"varint,4,opt,name=enable_ts_monitoring,json=enableTsMonitoring,proto3" json:"enable_ts_monitoring,omitempty"`
	// (deprecated, see pools.proto) Configuration for swarming-cipd integration.
	Cipd *CipdSettings `protobuf:"bytes,6,opt,name=cipd,proto3" json:"cipd,omitempty"`
	// Emergency setting to disable bot task reaping. When set, all bots are
	// always put to sleep and are never granted task.
	ForceBotsToSleepAndNotRunTask bool `` /* 161-byte string literal not displayed */
	// oauth client id for the ui. This is created in the developer's console
	// under Credentials.
	UiClientId string `protobuf:"bytes,9,opt,name=ui_client_id,json=uiClientId,proto3" json:"ui_client_id,omitempty"`
	// A url to a task display server (e.g. milo).  This should have a %s where
	// a task id can go.
	DisplayServerUrlTemplate string `` /* 138-byte string literal not displayed */
	// Sets a maximum sleep time in seconds for bots that limits the exponental
	// backoff. If missing, the task scheduler will provide the default maximum
	// (usually 60s, but see bot_code/task_scheduler.py for details).
	MaxBotSleepTime int32 `protobuf:"varint,12,opt,name=max_bot_sleep_time,json=maxBotSleepTime,proto3" json:"max_bot_sleep_time,omitempty"`
	// Names of the authorization groups used by components/auth.
	Auth *AuthSettings `protobuf:"bytes,13,opt,name=auth,proto3" json:"auth,omitempty"`
	// Sets the default gRPC proxy for the bot's Isolate server calls.
	BotIsolateGrpcProxy string `protobuf:"bytes,14,opt,name=bot_isolate_grpc_proxy,json=botIsolateGrpcProxy,proto3" json:"bot_isolate_grpc_proxy,omitempty"`
	// Sets the default gRPC proxy for the bot's Swarming server calls.
	BotSwarmingGrpcProxy string `` /* 126-byte string literal not displayed */
	// Any extra urls that should be added to frame-src, e.g. anything that
	// will be linked to from the display server.
	// This originally added things to child-src, which was deprecated:
	// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/child-src
	ExtraChildSrcCspUrl []string `protobuf:"bytes,16,rep,name=extra_child_src_csp_url,json=extraChildSrcCspUrl,proto3" json:"extra_child_src_csp_url,omitempty"`
	// Whether swarming should batch notifications to the external scheduler.
	EnableBatchEsNotifications bool `` /* 145-byte string literal not displayed */
	// Configuration for Swarming-ResultDB integration.
	Resultdb *ResultDBSettings `protobuf:"bytes,19,opt,name=resultdb,proto3" json:"resultdb,omitempty"`
	// Configuration for RBE-CAS integration.
	Cas *CASSettings `protobuf:"bytes,20,opt,name=cas,proto3" json:"cas,omitempty"`
	// Configuration for Python => Go RPC servers migration.
	TrafficMigration *TrafficMigration `protobuf:"bytes,21,opt,name=traffic_migration,json=trafficMigration,proto3" json:"traffic_migration,omitempty"`
	// Configuration of the bot deployment process.
	BotDeployment *BotDeployment `protobuf:"bytes,22,opt,name=bot_deployment,json=botDeployment,proto3" json:"bot_deployment,omitempty"`
	// contains filtered or unexported fields
}

Schema for settings.cfg service config file in luci-config.

func (*SettingsCfg) Descriptor deprecated

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

Deprecated: Use SettingsCfg.ProtoReflect.Descriptor instead.

func (*SettingsCfg) GetAuth

func (x *SettingsCfg) GetAuth() *AuthSettings

func (*SettingsCfg) GetBotDeathTimeoutSecs

func (x *SettingsCfg) GetBotDeathTimeoutSecs() int32

func (*SettingsCfg) GetBotDeployment

func (x *SettingsCfg) GetBotDeployment() *BotDeployment

func (*SettingsCfg) GetBotIsolateGrpcProxy

func (x *SettingsCfg) GetBotIsolateGrpcProxy() string

func (*SettingsCfg) GetBotSwarmingGrpcProxy

func (x *SettingsCfg) GetBotSwarmingGrpcProxy() string

func (*SettingsCfg) GetCas

func (x *SettingsCfg) GetCas() *CASSettings

func (*SettingsCfg) GetCipd

func (x *SettingsCfg) GetCipd() *CipdSettings

func (*SettingsCfg) GetDisplayServerUrlTemplate

func (x *SettingsCfg) GetDisplayServerUrlTemplate() string

func (*SettingsCfg) GetEnableBatchEsNotifications

func (x *SettingsCfg) GetEnableBatchEsNotifications() bool

func (*SettingsCfg) GetEnableTsMonitoring

func (x *SettingsCfg) GetEnableTsMonitoring() bool

func (*SettingsCfg) GetExtraChildSrcCspUrl

func (x *SettingsCfg) GetExtraChildSrcCspUrl() []string

func (*SettingsCfg) GetForceBotsToSleepAndNotRunTask

func (x *SettingsCfg) GetForceBotsToSleepAndNotRunTask() bool

func (*SettingsCfg) GetGoogleAnalytics

func (x *SettingsCfg) GetGoogleAnalytics() string

func (*SettingsCfg) GetMaxBotSleepTime

func (x *SettingsCfg) GetMaxBotSleepTime() int32

func (*SettingsCfg) GetResultdb

func (x *SettingsCfg) GetResultdb() *ResultDBSettings

func (*SettingsCfg) GetReusableTaskAgeSecs

func (x *SettingsCfg) GetReusableTaskAgeSecs() int32

func (*SettingsCfg) GetTrafficMigration

func (x *SettingsCfg) GetTrafficMigration() *TrafficMigration

func (*SettingsCfg) GetUiClientId

func (x *SettingsCfg) GetUiClientId() string

func (*SettingsCfg) ProtoMessage

func (*SettingsCfg) ProtoMessage()

func (*SettingsCfg) ProtoReflect

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

func (*SettingsCfg) Reset

func (x *SettingsCfg) Reset()

func (*SettingsCfg) String

func (x *SettingsCfg) String() string

type TaskTemplate

type TaskTemplate struct {

	// This gives the template a name for the 'include' field below. This only
	// applies to templates defined within the PoolsCfg message (i.e. the
	// top-level message), not to templates inlined into a TaskTemplateDeployment.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Includes properties from the named other TaskTemplate. This can only
	// include templates defined in the top-level PoolsCfg message.
	Include []string `protobuf:"bytes,2,rep,name=include,proto3" json:"include,omitempty"`
	// CacheEntries are keyed by `name`, and `path` is overridden wholesale.
	//
	// It is illegal to have any TaskTemplate with multiple cache entries mapping
	// to the same path. It is illegal to have any cache paths overlap with cipd
	// package paths.
	Cache []*TaskTemplate_CacheEntry `protobuf:"bytes,3,rep,name=cache,proto3" json:"cache,omitempty"`
	// CipdPackages are keyed by (path, name), and `version` is overridden
	// wholesale.
	//
	// It is illegal to have any cipd paths overlap with cache entry paths.
	CipdPackage []*TaskTemplate_CipdPackage `protobuf:"bytes,4,rep,name=cipd_package,json=cipdPackage,proto3" json:"cipd_package,omitempty"`
	// Env vars are keyed by the `var` field,
	//
	// `value` fields overwrite included values.
	// `soft` fields overwrite included values.
	// `prefix` fields append to included values. For example, Doing:
	//
	//	   {name: "1" env { var: "PATH" prefix: "a" }}
	//	   {name: "2" env { var: "PATH" prefix: "b" }}
	//	   {name: "3" include: "1" include: "2" }
	//
	//	Is equivalent to:
	//
	//	   {name: "3" env { var: "PATH" prefix: "a" prefix: "b" }}
	//
	// Full Example:
	//
	//	env {
	//	  var: "PATH"
	//	  value: "/disable_system_path"
	//	  prefix: "a"
	//	  prefix: "b"
	//	  prefix: "c"
	//	  soft: true
	//	}
	//	env {
	//	  var: "OTHER"
	//	  value: "1"
	//	}
	//	env {
	//	  var: "PYTHONPATH"
	//	  prefix: "a"
	//	}
	//
	// Results in, essentially:
	//
	//	$PATH=/path/to/a:/path/to/b:/path/to/c:/disable_system_path
	//	$OTHER=1
	//	$PYTHONPATH=/path/to/a:$PYTHONPATH
	Env []*TaskTemplate_Env `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"`
	// contains filtered or unexported fields
}

A TaskTemplate describes a set of properties (caches, CIPD packages and envvars) which apply to tasks created within a swarming pool.

TaskTemplates may either be defined inline inside of a TaskTemplateDeployment, or in "shared namespace" of the PoolsCfg.task_template field.

TaskTemplates may also include other TaskTemplates by name from the "shared namespace" in PoolsCfg. Swarming calculates the final value for a given TaskTemplate by applying all of its `include` fields depth-first, and then by applying the properties in the body of the TaskTemplate. Includes may never be repeated, including transitively. This means that "diamond shaped dependencies" are forbidden (i.e. A<-B<-D and A<-C<-D would be forbidden because `A` is included in `D` twice (via both C and B)).

func (*TaskTemplate) Descriptor deprecated

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

Deprecated: Use TaskTemplate.ProtoReflect.Descriptor instead.

func (*TaskTemplate) GetCache

func (x *TaskTemplate) GetCache() []*TaskTemplate_CacheEntry

func (*TaskTemplate) GetCipdPackage

func (x *TaskTemplate) GetCipdPackage() []*TaskTemplate_CipdPackage

func (*TaskTemplate) GetEnv

func (x *TaskTemplate) GetEnv() []*TaskTemplate_Env

func (*TaskTemplate) GetInclude

func (x *TaskTemplate) GetInclude() []string

func (*TaskTemplate) GetName

func (x *TaskTemplate) GetName() string

func (*TaskTemplate) ProtoMessage

func (*TaskTemplate) ProtoMessage()

func (*TaskTemplate) ProtoReflect

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

func (*TaskTemplate) Reset

func (x *TaskTemplate) Reset()

func (*TaskTemplate) String

func (x *TaskTemplate) String() string

type TaskTemplateDeployment

type TaskTemplateDeployment struct {

	// This gives the deployment a name for the 'task_template_deployment' field
	// in PoolCfg.
	//
	// When this TaskTemplateDeployment is inlined into another message (e.g.
	// `TaskTemplate.task_template_deployment_inline`), the name field must not be
	// specified.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Most Deployments will have a TaskTemplate with just a single include
	// directive.
	//
	// However, pools which substantially differ from other ones could define an
	// entire template inline without being forced to put it in the shared
	// namespace.
	//
	// The name field in this template (and the canary template) must not be
	// specified.
	Prod *TaskTemplate `protobuf:"bytes,2,opt,name=prod,proto3" json:"prod,omitempty"`
	// The canary template can be defined like the `prod` field above. If this is
	// defined and `canary_chance` is greater than 0, then this template will be
	// selected instead of `prod`.
	Canary *TaskTemplate `protobuf:"bytes,3,opt,name=canary,proto3" json:"canary,omitempty"`
	// range [0, 9999] where each tick corresponds to %0.01 chance of selecting
	// the template. Exactly 0 means 'canary is disabled', meaning that tasks
	// in this pool will always get the prod template.
	//
	// Examples:
	//   - 1     ".01% chance of picking canary"
	//   - 10    ".1% chance of picking canary"
	//   - 100   "1% chance of picking canary"
	//   - 1000  "10% chance of picking canary"
	//   - 5000  "50% chance of picking canary"
	//   - 7500  "75% chance of picking canary"
	//   - 9999  "99.99% chance of picking canary"
	CanaryChance int32 `protobuf:"varint,4,opt,name=canary_chance,json=canaryChance,proto3" json:"canary_chance,omitempty"`
	// contains filtered or unexported fields
}

This is a tuple of (prod template, canary template, canary_chance), so that it can be referenced from multiple pools simultaneously as a single unit.

func (*TaskTemplateDeployment) Descriptor deprecated

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

Deprecated: Use TaskTemplateDeployment.ProtoReflect.Descriptor instead.

func (*TaskTemplateDeployment) GetCanary

func (x *TaskTemplateDeployment) GetCanary() *TaskTemplate

func (*TaskTemplateDeployment) GetCanaryChance

func (x *TaskTemplateDeployment) GetCanaryChance() int32

func (*TaskTemplateDeployment) GetName

func (x *TaskTemplateDeployment) GetName() string

func (*TaskTemplateDeployment) GetProd

func (x *TaskTemplateDeployment) GetProd() *TaskTemplate

func (*TaskTemplateDeployment) ProtoMessage

func (*TaskTemplateDeployment) ProtoMessage()

func (*TaskTemplateDeployment) ProtoReflect

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

func (*TaskTemplateDeployment) Reset

func (x *TaskTemplateDeployment) Reset()

func (*TaskTemplateDeployment) String

func (x *TaskTemplateDeployment) String() string

type TaskTemplate_CacheEntry

type TaskTemplate_CacheEntry struct {

	// The name of the cache (required).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The path relative to the task root to mount the cache (required).
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskTemplate_CacheEntry) Descriptor deprecated

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

Deprecated: Use TaskTemplate_CacheEntry.ProtoReflect.Descriptor instead.

func (*TaskTemplate_CacheEntry) GetName

func (x *TaskTemplate_CacheEntry) GetName() string

func (*TaskTemplate_CacheEntry) GetPath

func (x *TaskTemplate_CacheEntry) GetPath() string

func (*TaskTemplate_CacheEntry) ProtoMessage

func (*TaskTemplate_CacheEntry) ProtoMessage()

func (*TaskTemplate_CacheEntry) ProtoReflect

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

func (*TaskTemplate_CacheEntry) Reset

func (x *TaskTemplate_CacheEntry) Reset()

func (*TaskTemplate_CacheEntry) String

func (x *TaskTemplate_CacheEntry) String() string

type TaskTemplate_CipdPackage

type TaskTemplate_CipdPackage struct {

	// The relative to the task root to unpack the CIPD package. A blank value
	// is permitted and means 'the root directory of the task'.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The CIPD package name template to use (required).
	Pkg string `protobuf:"bytes,2,opt,name=pkg,proto3" json:"pkg,omitempty"`
	// The version of the CIPD package to use (required).
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskTemplate_CipdPackage) Descriptor deprecated

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

Deprecated: Use TaskTemplate_CipdPackage.ProtoReflect.Descriptor instead.

func (*TaskTemplate_CipdPackage) GetPath

func (x *TaskTemplate_CipdPackage) GetPath() string

func (*TaskTemplate_CipdPackage) GetPkg

func (x *TaskTemplate_CipdPackage) GetPkg() string

func (*TaskTemplate_CipdPackage) GetVersion

func (x *TaskTemplate_CipdPackage) GetVersion() string

func (*TaskTemplate_CipdPackage) ProtoMessage

func (*TaskTemplate_CipdPackage) ProtoMessage()

func (*TaskTemplate_CipdPackage) ProtoReflect

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

func (*TaskTemplate_CipdPackage) Reset

func (x *TaskTemplate_CipdPackage) Reset()

func (*TaskTemplate_CipdPackage) String

func (x *TaskTemplate_CipdPackage) String() string

type TaskTemplate_Env

type TaskTemplate_Env struct {

	// The envvar you want to set (required).
	Var string `protobuf:"bytes,1,opt,name=var,proto3" json:"var,omitempty"`
	// The envvar value you want to set. Any prefixes are prepended to this
	// value. If the value is unset, prefixes will be prepended to the bot's
	// current value of this envvar (see examples)
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Paths relative to the task root to prepend to this envvar on the bot.
	// These will be resolved to absolute paths on the bot.
	Prefix []string `protobuf:"bytes,3,rep,name=prefix,proto3" json:"prefix,omitempty"`
	// If true, tasks setting this EnvVar can overwrite the value and/or the
	// prefix. Otherwise, tasks will not be permitted to to set any env var or
	// env_prefix for this var.
	//
	// This should be True for envvars you expect tasks to extend, like $PATH.
	// Note that this only affects envvar manipulation at the Swarming API
	// level; once the task is running it can (of course) manipulate the env
	// however it wants.
	Soft bool `protobuf:"varint,4,opt,name=soft,proto3" json:"soft,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskTemplate_Env) Descriptor deprecated

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

Deprecated: Use TaskTemplate_Env.ProtoReflect.Descriptor instead.

func (*TaskTemplate_Env) GetPrefix

func (x *TaskTemplate_Env) GetPrefix() []string

func (*TaskTemplate_Env) GetSoft

func (x *TaskTemplate_Env) GetSoft() bool

func (*TaskTemplate_Env) GetValue

func (x *TaskTemplate_Env) GetValue() string

func (*TaskTemplate_Env) GetVar

func (x *TaskTemplate_Env) GetVar() string

func (*TaskTemplate_Env) ProtoMessage

func (*TaskTemplate_Env) ProtoMessage()

func (*TaskTemplate_Env) ProtoReflect

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

func (*TaskTemplate_Env) Reset

func (x *TaskTemplate_Env) Reset()

func (*TaskTemplate_Env) String

func (x *TaskTemplate_Env) String() string

type TrafficMigration

type TrafficMigration struct {

	// All routes where traffic splitting is enabled.
	Routes []*TrafficMigration_Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
	// contains filtered or unexported fields
}

Configuration for Python => Go RPC servers migration.

func (*TrafficMigration) Descriptor deprecated

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

Deprecated: Use TrafficMigration.ProtoReflect.Descriptor instead.

func (*TrafficMigration) GetRoutes

func (x *TrafficMigration) GetRoutes() []*TrafficMigration_Route

func (*TrafficMigration) ProtoMessage

func (*TrafficMigration) ProtoMessage()

func (*TrafficMigration) ProtoReflect

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

func (*TrafficMigration) Reset

func (x *TrafficMigration) Reset()

func (*TrafficMigration) String

func (x *TrafficMigration) String() string

type TrafficMigration_Route

type TrafficMigration_Route struct {

	// What route to apply this config on.
	// Route keys are "/prpc/<service>/<method>".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A portion of requests (in percents) to route to the Go version.
	RouteToGoPercent int32 `protobuf:"varint,2,opt,name=route_to_go_percent,json=routeToGoPercent,proto3" json:"route_to_go_percent,omitempty"`
	// contains filtered or unexported fields
}

func (*TrafficMigration_Route) Descriptor deprecated

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

Deprecated: Use TrafficMigration_Route.ProtoReflect.Descriptor instead.

func (*TrafficMigration_Route) GetName

func (x *TrafficMigration_Route) GetName() string

func (*TrafficMigration_Route) GetRouteToGoPercent

func (x *TrafficMigration_Route) GetRouteToGoPercent() int32

func (*TrafficMigration_Route) ProtoMessage

func (*TrafficMigration_Route) ProtoMessage()

func (*TrafficMigration_Route) ProtoReflect

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

func (*TrafficMigration_Route) Reset

func (x *TrafficMigration_Route) Reset()

func (*TrafficMigration_Route) String

func (x *TrafficMigration_Route) String() string

type TrustedDelegation

type TrustedDelegation struct {

	// Email of a trusted delegatee (the one who's minting the delegation token).
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	// A list of tags to expected in the delegation token to allow the usage of
	// a pool.
	//
	// Presence of any of the specified tags are enough. The format of these tags
	// generally depends on what service is doing the delegation.
	RequireAnyOf *TrustedDelegation_TagList `protobuf:"bytes,2,opt,name=require_any_of,json=requireAnyOf,proto3" json:"require_any_of,omitempty"`
	// contains filtered or unexported fields
}

Defines a delegatee trusted to make authorization decisions for who can use a pool.

This is based on LUCI delegation protocol. Imagine an end user U calling Swarming through an intermediary service X. In this case U is a delegator and X is a delegatee. When X calls Swarming, it makes an RPC to the token server to make a delegation token that says "<X can call Swarming on behalf of U>".

This token is then sent to the Swarming with the RPC. Swarming sees that the direct peer it's talking to is X, but the call should be performed under the authority of U.

We extend this to also allow X make authorization decisions about whether U can use particular Swarming resource or not. The result of this decision is encoded in the delegation token as a set of "key:value" tags. Swarming then can treat presence of such tags as a signal that the particular call is allowed.

In this scenario we totally trust X to make the correct decision.

func (*TrustedDelegation) Descriptor deprecated

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

Deprecated: Use TrustedDelegation.ProtoReflect.Descriptor instead.

func (*TrustedDelegation) GetPeerId

func (x *TrustedDelegation) GetPeerId() string

func (*TrustedDelegation) GetRequireAnyOf

func (x *TrustedDelegation) GetRequireAnyOf() *TrustedDelegation_TagList

func (*TrustedDelegation) ProtoMessage

func (*TrustedDelegation) ProtoMessage()

func (*TrustedDelegation) ProtoReflect

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

func (*TrustedDelegation) Reset

func (x *TrustedDelegation) Reset()

func (*TrustedDelegation) String

func (x *TrustedDelegation) String() string

type TrustedDelegation_TagList

type TrustedDelegation_TagList struct {
	Tag []string `protobuf:"bytes,1,rep,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*TrustedDelegation_TagList) Descriptor deprecated

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

Deprecated: Use TrustedDelegation_TagList.ProtoReflect.Descriptor instead.

func (*TrustedDelegation_TagList) GetTag

func (x *TrustedDelegation_TagList) GetTag() []string

func (*TrustedDelegation_TagList) ProtoMessage

func (*TrustedDelegation_TagList) ProtoMessage()

func (*TrustedDelegation_TagList) ProtoReflect

func (*TrustedDelegation_TagList) Reset

func (x *TrustedDelegation_TagList) Reset()

func (*TrustedDelegation_TagList) String

func (x *TrustedDelegation_TagList) String() string

Jump to

Keyboard shortcuts

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