From da00f43e759e8664df49a87ad919e89b99939a46 Mon Sep 17 00:00:00 2001 From: Adam Babik Date: Fri, 26 Jan 2024 16:08:24 +0100 Subject: [PATCH] Add UpdateSession() to runnerv2alpha1 --- Makefile | 3 +- .../api/runme/runner/v2alpha1/runner.proto | 21 + internal/command/command_test.go | 4 - internal/command/env_resolver_test.go | 2 - .../go/runme/runner/v2alpha1/runner.pb.go | 725 +++++++++++------- .../runme/runner/v2alpha1/runner_grpc.pb.go | 37 + .../runner/v2alpha1/runner_pb.client.d.ts | 10 + .../runme/runner/v2alpha1/runner_pb.client.js | 13 +- .../ts/runme/runner/v2alpha1/runner_pb.d.ts | 55 ++ .../ts/runme/runner/v2alpha1/runner_pb.js | 28 + internal/project/project.go | 16 +- internal/project/project_test.go | 29 +- internal/project/testdata/git-project/.env | 1 + internal/runner/client/client_local.go | 2 +- internal/runner/service.go | 4 +- .../runnerv2service/service_execute_test.go | 2 - .../runnerv2service/service_resolve_env.go | 12 +- .../service_resolve_env_test.go | 9 +- internal/runnerv2service/service_sessions.go | 81 +- .../runnerv2service/service_sessions_test.go | 66 ++ 20 files changed, 788 insertions(+), 332 deletions(-) create mode 100644 internal/project/testdata/git-project/.env create mode 100644 internal/runnerv2service/service_sessions_test.go diff --git a/Makefile b/Makefile index e3aa04888..01f386863 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,9 @@ wasm: .PHONY: test/execute test/execute: PKGS ?= "./..." +test/execute: RUN ?= .* test/execute: build test/prep-git-project - TZ=UTC go test -ldflags="$(LDTESTFLAGS)" -timeout=60s -covermode=atomic -coverprofile=cover.out -coverpkg=./... $(PKGS) + TZ=UTC go test -ldflags="$(LDTESTFLAGS)" -run="$(RUN)" -timeout=60s -covermode=atomic -coverprofile=cover.out -coverpkg=./... $(PKGS) .PHONY: test/prep-git-project test/prep-git-project: diff --git a/internal/api/runme/runner/v2alpha1/runner.proto b/internal/api/runme/runner/v2alpha1/runner.proto index 11cb9c19a..cd79c8c5e 100644 --- a/internal/api/runme/runner/v2alpha1/runner.proto +++ b/internal/api/runme/runner/v2alpha1/runner.proto @@ -62,6 +62,26 @@ message ListSessionsResponse { repeated Session sessions = 1; } +message UpdateSessionRequest { + string id = 1; + + // metadata is a map of client specific metadata. + map metadata = 2; + + // env field provides an initial set of environment variables + // for a newly created session. + repeated string env = 3; + + // project from which to load environment variables. + // They will be appended to the list from the env field. + // The env field has a higher priority. + optional Project project = 4; +} + +message UpdateSessionResponse { + Session session = 1; +} + message DeleteSessionRequest { string id = 1; } @@ -207,6 +227,7 @@ service RunnerService { rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse) {} rpc GetSession(GetSessionRequest) returns (GetSessionResponse) {} rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {} + rpc UpdateSession(UpdateSessionRequest) returns (UpdateSessionResponse) {} rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse) {} // Execute executes a program. Examine "ExecuteRequest" to explore diff --git a/internal/command/command_test.go b/internal/command/command_test.go index 0aaa8e6ee..cdd87a321 100644 --- a/internal/command/command_test.go +++ b/internal/command/command_test.go @@ -112,8 +112,6 @@ func TestExecutionCommandFromCodeBlocks(t *testing.T) { t.Run("NativeCommand", func(t *testing.T) { t.Parallel() - tc := tc - t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -130,8 +128,6 @@ func TestExecutionCommandFromCodeBlocks(t *testing.T) { }) t.Run("VirtualCommand", func(t *testing.T) { - t.Parallel() - tc := tc t.Run(tc.name, func(t *testing.T) { diff --git a/internal/command/env_resolver_test.go b/internal/command/env_resolver_test.go index 8273ae90c..56a65ce27 100644 --- a/internal/command/env_resolver_test.go +++ b/internal/command/env_resolver_test.go @@ -94,8 +94,6 @@ func TestEnvResolver_Parsing(t *testing.T) { } for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { r := NewEnvResolver(tc.source...) result, err := r.Resolve(strings.NewReader(tc.data)) diff --git a/internal/gen/proto/go/runme/runner/v2alpha1/runner.pb.go b/internal/gen/proto/go/runme/runner/v2alpha1/runner.pb.go index bab738030..5643c6f0d 100644 --- a/internal/gen/proto/go/runme/runner/v2alpha1/runner.pb.go +++ b/internal/gen/proto/go/runme/runner/v2alpha1/runner.pb.go @@ -171,7 +171,7 @@ func (x ResolveEnvResult_ResolvedEnvSource) Number() protoreflect.EnumNumber { // Deprecated: Use ResolveEnvResult_ResolvedEnvSource.Descriptor instead. func (ResolveEnvResult_ResolvedEnvSource) EnumDescriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{14, 0} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{16, 0} } type Project struct { @@ -596,6 +596,130 @@ func (x *ListSessionsResponse) GetSessions() []*Session { return nil } +type UpdateSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // metadata is a map of client specific metadata. + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // env field provides an initial set of environment variables + // for a newly created session. + Env []string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty"` + // project from which to load environment variables. + // They will be appended to the list from the env field. + // The env field has a higher priority. + Project *Project `protobuf:"bytes,4,opt,name=project,proto3,oneof" json:"project,omitempty"` +} + +func (x *UpdateSessionRequest) Reset() { + *x = UpdateSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSessionRequest) ProtoMessage() {} + +func (x *UpdateSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSessionRequest.ProtoReflect.Descriptor instead. +func (*UpdateSessionRequest) Descriptor() ([]byte, []int) { + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateSessionRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateSessionRequest) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateSessionRequest) GetEnv() []string { + if x != nil { + return x.Env + } + return nil +} + +func (x *UpdateSessionRequest) GetProject() *Project { + if x != nil { + return x.Project + } + return nil +} + +type UpdateSessionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` +} + +func (x *UpdateSessionResponse) Reset() { + *x = UpdateSessionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSessionResponse) ProtoMessage() {} + +func (x *UpdateSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSessionResponse.ProtoReflect.Descriptor instead. +func (*UpdateSessionResponse) Descriptor() ([]byte, []int) { + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateSessionResponse) GetSession() *Session { + if x != nil { + return x.Session + } + return nil +} + type DeleteSessionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -607,7 +731,7 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[8] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -620,7 +744,7 @@ func (x *DeleteSessionRequest) String() string { func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[8] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -633,7 +757,7 @@ func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead. func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{8} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{10} } func (x *DeleteSessionRequest) GetId() string { @@ -652,7 +776,7 @@ type DeleteSessionResponse struct { func (x *DeleteSessionResponse) Reset() { *x = DeleteSessionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[9] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -665,7 +789,7 @@ func (x *DeleteSessionResponse) String() string { func (*DeleteSessionResponse) ProtoMessage() {} func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[9] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -678,7 +802,7 @@ func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSessionResponse.ProtoReflect.Descriptor instead. func (*DeleteSessionResponse) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{9} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{11} } type Winsize struct { @@ -695,7 +819,7 @@ type Winsize struct { func (x *Winsize) Reset() { *x = Winsize{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[10] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -708,7 +832,7 @@ func (x *Winsize) String() string { func (*Winsize) ProtoMessage() {} func (x *Winsize) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[10] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -721,7 +845,7 @@ func (x *Winsize) ProtoReflect() protoreflect.Message { // Deprecated: Use Winsize.ProtoReflect.Descriptor instead. func (*Winsize) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{10} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{12} } func (x *Winsize) GetRows() uint32 { @@ -783,7 +907,7 @@ type ExecuteRequest struct { func (x *ExecuteRequest) Reset() { *x = ExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[11] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -796,7 +920,7 @@ func (x *ExecuteRequest) String() string { func (*ExecuteRequest) ProtoMessage() {} func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[11] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -809,7 +933,7 @@ func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead. func (*ExecuteRequest) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{11} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{13} } func (x *ExecuteRequest) GetConfig() *ProgramConfig { @@ -888,7 +1012,7 @@ type ExecuteResponse struct { func (x *ExecuteResponse) Reset() { *x = ExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[12] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -901,7 +1025,7 @@ func (x *ExecuteResponse) String() string { func (*ExecuteResponse) ProtoMessage() {} func (x *ExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[12] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -914,7 +1038,7 @@ func (x *ExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead. func (*ExecuteResponse) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{12} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{14} } func (x *ExecuteResponse) GetExitCode() *wrapperspb.UInt32Value { @@ -971,7 +1095,7 @@ type ResolveEnvRequest struct { func (x *ResolveEnvRequest) Reset() { *x = ResolveEnvRequest{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[13] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -984,7 +1108,7 @@ func (x *ResolveEnvRequest) String() string { func (*ResolveEnvRequest) ProtoMessage() {} func (x *ResolveEnvRequest) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[13] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -997,7 +1121,7 @@ func (x *ResolveEnvRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveEnvRequest.ProtoReflect.Descriptor instead. func (*ResolveEnvRequest) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{13} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{15} } func (m *ResolveEnvRequest) GetSource() isResolveEnvRequest_Source { @@ -1084,7 +1208,7 @@ type ResolveEnvResult struct { func (x *ResolveEnvResult) Reset() { *x = ResolveEnvResult{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[14] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1097,7 +1221,7 @@ func (x *ResolveEnvResult) String() string { func (*ResolveEnvResult) ProtoMessage() {} func (x *ResolveEnvResult) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[14] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1110,7 +1234,7 @@ func (x *ResolveEnvResult) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveEnvResult.ProtoReflect.Descriptor instead. func (*ResolveEnvResult) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{14} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{16} } func (m *ResolveEnvResult) GetResult() isResolveEnvResult_Result { @@ -1161,7 +1285,7 @@ type ResolveEnvResponse struct { func (x *ResolveEnvResponse) Reset() { *x = ResolveEnvResponse{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[15] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1174,7 +1298,7 @@ func (x *ResolveEnvResponse) String() string { func (*ResolveEnvResponse) ProtoMessage() {} func (x *ResolveEnvResponse) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[15] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1187,7 +1311,7 @@ func (x *ResolveEnvResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveEnvResponse.ProtoReflect.Descriptor instead. func (*ResolveEnvResponse) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{15} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{17} } func (x *ResolveEnvResponse) GetItems() []*ResolveEnvResult { @@ -1211,7 +1335,7 @@ type ResolveEnvRequest_CommandList struct { func (x *ResolveEnvRequest_CommandList) Reset() { *x = ResolveEnvRequest_CommandList{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[18] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1224,7 +1348,7 @@ func (x *ResolveEnvRequest_CommandList) String() string { func (*ResolveEnvRequest_CommandList) ProtoMessage() {} func (x *ResolveEnvRequest_CommandList) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[18] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1237,7 +1361,7 @@ func (x *ResolveEnvRequest_CommandList) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveEnvRequest_CommandList.ProtoReflect.Descriptor instead. func (*ResolveEnvRequest_CommandList) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{13, 0} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{15, 0} } func (x *ResolveEnvRequest_CommandList) GetItems() []string { @@ -1261,7 +1385,7 @@ type ResolveEnvResult_ResolvedEnv struct { func (x *ResolveEnvResult_ResolvedEnv) Reset() { *x = ResolveEnvResult_ResolvedEnv{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[19] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1274,7 +1398,7 @@ func (x *ResolveEnvResult_ResolvedEnv) String() string { func (*ResolveEnvResult_ResolvedEnv) ProtoMessage() {} func (x *ResolveEnvResult_ResolvedEnv) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[19] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1287,7 +1411,7 @@ func (x *ResolveEnvResult_ResolvedEnv) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveEnvResult_ResolvedEnv.ProtoReflect.Descriptor instead. func (*ResolveEnvResult_ResolvedEnv) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{14, 0} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{16, 0} } func (x *ResolveEnvResult_ResolvedEnv) GetName() string { @@ -1330,7 +1454,7 @@ type ResolveEnvResult_UnresolvedEnv struct { func (x *ResolveEnvResult_UnresolvedEnv) Reset() { *x = ResolveEnvResult_UnresolvedEnv{} if protoimpl.UnsafeEnabled { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[20] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1343,7 +1467,7 @@ func (x *ResolveEnvResult_UnresolvedEnv) String() string { func (*ResolveEnvResult_UnresolvedEnv) ProtoMessage() {} func (x *ResolveEnvResult_UnresolvedEnv) ProtoReflect() protoreflect.Message { - mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[20] + mi := &file_runme_runner_v2alpha1_runner_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1356,7 +1480,7 @@ func (x *ResolveEnvResult_UnresolvedEnv) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveEnvResult_UnresolvedEnv.ProtoReflect.Descriptor instead. func (*ResolveEnvResult_UnresolvedEnv) Descriptor() ([]byte, []int) { - return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{14, 1} + return file_runme_runner_v2alpha1_runner_proto_rawDescGZIP(), []int{16, 1} } func (x *ResolveEnvResult_UnresolvedEnv) GetName() string { @@ -1435,184 +1559,214 @@ var file_runme_runner_v2alpha1_runner_proto_rawDesc = []byte{ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, - 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x01, 0x79, 0x22, 0xd9, 0x03, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x75, 0x6e, 0x6d, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x97, 0x02, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x55, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x39, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x3d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x3d, - 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x48, - 0x00, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x10, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, - 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x3d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x48, 0x01, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, - 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x64, - 0x6f, 0x75, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x77, - 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, - 0x70, 0x69, 0x64, 0x22, 0xff, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, - 0x6e, 0x76, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x08, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x72, 0x75, - 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x18, 0x0a, - 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x10, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0f, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x3d, 0x0a, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, - 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x01, 0x52, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x23, 0x0a, 0x0b, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, - 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x81, 0x05, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x58, 0x0a, 0x0c, 0x72, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x64, 0x45, 0x6e, 0x76, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x64, 0x45, 0x6e, 0x76, 0x12, 0x5e, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x72, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x51, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, + 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, + 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x01, 0x79, 0x22, 0xd9, 0x03, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, + 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x22, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x3d, 0x0a, 0x07, 0x77, + 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, - 0x45, 0x6e, 0x76, 0x48, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x64, 0x45, 0x6e, 0x76, 0x1a, 0xc2, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x64, 0x45, 0x6e, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, - 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x4a, 0x0a, 0x0d, 0x55, 0x6e, 0x72, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x64, 0x45, 0x6e, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x52, - 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, - 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x4e, 0x56, 0x10, 0x01, 0x12, 0x1f, 0x0a, - 0x1b, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, 0x4f, - 0x55, 0x52, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1f, - 0x0a, 0x1b, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x42, - 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x53, 0x0a, 0x12, 0x52, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, - 0x76, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x5e, - 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1c, 0x0a, - 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x54, 0x45, - 0x52, 0x52, 0x55, 0x50, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x58, 0x45, 0x43, 0x55, - 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x02, 0x2a, 0x55, - 0x0a, 0x0f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, - 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x4d, 0x4f, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x43, - 0x45, 0x4e, 0x54, 0x10, 0x01, 0x32, 0x80, 0x05, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x48, 0x00, 0x52, 0x07, + 0x77, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x10, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x3d, 0x0a, 0x07, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x01, 0x52, + 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x11, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4c, 0x61, 0x73, + 0x74, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x77, 0x69, 0x6e, 0x73, + 0x69, 0x7a, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, + 0xbe, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x2e, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x70, 0x69, 0x64, + 0x22, 0xff, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, - 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x26, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x3d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x6d, + 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x01, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x23, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x08, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x22, 0x81, 0x05, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, + 0x76, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x58, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x0c, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x72, 0x75, 0x6e, - 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, - 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, - 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x25, - 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, - 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x63, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, - 0x76, 0x12, 0x28, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x72, 0x75, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, + 0x6e, 0x76, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, + 0x76, 0x12, 0x5e, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x72, 0x75, 0x6e, 0x6d, + 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x76, + 0x48, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, + 0x76, 0x1a, 0xc2, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, + 0x76, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x4a, 0x0a, 0x0d, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, + 0x6e, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x53, 0x4f, + 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, + 0x17, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, 0x4f, + 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x4e, 0x56, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x52, 0x45, + 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x52, + 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x5f, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x53, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, + 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2f, - 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x6d, - 0x65, 0x2f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x6e, - 0x65, 0x72, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x5e, 0x0a, 0x0b, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, + 0x45, 0x43, 0x55, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x45, 0x43, + 0x55, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, + 0x50, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x5f, + 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x02, 0x2a, 0x55, 0x0a, 0x0f, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x20, + 0x0a, 0x1c, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, + 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, + 0x54, 0x45, 0x47, 0x59, 0x5f, 0x4d, 0x4f, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x4e, 0x54, + 0x10, 0x01, 0x32, 0xee, 0x05, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x28, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x72, 0x75, 0x6e, + 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, + 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x2b, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, + 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x72, 0x75, 0x6e, 0x6d, + 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x63, + 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x12, 0x28, 0x2e, 0x72, + 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x72, + 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2f, 0x72, 0x75, 0x6e, 0x6d, 0x65, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2f, 0x72, 0x75, 0x6e, + 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1628,7 +1782,7 @@ func file_runme_runner_v2alpha1_runner_proto_rawDescGZIP() []byte { } var file_runme_runner_v2alpha1_runner_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_runme_runner_v2alpha1_runner_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_runme_runner_v2alpha1_runner_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_runme_runner_v2alpha1_runner_proto_goTypes = []interface{}{ (ExecuteStop)(0), // 0: runme.runner.v2alpha1.ExecuteStop (SessionStrategy)(0), // 1: runme.runner.v2alpha1.SessionStrategy @@ -1641,60 +1795,68 @@ var file_runme_runner_v2alpha1_runner_proto_goTypes = []interface{}{ (*GetSessionResponse)(nil), // 8: runme.runner.v2alpha1.GetSessionResponse (*ListSessionsRequest)(nil), // 9: runme.runner.v2alpha1.ListSessionsRequest (*ListSessionsResponse)(nil), // 10: runme.runner.v2alpha1.ListSessionsResponse - (*DeleteSessionRequest)(nil), // 11: runme.runner.v2alpha1.DeleteSessionRequest - (*DeleteSessionResponse)(nil), // 12: runme.runner.v2alpha1.DeleteSessionResponse - (*Winsize)(nil), // 13: runme.runner.v2alpha1.Winsize - (*ExecuteRequest)(nil), // 14: runme.runner.v2alpha1.ExecuteRequest - (*ExecuteResponse)(nil), // 15: runme.runner.v2alpha1.ExecuteResponse - (*ResolveEnvRequest)(nil), // 16: runme.runner.v2alpha1.ResolveEnvRequest - (*ResolveEnvResult)(nil), // 17: runme.runner.v2alpha1.ResolveEnvResult - (*ResolveEnvResponse)(nil), // 18: runme.runner.v2alpha1.ResolveEnvResponse - nil, // 19: runme.runner.v2alpha1.Session.MetadataEntry - nil, // 20: runme.runner.v2alpha1.CreateSessionRequest.MetadataEntry - (*ResolveEnvRequest_CommandList)(nil), // 21: runme.runner.v2alpha1.ResolveEnvRequest.CommandList - (*ResolveEnvResult_ResolvedEnv)(nil), // 22: runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnv - (*ResolveEnvResult_UnresolvedEnv)(nil), // 23: runme.runner.v2alpha1.ResolveEnvResult.UnresolvedEnv - (*ProgramConfig)(nil), // 24: runme.runner.v2alpha1.ProgramConfig - (*wrapperspb.UInt32Value)(nil), // 25: google.protobuf.UInt32Value + (*UpdateSessionRequest)(nil), // 11: runme.runner.v2alpha1.UpdateSessionRequest + (*UpdateSessionResponse)(nil), // 12: runme.runner.v2alpha1.UpdateSessionResponse + (*DeleteSessionRequest)(nil), // 13: runme.runner.v2alpha1.DeleteSessionRequest + (*DeleteSessionResponse)(nil), // 14: runme.runner.v2alpha1.DeleteSessionResponse + (*Winsize)(nil), // 15: runme.runner.v2alpha1.Winsize + (*ExecuteRequest)(nil), // 16: runme.runner.v2alpha1.ExecuteRequest + (*ExecuteResponse)(nil), // 17: runme.runner.v2alpha1.ExecuteResponse + (*ResolveEnvRequest)(nil), // 18: runme.runner.v2alpha1.ResolveEnvRequest + (*ResolveEnvResult)(nil), // 19: runme.runner.v2alpha1.ResolveEnvResult + (*ResolveEnvResponse)(nil), // 20: runme.runner.v2alpha1.ResolveEnvResponse + nil, // 21: runme.runner.v2alpha1.Session.MetadataEntry + nil, // 22: runme.runner.v2alpha1.CreateSessionRequest.MetadataEntry + nil, // 23: runme.runner.v2alpha1.UpdateSessionRequest.MetadataEntry + (*ResolveEnvRequest_CommandList)(nil), // 24: runme.runner.v2alpha1.ResolveEnvRequest.CommandList + (*ResolveEnvResult_ResolvedEnv)(nil), // 25: runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnv + (*ResolveEnvResult_UnresolvedEnv)(nil), // 26: runme.runner.v2alpha1.ResolveEnvResult.UnresolvedEnv + (*ProgramConfig)(nil), // 27: runme.runner.v2alpha1.ProgramConfig + (*wrapperspb.UInt32Value)(nil), // 28: google.protobuf.UInt32Value } var file_runme_runner_v2alpha1_runner_proto_depIdxs = []int32{ - 19, // 0: runme.runner.v2alpha1.Session.metadata:type_name -> runme.runner.v2alpha1.Session.MetadataEntry - 20, // 1: runme.runner.v2alpha1.CreateSessionRequest.metadata:type_name -> runme.runner.v2alpha1.CreateSessionRequest.MetadataEntry + 21, // 0: runme.runner.v2alpha1.Session.metadata:type_name -> runme.runner.v2alpha1.Session.MetadataEntry + 22, // 1: runme.runner.v2alpha1.CreateSessionRequest.metadata:type_name -> runme.runner.v2alpha1.CreateSessionRequest.MetadataEntry 3, // 2: runme.runner.v2alpha1.CreateSessionRequest.project:type_name -> runme.runner.v2alpha1.Project 4, // 3: runme.runner.v2alpha1.CreateSessionResponse.session:type_name -> runme.runner.v2alpha1.Session 4, // 4: runme.runner.v2alpha1.GetSessionResponse.session:type_name -> runme.runner.v2alpha1.Session 4, // 5: runme.runner.v2alpha1.ListSessionsResponse.sessions:type_name -> runme.runner.v2alpha1.Session - 24, // 6: runme.runner.v2alpha1.ExecuteRequest.config:type_name -> runme.runner.v2alpha1.ProgramConfig - 0, // 7: runme.runner.v2alpha1.ExecuteRequest.stop:type_name -> runme.runner.v2alpha1.ExecuteStop - 13, // 8: runme.runner.v2alpha1.ExecuteRequest.winsize:type_name -> runme.runner.v2alpha1.Winsize - 1, // 9: runme.runner.v2alpha1.ExecuteRequest.session_strategy:type_name -> runme.runner.v2alpha1.SessionStrategy - 3, // 10: runme.runner.v2alpha1.ExecuteRequest.project:type_name -> runme.runner.v2alpha1.Project - 25, // 11: runme.runner.v2alpha1.ExecuteResponse.exit_code:type_name -> google.protobuf.UInt32Value - 25, // 12: runme.runner.v2alpha1.ExecuteResponse.pid:type_name -> google.protobuf.UInt32Value - 21, // 13: runme.runner.v2alpha1.ResolveEnvRequest.commands:type_name -> runme.runner.v2alpha1.ResolveEnvRequest.CommandList - 1, // 14: runme.runner.v2alpha1.ResolveEnvRequest.session_strategy:type_name -> runme.runner.v2alpha1.SessionStrategy - 3, // 15: runme.runner.v2alpha1.ResolveEnvRequest.project:type_name -> runme.runner.v2alpha1.Project - 22, // 16: runme.runner.v2alpha1.ResolveEnvResult.resolved_env:type_name -> runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnv - 23, // 17: runme.runner.v2alpha1.ResolveEnvResult.unresolved_env:type_name -> runme.runner.v2alpha1.ResolveEnvResult.UnresolvedEnv - 17, // 18: runme.runner.v2alpha1.ResolveEnvResponse.items:type_name -> runme.runner.v2alpha1.ResolveEnvResult - 2, // 19: runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnv.source:type_name -> runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnvSource - 5, // 20: runme.runner.v2alpha1.RunnerService.CreateSession:input_type -> runme.runner.v2alpha1.CreateSessionRequest - 7, // 21: runme.runner.v2alpha1.RunnerService.GetSession:input_type -> runme.runner.v2alpha1.GetSessionRequest - 9, // 22: runme.runner.v2alpha1.RunnerService.ListSessions:input_type -> runme.runner.v2alpha1.ListSessionsRequest - 11, // 23: runme.runner.v2alpha1.RunnerService.DeleteSession:input_type -> runme.runner.v2alpha1.DeleteSessionRequest - 14, // 24: runme.runner.v2alpha1.RunnerService.Execute:input_type -> runme.runner.v2alpha1.ExecuteRequest - 16, // 25: runme.runner.v2alpha1.RunnerService.ResolveEnv:input_type -> runme.runner.v2alpha1.ResolveEnvRequest - 6, // 26: runme.runner.v2alpha1.RunnerService.CreateSession:output_type -> runme.runner.v2alpha1.CreateSessionResponse - 8, // 27: runme.runner.v2alpha1.RunnerService.GetSession:output_type -> runme.runner.v2alpha1.GetSessionResponse - 10, // 28: runme.runner.v2alpha1.RunnerService.ListSessions:output_type -> runme.runner.v2alpha1.ListSessionsResponse - 12, // 29: runme.runner.v2alpha1.RunnerService.DeleteSession:output_type -> runme.runner.v2alpha1.DeleteSessionResponse - 15, // 30: runme.runner.v2alpha1.RunnerService.Execute:output_type -> runme.runner.v2alpha1.ExecuteResponse - 18, // 31: runme.runner.v2alpha1.RunnerService.ResolveEnv:output_type -> runme.runner.v2alpha1.ResolveEnvResponse - 26, // [26:32] is the sub-list for method output_type - 20, // [20:26] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 23, // 6: runme.runner.v2alpha1.UpdateSessionRequest.metadata:type_name -> runme.runner.v2alpha1.UpdateSessionRequest.MetadataEntry + 3, // 7: runme.runner.v2alpha1.UpdateSessionRequest.project:type_name -> runme.runner.v2alpha1.Project + 4, // 8: runme.runner.v2alpha1.UpdateSessionResponse.session:type_name -> runme.runner.v2alpha1.Session + 27, // 9: runme.runner.v2alpha1.ExecuteRequest.config:type_name -> runme.runner.v2alpha1.ProgramConfig + 0, // 10: runme.runner.v2alpha1.ExecuteRequest.stop:type_name -> runme.runner.v2alpha1.ExecuteStop + 15, // 11: runme.runner.v2alpha1.ExecuteRequest.winsize:type_name -> runme.runner.v2alpha1.Winsize + 1, // 12: runme.runner.v2alpha1.ExecuteRequest.session_strategy:type_name -> runme.runner.v2alpha1.SessionStrategy + 3, // 13: runme.runner.v2alpha1.ExecuteRequest.project:type_name -> runme.runner.v2alpha1.Project + 28, // 14: runme.runner.v2alpha1.ExecuteResponse.exit_code:type_name -> google.protobuf.UInt32Value + 28, // 15: runme.runner.v2alpha1.ExecuteResponse.pid:type_name -> google.protobuf.UInt32Value + 24, // 16: runme.runner.v2alpha1.ResolveEnvRequest.commands:type_name -> runme.runner.v2alpha1.ResolveEnvRequest.CommandList + 1, // 17: runme.runner.v2alpha1.ResolveEnvRequest.session_strategy:type_name -> runme.runner.v2alpha1.SessionStrategy + 3, // 18: runme.runner.v2alpha1.ResolveEnvRequest.project:type_name -> runme.runner.v2alpha1.Project + 25, // 19: runme.runner.v2alpha1.ResolveEnvResult.resolved_env:type_name -> runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnv + 26, // 20: runme.runner.v2alpha1.ResolveEnvResult.unresolved_env:type_name -> runme.runner.v2alpha1.ResolveEnvResult.UnresolvedEnv + 19, // 21: runme.runner.v2alpha1.ResolveEnvResponse.items:type_name -> runme.runner.v2alpha1.ResolveEnvResult + 2, // 22: runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnv.source:type_name -> runme.runner.v2alpha1.ResolveEnvResult.ResolvedEnvSource + 5, // 23: runme.runner.v2alpha1.RunnerService.CreateSession:input_type -> runme.runner.v2alpha1.CreateSessionRequest + 7, // 24: runme.runner.v2alpha1.RunnerService.GetSession:input_type -> runme.runner.v2alpha1.GetSessionRequest + 9, // 25: runme.runner.v2alpha1.RunnerService.ListSessions:input_type -> runme.runner.v2alpha1.ListSessionsRequest + 11, // 26: runme.runner.v2alpha1.RunnerService.UpdateSession:input_type -> runme.runner.v2alpha1.UpdateSessionRequest + 13, // 27: runme.runner.v2alpha1.RunnerService.DeleteSession:input_type -> runme.runner.v2alpha1.DeleteSessionRequest + 16, // 28: runme.runner.v2alpha1.RunnerService.Execute:input_type -> runme.runner.v2alpha1.ExecuteRequest + 18, // 29: runme.runner.v2alpha1.RunnerService.ResolveEnv:input_type -> runme.runner.v2alpha1.ResolveEnvRequest + 6, // 30: runme.runner.v2alpha1.RunnerService.CreateSession:output_type -> runme.runner.v2alpha1.CreateSessionResponse + 8, // 31: runme.runner.v2alpha1.RunnerService.GetSession:output_type -> runme.runner.v2alpha1.GetSessionResponse + 10, // 32: runme.runner.v2alpha1.RunnerService.ListSessions:output_type -> runme.runner.v2alpha1.ListSessionsResponse + 12, // 33: runme.runner.v2alpha1.RunnerService.UpdateSession:output_type -> runme.runner.v2alpha1.UpdateSessionResponse + 14, // 34: runme.runner.v2alpha1.RunnerService.DeleteSession:output_type -> runme.runner.v2alpha1.DeleteSessionResponse + 17, // 35: runme.runner.v2alpha1.RunnerService.Execute:output_type -> runme.runner.v2alpha1.ExecuteResponse + 20, // 36: runme.runner.v2alpha1.RunnerService.ResolveEnv:output_type -> runme.runner.v2alpha1.ResolveEnvResponse + 30, // [30:37] is the sub-list for method output_type + 23, // [23:30] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_runme_runner_v2alpha1_runner_proto_init() } @@ -1801,7 +1963,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSessionRequest); i { + switch v := v.(*UpdateSessionRequest); i { case 0: return &v.state case 1: @@ -1813,7 +1975,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSessionResponse); i { + switch v := v.(*UpdateSessionResponse); i { case 0: return &v.state case 1: @@ -1825,7 +1987,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Winsize); i { + switch v := v.(*DeleteSessionRequest); i { case 0: return &v.state case 1: @@ -1837,7 +1999,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteRequest); i { + switch v := v.(*DeleteSessionResponse); i { case 0: return &v.state case 1: @@ -1849,7 +2011,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteResponse); i { + switch v := v.(*Winsize); i { case 0: return &v.state case 1: @@ -1861,7 +2023,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveEnvRequest); i { + switch v := v.(*ExecuteRequest); i { case 0: return &v.state case 1: @@ -1873,7 +2035,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveEnvResult); i { + switch v := v.(*ExecuteResponse); i { case 0: return &v.state case 1: @@ -1885,6 +2047,30 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResolveEnvRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runme_runner_v2alpha1_runner_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResolveEnvResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runme_runner_v2alpha1_runner_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResolveEnvResponse); i { case 0: return &v.state @@ -1896,7 +2082,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { return nil } } - file_runme_runner_v2alpha1_runner_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_runme_runner_v2alpha1_runner_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResolveEnvRequest_CommandList); i { case 0: return &v.state @@ -1908,7 +2094,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { return nil } } - file_runme_runner_v2alpha1_runner_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_runme_runner_v2alpha1_runner_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResolveEnvResult_ResolvedEnv); i { case 0: return &v.state @@ -1920,7 +2106,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { return nil } } - file_runme_runner_v2alpha1_runner_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_runme_runner_v2alpha1_runner_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResolveEnvResult_UnresolvedEnv); i { case 0: return &v.state @@ -1934,12 +2120,13 @@ func file_runme_runner_v2alpha1_runner_proto_init() { } } file_runme_runner_v2alpha1_runner_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_runme_runner_v2alpha1_runner_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_runme_runner_v2alpha1_runner_proto_msgTypes[13].OneofWrappers = []interface{}{ + file_runme_runner_v2alpha1_runner_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_runme_runner_v2alpha1_runner_proto_msgTypes[13].OneofWrappers = []interface{}{} + file_runme_runner_v2alpha1_runner_proto_msgTypes[15].OneofWrappers = []interface{}{ (*ResolveEnvRequest_Commands)(nil), (*ResolveEnvRequest_Script)(nil), } - file_runme_runner_v2alpha1_runner_proto_msgTypes[14].OneofWrappers = []interface{}{ + file_runme_runner_v2alpha1_runner_proto_msgTypes[16].OneofWrappers = []interface{}{ (*ResolveEnvResult_ResolvedEnv_)(nil), (*ResolveEnvResult_UnresolvedEnv_)(nil), } @@ -1949,7 +2136,7 @@ func file_runme_runner_v2alpha1_runner_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_runme_runner_v2alpha1_runner_proto_rawDesc, NumEnums: 3, - NumMessages: 21, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/internal/gen/proto/go/runme/runner/v2alpha1/runner_grpc.pb.go b/internal/gen/proto/go/runme/runner/v2alpha1/runner_grpc.pb.go index dfabf7e3f..99c8ac04e 100644 --- a/internal/gen/proto/go/runme/runner/v2alpha1/runner_grpc.pb.go +++ b/internal/gen/proto/go/runme/runner/v2alpha1/runner_grpc.pb.go @@ -22,6 +22,7 @@ const ( RunnerService_CreateSession_FullMethodName = "/runme.runner.v2alpha1.RunnerService/CreateSession" RunnerService_GetSession_FullMethodName = "/runme.runner.v2alpha1.RunnerService/GetSession" RunnerService_ListSessions_FullMethodName = "/runme.runner.v2alpha1.RunnerService/ListSessions" + RunnerService_UpdateSession_FullMethodName = "/runme.runner.v2alpha1.RunnerService/UpdateSession" RunnerService_DeleteSession_FullMethodName = "/runme.runner.v2alpha1.RunnerService/DeleteSession" RunnerService_Execute_FullMethodName = "/runme.runner.v2alpha1.RunnerService/Execute" RunnerService_ResolveEnv_FullMethodName = "/runme.runner.v2alpha1.RunnerService/ResolveEnv" @@ -34,6 +35,7 @@ type RunnerServiceClient interface { CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) + UpdateSession(ctx context.Context, in *UpdateSessionRequest, opts ...grpc.CallOption) (*UpdateSessionResponse, error) DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*DeleteSessionResponse, error) // Execute executes a program. Examine "ExecuteRequest" to explore // configuration options. @@ -81,6 +83,15 @@ func (c *runnerServiceClient) ListSessions(ctx context.Context, in *ListSessions return out, nil } +func (c *runnerServiceClient) UpdateSession(ctx context.Context, in *UpdateSessionRequest, opts ...grpc.CallOption) (*UpdateSessionResponse, error) { + out := new(UpdateSessionResponse) + err := c.cc.Invoke(ctx, RunnerService_UpdateSession_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *runnerServiceClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*DeleteSessionResponse, error) { out := new(DeleteSessionResponse) err := c.cc.Invoke(ctx, RunnerService_DeleteSession_FullMethodName, in, out, opts...) @@ -137,6 +148,7 @@ type RunnerServiceServer interface { CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) + UpdateSession(context.Context, *UpdateSessionRequest) (*UpdateSessionResponse, error) DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) // Execute executes a program. Examine "ExecuteRequest" to explore // configuration options. @@ -163,6 +175,9 @@ func (UnimplementedRunnerServiceServer) GetSession(context.Context, *GetSessionR func (UnimplementedRunnerServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented") } +func (UnimplementedRunnerServiceServer) UpdateSession(context.Context, *UpdateSessionRequest) (*UpdateSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSession not implemented") +} func (UnimplementedRunnerServiceServer) DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteSession not implemented") } @@ -239,6 +254,24 @@ func _RunnerService_ListSessions_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _RunnerService_UpdateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunnerServiceServer).UpdateSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunnerService_UpdateSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunnerServiceServer).UpdateSession(ctx, req.(*UpdateSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _RunnerService_DeleteSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteSessionRequest) if err := dec(in); err != nil { @@ -320,6 +353,10 @@ var RunnerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListSessions", Handler: _RunnerService_ListSessions_Handler, }, + { + MethodName: "UpdateSession", + Handler: _RunnerService_UpdateSession_Handler, + }, { MethodName: "DeleteSession", Handler: _RunnerService_DeleteSession_Handler, diff --git a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.d.ts b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.d.ts index f996d0c92..5ace5b6e2 100644 --- a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.d.ts +++ b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.d.ts @@ -12,6 +12,8 @@ import type { ExecuteRequest } from "./runner_pb"; import type { DuplexStreamingCall } from "@protobuf-ts/runtime-rpc"; import type { DeleteSessionResponse } from "./runner_pb"; import type { DeleteSessionRequest } from "./runner_pb"; +import type { UpdateSessionResponse } from "./runner_pb"; +import type { UpdateSessionRequest } from "./runner_pb"; import type { ListSessionsResponse } from "./runner_pb"; import type { ListSessionsRequest } from "./runner_pb"; import type { GetSessionResponse } from "./runner_pb"; @@ -36,6 +38,10 @@ export interface IRunnerServiceClient { * @generated from protobuf rpc: ListSessions(runme.runner.v2alpha1.ListSessionsRequest) returns (runme.runner.v2alpha1.ListSessionsResponse); */ listSessions(input: ListSessionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: UpdateSession(runme.runner.v2alpha1.UpdateSessionRequest) returns (runme.runner.v2alpha1.UpdateSessionResponse); + */ + updateSession(input: UpdateSessionRequest, options?: RpcOptions): UnaryCall; /** * @generated from protobuf rpc: DeleteSession(runme.runner.v2alpha1.DeleteSessionRequest) returns (runme.runner.v2alpha1.DeleteSessionResponse); */ @@ -78,6 +84,10 @@ export declare class RunnerServiceClient implements IRunnerServiceClient, Servic * @generated from protobuf rpc: ListSessions(runme.runner.v2alpha1.ListSessionsRequest) returns (runme.runner.v2alpha1.ListSessionsResponse); */ listSessions(input: ListSessionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: UpdateSession(runme.runner.v2alpha1.UpdateSessionRequest) returns (runme.runner.v2alpha1.UpdateSessionResponse); + */ + updateSession(input: UpdateSessionRequest, options?: RpcOptions): UnaryCall; /** * @generated from protobuf rpc: DeleteSession(runme.runner.v2alpha1.DeleteSessionRequest) returns (runme.runner.v2alpha1.DeleteSessionResponse); */ diff --git a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.js b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.js index 7327eef25..ef977716f 100644 --- a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.js +++ b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.client.js @@ -36,11 +36,18 @@ export class RunnerServiceClient { const method = this.methods[2], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * @generated from protobuf rpc: UpdateSession(runme.runner.v2alpha1.UpdateSessionRequest) returns (runme.runner.v2alpha1.UpdateSessionResponse); + */ + updateSession(input, options) { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } /** * @generated from protobuf rpc: DeleteSession(runme.runner.v2alpha1.DeleteSessionRequest) returns (runme.runner.v2alpha1.DeleteSessionResponse); */ deleteSession(input, options) { - const method = this.methods[3], opt = this._transport.mergeOptions(options); + const method = this.methods[4], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** @@ -55,14 +62,14 @@ export class RunnerServiceClient { * @generated from protobuf rpc: Execute(stream runme.runner.v2alpha1.ExecuteRequest) returns (stream runme.runner.v2alpha1.ExecuteResponse); */ execute(options) { - const method = this.methods[4], opt = this._transport.mergeOptions(options); + const method = this.methods[5], opt = this._transport.mergeOptions(options); return stackIntercept("duplex", this._transport, method, opt); } /** * @generated from protobuf rpc: ResolveEnv(runme.runner.v2alpha1.ResolveEnvRequest) returns (runme.runner.v2alpha1.ResolveEnvResponse); */ resolveEnv(input, options) { - const method = this.methods[5], opt = this._transport.mergeOptions(options); + const method = this.methods[6], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } } diff --git a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.d.ts b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.d.ts index e3b61d7e1..e80467e66 100644 --- a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.d.ts +++ b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.d.ts @@ -120,6 +120,47 @@ export interface ListSessionsResponse { */ sessions: Session[]; } +/** + * @generated from protobuf message runme.runner.v2alpha1.UpdateSessionRequest + */ +export interface UpdateSessionRequest { + /** + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * metadata is a map of client specific metadata. + * + * @generated from protobuf field: map metadata = 2; + */ + metadata: { + [key: string]: string; + }; + /** + * env field provides an initial set of environment variables + * for a newly created session. + * + * @generated from protobuf field: repeated string env = 3; + */ + env: string[]; + /** + * project from which to load environment variables. + * They will be appended to the list from the env field. + * The env field has a higher priority. + * + * @generated from protobuf field: optional runme.runner.v2alpha1.Project project = 4; + */ + project?: Project; +} +/** + * @generated from protobuf message runme.runner.v2alpha1.UpdateSessionResponse + */ +export interface UpdateSessionResponse { + /** + * @generated from protobuf field: runme.runner.v2alpha1.Session session = 1; + */ + session?: Session; +} /** * @generated from protobuf message runme.runner.v2alpha1.DeleteSessionRequest */ @@ -494,6 +535,20 @@ declare class ListSessionsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message runme.runner.v2alpha1.UpdateSessionRequest + */ +export declare const UpdateSessionRequest: UpdateSessionRequest$Type; +declare class UpdateSessionResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message runme.runner.v2alpha1.UpdateSessionResponse + */ +export declare const UpdateSessionResponse: UpdateSessionResponse$Type; declare class DeleteSessionRequest$Type extends MessageType { constructor(); } diff --git a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.js b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.js index 68636b545..8f9785d3f 100644 --- a/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.js +++ b/internal/gen/proto/ts/runme/runner/v2alpha1/runner_pb.js @@ -175,6 +175,33 @@ class ListSessionsResponse$Type extends MessageType { */ export const ListSessionsResponse = new ListSessionsResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods +class UpdateSessionRequest$Type extends MessageType { + constructor() { + super("runme.runner.v2alpha1.UpdateSessionRequest", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }, + { no: 3, name: "env", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "project", kind: "message", T: () => Project } + ]); + } +} +/** + * @generated MessageType for protobuf message runme.runner.v2alpha1.UpdateSessionRequest + */ +export const UpdateSessionRequest = new UpdateSessionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UpdateSessionResponse$Type extends MessageType { + constructor() { + super("runme.runner.v2alpha1.UpdateSessionResponse", [ + { no: 1, name: "session", kind: "message", T: () => Session } + ]); + } +} +/** + * @generated MessageType for protobuf message runme.runner.v2alpha1.UpdateSessionResponse + */ +export const UpdateSessionResponse = new UpdateSessionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods class DeleteSessionRequest$Type extends MessageType { constructor() { super("runme.runner.v2alpha1.DeleteSessionRequest", [ @@ -334,6 +361,7 @@ export const RunnerService = new ServiceType("runme.runner.v2alpha1.RunnerServic { name: "CreateSession", options: {}, I: CreateSessionRequest, O: CreateSessionResponse }, { name: "GetSession", options: {}, I: GetSessionRequest, O: GetSessionResponse }, { name: "ListSessions", options: {}, I: ListSessionsRequest, O: ListSessionsResponse }, + { name: "UpdateSession", options: {}, I: UpdateSessionRequest, O: UpdateSessionResponse }, { name: "DeleteSession", options: {}, I: DeleteSessionRequest, O: DeleteSessionResponse }, { name: "Execute", serverStreaming: true, clientStreaming: true, options: {}, I: ExecuteRequest, O: ExecuteResponse }, { name: "ResolveEnv", options: {}, I: ResolveEnvRequest, O: ResolveEnvResponse } diff --git a/internal/project/project.go b/internal/project/project.go index e665688ce..e73c6539f 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -16,9 +16,10 @@ import ( "github.com/go-git/go-git/v5/plumbing/format/gitignore" "github.com/joho/godotenv" "github.com/pkg/errors" + "go.uber.org/zap" + "github.com/stateful/runme/internal/document" "github.com/stateful/runme/internal/document/identity" - "go.uber.org/zap" ) type LoadEventType uint8 @@ -82,6 +83,13 @@ func ExtractDataFromLoadEvent[T any](event LoadEvent) T { return data } +var DefaultProjectOptions = [...]ProjectOption{ + WithFindRepoUpward(), + WithRespectGitignore(true), + WithEnvFilesReadOrder([]string{".env"}), + WithIgnoreFilePatterns("node_modules", ".venv", "vendor"), +} + type ProjectOption func(*Project) func WithRespectGitignore(value bool) ProjectOption { @@ -510,8 +518,8 @@ func isMarkdown(filePath string) bool { return ext == ".md" || ext == ".mdx" || ext == ".mdi" || ext == ".mdr" || ext == ".run" || ext == ".runme" } -func (p *Project) LoadEnvs() ([]string, error) { - envs, err := p.LoadEnvsAsMap() +func (p *Project) LoadEnv() ([]string, error) { + envs, err := p.LoadEnvAsMap() if err != nil { return nil, err } @@ -525,7 +533,7 @@ func (p *Project) LoadEnvs() ([]string, error) { return result, nil } -func (p *Project) LoadEnvsAsMap() (map[string]string, error) { +func (p *Project) LoadEnvAsMap() (map[string]string, error) { // For file-based projects, there are no envs to read. if p.fs == nil { return nil, nil diff --git a/internal/project/project_test.go b/internal/project/project_test.go index f3efea51f..1ec5d7755 100644 --- a/internal/project/project_test.go +++ b/internal/project/project_test.go @@ -134,7 +134,6 @@ func TestProjectLoad(t *testing.T) { t.Run("GitProject", func(t *testing.T) { p, err := NewDirProject( gitProjectDir, - WithFindRepoUpward(), WithIgnoreFilePatterns(".git.bkp"), WithIgnoreFilePatterns(".gitignore.bkp"), ) @@ -268,9 +267,16 @@ func TestProjectLoad(t *testing.T) { gitProjectNestedDir := testdata.GitProjectNestedPath() t.Run("GitProjectWithNested", func(t *testing.T) { - pRoot, err := NewDirProject( + pRoot1, err := NewDirProject( + gitProjectDir, + WithFindRepoUpward(), // not needed, but let's check if it's noop in this case + WithIgnoreFilePatterns(".git.bkp"), + WithIgnoreFilePatterns(".gitignore.bkp"), + ) + require.NoError(t, err) + + pRoot2, err := NewDirProject( gitProjectDir, - WithFindRepoUpward(), WithIgnoreFilePatterns(".git.bkp"), WithIgnoreFilePatterns(".gitignore.bkp"), ) @@ -283,13 +289,13 @@ func TestProjectLoad(t *testing.T) { ) require.NoError(t, err) - require.EqualValues(t, pRoot.fs.Root(), pNested.fs.Root()) + require.EqualValues(t, pRoot1.fs.Root(), pRoot2.fs.Root()) + require.EqualValues(t, pRoot1.fs.Root(), pNested.fs.Root()) }) t.Run("DirProjectWithRespectGitignoreAndIgnorePatterns", func(t *testing.T) { p, err := NewDirProject( gitProjectDir, - WithFindRepoUpward(), WithRespectGitignore(true), WithIgnoreFilePatterns(".git.bkp"), WithIgnoreFilePatterns(".gitignore.bkp"), @@ -467,7 +473,7 @@ func TestProjectLoad(t *testing.T) { func TestLoadTasks(t *testing.T) { gitProjectDir := testdata.GitProjectPath() - p, err := NewDirProject(gitProjectDir, WithFindRepoUpward(), WithIgnoreFilePatterns(".*.bkp")) + p, err := NewDirProject(gitProjectDir, WithIgnoreFilePatterns(".*.bkp")) require.NoError(t, err) tasks, err := LoadTasks(context.Background(), p) @@ -475,6 +481,17 @@ func TestLoadTasks(t *testing.T) { assert.Len(t, tasks, 5) } +func TestLoadEnv(t *testing.T) { + gitProjectDir := testdata.GitProjectPath() + p, err := NewDirProject(gitProjectDir, WithIgnoreFilePatterns(".*.bkp"), WithEnvFilesReadOrder([]string{".env"})) + require.NoError(t, err) + + env, err := p.LoadEnv() + require.NoError(t, err) + assert.Len(t, env, 1) + assert.Equal(t, "PROJECT_ENV_FROM_DOTFILE=1", env[0]) +} + func mapLoadEvents[T any](events []LoadEvent, fn func(LoadEvent) T) []T { result := make([]T, 0, len(events)) diff --git a/internal/project/testdata/git-project/.env b/internal/project/testdata/git-project/.env new file mode 100644 index 000000000..c74fd8a48 --- /dev/null +++ b/internal/project/testdata/git-project/.env @@ -0,0 +1 @@ +PROJECT_ENV_FROM_DOTFILE=1 diff --git a/internal/runner/client/client_local.go b/internal/runner/client/client_local.go index 182d5001e..a70d8d869 100644 --- a/internal/runner/client/client_local.go +++ b/internal/runner/client/client_local.go @@ -96,7 +96,7 @@ func (r *LocalRunner) newExecutable(task project.Task) (runner.Executable, error } // TODO(adamb): what about `r.envs`? - cfg.PreEnv, err = r.project.LoadEnvs() + cfg.PreEnv, err = r.project.LoadEnv() if err != nil { return nil, err } diff --git a/internal/runner/service.go b/internal/runner/service.go index e4b250245..4c4b23add 100644 --- a/internal/runner/service.go +++ b/internal/runner/service.go @@ -80,7 +80,7 @@ func (r *runnerService) CreateSession(ctx context.Context, req *runnerv1.CreateS copy(envs, req.Envs) if proj != nil { - projEnvs, err := proj.LoadEnvs() + projEnvs, err := proj.LoadEnv() if err != nil { return nil, err } @@ -257,7 +257,7 @@ func (r *runnerService) Execute(srv runnerv1.RunnerService_ExecuteServer) error return err } - projEnvs, err := proj.LoadEnvs() + projEnvs, err := proj.LoadEnv() if err != nil { return err } diff --git a/internal/runnerv2service/service_execute_test.go b/internal/runnerv2service/service_execute_test.go index 9eb2676fc..5e2737e28 100644 --- a/internal/runnerv2service/service_execute_test.go +++ b/internal/runnerv2service/service_execute_test.go @@ -196,8 +196,6 @@ func TestRunnerServiceServerExecuteConfigs(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { - t.Parallel() - stream, err := client.Execute(context.Background()) require.NoError(t, err) diff --git a/internal/runnerv2service/service_resolve_env.go b/internal/runnerv2service/service_resolve_env.go index 56942f337..1b082cba9 100644 --- a/internal/runnerv2service/service_resolve_env.go +++ b/internal/runnerv2service/service_resolve_env.go @@ -5,25 +5,27 @@ import ( "slices" "strings" - "github.com/stateful/runme/internal/command" - runnerv2alpha1 "github.com/stateful/runme/internal/gen/proto/go/runme/runner/v2alpha1" "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + "github.com/stateful/runme/internal/command" + runnerv2alpha1 "github.com/stateful/runme/internal/gen/proto/go/runme/runner/v2alpha1" ) func (r *runnerService) ResolveEnv(ctx context.Context, req *runnerv2alpha1.ResolveEnvRequest) (*runnerv2alpha1.ResolveEnvResponse, error) { + // Add explicitly passed env as a source. sources := []command.EnvResolverSource{ command.EnvResolverSourceFunc(req.Env), } - // Load project envs. + // Add project env as a source. proj, err := convertProtoProjectToProject(req.GetProject()) if err != nil { return nil, err } if proj != nil { - projEnvs, err := proj.LoadEnvs() + projEnvs, err := proj.LoadEnv() if err != nil { r.logger.Info("failed to load envs for project", zap.Error(err)) } else { @@ -31,7 +33,7 @@ func (r *runnerService) ResolveEnv(ctx context.Context, req *runnerv2alpha1.Reso } } - // Load session envs. + // Add session env as a source. session, found, err := r.getSessionFromRequest(req) if err != nil { return nil, err diff --git a/internal/runnerv2service/service_resolve_env_test.go b/internal/runnerv2service/service_resolve_env_test.go index 7f5f76dc3..086531655 100644 --- a/internal/runnerv2service/service_resolve_env_test.go +++ b/internal/runnerv2service/service_resolve_env_test.go @@ -43,15 +43,8 @@ func TestRunnerServiceResolveEnv(t *testing.T) { } for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - resp, err := client.ResolveEnv(context.Background(), &runnerv2alpha1.ResolveEnvRequest{ - Env: []string{"TEST_RESOLVED=value"}, - Source: &runnerv2alpha1.ResolveEnvRequest_Script{ - Script: "export TEST_RESOLVED=default\nexport TEST_UNRESOLVED", - }, - }) + resp, err := client.ResolveEnv(context.Background(), tc.request) require.NoError(t, err) require.Len(t, resp.Items, 2) require.EqualValues( diff --git a/internal/runnerv2service/service_sessions.go b/internal/runnerv2service/service_sessions.go index 8655f3d51..e86e58f49 100644 --- a/internal/runnerv2service/service_sessions.go +++ b/internal/runnerv2service/service_sessions.go @@ -11,7 +11,7 @@ import ( "github.com/stateful/runme/internal/project" ) -func toRunnerv2alpha1Session(sess *command.Session) *runnerv2alpha1.Session { +func convertSessionToRunnerv2alpha1Session(sess *command.Session) *runnerv2alpha1.Session { return &runnerv2alpha1.Session{ Id: sess.ID, Env: sess.GetEnv(), @@ -25,9 +25,10 @@ func convertProtoProjectToProject(runnerProj *runnerv2alpha1.Project) (*project. return nil, nil } - opts := []project.ProjectOption{ - project.WithFindRepoUpward(), - project.WithEnvFilesReadOrder(runnerProj.EnvLoadOrder), + opts := project.DefaultProjectOptions[:] + + if runnerProj.EnvLoadOrder != nil { + opts = append(opts, project.WithEnvFilesReadOrder(runnerProj.EnvLoadOrder)) } return project.NewDirProject(runnerProj.Root, opts...) @@ -36,33 +37,16 @@ func convertProtoProjectToProject(runnerProj *runnerv2alpha1.Project) (*project. func (r *runnerService) CreateSession(ctx context.Context, req *runnerv2alpha1.CreateSessionRequest) (*runnerv2alpha1.CreateSessionResponse, error) { r.logger.Info("running CreateSession in runnerService") - proj, err := convertProtoProjectToProject(req.Project) - if err != nil { - return nil, err - } - - env := make([]string, len(req.Env)) - copy(env, req.Env) - - if proj != nil { - projEnvs, err := proj.LoadEnvs() - if err != nil { - return nil, err - } - - env = append(env, projEnvs...) - } - sess := command.NewSession() - if err := sess.SetEnv(env...); err != nil { + if err := r.updateSession(sess, req); err != nil { return nil, err } r.sessions.Add(sess) return &runnerv2alpha1.CreateSessionResponse{ - Session: toRunnerv2alpha1Session(sess), + Session: convertSessionToRunnerv2alpha1Session(sess), }, nil } @@ -75,7 +59,7 @@ func (r *runnerService) GetSession(_ context.Context, req *runnerv2alpha1.GetSes } return &runnerv2alpha1.GetSessionResponse{ - Session: toRunnerv2alpha1Session(sess), + Session: convertSessionToRunnerv2alpha1Session(sess), }, nil } @@ -86,12 +70,27 @@ func (r *runnerService) ListSessions(_ context.Context, req *runnerv2alpha1.List runnerSessions := make([]*runnerv2alpha1.Session, 0, len(sessions)) for _, s := range sessions { - runnerSessions = append(runnerSessions, toRunnerv2alpha1Session(s)) + runnerSessions = append(runnerSessions, convertSessionToRunnerv2alpha1Session(s)) } return &runnerv2alpha1.ListSessionsResponse{Sessions: runnerSessions}, nil } +func (r *runnerService) UpdateSession(_ context.Context, req *runnerv2alpha1.UpdateSessionRequest) (*runnerv2alpha1.UpdateSessionResponse, error) { + r.logger.Info("running UpdateSession in runnerService") + + sess, ok := r.sessions.Get(req.Id) + if !ok { + return nil, status.Error(codes.NotFound, "session not found") + } + + if err := r.updateSession(sess, req); err != nil { + return nil, err + } + + return &runnerv2alpha1.UpdateSessionResponse{Session: convertSessionToRunnerv2alpha1Session(sess)}, nil +} + func (r *runnerService) DeleteSession(_ context.Context, req *runnerv2alpha1.DeleteSessionRequest) (*runnerv2alpha1.DeleteSessionResponse, error) { r.logger.Info("running DeleteSession in runnerService") @@ -100,5 +99,37 @@ func (r *runnerService) DeleteSession(_ context.Context, req *runnerv2alpha1.Del if !deleted { return nil, status.Error(codes.NotFound, "session not found") } + return &runnerv2alpha1.DeleteSessionResponse{}, nil } + +type updateRequest interface { + GetEnv() []string + GetProject() *runnerv2alpha1.Project +} + +func (r *runnerService) updateSession(sess *command.Session, req updateRequest) error { + // Explictly passed env has higher priority and should be set first. + if err := sess.SetEnv(req.GetEnv()...); err != nil { + return err + } + + proj, err := convertProtoProjectToProject(req.GetProject()) + if err != nil { + return err + } + + if proj != nil { + projEnvs, err := proj.LoadEnv() + if err != nil { + return err + } + + // Project envs have lower priority and should be set last. + if err := sess.SetEnv(projEnvs...); err != nil { + return err + } + } + + return nil +} diff --git a/internal/runnerv2service/service_sessions_test.go b/internal/runnerv2service/service_sessions_test.go new file mode 100644 index 000000000..29c77fd8d --- /dev/null +++ b/internal/runnerv2service/service_sessions_test.go @@ -0,0 +1,66 @@ +package runnerv2service + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + runnerv2alpha1 "github.com/stateful/runme/internal/gen/proto/go/runme/runner/v2alpha1" + "github.com/stateful/runme/internal/project/testdata" +) + +// TODO(adamb): add a test case with project. +func TestRunnerServiceSessions(t *testing.T) { + lis, stop := testStartRunnerServiceServer(t) + t.Cleanup(stop) + _, client := testCreateRunnerServiceClient(t, lis) + + t.Run("WithEnv", func(t *testing.T) { + createResp, err := client.CreateSession(context.Background(), &runnerv2alpha1.CreateSessionRequest{}) + require.NoError(t, err) + require.NotNil(t, createResp.Session) + + createResp, err = client.CreateSession(context.Background(), &runnerv2alpha1.CreateSessionRequest{Env: []string{"TEST1=value1"}}) + require.NoError(t, err) + require.EqualValues(t, []string{"TEST1=value1"}, createResp.Session.Env) + + getResp, err := client.GetSession(context.Background(), &runnerv2alpha1.GetSessionRequest{Id: createResp.Session.Id}) + require.NoError(t, err) + require.EqualValues(t, []string{"TEST1=value1"}, getResp.Session.Env) + + updateResp, err := client.UpdateSession( + context.Background(), + &runnerv2alpha1.UpdateSessionRequest{Id: createResp.Session.Id, Env: []string{"TEST2=value2"}}, + ) + require.NoError(t, err) + require.Equal(t, []string{"TEST1=value1", "TEST2=value2"}, updateResp.Session.Env) + + deleteResp, err := client.DeleteSession(context.Background(), &runnerv2alpha1.DeleteSessionRequest{Id: updateResp.Session.Id}) + require.NoError(t, err) + require.NotNil(t, deleteResp) + + getResp, err = client.GetSession(context.Background(), &runnerv2alpha1.GetSessionRequest{Id: createResp.Session.Id}) + require.Error(t, err) + require.Nil(t, getResp) + }) + + t.Run("WithProject", func(t *testing.T) { + projectPath := testdata.GitProjectPath() + createResp, err := client.CreateSession( + context.Background(), + &runnerv2alpha1.CreateSessionRequest{Project: &runnerv2alpha1.Project{Root: projectPath, EnvLoadOrder: []string{".env"}}}, + ) + require.NoError(t, err) + require.NotNil(t, createResp.Session) + require.EqualValues(t, []string{"PROJECT_ENV_FROM_DOTFILE=1"}, createResp.Session.Env) + }) + + t.Run("WithProjectInvalid", func(t *testing.T) { + _, err := client.CreateSession( + context.Background(), + &runnerv2alpha1.CreateSessionRequest{Project: &runnerv2alpha1.Project{Root: "/non/existing/path"}}, + ) + require.Error(t, err) + }) +}