internalspb

package
v0.0.0-...-f2cdad0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package internalspb contains protobuf messages used internally by Swarming.

Index

Constants

View Source
const (
	Internals_ExpireSlice_FullMethodName = "/swarming.internals.rbe.Internals/ExpireSlice"
)

Variables

View Source
var (
	TaggedMessage_PayloadType_name = map[int32]string{
		0: "PAYLOAD_TYPE_UNSPECIFIED",
		1: "POLL_STATE",
		2: "BOT_SESSION",
	}
	TaggedMessage_PayloadType_value = map[string]int32{
		"PAYLOAD_TYPE_UNSPECIFIED": 0,
		"POLL_STATE":               1,
		"BOT_SESSION":              2,
	}
)

Enum value maps for TaggedMessage_PayloadType.

View Source
var (
	ExpireSliceRequest_Reason_name = map[int32]string{
		0: "REASON_UNSPECIFIED",
		1: "NO_RESOURCE",
		2: "PERMISSION_DENIED",
		3: "INVALID_ARGUMENT",
		4: "BOT_INTERNAL_ERROR",
		5: "EXPIRED",
	}
	ExpireSliceRequest_Reason_value = map[string]int32{
		"REASON_UNSPECIFIED": 0,
		"NO_RESOURCE":        1,
		"PERMISSION_DENIED":  2,
		"INVALID_ARGUMENT":   3,
		"BOT_INTERNAL_ERROR": 4,
		"EXPIRED":            5,
	}
)

Enum value maps for ExpireSliceRequest_Reason.

View Source
var File_go_chromium_org_luci_swarming_proto_internals_rbe_proto protoreflect.FileDescriptor
View Source
var Internals_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "swarming.internals.rbe.Internals",
	HandlerType: (*InternalsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ExpireSlice",
			Handler:    _Internals_ExpireSlice_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "go.chromium.org/luci/swarming/proto/internals/rbe.proto",
}

Internals_ServiceDesc is the grpc.ServiceDesc for Internals service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInternalsServer

func RegisterInternalsServer(s grpc.ServiceRegistrar, srv InternalsServer)

Types

type BotSession

type BotSession struct {

	// ID of the RBE's BotSession.
	RbeBotSessionId string `protobuf:"bytes,1,opt,name=rbe_bot_session_id,json=rbeBotSessionId,proto3" json:"rbe_bot_session_id,omitempty"`
	// Poll state extracted from the last seen validated PollState token.
	//
	// Its `expiry` should be ignored in favor of `expiry` field in BotSession.
	PollState *PollState `protobuf:"bytes,2,opt,name=poll_state,json=pollState,proto3" json:"poll_state,omitempty"`
	// Expiration time of this message. It should not be used once it expires.
	Expiry *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

BotSession carries an RBE bot session ID and the latest validated PollState.

It travels wrapped in a TaggedMessage. It is produced and verified by the Go server whenever the bot calls CreateBotSession or UpdateBotSession.

It serves two purposes:

  1. Protect the RBE bot session ID from tampering by the bot (e.g. prevents the bot from using a different bot session ID of a bot in another pool).
  2. Preserve parameters of the last known PollState (in particular auth ones) and bind the session ID to them, so even if the bot has a valid BotSession token from another bot, it won't be able to use them (because it will fail the auth check encoded in the PollState).

The original PollState token has limited expiration time and it expires if the bot doesn't refresh it by calling the polling endpoint served by the Python server. When running a long task, the bot is not polling anything and can't refresh the PollState token. But it still periodically calls UpdateBotSession to send heartbeats to RBE. This is where PollState stored in BotSession token is verified and where BotSession token is occasionally refreshed.

If a call to UpdateBotSession has both the PollState token and BotSession token (happens when a bot is polling new tasks from RBE), the information in the PollState token is used as authoritative since PollState tokens are generated by Python code based on the freshest state of bot configs. Fields pulled from such PollState token is used to update BotSession token.

func (*BotSession) Descriptor deprecated

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

Deprecated: Use BotSession.ProtoReflect.Descriptor instead.

func (*BotSession) GetExpiry

func (x *BotSession) GetExpiry() *timestamppb.Timestamp

func (*BotSession) GetPollState

func (x *BotSession) GetPollState() *PollState

func (*BotSession) GetRbeBotSessionId

func (x *BotSession) GetRbeBotSessionId() string

func (*BotSession) ProtoMessage

func (*BotSession) ProtoMessage()

func (*BotSession) ProtoReflect

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

func (*BotSession) Reset

func (x *BotSession) Reset()

func (*BotSession) String

func (x *BotSession) String() string

type CancelRBETask

type CancelRBETask struct {

	// Full RBE instance ID with the reservation, extracted from TaskRequest.
	RbeInstance string `protobuf:"bytes,1,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	// Reservation to cancel (scoped to the instance).
	ReservationId string                   `protobuf:"bytes,2,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
	DebugInfo     *CancelRBETask_DebugInfo `protobuf:"bytes,3,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// contains filtered or unexported fields
}

CancelRBETask describes payload of `rbe-cancel` TQ tasks.

It is submitted into `rbe-cancel` Cloud Tasks queue by the Python side and processed by the Go side (resulting in cancellation of an RBE reservation).

func (*CancelRBETask) Descriptor deprecated

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

Deprecated: Use CancelRBETask.ProtoReflect.Descriptor instead.

func (*CancelRBETask) GetDebugInfo

func (x *CancelRBETask) GetDebugInfo() *CancelRBETask_DebugInfo

func (*CancelRBETask) GetRbeInstance

func (x *CancelRBETask) GetRbeInstance() string

func (*CancelRBETask) GetReservationId

func (x *CancelRBETask) GetReservationId() string

func (*CancelRBETask) ProtoMessage

func (*CancelRBETask) ProtoMessage()

func (*CancelRBETask) ProtoReflect

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

func (*CancelRBETask) Reset

func (x *CancelRBETask) Reset()

func (*CancelRBETask) String

func (x *CancelRBETask) String() string

type CancelRBETask_DebugInfo

type CancelRBETask_DebugInfo struct {
	Created           *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`                                                // when this message was created
	PySwarmingVersion string                 `protobuf:"bytes,2,opt,name=py_swarming_version,json=pySwarmingVersion,proto3" json:"py_swarming_version,omitempty"` // version of the Python Swarming
	TaskName          string                 `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`                              // the user-supplied task name FYI
	// contains filtered or unexported fields
}

Optional information used for debugging and tracing purposes.

func (*CancelRBETask_DebugInfo) Descriptor deprecated

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

Deprecated: Use CancelRBETask_DebugInfo.ProtoReflect.Descriptor instead.

func (*CancelRBETask_DebugInfo) GetCreated

func (*CancelRBETask_DebugInfo) GetPySwarmingVersion

func (x *CancelRBETask_DebugInfo) GetPySwarmingVersion() string

func (*CancelRBETask_DebugInfo) GetTaskName

func (x *CancelRBETask_DebugInfo) GetTaskName() string

func (*CancelRBETask_DebugInfo) ProtoMessage

func (*CancelRBETask_DebugInfo) ProtoMessage()

func (*CancelRBETask_DebugInfo) ProtoReflect

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

func (*CancelRBETask_DebugInfo) Reset

func (x *CancelRBETask_DebugInfo) Reset()

func (*CancelRBETask_DebugInfo) String

func (x *CancelRBETask_DebugInfo) String() string

type EnqueueRBETask

type EnqueueRBETask struct {

	// Payload of the new RBE reservation. It will eventually be routed to a bot.
	Payload *TaskPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Full RBE instance ID to submit this task to, extracted from TaskRequest.
	RbeInstance string `protobuf:"bytes,2,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	// When this particular slice expires, extracted from TaskToRunShard.
	Expiry *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// A bot that should execute this slice (if any), extracted from TaskSlice.
	RequestedBotId string                       `protobuf:"bytes,4,opt,name=requested_bot_id,json=requestedBotId,proto3" json:"requested_bot_id,omitempty"`
	Constraints    []*EnqueueRBETask_Constraint `protobuf:"bytes,5,rep,name=constraints,proto3" json:"constraints,omitempty"`
	// Swarming task priority, as submitted by the client.
	Priority int32 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"`
	// Swarming scheduling algorithm, as specified in pools.cfg.
	SchedulingAlgorithm config.Pool_SchedulingAlgorithm `` /* 165-byte string literal not displayed */
	// How long the task is allowed to run once it starts on the bot.
	ExecutionTimeout *durationpb.Duration `protobuf:"bytes,8,opt,name=execution_timeout,json=executionTimeout,proto3" json:"execution_timeout,omitempty"`
	// contains filtered or unexported fields
}

EnqueueRBETask describes payload of `rbe-enqueue` TQ tasks.

It is submitted into `rbe-enqueue` Cloud Tasks queue by the Python side and processed by the Go side (resulting in a new RBE reservation on success).

func (*EnqueueRBETask) Descriptor deprecated

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

Deprecated: Use EnqueueRBETask.ProtoReflect.Descriptor instead.

func (*EnqueueRBETask) GetConstraints

func (x *EnqueueRBETask) GetConstraints() []*EnqueueRBETask_Constraint

func (*EnqueueRBETask) GetExecutionTimeout

func (x *EnqueueRBETask) GetExecutionTimeout() *durationpb.Duration

func (*EnqueueRBETask) GetExpiry

func (x *EnqueueRBETask) GetExpiry() *timestamppb.Timestamp

func (*EnqueueRBETask) GetPayload

func (x *EnqueueRBETask) GetPayload() *TaskPayload

func (*EnqueueRBETask) GetPriority

func (x *EnqueueRBETask) GetPriority() int32

func (*EnqueueRBETask) GetRbeInstance

func (x *EnqueueRBETask) GetRbeInstance() string

func (*EnqueueRBETask) GetRequestedBotId

func (x *EnqueueRBETask) GetRequestedBotId() string

func (*EnqueueRBETask) GetSchedulingAlgorithm

func (x *EnqueueRBETask) GetSchedulingAlgorithm() config.Pool_SchedulingAlgorithm

func (*EnqueueRBETask) ProtoMessage

func (*EnqueueRBETask) ProtoMessage()

func (*EnqueueRBETask) ProtoReflect

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

func (*EnqueueRBETask) Reset

func (x *EnqueueRBETask) Reset()

func (*EnqueueRBETask) String

func (x *EnqueueRBETask) String() string

type EnqueueRBETask_Constraint

type EnqueueRBETask_Constraint struct {

	// The dimension key e.g. "python_version".
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Allowed dimension values to satisfy the constraint, e.g. ["3.8", "3.9"].
	AllowedValues []string `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
	// contains filtered or unexported fields
}

Constraints on dimensions reported by a matching bot (ANDed together).

func (*EnqueueRBETask_Constraint) Descriptor deprecated

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

Deprecated: Use EnqueueRBETask_Constraint.ProtoReflect.Descriptor instead.

func (*EnqueueRBETask_Constraint) GetAllowedValues

func (x *EnqueueRBETask_Constraint) GetAllowedValues() []string

func (*EnqueueRBETask_Constraint) GetKey

func (x *EnqueueRBETask_Constraint) GetKey() string

func (*EnqueueRBETask_Constraint) ProtoMessage

func (*EnqueueRBETask_Constraint) ProtoMessage()

func (*EnqueueRBETask_Constraint) ProtoReflect

func (*EnqueueRBETask_Constraint) Reset

func (x *EnqueueRBETask_Constraint) Reset()

func (*EnqueueRBETask_Constraint) String

func (x *EnqueueRBETask_Constraint) String() string

type ExpireSliceRequest

type ExpireSliceRequest struct {

	// Swarming task ID (aka TaskResultSummary packed id), identifies TaskRequest.
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Shard index of TaskToRunShardXXX entity class.
	TaskToRunShard int32 `protobuf:"varint,2,opt,name=task_to_run_shard,json=taskToRunShard,proto3" json:"task_to_run_shard,omitempty"`
	// Datastore ID of TaskToRunShardXXX entity (a child of the TaskRequest).
	TaskToRunId int64                     `protobuf:"varint,3,opt,name=task_to_run_id,json=taskToRunId,proto3" json:"task_to_run_id,omitempty"`
	Reason      ExpireSliceRequest_Reason `protobuf:"varint,4,opt,name=reason,proto3,enum=swarming.internals.rbe.ExpireSliceRequest_Reason" json:"reason,omitempty"`
	Details     string                    `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

Body of ExpireSlice internal RPC call.

It identifies a concrete TaskToRunShardXXX entity and the reason it has expired.

func (*ExpireSliceRequest) Descriptor deprecated

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

Deprecated: Use ExpireSliceRequest.ProtoReflect.Descriptor instead.

func (*ExpireSliceRequest) GetDetails

func (x *ExpireSliceRequest) GetDetails() string

func (*ExpireSliceRequest) GetReason

func (*ExpireSliceRequest) GetTaskId

func (x *ExpireSliceRequest) GetTaskId() string

func (*ExpireSliceRequest) GetTaskToRunId

func (x *ExpireSliceRequest) GetTaskToRunId() int64

func (*ExpireSliceRequest) GetTaskToRunShard

func (x *ExpireSliceRequest) GetTaskToRunShard() int32

func (*ExpireSliceRequest) ProtoMessage

func (*ExpireSliceRequest) ProtoMessage()

func (*ExpireSliceRequest) ProtoReflect

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

func (*ExpireSliceRequest) Reset

func (x *ExpireSliceRequest) Reset()

func (*ExpireSliceRequest) String

func (x *ExpireSliceRequest) String() string

type ExpireSliceRequest_Reason

type ExpireSliceRequest_Reason int32

The reason the slice is marked as expired.

const (
	ExpireSliceRequest_REASON_UNSPECIFIED ExpireSliceRequest_Reason = 0
	ExpireSliceRequest_NO_RESOURCE        ExpireSliceRequest_Reason = 1 // no bots alive that match the requested dimensions
	ExpireSliceRequest_PERMISSION_DENIED  ExpireSliceRequest_Reason = 2 // no access to the RBE instance
	ExpireSliceRequest_INVALID_ARGUMENT   ExpireSliceRequest_Reason = 3 // RBE didn't like something about the reservation
	ExpireSliceRequest_BOT_INTERNAL_ERROR ExpireSliceRequest_Reason = 4 // the bot picked up the reservation and then died
	ExpireSliceRequest_EXPIRED            ExpireSliceRequest_Reason = 5 // the scheduling deadline exceeded
)

func (ExpireSliceRequest_Reason) Descriptor

func (ExpireSliceRequest_Reason) Enum

func (ExpireSliceRequest_Reason) EnumDescriptor deprecated

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

Deprecated: Use ExpireSliceRequest_Reason.Descriptor instead.

func (ExpireSliceRequest_Reason) Number

func (ExpireSliceRequest_Reason) String

func (x ExpireSliceRequest_Reason) String() string

func (ExpireSliceRequest_Reason) Type

type InternalsClient

type InternalsClient interface {
	// Marks the slice as expired or failed, switches the task to the next slice.
	//
	// Does nothing (and succeeds) if the slice is no longer pending or doesn't
	// exist.
	ExpireSlice(ctx context.Context, in *ExpireSliceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

InternalsClient is the client API for Internals service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

This service is exposed by the Python Swarming, called by the Go Swarming.

All RPCs are internal to the Swarming backend.

func NewInternalsClient

func NewInternalsClient(cc grpc.ClientConnInterface) InternalsClient

type InternalsServer

type InternalsServer interface {
	// Marks the slice as expired or failed, switches the task to the next slice.
	//
	// Does nothing (and succeeds) if the slice is no longer pending or doesn't
	// exist.
	ExpireSlice(context.Context, *ExpireSliceRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

InternalsServer is the server API for Internals service. All implementations must embed UnimplementedInternalsServer for forward compatibility.

This service is exposed by the Python Swarming, called by the Go Swarming.

All RPCs are internal to the Swarming backend.

type PollState

type PollState struct {

	// Unique ID of this message (primary to correlate logs that use it).
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Expiration time of this message. It should not be used once it expires.
	Expiry *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// Full RBE instance name to use.
	RbeInstance        string                 `protobuf:"bytes,3,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	EnforcedDimensions []*PollState_Dimension `protobuf:"bytes,4,rep,name=enforced_dimensions,json=enforcedDimensions,proto3" json:"enforced_dimensions,omitempty"`
	DebugInfo          *PollState_DebugInfo   `protobuf:"bytes,5,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// If set, the bot should be in the corresponding IP allowlist (in addition
	// to the primary auth check described by auth_method). Always set if
	// auth_method is IPAllowlistAuth.
	IpAllowlist string `protobuf:"bytes,10,opt,name=ip_allowlist,json=ipAllowlist,proto3" json:"ip_allowlist,omitempty"`
	// Describes how to authenticate the bot. See swarming.config.BotAuth.
	//
	// Must be set.
	//
	// Types that are assignable to AuthMethod:
	//
	//	*PollState_GceAuth
	//	*PollState_ServiceAccountAuth_
	//	*PollState_LuciMachineTokenAuth
	//	*PollState_IpAllowlistAuth
	AuthMethod isPollState_AuthMethod `protobuf_oneof:"auth_method"`
	// contains filtered or unexported fields
}

PollState is produced by the Python server and passed to the Go server.

It travels wrapped in a TaggedMessage. Once the HMAC tag is verified, the Go server can trust that this message was generated by the Python server and was not tampered with.

It is generated by "/bot/poll" endpoint for bots in the RBE mode. Such bots then pass it to the "/bot/rbe/..." endpoints. It contains RBE-related parameters for this particular bot produced based on the bot credentials and Python server configs.

It also contains instructions how to authenticate the bot on the Go side. They are derived based on how the Python server authenticated this particular bot. They are tightly coupled to swarming.config.BotAuth message.

Once the Go server verifies the HMAC tag, and checks that the bot presented the exact same credentials as used by the Python side, the Go side can trust that this message was not tampered with and was not "substituted" (i.e. taken from one bot and replayed on another).

func (*PollState) Descriptor deprecated

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

Deprecated: Use PollState.ProtoReflect.Descriptor instead.

func (*PollState) GetAuthMethod

func (m *PollState) GetAuthMethod() isPollState_AuthMethod

func (*PollState) GetDebugInfo

func (x *PollState) GetDebugInfo() *PollState_DebugInfo

func (*PollState) GetEnforcedDimensions

func (x *PollState) GetEnforcedDimensions() []*PollState_Dimension

func (*PollState) GetExpiry

func (x *PollState) GetExpiry() *timestamppb.Timestamp

func (*PollState) GetGceAuth

func (x *PollState) GetGceAuth() *PollState_GCEAuth

func (*PollState) GetId

func (x *PollState) GetId() string

func (*PollState) GetIpAllowlist

func (x *PollState) GetIpAllowlist() string

func (*PollState) GetIpAllowlistAuth

func (x *PollState) GetIpAllowlistAuth() *PollState_IPAllowlistAuth

func (*PollState) GetLuciMachineTokenAuth

func (x *PollState) GetLuciMachineTokenAuth() *PollState_LUCIMachineTokenAuth

func (*PollState) GetRbeInstance

func (x *PollState) GetRbeInstance() string

func (*PollState) GetServiceAccountAuth

func (x *PollState) GetServiceAccountAuth() *PollState_ServiceAccountAuth

func (*PollState) ProtoMessage

func (*PollState) ProtoMessage()

func (*PollState) ProtoReflect

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

func (*PollState) Reset

func (x *PollState) Reset()

func (*PollState) String

func (x *PollState) String() string

type PollState_DebugInfo

type PollState_DebugInfo struct {
	Created         *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`                                        // when this message was created
	SwarmingVersion string                 `protobuf:"bytes,2,opt,name=swarming_version,json=swarmingVersion,proto3" json:"swarming_version,omitempty"` // version of the Swarming code
	RequestId       string                 `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`                   // ID of the "/bot/poll" request
	// contains filtered or unexported fields
}

Information for logs and debugging (not passed to RBE).

func (*PollState_DebugInfo) Descriptor deprecated

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

Deprecated: Use PollState_DebugInfo.ProtoReflect.Descriptor instead.

func (*PollState_DebugInfo) GetCreated

func (x *PollState_DebugInfo) GetCreated() *timestamppb.Timestamp

func (*PollState_DebugInfo) GetRequestId

func (x *PollState_DebugInfo) GetRequestId() string

func (*PollState_DebugInfo) GetSwarmingVersion

func (x *PollState_DebugInfo) GetSwarmingVersion() string

func (*PollState_DebugInfo) ProtoMessage

func (*PollState_DebugInfo) ProtoMessage()

func (*PollState_DebugInfo) ProtoReflect

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

func (*PollState_DebugInfo) Reset

func (x *PollState_DebugInfo) Reset()

func (*PollState_DebugInfo) String

func (x *PollState_DebugInfo) String() string

type PollState_Dimension

type PollState_Dimension struct {
	Key    string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

Override these particular dimensions when contacting RBE.

These values will be used instead of whatever the bot is reporting. This is used for security-sensitive dimensions like `id` and `pool`.

`id` is always populated and has a single value matching the bot ID.

func (*PollState_Dimension) Descriptor deprecated

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

Deprecated: Use PollState_Dimension.ProtoReflect.Descriptor instead.

func (*PollState_Dimension) GetKey

func (x *PollState_Dimension) GetKey() string

func (*PollState_Dimension) GetValues

func (x *PollState_Dimension) GetValues() []string

func (*PollState_Dimension) ProtoMessage

func (*PollState_Dimension) ProtoMessage()

func (*PollState_Dimension) ProtoReflect

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

func (*PollState_Dimension) Reset

func (x *PollState_Dimension) Reset()

func (*PollState_Dimension) String

func (x *PollState_Dimension) String() string

type PollState_GCEAuth

type PollState_GCEAuth struct {
	GceProject  string `protobuf:"bytes,1,opt,name=gce_project,json=gceProject,proto3" json:"gce_project,omitempty"`
	GceInstance string `protobuf:"bytes,2,opt,name=gce_instance,json=gceInstance,proto3" json:"gce_instance,omitempty"`
	// contains filtered or unexported fields
}

If set, use `X-Luci-Gce-Vm-Token` header for auth.

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 `gce_project`.
  • google.compute_engine.instance_name matches `gce_instance`.

func (*PollState_GCEAuth) Descriptor deprecated

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

Deprecated: Use PollState_GCEAuth.ProtoReflect.Descriptor instead.

func (*PollState_GCEAuth) GetGceInstance

func (x *PollState_GCEAuth) GetGceInstance() string

func (*PollState_GCEAuth) GetGceProject

func (x *PollState_GCEAuth) GetGceProject() string

func (*PollState_GCEAuth) ProtoMessage

func (*PollState_GCEAuth) ProtoMessage()

func (*PollState_GCEAuth) ProtoReflect

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

func (*PollState_GCEAuth) Reset

func (x *PollState_GCEAuth) Reset()

func (*PollState_GCEAuth) String

func (x *PollState_GCEAuth) String() string

type PollState_GceAuth

type PollState_GceAuth struct {
	GceAuth *PollState_GCEAuth `protobuf:"bytes,11,opt,name=gce_auth,json=gceAuth,proto3,oneof"`
}

type PollState_IPAllowlistAuth

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

If set, use only `ip_allowlist` field for auth (see below).

func (*PollState_IPAllowlistAuth) Descriptor deprecated

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

Deprecated: Use PollState_IPAllowlistAuth.ProtoReflect.Descriptor instead.

func (*PollState_IPAllowlistAuth) ProtoMessage

func (*PollState_IPAllowlistAuth) ProtoMessage()

func (*PollState_IPAllowlistAuth) ProtoReflect

func (*PollState_IPAllowlistAuth) Reset

func (x *PollState_IPAllowlistAuth) Reset()

func (*PollState_IPAllowlistAuth) String

func (x *PollState_IPAllowlistAuth) String() string

type PollState_IpAllowlistAuth

type PollState_IpAllowlistAuth struct {
	IpAllowlistAuth *PollState_IPAllowlistAuth `protobuf:"bytes,14,opt,name=ip_allowlist_auth,json=ipAllowlistAuth,proto3,oneof"`
}

type PollState_LUCIMachineTokenAuth

type PollState_LUCIMachineTokenAuth struct {
	MachineFqdn string `protobuf:"bytes,1,opt,name=machine_fqdn,json=machineFqdn,proto3" json:"machine_fqdn,omitempty"`
	// contains filtered or unexported fields
}

If set, use `X-Luci-Machine-Token` header with LUCI machine token.

The token should have the corresponding FQDN in it.

func (*PollState_LUCIMachineTokenAuth) Descriptor deprecated

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

Deprecated: Use PollState_LUCIMachineTokenAuth.ProtoReflect.Descriptor instead.

func (*PollState_LUCIMachineTokenAuth) GetMachineFqdn

func (x *PollState_LUCIMachineTokenAuth) GetMachineFqdn() string

func (*PollState_LUCIMachineTokenAuth) ProtoMessage

func (*PollState_LUCIMachineTokenAuth) ProtoMessage()

func (*PollState_LUCIMachineTokenAuth) ProtoReflect

func (*PollState_LUCIMachineTokenAuth) Reset

func (x *PollState_LUCIMachineTokenAuth) Reset()

func (*PollState_LUCIMachineTokenAuth) String

type PollState_LuciMachineTokenAuth

type PollState_LuciMachineTokenAuth struct {
	LuciMachineTokenAuth *PollState_LUCIMachineTokenAuth `protobuf:"bytes,13,opt,name=luci_machine_token_auth,json=luciMachineTokenAuth,proto3,oneof"`
}

type PollState_ServiceAccountAuth

type PollState_ServiceAccountAuth struct {
	ServiceAccount string `protobuf:"bytes,1,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`
	// contains filtered or unexported fields
}

If set, use `Authorization` header with OAuth2 access tokens for auth.

The token should have "https://www.googleapis.com/auth/userinfo.email" scope and belong to the given service account.

func (*PollState_ServiceAccountAuth) Descriptor deprecated

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

Deprecated: Use PollState_ServiceAccountAuth.ProtoReflect.Descriptor instead.

func (*PollState_ServiceAccountAuth) GetServiceAccount

func (x *PollState_ServiceAccountAuth) GetServiceAccount() string

func (*PollState_ServiceAccountAuth) ProtoMessage

func (*PollState_ServiceAccountAuth) ProtoMessage()

func (*PollState_ServiceAccountAuth) ProtoReflect

func (*PollState_ServiceAccountAuth) Reset

func (x *PollState_ServiceAccountAuth) Reset()

func (*PollState_ServiceAccountAuth) String

type PollState_ServiceAccountAuth_

type PollState_ServiceAccountAuth_ struct {
	ServiceAccountAuth *PollState_ServiceAccountAuth `protobuf:"bytes,12,opt,name=service_account_auth,json=serviceAccountAuth,proto3,oneof"`
}

type TaggedMessage

type TaggedMessage struct {
	PayloadType TaggedMessage_PayloadType `` // identifies the payload proto message type
	/* 149-byte string literal not displayed */
	Payload    []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`                         // the serialized payload proto message
	HmacSha256 []byte `protobuf:"bytes,3,opt,name=hmac_sha256,json=hmacSha256,proto3" json:"hmac_sha256,omitempty"` // HMAC of the payload, see the comment above
	// contains filtered or unexported fields
}

TaggedMessage is an envelope for an HMAC-tagged protobuf message.

A secret key that was used for tagging should be communicated off band (e.g. stored in some pre-agreed Google Secret Manager secret).

hmac_sha256 is calculated as:

hmac_sha256("%d" % payload_type + "\n" + payload, secret_key).

func (*TaggedMessage) Descriptor deprecated

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

Deprecated: Use TaggedMessage.ProtoReflect.Descriptor instead.

func (*TaggedMessage) GetHmacSha256

func (x *TaggedMessage) GetHmacSha256() []byte

func (*TaggedMessage) GetPayload

func (x *TaggedMessage) GetPayload() []byte

func (*TaggedMessage) GetPayloadType

func (x *TaggedMessage) GetPayloadType() TaggedMessage_PayloadType

func (*TaggedMessage) ProtoMessage

func (*TaggedMessage) ProtoMessage()

func (*TaggedMessage) ProtoReflect

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

func (*TaggedMessage) Reset

func (x *TaggedMessage) Reset()

func (*TaggedMessage) String

func (x *TaggedMessage) String() string

type TaggedMessage_PayloadType

type TaggedMessage_PayloadType int32
const (
	TaggedMessage_PAYLOAD_TYPE_UNSPECIFIED TaggedMessage_PayloadType = 0
	TaggedMessage_POLL_STATE               TaggedMessage_PayloadType = 1 // payload is wirepb-serialized PollState
	TaggedMessage_BOT_SESSION              TaggedMessage_PayloadType = 2 // payload is wirepb-serialized BotSession
)

func (TaggedMessage_PayloadType) Descriptor

func (TaggedMessage_PayloadType) Enum

func (TaggedMessage_PayloadType) EnumDescriptor deprecated

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

Deprecated: Use TaggedMessage_PayloadType.Descriptor instead.

func (TaggedMessage_PayloadType) Number

func (TaggedMessage_PayloadType) String

func (x TaggedMessage_PayloadType) String() string

func (TaggedMessage_PayloadType) Type

type TaskPayload

type TaskPayload struct {

	// Unique (within the RBE instance) ID of the reservation, for idempotency.
	ReservationId string `protobuf:"bytes,1,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
	// Swarming task ID (aka TaskResultSummary packed id), identifies TaskRequest.
	TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Task slice index (mostly FYI).
	SliceIndex int32 `protobuf:"varint,3,opt,name=slice_index,json=sliceIndex,proto3" json:"slice_index,omitempty"`
	// Shard index of TaskToRunShardXXX entity class.
	TaskToRunShard int32 `protobuf:"varint,4,opt,name=task_to_run_shard,json=taskToRunShard,proto3" json:"task_to_run_shard,omitempty"`
	// Datastore ID of TaskToRunShardXXX entity (a child of the TaskRequest).
	TaskToRunId int64                  `protobuf:"varint,5,opt,name=task_to_run_id,json=taskToRunId,proto3" json:"task_to_run_id,omitempty"`
	DebugInfo   *TaskPayload_DebugInfo `protobuf:"bytes,6,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// If true, the bot should not contact Python Swarming, don't execute
	// anything, just immediately move the reservation into COMPLETED state.
	//
	// This is useful during initial development to test RBE task distribution
	// mechanism in isolation from other Swarming guts.
	Noop bool `protobuf:"varint,7,opt,name=noop,proto3" json:"noop,omitempty"`
	// contains filtered or unexported fields
}

TaskPayload is used as an RBE task payload.

It is serialized as anypb.Any when passed to RBE, and its full proto name is thus sensitive.

It points to an existing TaskToRunShardXXX entity representing the pending request to execute a single task slice plus some extra information useful for debugging.

It also contains the name of the RBE reservation that will be created to represent this task.

func (*TaskPayload) Descriptor deprecated

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

Deprecated: Use TaskPayload.ProtoReflect.Descriptor instead.

func (*TaskPayload) GetDebugInfo

func (x *TaskPayload) GetDebugInfo() *TaskPayload_DebugInfo

func (*TaskPayload) GetNoop

func (x *TaskPayload) GetNoop() bool

func (*TaskPayload) GetReservationId

func (x *TaskPayload) GetReservationId() string

func (*TaskPayload) GetSliceIndex

func (x *TaskPayload) GetSliceIndex() int32

func (*TaskPayload) GetTaskId

func (x *TaskPayload) GetTaskId() string

func (*TaskPayload) GetTaskToRunId

func (x *TaskPayload) GetTaskToRunId() int64

func (*TaskPayload) GetTaskToRunShard

func (x *TaskPayload) GetTaskToRunShard() int32

func (*TaskPayload) ProtoMessage

func (*TaskPayload) ProtoMessage()

func (*TaskPayload) ProtoReflect

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

func (*TaskPayload) Reset

func (x *TaskPayload) Reset()

func (*TaskPayload) String

func (x *TaskPayload) String() string

type TaskPayload_DebugInfo

type TaskPayload_DebugInfo struct {
	Created           *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`                                                // when this message was created
	PySwarmingVersion string                 `protobuf:"bytes,2,opt,name=py_swarming_version,json=pySwarmingVersion,proto3" json:"py_swarming_version,omitempty"` // version of the Python Swarming
	GoSwarmingVersion string                 `protobuf:"bytes,3,opt,name=go_swarming_version,json=goSwarmingVersion,proto3" json:"go_swarming_version,omitempty"` // version of the Go Swarming
	TaskName          string                 `protobuf:"bytes,4,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`                              // the user-supplied task name FYI
	// contains filtered or unexported fields
}

Optional information used for debugging and tracing purposes.

func (*TaskPayload_DebugInfo) Descriptor deprecated

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

Deprecated: Use TaskPayload_DebugInfo.ProtoReflect.Descriptor instead.

func (*TaskPayload_DebugInfo) GetCreated

func (x *TaskPayload_DebugInfo) GetCreated() *timestamppb.Timestamp

func (*TaskPayload_DebugInfo) GetGoSwarmingVersion

func (x *TaskPayload_DebugInfo) GetGoSwarmingVersion() string

func (*TaskPayload_DebugInfo) GetPySwarmingVersion

func (x *TaskPayload_DebugInfo) GetPySwarmingVersion() string

func (*TaskPayload_DebugInfo) GetTaskName

func (x *TaskPayload_DebugInfo) GetTaskName() string

func (*TaskPayload_DebugInfo) ProtoMessage

func (*TaskPayload_DebugInfo) ProtoMessage()

func (*TaskPayload_DebugInfo) ProtoReflect

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

func (*TaskPayload_DebugInfo) Reset

func (x *TaskPayload_DebugInfo) Reset()

func (*TaskPayload_DebugInfo) String

func (x *TaskPayload_DebugInfo) String() string

type TaskResult

type TaskResult struct {

	// Set to a human readable string if the bot legitimately skipped executing
	// the reservation e.g. because it was already claimed. Used for debugging
	// only.
	SkipReason string `protobuf:"bytes,1,opt,name=skip_reason,json=skipReason,proto3" json:"skip_reason,omitempty"`
	// Set if the bot picked up the reservation, but could not work on it and
	// gave up. This usually happens if the bot can't claim the TaskToRun after
	// many attempts. This is an internal Swarming error and it results in the
	// task failing with BOT_DIED error.
	BotInternalError string `protobuf:"bytes,2,opt,name=bot_internal_error,json=botInternalError,proto3" json:"bot_internal_error,omitempty"`
	// contains filtered or unexported fields
}

TaskResult is used as an RBE task result.

TaskResult represents an outcome of a reservation that was processed by a bot (successfully or not). If a bot never saw the reservation, or crashed midway, TaskResult is not available. There's more generic Reservation.status field for these cases in the RBE API.

TaskResult is serialized into anypb.Any when passed to RBE, and its full proto name is thus sensitive.

Note that the corresponding TaskPayload is available in the same RBE Reservation proto that contains TaskResult, so TaskPayload fields are not duplicated in the TaskResult.

func (*TaskResult) Descriptor deprecated

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

Deprecated: Use TaskResult.ProtoReflect.Descriptor instead.

func (*TaskResult) GetBotInternalError

func (x *TaskResult) GetBotInternalError() string

func (*TaskResult) GetSkipReason

func (x *TaskResult) GetSkipReason() string

func (*TaskResult) ProtoMessage

func (*TaskResult) ProtoMessage()

func (*TaskResult) ProtoReflect

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

func (*TaskResult) Reset

func (x *TaskResult) Reset()

func (*TaskResult) String

func (x *TaskResult) String() string

type UnimplementedInternalsServer

type UnimplementedInternalsServer struct{}

UnimplementedInternalsServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedInternalsServer) ExpireSlice

type UnsafeInternalsServer

type UnsafeInternalsServer interface {
	// contains filtered or unexported methods
}

UnsafeInternalsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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