diff --git a/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go b/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go index afd8c2c42f..32d8450635 100644 --- a/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go +++ b/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go @@ -71,9 +71,7 @@ func (Port_TransportProtocol) EnumDescriptor() ([]byte, []int) { } // ============================================================================================== -// -// Shared Objects (Used By Multiple Endpoints) -// +// Shared Objects (Used By Multiple Endpoints) // ============================================================================================== type Port struct { state protoimpl.MessageState @@ -155,9 +153,7 @@ type ServiceInfo struct { // NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info MaybePublicIpAddr string `protobuf:"bytes,4,opt,name=maybe_public_ip_addr,json=maybePublicIpAddr,proto3" json:"maybe_public_ip_addr,omitempty"` // Mapping defining the ports that the service can be reached at *outside* the enclave, in the user_defined_port_id -> port_info where user_defined_port_id - // - // corresponds to the ID that was passed in in StartServiceArgs - // + // corresponds to the ID that was passed in in StartServiceArgs // NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info MaybePublicPorts map[string]*Port `protobuf:"bytes,5,rep,name=maybe_public_ports,json=maybePublicPorts,proto3" json:"maybe_public_ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Name of the service @@ -255,7 +251,7 @@ type ServiceConfig struct { ContainerImageName string `protobuf:"bytes,1,opt,name=container_image_name,json=containerImageName,proto3" json:"container_image_name,omitempty"` // Definition of the ports *inside* the enclave that the container should have exposed, specified as user_friendly_port_id -> port_definition PrivatePorts map[string]*Port `protobuf:"bytes,2,rep,name=private_ports,json=privatePorts,proto3" json:"private_ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution + //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution PublicPorts map[string]*Port `protobuf:"bytes,3,rep,name=public_ports,json=publicPorts,proto3" json:"public_ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Corresponds to a Dockerfile's ENTRYPOINT directive; leave blank to do no overriding EntrypointArgs []string `protobuf:"bytes,4,rep,name=entrypoint_args,json=entrypointArgs,proto3" json:"entrypoint_args,omitempty"` @@ -436,9 +432,7 @@ func (x *UpdateServiceConfig) GetSubnetwork() string { } // ============================================================================================== -// -// Execute Starlark Arguments -// +// Execute Starlark Arguments // ============================================================================================== type RunStarlarkScriptArgs struct { state protoimpl.MessageState @@ -523,7 +517,6 @@ type RunStarlarkPackageArgs struct { // This should be a valid JSON string // // Types that are assignable to StarlarkPackageContent: - // // *RunStarlarkPackageArgs_Local // *RunStarlarkPackageArgs_Remote StarlarkPackageContent isRunStarlarkPackageArgs_StarlarkPackageContent `protobuf_oneof:"starlark_package_content"` @@ -632,9 +625,7 @@ func (*RunStarlarkPackageArgs_Local) isRunStarlarkPackageArgs_StarlarkPackageCon func (*RunStarlarkPackageArgs_Remote) isRunStarlarkPackageArgs_StarlarkPackageContent() {} // ============================================================================================== -// -// Starlark Execution Response -// +// Starlark Execution Response // ============================================================================================== type StarlarkRunResponseLine struct { state protoimpl.MessageState @@ -642,7 +633,6 @@ type StarlarkRunResponseLine struct { unknownFields protoimpl.UnknownFields // Types that are assignable to RunResponseLine: - // // *StarlarkRunResponseLine_Instruction // *StarlarkRunResponseLine_Error // *StarlarkRunResponseLine_ProgressInfo @@ -1009,7 +999,6 @@ type StarlarkError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *StarlarkError_InterpretationError // *StarlarkError_ValidationError // *StarlarkError_ExecutionError @@ -1358,9 +1347,7 @@ func (x *StarlarkRunFinishedEvent) GetSerializedOutput() string { } // ============================================================================================== -// -// Start Service -// +// Start Service // ============================================================================================== type StartServicesArgs struct { state protoimpl.MessageState @@ -1467,9 +1454,7 @@ func (x *StartServicesResponse) GetFailedServiceNameToError() map[string]string } // ============================================================================================== -// -// Get Services -// +// Get Services // ============================================================================================== type GetServicesArgs struct { state protoimpl.MessageState @@ -1683,9 +1668,7 @@ func (x *GetExistingAndHistoricalServiceIdentifiersResponse) GetAllIdentifiers() } // ============================================================================================== -// -// Remove Service -// +// Remove Service // ============================================================================================== type RemoveServiceArgs struct { state protoimpl.MessageState @@ -1783,9 +1766,7 @@ func (x *RemoveServiceResponse) GetServiceUuid() string { } // ============================================================================================== -// -// Repartition -// +// Repartition // ============================================================================================== type RepartitionArgs struct { state protoimpl.MessageState @@ -1797,8 +1778,7 @@ type RepartitionArgs struct { // Definition of partitionIdA -> partitionIdB -> information defining the connection between A <-> B PartitionConnections map[string]*PartitionConnections `protobuf:"bytes,2,rep,name=partition_connections,json=partitionConnections,proto3" json:"partition_connections,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Information about the default inter-partition connection to set up if one is not defined in the - // - // partition connections map + // partition connections map DefaultConnection *PartitionConnectionInfo `protobuf:"bytes,3,opt,name=default_connection,json=defaultConnection,proto3" json:"default_connection,omitempty"` } @@ -1999,9 +1979,7 @@ func (x *PartitionConnectionInfo) GetPacketLossPercentage() float32 { } // ============================================================================================== -// -// Exec Command -// +// Exec Command // ============================================================================================== type ExecCommandArgs struct { state protoimpl.MessageState @@ -2060,9 +2038,7 @@ func (x *ExecCommandArgs) GetCommandArgs() []string { } // ============================================================================================== -// -// Pause/Unpause Service -// +// Pause/Unpause Service // ============================================================================================== type PauseServiceArgs struct { state protoimpl.MessageState @@ -2217,28 +2193,26 @@ func (x *ExecCommandResponse) GetLogOutput() string { } // ============================================================================================== -// -// Wait For HTTP Get Endpoint Availability -// +// Wait For HTTP Get Endpoint Availability // ============================================================================================== type WaitForHttpGetEndpointAvailabilityArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The identifier of the service to check. + //The identifier of the service to check. ServiceIdentifier string `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` - // The port of the service to check. For instance 8080 + //The port of the service to check. For instance 8080 Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - // The path of the service to check. It mustn't start with the first slash. For instance `service/health` + //The path of the service to check. It mustn't start with the first slash. For instance `service/health` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - // The number of milliseconds to wait until executing the first HTTP call + //The number of milliseconds to wait until executing the first HTTP call InitialDelayMilliseconds uint32 `protobuf:"varint,4,opt,name=initial_delay_milliseconds,json=initialDelayMilliseconds,proto3" json:"initial_delay_milliseconds,omitempty"` - // Max number of HTTP call attempts that this will execute until giving up and returning an error + //Max number of HTTP call attempts that this will execute until giving up and returning an error Retries uint32 `protobuf:"varint,5,opt,name=retries,proto3" json:"retries,omitempty"` - // Number of milliseconds to wait between retries + //Number of milliseconds to wait between retries RetriesDelayMilliseconds uint32 `protobuf:"varint,6,opt,name=retries_delay_milliseconds,json=retriesDelayMilliseconds,proto3" json:"retries_delay_milliseconds,omitempty"` - // If the endpoint returns this value, the service will be marked as available (e.g. Hello World). + //If the endpoint returns this value, the service will be marked as available (e.g. Hello World). BodyText string `protobuf:"bytes,7,opt,name=body_text,json=bodyText,proto3" json:"body_text,omitempty"` } @@ -2324,30 +2298,28 @@ func (x *WaitForHttpGetEndpointAvailabilityArgs) GetBodyText() string { } // ============================================================================================== -// -// Wait For HTTP Post Endpoint Availability -// +// Wait For HTTP Post Endpoint Availability // ============================================================================================== type WaitForHttpPostEndpointAvailabilityArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The identifier of the service to check. + //The identifier of the service to check. ServiceIdentifier string `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` - // The port of the service to check. For instance 8080 + //The port of the service to check. For instance 8080 Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - // The path of the service to check. It mustn't start with the first slash. For instance `service/health` + //The path of the service to check. It mustn't start with the first slash. For instance `service/health` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - // The content of the request body. + //The content of the request body. RequestBody string `protobuf:"bytes,4,opt,name=request_body,json=requestBody,proto3" json:"request_body,omitempty"` - // The number of milliseconds to wait until executing the first HTTP call + //The number of milliseconds to wait until executing the first HTTP call InitialDelayMilliseconds uint32 `protobuf:"varint,5,opt,name=initial_delay_milliseconds,json=initialDelayMilliseconds,proto3" json:"initial_delay_milliseconds,omitempty"` - // Max number of HTTP call attempts that this will execute until giving up and returning an error + //Max number of HTTP call attempts that this will execute until giving up and returning an error Retries uint32 `protobuf:"varint,6,opt,name=retries,proto3" json:"retries,omitempty"` - // Number of milliseconds to wait between retries + //Number of milliseconds to wait between retries RetriesDelayMilliseconds uint32 `protobuf:"varint,7,opt,name=retries_delay_milliseconds,json=retriesDelayMilliseconds,proto3" json:"retries_delay_milliseconds,omitempty"` - // If the endpoint returns this value, the service will be marked as available (e.g. Hello World). + //If the endpoint returns this value, the service will be marked as available (e.g. Hello World). BodyText string `protobuf:"bytes,8,opt,name=body_text,json=bodyText,proto3" json:"body_text,omitempty"` } @@ -2440,9 +2412,7 @@ func (x *WaitForHttpPostEndpointAvailabilityArgs) GetBodyText() string { } // ============================================================================================== -// -// Upload Files Artifact -// +// Upload Files Artifact // ============================================================================================== type UploadFilesArtifactArgs struct { state protoimpl.MessageState @@ -2508,6 +2478,8 @@ type UploadFilesArtifactResponse struct { // UUID of the files artifact, for use when referencing it in the future Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + // UUID of the files artifact, for use when referencing it in the future + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` } func (x *UploadFilesArtifactResponse) Reset() { @@ -2549,10 +2521,15 @@ func (x *UploadFilesArtifactResponse) GetUuid() string { return "" } +func (x *UploadFilesArtifactResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + // ============================================================================================== -// -// Download Files Artifact -// +// Download Files Artifact // ============================================================================================== type DownloadFilesArtifactArgs struct { state protoimpl.MessageState @@ -2651,9 +2628,7 @@ func (x *DownloadFilesArtifactResponse) GetData() []byte { } // ============================================================================================== -// -// Store Web Files Artifact -// +// Store Web Files Artifact // ============================================================================================== type StoreWebFilesArtifactArgs struct { state protoimpl.MessageState @@ -3543,199 +3518,200 @@ var file_api_container_service_proto_rawDesc = []byte{ 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x1b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x22, 0x3b, 0x0a, 0x19, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1e, 0x0a, - 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x33, 0x0a, - 0x1d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x41, 0x0a, 0x19, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, - 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x21, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x25, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, - 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, - 0x64, 0x22, 0xf6, 0x03, 0x0a, 0x22, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0xc5, 0x01, 0x0a, 0x2e, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x62, 0x79, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x65, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x63, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, - 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x28, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x4f, 0x0a, 0x0f, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x73, 0x5f, 0x6a, - 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x41, - 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x1a, 0xa2, 0x01, 0x0a, 0x2d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, - 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x5b, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x2e, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x26, 0x52, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x32, 0x82, 0x0f, 0x0a, 0x13, 0x41, 0x70, 0x69, - 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x6d, 0x0a, 0x11, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, - 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, - 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, - 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, - 0x6f, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, - 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x41, 0x72, 0x67, 0x73, - 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x19, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x22, 0x33, 0x0a, 0x1d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x19, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, + 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, + 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x1d, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x87, + 0x01, 0x0a, 0x21, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x72, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x25, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, + 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xf6, 0x03, 0x0a, 0x22, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0xc5, 0x01, 0x0a, + 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x63, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x46, 0x69, 0x6c, + 0x65, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x28, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x65, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x4f, 0x0a, 0x0f, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x61, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, + 0x61, 0x74, 0x61, 0x41, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x1a, 0xa2, 0x01, 0x0a, 0x2d, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x46, 0x69, + 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x5b, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x61, + 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, + 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, + 0x72, 0x67, 0x73, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, + 0x0a, 0x26, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x32, 0x82, 0x0f, 0x0a, + 0x13, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x11, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, + 0x61, 0x72, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, + 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x41, + 0x72, 0x67, 0x73, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, + 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, + 0x72, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, + 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, + 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, + 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x8d, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x41, 0x6e, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x45, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x45, - 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x61, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x5b, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, - 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, - 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, + 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x45, 0x2e, 0x61, 0x70, + 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, + 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, - 0x0c, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, - 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, - 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, - 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, - 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x25, - 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, - 0x70, 0x69, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, - 0x79, 0x0a, 0x22, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, + 0x61, 0x6e, 0x64, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x22, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, + 0x74, 0x70, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, + 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x7b, + 0x0a, 0x23, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, - 0x72, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x23, 0x57, 0x61, - 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x3a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x13, 0x55, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2a, + 0x72, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x72, 0x67, + 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x13, 0x55, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x15, - 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, - 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x30, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x79, 0x0a, 0x15, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x77, 0x6e, + 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x15, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, + 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x91, 0x01, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, + 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, + 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x38, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x91, 0x01, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x38, 0x2e, 0x61, 0x70, 0x69, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x94, 0x01, 0x0a, 0x1e, 0x52, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, - 0x1a, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x52, 0x5a, - 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x72, 0x74, - 0x6f, 0x73, 0x69, 0x73, 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, - 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x72, 0x65, - 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x94, 0x01, 0x0a, 0x1e, 0x52, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x35, 0x2e, + 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x41, 0x72, 0x67, 0x73, 0x1a, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x6b, 0x75, + 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, + 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x62, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/golang/core/lib/enclaves/enclave_context.go b/api/golang/core/lib/enclaves/enclave_context.go index a0e33b23fd..18126cf94f 100644 --- a/api/golang/core/lib/enclaves/enclave_context.go +++ b/api/golang/core/lib/enclaves/enclave_context.go @@ -215,10 +215,10 @@ func (enclaveCtx *EnclaveContext) GetServices() (map[services.ServiceName]servic } // Docs available at https://docs.kurtosis.com/sdk#uploadfilesstring-pathtoupload-string-artifactname -func (enclaveCtx *EnclaveContext) UploadFiles(pathToUpload string, artifactName string) (services.FilesArtifactUUID, error) { +func (enclaveCtx *EnclaveContext) UploadFiles(pathToUpload string, artifactName string) (services.FilesArtifactUUID, services.FileArtifactName, error) { content, err := shared_utils.CompressPath(pathToUpload, ensureCompressedFileIsLesserThanGRPCLimit) if err != nil { - return "", stacktrace.Propagate(err, + return "", "", stacktrace.Propagate(err, "There was an error compressing the file '%v' before upload", pathToUpload) } @@ -226,9 +226,9 @@ func (enclaveCtx *EnclaveContext) UploadFiles(pathToUpload string, artifactName args := binding_constructors.NewUploadFilesArtifactArgs(content, artifactName) response, err := enclaveCtx.client.UploadFilesArtifact(context.Background(), args) if err != nil { - return "", stacktrace.Propagate(err, "An error was encountered while uploading data to the API Container.") + return "", "", stacktrace.Propagate(err, "An error was encountered while uploading data to the API Container.") } - return services.FilesArtifactUUID(response.Uuid), nil + return services.FilesArtifactUUID(response.GetUuid()), services.FileArtifactName(response.GetName()), nil } // Docs available at https://docs.kurtosis.com/sdk#storewebfilesstring-urltodownload-string-artifactname diff --git a/api/golang/core/lib/services/service_config_builder.go b/api/golang/core/lib/services/service_config_builder.go index cdef84d23e..541eb7bee7 100644 --- a/api/golang/core/lib/services/service_config_builder.go +++ b/api/golang/core/lib/services/service_config_builder.go @@ -8,6 +8,7 @@ import ( ) type FilesArtifactUUID string +type FileArtifactName string const ( defaultSubnetwork = "default" diff --git a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go index f63b7aa0da..98dcdb1f8b 100644 --- a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go +++ b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go @@ -23,9 +23,7 @@ const ( ) // ============================================================================================== -// -// Get Enclaves -// +// Get Enclaves // ============================================================================================== // Status of the containers in the enclave // NOTE: We have to prefix the enum values with the enum name due to the way Protobuf enum valuee uniqueness works @@ -90,8 +88,7 @@ const ( EnclaveAPIContainerStatus_EnclaveAPIContainerStatus_NONEXISTENT EnclaveAPIContainerStatus = 0 // An API container exists and is running // NOTE: this does NOT say that the server inside the API container is available, because checking if it's available requires making a call to the API container - // - // If we have a lot of API containers, we'd be making tons of calls + // If we have a lot of API containers, we'd be making tons of calls EnclaveAPIContainerStatus_EnclaveAPIContainerStatus_RUNNING EnclaveAPIContainerStatus = 1 // An API container exists, but isn't running EnclaveAPIContainerStatus_EnclaveAPIContainerStatus_STOPPED EnclaveAPIContainerStatus = 2 @@ -138,7 +135,7 @@ func (EnclaveAPIContainerStatus) EnumDescriptor() ([]byte, []int) { return file_engine_service_proto_rawDescGZIP(), []int{1} } -// The filter operator which can be text or regex type +//The filter operator which can be text or regex type // NOTE: We have to prefix the enum values with the enum name due to the way Protobuf enum value uniqueness works type LogLineOperator int32 @@ -193,9 +190,7 @@ func (LogLineOperator) EnumDescriptor() ([]byte, []int) { } // ============================================================================================== -// -// Get Engine Info -// +// Get Engine Info // ============================================================================================== type GetEngineInfoResponse struct { state protoimpl.MessageState @@ -246,9 +241,7 @@ func (x *GetEngineInfoResponse) GetEngineVersion() string { } // ============================================================================================== -// -// Create Enclave -// +// Create Enclave // ============================================================================================== type CreateEnclaveArgs struct { state protoimpl.MessageState @@ -331,7 +324,7 @@ type CreateEnclaveResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // All the enclave information inside this object + //All the enclave information inside this object EnclaveInfo *EnclaveInfo `protobuf:"bytes,1,opt,name=enclave_info,json=enclaveInfo,proto3" json:"enclave_info,omitempty"` } @@ -379,7 +372,7 @@ type EnclaveAPIContainerInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The container engine ID of the API container + //The container engine ID of the API container ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // The IP inside the enclave network of the API container (i.e. how services inside the network can reach the API container) IpInsideEnclave string `protobuf:"bytes,2,opt,name=ip_inside_enclave,json=ipInsideEnclave,proto3" json:"ip_inside_enclave,omitempty"` @@ -536,7 +529,7 @@ type EnclaveInfo struct { ApiContainerInfo *EnclaveAPIContainerInfo `protobuf:"bytes,6,opt,name=api_container_info,json=apiContainerInfo,proto3" json:"api_container_info,omitempty"` // NOTE: Will not be present if the API container status is not "RUNNING"!! ApiContainerHostMachineInfo *EnclaveAPIContainerHostMachineInfo `protobuf:"bytes,7,opt,name=api_container_host_machine_info,json=apiContainerHostMachineInfo,proto3" json:"api_container_host_machine_info,omitempty"` - // The enclave's creation time + //The enclave's creation time CreationTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` } @@ -791,16 +784,14 @@ func (x *GetExistingAndHistoricalEnclaveIdentifiersResponse) GetAllIdentifiers() } // ============================================================================================== -// -// Stop Enclave -// +// Stop Enclave // ============================================================================================== type StopEnclaveArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to stop + //The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to stop EnclaveIdentifier string `protobuf:"bytes,1,opt,name=enclave_identifier,json=enclaveIdentifier,proto3" json:"enclave_identifier,omitempty"` } @@ -844,16 +835,14 @@ func (x *StopEnclaveArgs) GetEnclaveIdentifier() string { } // ============================================================================================== -// -// Destroy Enclave -// +// Destroy Enclave // ============================================================================================== type DestroyEnclaveArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to destroy + //The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to destroy EnclaveIdentifier string `protobuf:"bytes,1,opt,name=enclave_identifier,json=enclaveIdentifier,proto3" json:"enclave_identifier,omitempty"` } @@ -897,9 +886,7 @@ func (x *DestroyEnclaveArgs) GetEnclaveIdentifier() string { } // ============================================================================================== -// -// Create Enclave -// +// Create Enclave // ============================================================================================== type CleanArgs struct { state protoimpl.MessageState @@ -1053,9 +1040,7 @@ func (x *CleanResponse) GetRemovedEnclaveNameAndUuids() []*EnclaveNameAndUuid { } // ============================================================================================== -// -// Get User Service Logs -// +// Get User Service Logs // ============================================================================================== type GetServiceLogsArgs struct { state protoimpl.MessageState diff --git a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go index c67de2908e..5bcd526283 100644 --- a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go +++ b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go @@ -26,9 +26,7 @@ type EngineServiceClient interface { // Endpoint for getting information about the engine, which is also what we use to verify that the engine has become available GetEngineInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetEngineInfoResponse, error) // ============================================================================================== - // - // Enclave Management - // + // Enclave Management // ============================================================================================== // Creates a new Kurtosis Enclave CreateEnclave(ctx context.Context, in *CreateEnclaveArgs, opts ...grpc.CallOption) (*CreateEnclaveResponse, error) @@ -156,9 +154,7 @@ type EngineServiceServer interface { // Endpoint for getting information about the engine, which is also what we use to verify that the engine has become available GetEngineInfo(context.Context, *emptypb.Empty) (*GetEngineInfoResponse, error) // ============================================================================================== - // - // Enclave Management - // + // Enclave Management // ============================================================================================== // Creates a new Kurtosis Enclave CreateEnclave(context.Context, *CreateEnclaveArgs) (*CreateEnclaveResponse, error) diff --git a/api/protobuf/core/api_container_service.proto b/api/protobuf/core/api_container_service.proto index ab631f9b4a..83849bd902 100644 --- a/api/protobuf/core/api_container_service.proto +++ b/api/protobuf/core/api_container_service.proto @@ -434,6 +434,9 @@ message UploadFilesArtifactArgs { message UploadFilesArtifactResponse { // UUID of the files artifact, for use when referencing it in the future string uuid = 1; + + // UUID of the files artifact, for use when referencing it in the future + string name = 2; } diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js index 3a9a5d91d9..5a924eb14e 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js @@ -7,7 +7,7 @@ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 -// protoc v3.19.1 +// protoc v3.15.6 // source: api_container_service.proto diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts index 37f88d2689..3726df15a0 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts @@ -1033,6 +1033,9 @@ export class UploadFilesArtifactResponse extends jspb.Message { getUuid(): string; setUuid(value: string): UploadFilesArtifactResponse; + getName(): string; + setName(value: string): UploadFilesArtifactResponse; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UploadFilesArtifactResponse.AsObject; static toObject(includeInstance: boolean, msg: UploadFilesArtifactResponse): UploadFilesArtifactResponse.AsObject; @@ -1044,6 +1047,7 @@ export class UploadFilesArtifactResponse extends jspb.Message { export namespace UploadFilesArtifactResponse { export type AsObject = { uuid: string, + name: string, } } diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js index 497e132e2b..8e0eb13db9 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = Function('return this')(); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); @@ -8372,7 +8366,8 @@ proto.api_container_api.UploadFilesArtifactResponse.prototype.toObject = functio */ proto.api_container_api.UploadFilesArtifactResponse.toObject = function(includeInstance, msg) { var f, obj = { - uuid: jspb.Message.getFieldWithDefault(msg, 1, "") + uuid: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -8413,6 +8408,10 @@ proto.api_container_api.UploadFilesArtifactResponse.deserializeBinaryFromReader var value = /** @type {string} */ (reader.readString()); msg.setUuid(value); break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; default: reader.skipField(); break; @@ -8449,6 +8448,13 @@ proto.api_container_api.UploadFilesArtifactResponse.serializeBinaryToWriter = fu f ); } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; @@ -8470,6 +8476,24 @@ proto.api_container_api.UploadFilesArtifactResponse.prototype.setUuid = function }; +/** + * optional string name = 2; + * @return {string} + */ +proto.api_container_api.UploadFilesArtifactResponse.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.api_container_api.UploadFilesArtifactResponse} returns this + */ +proto.api_container_api.UploadFilesArtifactResponse.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + diff --git a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js index 6a18e31707..e2db64053b 100644 --- a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js +++ b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js @@ -7,7 +7,7 @@ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 -// protoc v3.19.1 +// protoc v3.15.6 // source: engine_service.proto diff --git a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js index 1e5e7c42ec..4bf71a0b01 100644 --- a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js +++ b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = Function('return this')(); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); diff --git a/cli/cli/commands/files/upload/upload.go b/cli/cli/commands/files/upload/upload.go index 762383b84c..008023c00f 100644 --- a/cli/cli/commands/files/upload/upload.go +++ b/cli/cli/commands/files/upload/upload.go @@ -2,7 +2,6 @@ package upload import ( "context" - "fmt" "github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rpc_api_bindings" "github.com/kurtosis-tech/kurtosis/api/golang/engine/lib/kurtosis_context" "github.com/kurtosis-tech/kurtosis/cli/cli/command_framework/highlevel/enclave_id_arg" @@ -15,7 +14,6 @@ import ( "github.com/kurtosis-tech/stacktrace" "github.com/sirupsen/logrus" "os" - "time" ) const ( @@ -30,8 +28,6 @@ const ( kurtosisBackendCtxKey = "kurtosis-backend" engineClientCtxKey = "engine-client" - - artifactNamePrefix = "cli-uploaded-artifact-%v" ) var FilesUploadCmd = &engine_consuming_kurtosis_command.EngineConsumingKurtosisCommand{ @@ -65,8 +61,8 @@ var FilesUploadCmd = &engine_consuming_kurtosis_command.EngineConsumingKurtosisC func run( ctx context.Context, - kurtosisBackend backend_interface.KurtosisBackend, - engineClient kurtosis_engine_rpc_api_bindings.EngineServiceClient, + _ backend_interface.KurtosisBackend, + _ kurtosis_engine_rpc_api_bindings.EngineServiceClient, _ metrics_client.MetricsClient, flags *flags.ParsedFlags, args *args.ParsedArgs, @@ -93,19 +89,16 @@ func run( if err != nil { return stacktrace.Propagate(err, "An error occurred getting the name to be given to the produced artifact") } - if artifactName == defaultName { - artifactName = fmt.Sprintf(artifactNamePrefix, time.Now().Unix()) - } - filesArtifactUuid, err := enclaveCtx.UploadFiles(path, artifactName) + filesArtifactUuid, fileArtifactName, err := enclaveCtx.UploadFiles(path, artifactName) if err != nil { return stacktrace.Propagate(err, "An error occurred uploading files at path '%v' to enclave '%v'", path, enclaveIdentifier) } - logrus.Infof("Files package '%v' uploaded with UUID: %v", artifactName, filesArtifactUuid) + logrus.Infof("Files package '%v' uploaded with UUID: %v", fileArtifactName, filesArtifactUuid) return nil } -func validatePathArg(ctx context.Context, flags *flags.ParsedFlags, args *args.ParsedArgs) error { +func validatePathArg(_ context.Context, _ *flags.ParsedFlags, args *args.ParsedArgs) error { path, err := args.GetNonGreedyArg(pathArgKey) if err != nil { return stacktrace.Propagate(err, "An error occurred getting the path to validate using key '%v'", pathArgKey) diff --git a/core/server/api_container/server/api_container_service.go b/core/server/api_container/server/api_container_service.go index 0b80b74dda..c84e8cb081 100644 --- a/core/server/api_container/server/api_container_service.go +++ b/core/server/api_container/server/api_container_service.go @@ -369,14 +369,18 @@ func (apicService ApiContainerService) GetExistingAndHistoricalServiceIdentifier return &kurtosis_core_rpc_api_bindings.GetExistingAndHistoricalServiceIdentifiersResponse{AllIdentifiers: allIdentifiers}, nil } -func (apicService ApiContainerService) UploadFilesArtifact(ctx context.Context, args *kurtosis_core_rpc_api_bindings.UploadFilesArtifactArgs) (*kurtosis_core_rpc_api_bindings.UploadFilesArtifactResponse, error) { +func (apicService ApiContainerService) UploadFilesArtifact(_ context.Context, args *kurtosis_core_rpc_api_bindings.UploadFilesArtifactArgs) (*kurtosis_core_rpc_api_bindings.UploadFilesArtifactResponse, error) { + maybeArtifactName := args.GetName() + if maybeArtifactName == "" { + maybeArtifactName = apicService.filesArtifactStore.GenerateUniqueNameForFileArtifact() + } - filesArtifactUuid, err := apicService.serviceNetwork.UploadFilesArtifact(args.Data, args.Name) + filesArtifactUuid, err := apicService.serviceNetwork.UploadFilesArtifact(args.Data, maybeArtifactName) if err != nil { return nil, stacktrace.Propagate(err, "An error occurred while trying to upload the file") } - response := &kurtosis_core_rpc_api_bindings.UploadFilesArtifactResponse{Uuid: string(filesArtifactUuid)} + response := &kurtosis_core_rpc_api_bindings.UploadFilesArtifactResponse{Uuid: string(filesArtifactUuid), Name: maybeArtifactName} return response, nil } diff --git a/core/server/api_container/server/startosis_engine/kurtosis_builtins.go b/core/server/api_container/server/startosis_engine/kurtosis_builtins.go index 62403f6e1d..b2ca6bbb10 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_builtins.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_builtins.go @@ -5,7 +5,6 @@ import ( "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/builtins/import_module" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/builtins/print_builtin" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/builtins/read_file" - "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction/add_service" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction/assert" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction/exec" @@ -45,6 +44,7 @@ func KurtosisPlanInstructions(serviceNetwork service_network.ServiceNetwork, run add_service.NewAddServices(serviceNetwork, runtimeValueStore), assert.NewAssert(runtimeValueStore), exec.NewExec(serviceNetwork, runtimeValueStore), + kurtosis_print.NewPrint(serviceNetwork, runtimeValueStore), remove_connection.NewRemoveConnection(serviceNetwork), remove_service.NewRemoveService(serviceNetwork), render_templates.NewRenderTemplatesInstruction(serviceNetwork), @@ -57,12 +57,6 @@ func KurtosisPlanInstructions(serviceNetwork service_network.ServiceNetwork, run } } -func OldKurtosisPlanInstructions(instructionsQueue *[]kurtosis_instruction.KurtosisInstruction, packageContentProvider startosis_packages.PackageContentProvider, serviceNetwork service_network.ServiceNetwork, runtimeValueStore *runtime_value_store.RuntimeValueStore) []*starlark.Builtin { - return []*starlark.Builtin{ - starlark.NewBuiltin(kurtosis_print.PrintBuiltinName, kurtosis_print.GeneratePrintBuiltin(instructionsQueue, runtimeValueStore, serviceNetwork)), - } -} - // KurtosisHelpers returns the entire list of KurtosisHelper available by default in Kurtosis Starlark engine. // // A KurtosisHelper is a builtin which provides additional capabilities at interpretation time. It does not have any diff --git a/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print.go b/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print.go index 5fe1ebcdb6..5e5882d4ae 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print.go @@ -2,172 +2,91 @@ package kurtosis_print import ( "context" - "fmt" - "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rpc_api_bindings" - "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/binding_constructors" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/service_network" - "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction" - "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction/shared_helpers" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction/shared_helpers/magic_string_helper" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument" - "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_types" + "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/kurtosis_plan_instruction" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/runtime_value_store" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/startosis_errors" "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/startosis_validator" "github.com/kurtosis-tech/stacktrace" "go.starlark.net/starlark" - "strings" ) -type separator string -type end string - const ( PrintBuiltinName = "print" - separatorArgName = "sep" - defaultSeparator = separator(" ") - - endArgName = "end" - defaultEnd = end("") - - argsSeparator = ", " + PrintArgName = "msg" ) -func GeneratePrintBuiltin(instructionsQueue *[]kurtosis_instruction.KurtosisInstruction, recipeExecutor *runtime_value_store.RuntimeValueStore, serviceNetwork service_network.ServiceNetwork) func(thread *starlark.Thread, builtin *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { - return func(thread *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { - args, separatorStr, endStr, interpretationError := parseStartosisArg(b, args, kwargs) - if interpretationError != nil { - return nil, interpretationError - } - instructionPosition := shared_helpers.GetCallerPositionFromThread(thread) - printInstruction := NewPrintInstruction(instructionPosition, args, separatorStr, endStr, recipeExecutor, serviceNetwork) - *instructionsQueue = append(*instructionsQueue, printInstruction) - return starlark.None, nil - } -} - -type PrintInstruction struct { - position *kurtosis_starlark_framework.KurtosisBuiltinPosition - args []starlark.Value - separator separator - end end - recipeExecutor *runtime_value_store.RuntimeValueStore - serviceNetwork service_network.ServiceNetwork -} - -func NewPrintInstruction(position *kurtosis_starlark_framework.KurtosisBuiltinPosition, args []starlark.Value, separatorStr separator, endStr end, recipeExecutor *runtime_value_store.RuntimeValueStore, serviceNetwork service_network.ServiceNetwork) *PrintInstruction { - return &PrintInstruction{ - position: position, - args: args, - separator: separatorStr, - end: endStr, - recipeExecutor: recipeExecutor, - serviceNetwork: serviceNetwork, - } -} - -func (instruction *PrintInstruction) GetPositionInOriginalScript() *kurtosis_starlark_framework.KurtosisBuiltinPosition { - return instruction.position -} +func NewPrint(serviceNetwork service_network.ServiceNetwork, runtimeValueStore *runtime_value_store.RuntimeValueStore) *kurtosis_plan_instruction.KurtosisPlanInstruction { + return &kurtosis_plan_instruction.KurtosisPlanInstruction{ + KurtosisBaseBuiltin: &kurtosis_starlark_framework.KurtosisBaseBuiltin{ + Name: PrintBuiltinName, + + Arguments: []*builtin_argument.BuiltinArgument{ + { + Name: PrintArgName, + IsOptional: false, + ZeroValueProvider: builtin_argument.ZeroValueProvider[starlark.Value], + Validator: nil, + }, + }, + }, + + Capabilities: func() kurtosis_plan_instruction.KurtosisPlanInstructionCapabilities { + return &PrintCapabilities{ + serviceNetwork: serviceNetwork, + runtimeValueStore: runtimeValueStore, + + msg: nil, // populated at interpretation time + } + }, -func (instruction *PrintInstruction) GetCanonicalInstruction() *kurtosis_core_rpc_api_bindings.StarlarkInstruction { - args := make([]*kurtosis_core_rpc_api_bindings.StarlarkInstructionArg, len(instruction.args)) - for idx, arg := range instruction.args { - args[idx] = binding_constructors.NewStarlarkInstructionArg(builtin_argument.StringifyArgumentValue(arg), kurtosis_instruction.Representative) + DefaultDisplayArguments: map[string]bool{ + PrintArgName: true, + }, } - args = append(args, binding_constructors.NewStarlarkInstructionKwarg(builtin_argument.StringifyArgumentValue(starlark.String(instruction.separator)), separatorArgName, kurtosis_instruction.NotRepresentative)) - args = append(args, binding_constructors.NewStarlarkInstructionKwarg(builtin_argument.StringifyArgumentValue(starlark.String(instruction.end)), endArgName, kurtosis_instruction.NotRepresentative)) - return binding_constructors.NewStarlarkInstruction(instruction.position.ToAPIType(), PrintBuiltinName, instruction.String(), args) } -func (instruction *PrintInstruction) Execute(_ context.Context) (*string, error) { - serializedArgs := make([]string, len(instruction.args)) - for idx, genericArg := range instruction.args { - if genericArg == nil { - return nil, stacktrace.NewError("'%s' statement with nil argument. This is unexpected: '%v'", PrintBuiltinName, instruction.args) - } - switch arg := genericArg.(type) { - case starlark.String: - serializedArgs[idx] = arg.GoString() - default: - serializedArgs[idx] = arg.String() - } - maybeSerializedArgsWithRuntimeValue, err := magic_string_helper.ReplaceRuntimeValueInString(serializedArgs[idx], instruction.recipeExecutor) - if err != nil { - return nil, stacktrace.Propagate(err, "Error replacing runtime value '%v'", serializedArgs[idx]) - } - maybeSerializedArgsWithIPAddressAndHostname, err := magic_string_helper.ReplaceIPAddressAndHostnameInString(maybeSerializedArgsWithRuntimeValue, instruction.serviceNetwork, PrintBuiltinName) - if err != nil { - return nil, stacktrace.Propagate(err, "Error replacing IP address value '%v'", serializedArgs[idx]) - } - serializedArgs[idx] = maybeSerializedArgsWithIPAddressAndHostname - } - instructionOutput := fmt.Sprintf("%s%s", strings.Join(serializedArgs, string(instruction.separator)), instruction.end) +type PrintCapabilities struct { + serviceNetwork service_network.ServiceNetwork + runtimeValueStore *runtime_value_store.RuntimeValueStore - return &instructionOutput, nil + msg starlark.Value } -func (instruction *PrintInstruction) String() string { - var stringifiedArguments []string - for _, arg := range instruction.args { - stringifiedArguments = append(stringifiedArguments, builtin_argument.StringifyArgumentValue(arg)) +func (builtin *PrintCapabilities) Interpret(arguments *builtin_argument.ArgumentValuesSet) (starlark.Value, *startosis_errors.InterpretationError) { + msg, err := builtin_argument.ExtractArgumentValue[starlark.Value](arguments, PrintArgName) + if err != nil { + return nil, startosis_errors.WrapWithInterpretationError(err, "Unable to extract value for '%s' argument", PrintArgName) } - stringifiedArguments = append(stringifiedArguments, fmt.Sprintf("%s=%q", endArgName, instruction.end)) - stringifiedArguments = append(stringifiedArguments, fmt.Sprintf("%s=%q", separatorArgName, instruction.separator)) - return fmt.Sprintf("%s(%s)", PrintBuiltinName, strings.Join(stringifiedArguments, argsSeparator)) + builtin.msg = msg + return starlark.None, nil } -func (instruction *PrintInstruction) ValidateAndUpdateEnvironment(environment *startosis_validator.ValidatorEnvironment) error { +func (builtin *PrintCapabilities) Validate(_ *builtin_argument.ArgumentValuesSet, _ *startosis_validator.ValidatorEnvironment) *startosis_errors.ValidationError { // nothing to do for now // TODO(gb): maybe in the future validate that if we're using a magic string, it points to something real return nil } -// parseStartosisArg is specific because in python we can pass anything to a print statement. The contract is the following: -// - as many positional arg as wanted -// - those positional args can be of any type: string, int, array, dictionary, etc. -// - all those arguments will be stringified using the String() function and concatenated using the separator optionally passed in (see below) -// - an optional `sep` named argument which must be a string, representing the separator that will be used to concatenate the positional args (defaults to a blank space if absent) -// - an optional `end` named argument which must be a string, representing the endOfLine that will be used (defaults to '\n') -func parseStartosisArg(b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) ([]starlark.Value, separator, end, *startosis_errors.InterpretationError) { - // read positional args first - argsList := make([]starlark.Value, len(args)) - copy(argsList, args) - - // read kwargs - throw if it's something different than the separator - separatorKwarg := defaultSeparator - endKwarg := defaultEnd - for _, kwarg := range kwargs { - switch kwarg.Index(0) { - case starlark.String(separatorArgName): - separatorKwargStr, interpretationError := toNonEmptyString(separatorArgName, kwarg.Index(1)) - if interpretationError != nil { - return nil, "", "", interpretationError - } - separatorKwarg = separator(separatorKwargStr) - case starlark.String(endArgName): - endKwargStr, interpretationError := toNonEmptyString(endArgName, kwarg.Index(1)) - if interpretationError != nil { - return nil, "", "", interpretationError - } - endKwarg = end(endKwargStr) - default: - // This is the python default error message - return nil, "", "", startosis_errors.NewInterpretationError("%s: unexpected keyword argument '%'", b.Name(), kwarg.Index(0)) - } +func (builtin *PrintCapabilities) Execute(_ context.Context, _ *builtin_argument.ArgumentValuesSet) (string, error) { + var serializedMsg string + switch arg := builtin.msg.(type) { + case starlark.String: + serializedMsg = arg.GoString() + default: + serializedMsg = arg.String() } - return argsList, separatorKwarg, endKwarg, nil -} - -func toNonEmptyString(argName string, argValue starlark.Value) (string, *startosis_errors.InterpretationError) { - strArgValue, interpretationErr := kurtosis_types.SafeCastToString(argValue, argName) - if interpretationErr != nil { - return "", interpretationErr + maybeSerializedArgsWithRuntimeValue, err := magic_string_helper.ReplaceRuntimeValueInString(serializedMsg, builtin.runtimeValueStore) + if err != nil { + return "", stacktrace.Propagate(err, "Error replacing runtime value '%v'", serializedMsg) } - if len(strArgValue) == 0 { - return "", startosis_errors.NewInterpretationError("Expected non empty string for argument '%s'", argName) + maybeSerializedArgsWithIPAddressAndHostname, err := magic_string_helper.ReplaceIPAddressAndHostnameInString(maybeSerializedArgsWithRuntimeValue, builtin.serviceNetwork, PrintBuiltinName) + if err != nil { + return "", stacktrace.Propagate(err, "Error replacing IP address value '%v'", serializedMsg) } - return strArgValue, nil + return maybeSerializedArgsWithIPAddressAndHostname, nil } diff --git a/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print_test.go b/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print_test.go deleted file mode 100644 index e1248e999e..0000000000 --- a/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print/kurtosis_print_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package kurtosis_print - -import ( - "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rpc_api_bindings" - "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/binding_constructors" - "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework" - "github.com/stretchr/testify/require" - "go.starlark.net/starlark" - "testing" -) - -func TestPrintInstruction_StringRepresentation(t *testing.T) { - position := kurtosis_starlark_framework.NewKurtosisBuiltinPosition("dummyFile", 1, 1) - instruction := NewPrintInstruction( - position, - []starlark.Value{ - starlark.String("foo"), - starlark.NewList([]starlark.Value{ - starlark.String("bar"), - }), - }, - "; ", - "EOL", - nil, - nil, - ) - expectedStr := `print("foo", ["bar"], end="EOL", sep="; ")` - require.Equal(t, expectedStr, instruction.String()) - - canonicalInstruction := binding_constructors.NewStarlarkInstruction( - position.ToAPIType(), - PrintBuiltinName, - expectedStr, - []*kurtosis_core_rpc_api_bindings.StarlarkInstructionArg{ - binding_constructors.NewStarlarkInstructionArg(`"foo"`, true), - binding_constructors.NewStarlarkInstructionArg(`["bar"]`, true), - binding_constructors.NewStarlarkInstructionKwarg(`"; "`, "sep", false), - binding_constructors.NewStarlarkInstructionKwarg(`"EOL"`, "end", false), - }) - require.Equal(t, canonicalInstruction, instruction.GetCanonicalInstruction()) -} diff --git a/core/server/api_container/server/startosis_engine/kurtosis_instruction/plan_module/plan_module.go b/core/server/api_container/server/startosis_engine/kurtosis_instruction/plan_module/plan_module.go index d4a33eb901..c7b04cf431 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_instruction/plan_module/plan_module.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_instruction/plan_module/plan_module.go @@ -13,13 +13,9 @@ const ( func PlanModule( instructionsQueue *[]kurtosis_instruction.KurtosisInstruction, - oldKurtosisInstructions []*starlark.Builtin, kurtosisPlanInstructions []*kurtosis_plan_instruction.KurtosisPlanInstruction, ) *starlarkstruct.Module { moduleBuiltins := starlark.StringDict{} - for _, oldInstruction := range oldKurtosisInstructions { - moduleBuiltins[oldInstruction.Name()] = oldInstruction - } for _, planInstruction := range kurtosisPlanInstructions { wrappedPlanInstruction := kurtosis_plan_instruction.NewKurtosisPlanInstructionWrapper(planInstruction, instructionsQueue) moduleBuiltins[planInstruction.GetName()] = starlark.NewBuiltin(planInstruction.GetName(), wrappedPlanInstruction.CreateBuiltin()) diff --git a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/kurtosis_print_framework_test_case.go b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/kurtosis_print_framework_test_case.go new file mode 100644 index 0000000000..a285418ecc --- /dev/null +++ b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/kurtosis_print_framework_test_case.go @@ -0,0 +1,52 @@ +package test_engine + +import ( + "fmt" + "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/service_network" + "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_instruction/kurtosis_print" + "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/kurtosis_plan_instruction" + "github.com/kurtosis-tech/kurtosis/core/server/api_container/server/startosis_engine/runtime_value_store" + "github.com/stretchr/testify/require" + "go.starlark.net/starlark" + "testing" +) + +const ( + printedValue = 24.675432 +) + +type printTestCase struct { + *testing.T +} + +func newPrintTestCase(t *testing.T) *printTestCase { + return &printTestCase{ + T: t, + } +} + +func (t *printTestCase) GetId() string { + return kurtosis_print.PrintBuiltinName +} + +func (t *printTestCase) GetInstruction() *kurtosis_plan_instruction.KurtosisPlanInstruction { + serviceNetwork := service_network.NewMockServiceNetwork(t) + runtimeValueStore := runtime_value_store.NewRuntimeValueStore() + + return kurtosis_print.NewPrint(serviceNetwork, runtimeValueStore) +} + +func (t *printTestCase) GetStarlarkCode() string { + return fmt.Sprintf("%s(%s=%f)", kurtosis_print.PrintBuiltinName, kurtosis_print.PrintArgName, printedValue) +} + +func (t *printTestCase) Assert(interpretationResult starlark.Value, executionResult *string) { + require.Equal(t, starlark.None, interpretationResult) + + expectedExecutionResult := "24.675432" + require.Equal(t, &expectedExecutionResult, executionResult) +} + +func (t *printTestCase) GetStarlarkCodeForAssertion() string { + return "" +} diff --git a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/starlark_framework_engine_test.go b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/starlark_framework_engine_test.go index da11b32740..d84307b2dc 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/starlark_framework_engine_test.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/starlark_framework_engine_test.go @@ -29,6 +29,7 @@ func TestAllRegisteredBuiltins(t *testing.T) { testKurtosisPlanInstruction(t, newExecTestCase3(t)) testKurtosisPlanInstruction(t, newSetConnectionTestCase(t)) testKurtosisPlanInstruction(t, newSetConnectionDefaultTestCase(t)) + testKurtosisPlanInstruction(t, newPrintTestCase(t)) testKurtosisPlanInstruction(t, newRemoveConnectionTestCase(t)) testKurtosisPlanInstruction(t, newRemoveServiceTestCase(t)) testKurtosisPlanInstruction(t, newRenderSingleTemplateTestCase(t)) diff --git a/core/server/api_container/server/startosis_engine/startosis_interpreter.go b/core/server/api_container/server/startosis_engine/startosis_interpreter.go index f743f47b86..a8b959677a 100644 --- a/core/server/api_container/server/startosis_engine/startosis_interpreter.go +++ b/core/server/api_container/server/startosis_engine/startosis_interpreter.go @@ -112,9 +112,8 @@ func (interpreter *StartosisInterpreter) Interpret(_ context.Context, packageId if paramName, _ := runFunction.Param(planParamIndex); paramName != planParamName { return "", nil, startosis_errors.NewInterpretationError(unexpectedArgNameError, planParamIndex, planParamName, paramName).ToAPIType() } - oldKurtosisPlanInstructions := OldKurtosisPlanInstructions(&instructionsQueue, interpreter.moduleContentProvider, interpreter.serviceNetwork, interpreter.recipeExecutor) kurtosisPlanInstructions := KurtosisPlanInstructions(interpreter.serviceNetwork, interpreter.recipeExecutor, interpreter.moduleContentProvider) - planModule := plan_module.PlanModule(&instructionsQueue, oldKurtosisPlanInstructions, kurtosisPlanInstructions) + planModule := plan_module.PlanModule(&instructionsQueue, kurtosisPlanInstructions) argsTuple = append(argsTuple, planModule) } diff --git a/core/server/api_container/server/startosis_engine/startosis_interpreter_test.go b/core/server/api_container/server/startosis_engine/startosis_interpreter_test.go index 523776fb1a..5ffff51168 100644 --- a/core/server/api_container/server/startosis_engine/startosis_interpreter_test.go +++ b/core/server/api_container/server/startosis_engine/startosis_interpreter_test.go @@ -1095,8 +1095,9 @@ def run(plan): func validateScriptOutputFromPrintInstructions(t *testing.T, instructions []kurtosis_instruction.KurtosisInstruction, expectedOutput string) { scriptOutput := strings.Builder{} for _, instruction := range instructions { - switch instruction.(type) { - case *kurtosis_print.PrintInstruction: + + switch instruction.GetCanonicalInstruction().InstructionName { + case kurtosis_print.PrintBuiltinName: instructionOutput, err := instruction.Execute(context.Background()) require.Nil(t, err, "Error running the print statements") if instructionOutput != nil { diff --git a/docs/docs/reference/sdk.md b/docs/docs/reference/sdk.md index e1ec964622..ec78572183 100644 --- a/docs/docs/reference/sdk.md +++ b/docs/docs/reference/sdk.md @@ -340,7 +340,7 @@ Gets the Name and UUID of the current services in the enclave. * `serviceIdentifiers`: A map of objects containing a mapping of Name -> UUID for all the services inside the enclave -### `uploadFiles(String pathToUpload, String artifactName)` +### `uploadFiles(String pathToUpload, String artifactName) -> FileArtifaceUUID, FileArtifactName, Error` Takes a filepath or directory path that will be compressed and uploaded to the Kurtosis filestore for use with [ContainerConfig.filesArtifactMountpoints][containerconfig_filesartifactmountpoints]. If a directory is specified, the contents of the directory will be uploaded to the archive without additional nesting. Empty directories cannot be uploaded. @@ -352,7 +352,8 @@ If a directory is specified, the contents of the directory will be uploaded to t **Returns** -* `UUID`: A unique ID as a string identifying the uploaded files, which can be used in [ContainerConfig.filesArtifactMountpoints][containerconfig_filesartifactmountpoints]. +* `FileArtifactUUID`: A unique ID as a string identifying the uploaded files, which can be used in [ContainerConfig.filesArtifactMountpoints][containerconfig_filesartifactmountpoints]. +* `FileArtifactName`: The name of the file-artifact, it is auto-generated if `artitfactName` is an empty string. ### `storeWebFiles(String urlToDownload, String artifactName)` Downloads a files-containing `.tgz` from the given URL to the Kurtosis engine, so that the files inside can be mounted inside a service's filespace at creation time via [ContainerConfig.filesArtifactMountpoints][containerconfig_filesartifactmountpoints]. diff --git a/internal_testsuites/golang/test_helpers/test_helpers.go b/internal_testsuites/golang/test_helpers/test_helpers.go index 22b6de1e0d..766b495192 100644 --- a/internal_testsuites/golang/test_helpers/test_helpers.go +++ b/internal_testsuites/golang/test_helpers/test_helpers.go @@ -273,7 +273,7 @@ func AddAPIServiceToPartition(ctx context.Context, serviceName services.ServiceN return nil, nil, nil, stacktrace.Propagate(err, "An error occurred creating the datastore config file") } artifactName := fmt.Sprintf(artifactNamePrefix, time.Now().Unix()) - _, err = enclaveCtx.UploadFiles(configFilepath, artifactName) + _, _, err = enclaveCtx.UploadFiles(configFilepath, artifactName) if err != nil { return nil, nil, nil, stacktrace.Propagate(err, "An error occurred uploading the datastore config file") } diff --git a/internal_testsuites/golang/testsuite/upload_download_files_test/upload_download_file_test.go b/internal_testsuites/golang/testsuite/upload_download_files_test/upload_download_file_test.go index 1290723f3d..507d5af4ad 100644 --- a/internal_testsuites/golang/testsuite/upload_download_files_test/upload_download_file_test.go +++ b/internal_testsuites/golang/testsuite/upload_download_files_test/upload_download_file_test.go @@ -52,8 +52,9 @@ func TestUploadAndDownloadFiles(t *testing.T) { pathToUpload := filePathsMap[diskDirKeyword] require.NotEmptyf(t, pathToUpload, "Failed to store uploadable path in path map.") - artifactUuid, err := enclaveCtx.UploadFiles(filePathsMap[diskDirKeyword], testArtifactName) + artifactUuid, artifactName, err := enclaveCtx.UploadFiles(filePathsMap[diskDirKeyword], testArtifactName) require.NoError(t, err) + require.Equal(t, string(artifactName), testArtifactName) firstArchiveRootKeyword := fmt.Sprintf("%s%v", archiveRootFileKeywordPattern, 0) firstArchiveRootFilename := filePathsMap[firstArchiveRootKeyword]