diff --git a/.github/workflows/playground_frontend_test.yml b/.github/workflows/playground_frontend_test.yml index 4813b6c69944..aefe2b7aa4d3 100644 --- a/.github/workflows/playground_frontend_test.yml +++ b/.github/workflows/playground_frontend_test.yml @@ -86,6 +86,5 @@ jobs: - name: 'Integration tests' run: | - cp playground/frontend/lib/config.example.dart playground/frontend/lib/config.g.dart chromedriver --port=4444 & ./gradlew :playground:frontend:integrationTest -PdeviceId=web-server diff --git a/learning/tour-of-beam/backend/README.md b/learning/tour-of-beam/backend/README.md index e0294ec5556d..1ec10044ed59 100644 --- a/learning/tour-of-beam/backend/README.md +++ b/learning/tour-of-beam/backend/README.md @@ -41,6 +41,7 @@ To update mocks for tests, run: $ go generate -x ./... ``` +> Note: [`moq`](https://github.com/matryer/moq) tool to be installed ### Datastore schema diff --git a/learning/tour-of-beam/backend/playground_api/api/v1/api.pb.go b/learning/tour-of-beam/backend/playground_api/api/v1/api.pb.go index a3d7e3cd2678..2df53df2bf04 100644 --- a/learning/tour-of-beam/backend/playground_api/api/v1/api.pb.go +++ b/learning/tour-of-beam/backend/playground_api/api/v1/api.pb.go @@ -2588,6 +2588,117 @@ func (x *GetSnippetResponse) GetComplexity() Complexity { return Complexity_COMPLEXITY_UNSPECIFIED } +// GetMetadataRequest represents request for runner metadata +type GetMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetMetadataRequest) Reset() { + *x = GetMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataRequest) ProtoMessage() {} + +func (x *GetMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[42] + 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 GetMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetMetadataRequest) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{42} +} + +// GetMetadataResponse contains metadata about the runner +type GetMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RunnerSdk string `protobuf:"bytes,1,opt,name=runner_sdk,json=runnerSdk,proto3" json:"runner_sdk,omitempty"` + BuildCommitHash string `protobuf:"bytes,2,opt,name=build_commit_hash,json=buildCommitHash,proto3" json:"build_commit_hash,omitempty"` + BuildCommitTimestampSecondsSinceEpoch int64 `protobuf:"varint,3,opt,name=build_commit_timestamp_seconds_since_epoch,json=buildCommitTimestampSecondsSinceEpoch,proto3" json:"build_commit_timestamp_seconds_since_epoch,omitempty"` + BeamSdkVersion string `protobuf:"bytes,4,opt,name=beam_sdk_version,json=beamSdkVersion,proto3" json:"beam_sdk_version,omitempty"` +} + +func (x *GetMetadataResponse) Reset() { + *x = GetMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataResponse) ProtoMessage() {} + +func (x *GetMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[43] + 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 GetMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetMetadataResponse) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{43} +} + +func (x *GetMetadataResponse) GetRunnerSdk() string { + if x != nil { + return x.RunnerSdk + } + return "" +} + +func (x *GetMetadataResponse) GetBuildCommitHash() string { + if x != nil { + return x.BuildCommitHash + } + return "" +} + +func (x *GetMetadataResponse) GetBuildCommitTimestampSecondsSinceEpoch() int64 { + if x != nil { + return x.BuildCommitTimestampSecondsSinceEpoch + } + return 0 +} + +func (x *GetMetadataResponse) GetBeamSdkVersion() string { + if x != nil { + return x.BeamSdkVersion + } + return "" +} + type Categories_Category struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2600,7 +2711,7 @@ type Categories_Category struct { func (x *Categories_Category) Reset() { *x = Categories_Category{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[43] + mi := &file_api_v1_api_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2613,7 +2724,7 @@ func (x *Categories_Category) String() string { func (*Categories_Category) ProtoMessage() {} func (x *Categories_Category) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[43] + mi := &file_api_v1_api_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2889,163 +3000,183 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, - 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, - 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, - 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, - 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, - 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, - 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, - 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, - 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, - 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, - 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, - 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, - 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, - 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, - 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, - 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe5, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x64, 0x6b, 0x12, 0x2a, 0x0a, + 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x59, 0x0a, 0x2a, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, + 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x25, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x64, 0x6b, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x62, 0x65, 0x61, 0x6d, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x52, + 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, + 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, + 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, + 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, + 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, + 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, + 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, + 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, - 0x2a, 0x6e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x12, 0x1a, - 0x0a, 0x16, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, - 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, - 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x4d, - 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x4c, - 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x44, 0x56, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x03, - 0x2a, 0x46, 0x0a, 0x0c, 0x45, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x17, 0x0a, 0x13, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4b, 0x41, 0x46, 0x4b, 0x41, 0x10, 0x01, 0x32, 0x8b, 0x0d, 0x0a, 0x11, 0x50, 0x6c, 0x61, - 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, - 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, + 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x2a, 0x6e, + 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, + 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, + 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, + 0x49, 0x54, 0x59, 0x5f, 0x41, 0x44, 0x56, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x46, + 0x0a, 0x0c, 0x45, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, + 0x0a, 0x19, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, + 0x13, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, + 0x41, 0x46, 0x4b, 0x41, 0x10, 0x01, 0x32, 0xd3, 0x0d, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, + 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, + 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x61, 0x76, - 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, - 0x76, 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, - 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, - 0x70, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, - 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x53, + 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x76, 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, 0x19, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, + 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3061,7 +3192,7 @@ func file_api_v1_api_proto_rawDescGZIP() []byte { } var file_api_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_api_v1_api_proto_goTypes = []interface{}{ (Sdk)(0), // 0: api.v1.Sdk (Status)(0), // 1: api.v1.Status @@ -3110,12 +3241,14 @@ var file_api_v1_api_proto_goTypes = []interface{}{ (*SaveSnippetResponse)(nil), // 44: api.v1.SaveSnippetResponse (*GetSnippetRequest)(nil), // 45: api.v1.GetSnippetRequest (*GetSnippetResponse)(nil), // 46: api.v1.GetSnippetResponse - nil, // 47: api.v1.Dataset.OptionsEntry - (*Categories_Category)(nil), // 48: api.v1.Categories.Category + (*GetMetadataRequest)(nil), // 47: api.v1.GetMetadataRequest + (*GetMetadataResponse)(nil), // 48: api.v1.GetMetadataResponse + nil, // 49: api.v1.Dataset.OptionsEntry + (*Categories_Category)(nil), // 50: api.v1.Categories.Category } var file_api_v1_api_proto_depIdxs = []int32{ 4, // 0: api.v1.Dataset.type:type_name -> api.v1.EmulatorType - 47, // 1: api.v1.Dataset.options:type_name -> api.v1.Dataset.OptionsEntry + 49, // 1: api.v1.Dataset.options:type_name -> api.v1.Dataset.OptionsEntry 0, // 2: api.v1.RunCodeRequest.sdk:type_name -> api.v1.Sdk 5, // 3: api.v1.RunCodeRequest.datasets:type_name -> api.v1.Dataset 42, // 4: api.v1.RunCodeRequest.files:type_name -> api.v1.SnippetFile @@ -3125,7 +3258,7 @@ var file_api_v1_api_proto_depIdxs = []int32{ 3, // 8: api.v1.PrecompiledObject.complexity:type_name -> api.v1.Complexity 5, // 9: api.v1.PrecompiledObject.datasets:type_name -> api.v1.Dataset 0, // 10: api.v1.Categories.sdk:type_name -> api.v1.Sdk - 48, // 11: api.v1.Categories.categories:type_name -> api.v1.Categories.Category + 50, // 11: api.v1.Categories.categories:type_name -> api.v1.Categories.Category 0, // 12: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk 0, // 13: api.v1.GetDefaultPrecompiledObjectRequest.sdk:type_name -> api.v1.Sdk 27, // 14: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories @@ -3158,27 +3291,29 @@ var file_api_v1_api_proto_depIdxs = []int32{ 34, // 41: api.v1.PlaygroundService.GetDefaultPrecompiledObject:input_type -> api.v1.GetDefaultPrecompiledObjectRequest 43, // 42: api.v1.PlaygroundService.SaveSnippet:input_type -> api.v1.SaveSnippetRequest 45, // 43: api.v1.PlaygroundService.GetSnippet:input_type -> api.v1.GetSnippetRequest - 7, // 44: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse - 9, // 45: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse - 17, // 46: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse - 21, // 47: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse - 23, // 48: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse - 19, // 49: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse - 11, // 50: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse - 13, // 51: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse - 15, // 52: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse - 25, // 53: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse - 35, // 54: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse - 36, // 55: api.v1.PlaygroundService.GetPrecompiledObject:output_type -> api.v1.GetPrecompiledObjectResponse - 37, // 56: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse - 38, // 57: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse - 39, // 58: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse - 40, // 59: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse - 41, // 60: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse - 44, // 61: api.v1.PlaygroundService.SaveSnippet:output_type -> api.v1.SaveSnippetResponse - 46, // 62: api.v1.PlaygroundService.GetSnippet:output_type -> api.v1.GetSnippetResponse - 44, // [44:63] is the sub-list for method output_type - 25, // [25:44] is the sub-list for method input_type + 47, // 44: api.v1.PlaygroundService.GetMetadata:input_type -> api.v1.GetMetadataRequest + 7, // 45: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse + 9, // 46: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse + 17, // 47: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse + 21, // 48: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse + 23, // 49: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse + 19, // 50: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse + 11, // 51: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse + 13, // 52: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse + 15, // 53: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse + 25, // 54: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse + 35, // 55: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse + 36, // 56: api.v1.PlaygroundService.GetPrecompiledObject:output_type -> api.v1.GetPrecompiledObjectResponse + 37, // 57: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse + 38, // 58: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse + 39, // 59: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse + 40, // 60: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse + 41, // 61: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse + 44, // 62: api.v1.PlaygroundService.SaveSnippet:output_type -> api.v1.SaveSnippetResponse + 46, // 63: api.v1.PlaygroundService.GetSnippet:output_type -> api.v1.GetSnippetResponse + 48, // 64: api.v1.PlaygroundService.GetMetadata:output_type -> api.v1.GetMetadataResponse + 45, // [45:65] is the sub-list for method output_type + 25, // [25:45] is the sub-list for method input_type 25, // [25:25] is the sub-list for extension type_name 25, // [25:25] is the sub-list for extension extendee 0, // [0:25] is the sub-list for field type_name @@ -3694,7 +3829,31 @@ func file_api_v1_api_proto_init() { return nil } } + file_api_v1_api_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_api_v1_api_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Categories_Category); i { case 0: return &v.state @@ -3713,7 +3872,7 @@ func file_api_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_api_proto_rawDesc, NumEnums: 5, - NumMessages: 44, + NumMessages: 46, NumExtensions: 0, NumServices: 1, }, diff --git a/learning/tour-of-beam/backend/playground_api/api/v1/api_grpc.pb.go b/learning/tour-of-beam/backend/playground_api/api/v1/api_grpc.pb.go index 2894e8f4ef6a..e6798717e04a 100644 --- a/learning/tour-of-beam/backend/playground_api/api/v1/api_grpc.pb.go +++ b/learning/tour-of-beam/backend/playground_api/api/v1/api_grpc.pb.go @@ -60,6 +60,8 @@ type PlaygroundServiceClient interface { SaveSnippet(ctx context.Context, in *SaveSnippetRequest, opts ...grpc.CallOption) (*SaveSnippetResponse, error) // Get the snippet of playground. GetSnippet(ctx context.Context, in *GetSnippetRequest, opts ...grpc.CallOption) (*GetSnippetResponse, error) + // Get the runner metadata. + GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) } type playgroundServiceClient struct { @@ -241,6 +243,15 @@ func (c *playgroundServiceClient) GetSnippet(ctx context.Context, in *GetSnippet return out, nil } +func (c *playgroundServiceClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) { + out := new(GetMetadataResponse) + err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PlaygroundServiceServer is the server API for PlaygroundService service. // All implementations should embed UnimplementedPlaygroundServiceServer // for forward compatibility @@ -283,6 +294,8 @@ type PlaygroundServiceServer interface { SaveSnippet(context.Context, *SaveSnippetRequest) (*SaveSnippetResponse, error) // Get the snippet of playground. GetSnippet(context.Context, *GetSnippetRequest) (*GetSnippetResponse, error) + // Get the runner metadata. + GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) } // UnimplementedPlaygroundServiceServer should be embedded to have forward compatible implementations. @@ -346,6 +359,9 @@ func (UnimplementedPlaygroundServiceServer) SaveSnippet(context.Context, *SaveSn func (UnimplementedPlaygroundServiceServer) GetSnippet(context.Context, *GetSnippetRequest) (*GetSnippetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSnippet not implemented") } +func (UnimplementedPlaygroundServiceServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} // UnsafePlaygroundServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PlaygroundServiceServer will @@ -700,6 +716,24 @@ func _PlaygroundService_GetSnippet_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _PlaygroundService_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlaygroundServiceServer).GetMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.PlaygroundService/GetMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlaygroundServiceServer).GetMetadata(ctx, req.(*GetMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PlaygroundService_ServiceDesc is the grpc.ServiceDesc for PlaygroundService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -783,6 +817,10 @@ var PlaygroundService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetSnippet", Handler: _PlaygroundService_GetSnippet_Handler, }, + { + MethodName: "GetMetadata", + Handler: _PlaygroundService_GetMetadata_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/api.proto", diff --git a/learning/tour-of-beam/backend/playground_api/api/v1/mock.go b/learning/tour-of-beam/backend/playground_api/api/v1/mock.go index ad58c88a72eb..58d10e8f2fd9 100644 --- a/learning/tour-of-beam/backend/playground_api/api/v1/mock.go +++ b/learning/tour-of-beam/backend/playground_api/api/v1/mock.go @@ -37,6 +37,9 @@ var _ PlaygroundServiceClient = &PlaygroundServiceClientMock{} // GetLogsFunc: func(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error) { // panic("mock out the GetLogs method") // }, +// GetMetadataFunc: func(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) { +// panic("mock out the GetMetadata method") +// }, // GetPrecompiledObjectFunc: func(ctx context.Context, in *GetPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectResponse, error) { // panic("mock out the GetPrecompiledObject method") // }, @@ -101,6 +104,9 @@ type PlaygroundServiceClientMock struct { // GetLogsFunc mocks the GetLogs method. GetLogsFunc func(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error) + // GetMetadataFunc mocks the GetMetadata method. + GetMetadataFunc func(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) + // GetPrecompiledObjectFunc mocks the GetPrecompiledObject method. GetPrecompiledObjectFunc func(ctx context.Context, in *GetPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectResponse, error) @@ -196,6 +202,15 @@ type PlaygroundServiceClientMock struct { // Opts is the opts argument value. Opts []grpc.CallOption } + // GetMetadata holds details about calls to the GetMetadata method. + GetMetadata []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // In is the in argument value. + In *GetMetadataRequest + // Opts is the opts argument value. + Opts []grpc.CallOption + } // GetPrecompiledObject holds details about calls to the GetPrecompiledObject method. GetPrecompiledObject []struct { // Ctx is the ctx argument value. @@ -320,6 +335,7 @@ type PlaygroundServiceClientMock struct { lockGetDefaultPrecompiledObject sync.RWMutex lockGetGraph sync.RWMutex lockGetLogs sync.RWMutex + lockGetMetadata sync.RWMutex lockGetPrecompiledObject sync.RWMutex lockGetPrecompiledObjectCode sync.RWMutex lockGetPrecompiledObjectGraph sync.RWMutex @@ -575,6 +591,46 @@ func (mock *PlaygroundServiceClientMock) GetLogsCalls() []struct { return calls } +// GetMetadata calls GetMetadataFunc. +func (mock *PlaygroundServiceClientMock) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) { + if mock.GetMetadataFunc == nil { + panic("PlaygroundServiceClientMock.GetMetadataFunc: method is nil but PlaygroundServiceClient.GetMetadata was just called") + } + callInfo := struct { + Ctx context.Context + In *GetMetadataRequest + Opts []grpc.CallOption + }{ + Ctx: ctx, + In: in, + Opts: opts, + } + mock.lockGetMetadata.Lock() + mock.calls.GetMetadata = append(mock.calls.GetMetadata, callInfo) + mock.lockGetMetadata.Unlock() + return mock.GetMetadataFunc(ctx, in, opts...) +} + +// GetMetadataCalls gets all the calls that were made to GetMetadata. +// Check the length with: +// +// len(mockedPlaygroundServiceClient.GetMetadataCalls()) +func (mock *PlaygroundServiceClientMock) GetMetadataCalls() []struct { + Ctx context.Context + In *GetMetadataRequest + Opts []grpc.CallOption +} { + var calls []struct { + Ctx context.Context + In *GetMetadataRequest + Opts []grpc.CallOption + } + mock.lockGetMetadata.RLock() + calls = mock.calls.GetMetadata + mock.lockGetMetadata.RUnlock() + return calls +} + // GetPrecompiledObject calls GetPrecompiledObjectFunc. func (mock *PlaygroundServiceClientMock) GetPrecompiledObject(ctx context.Context, in *GetPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectResponse, error) { if mock.GetPrecompiledObjectFunc == nil { diff --git a/playground/README.md b/playground/README.md index 958e58ce1d7f..31cafcc5d102 100644 --- a/playground/README.md +++ b/playground/README.md @@ -80,8 +80,8 @@ cd beam ### Router, runners, and frontend -1. Edit `/playground/frontend/lib/config.g.dart` to set your local backend host and ports -found in `/playground/docker-compose.local.yaml`. +1. Edit `/playground/frontend/playground_components/lib/src/constants/backend_urls.dart` +to override backend URLs with yours found in `/playground/docker-compose.local.yaml`. 2. To start, run: ```bash @@ -106,6 +106,8 @@ If you do not need particular runners, comment out: 1. Dependencies on them in `/playground/build.gradle.kts` in `dockerComposeLocalUp` task. 2. Their Docker image configurations in `/playground/docker-compose.local.yaml`. +See also [Backend Lookup](frontend/README.md#backend-lookup) in the Frontend. + ## Removing old snippets Run the method to remove unused code snippets from the Cloud Datastore. Unused snippets are snippets that are out of date. If the last visited date property less or equals than the current date minus dayDiff parameter then a snippet is out of date diff --git a/playground/api/v1/api.proto b/playground/api/v1/api.proto index 3a62329fdb09..52473e4f0e02 100644 --- a/playground/api/v1/api.proto +++ b/playground/api/v1/api.proto @@ -314,6 +314,17 @@ message GetSnippetResponse { Complexity complexity = 4; } +// GetMetadataRequest represents request for runner metadata +message GetMetadataRequest {} + +// GetMetadataResponse contains metadata about the runner +message GetMetadataResponse { + string runner_sdk = 1; + string build_commit_hash = 2; + int64 build_commit_timestamp_seconds_since_epoch = 3; + string beam_sdk_version = 4; +} + service PlaygroundService { // Submit the job for an execution and get the pipeline uuid. @@ -372,4 +383,7 @@ service PlaygroundService { // Get the snippet of playground. rpc GetSnippet(GetSnippetRequest) returns (GetSnippetResponse); + + // Get the runner metadata. + rpc GetMetadata(GetMetadataRequest) returns (GetMetadataResponse); } diff --git a/playground/backend/cmd/server/build_info.go b/playground/backend/cmd/server/build_info.go new file mode 100644 index 000000000000..323e40aa7252 --- /dev/null +++ b/playground/backend/cmd/server/build_info.go @@ -0,0 +1,26 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +// This file is intended to store build-time variables. +// To set a value to any of this variable use '-ldflags="-X main.="' +// option when invoking 'go build'. + +// BuildCommitHash will contain hash of git commit from which the application is built +var BuildCommitHash string + +// BuildCommitTimestamp will contain timestamp of git commit from which the application is built +var BuildCommitTimestamp string diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index df6943eed234..34a42df2aa7d 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -15,11 +15,11 @@ package main import ( + "cloud.google.com/go/datastore" "context" "errors" - - "cloud.google.com/go/datastore" "github.com/google/uuid" + "strconv" pb "beam.apache.org/playground/backend/internal/api/v1" "beam.apache.org/playground/backend/internal/cache" @@ -529,3 +529,21 @@ func (controller *playgroundController) GetSnippet(ctx context.Context, info *pb } return &response, nil } + +// GetMetadata returns runner metadata +func (controller *playgroundController) GetMetadata(_ context.Context, _ *pb.GetMetadataRequest) (*pb.GetMetadataResponse, error) { + commitTimestampInteger, err := strconv.ParseInt(BuildCommitTimestamp, 10, 64) + if err != nil { + logger.Errorf("GetMetadata(): failed to parse BuildCommitTimestamp (\"%s\"): %s", BuildCommitTimestamp, err.Error()) + commitTimestampInteger = 0 + } + + response := pb.GetMetadataResponse{ + RunnerSdk: controller.env.BeamSdkEnvs.ApacheBeamSdk.String(), + BuildCommitHash: BuildCommitHash, + BuildCommitTimestampSecondsSinceEpoch: commitTimestampInteger, + BeamSdkVersion: controller.env.BeamSdkEnvs.BeamVersion, + } + + return &response, nil +} diff --git a/playground/backend/containers/git-functions.gradle b/playground/backend/containers/git-functions.gradle new file mode 100644 index 000000000000..9f5eb39eb0a8 --- /dev/null +++ b/playground/backend/containers/git-functions.gradle @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +ext.getGitCommitHash = () -> { + def stdout = new ByteArrayOutputStream() + exec { + executable('git') + args('rev-parse', 'HEAD') + standardOutput = stdout + } + return stdout.toString().trim() +} as Closure + +ext.getGitCommitTimestamp = () -> { + def stdout = new ByteArrayOutputStream() + exec { + executable('git') + args('show', '-s', '--format=%ct', 'HEAD') + standardOutput = stdout + } + return stdout.toString().trim() +} as Closure diff --git a/playground/backend/containers/go/Dockerfile b/playground/backend/containers/go/Dockerfile index 92eb1980ff15..36e9ac8577b0 100644 --- a/playground/backend/containers/go/Dockerfile +++ b/playground/backend/containers/go/Dockerfile @@ -20,6 +20,8 @@ ARG BASE_IMAGE FROM $BASE_IMAGE ARG SDK_TAG ARG SDK_TAG_LOCAL +ARG GIT_COMMIT="" +ARG GIT_TIMESTAMP="0" # Setup Go Environment ENV GOPATH /go @@ -48,8 +50,9 @@ WORKDIR /go/src/playground/backend RUN go mod download &&\ go mod tidy &&\ cd cmd/server &&\ - go build -o /opt/playground/backend/server_go_backend + go build -ldflags="-X main.BuildCommitHash=$GIT_COMMIT -X main.BuildCommitTimestamp=$GIT_TIMESTAMP" -o /opt/playground/backend/server_go_backend +ENV BEAM_VERSION=$SDK_TAG ENV SERVER_IP=0.0.0.0 ENV SERVER_PORT=8080 ENV APP_WORK_DIR=/opt/playground/backend/ diff --git a/playground/backend/containers/go/build.gradle b/playground/backend/containers/go/build.gradle index ffeb828c6009..0f89d056f3ee 100644 --- a/playground/backend/containers/go/build.gradle +++ b/playground/backend/containers/go/build.gradle @@ -19,6 +19,7 @@ apply plugin: 'org.apache.beam.module' apply plugin: 'base' +apply from: "$project.rootDir/playground/backend/containers/git-functions.gradle" applyDockerNature() def playgroundJobServerProject = "${project.path.replace('-container', '')}" @@ -26,11 +27,11 @@ def playgroundJobServerProject = "${project.path.replace('-container', '')}" description = project(playgroundJobServerProject).description + " :: Container" configurations { - dockerDependency + dockerDependency } dependencies { - dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") + dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") } task copyKafkaEmulator(type: Copy) { @@ -83,19 +84,22 @@ task copyDockerfileDependencies(type: Copy) { } docker { - name containerImageName( - name: project.docker_image_default_repo_prefix + "playground-backend-go", - root: project.rootProject.hasProperty(["docker-repository-root"]) ? - project.rootProject["docker-repository-root"] : - project.docker_image_default_repo_root) - files "./build/" - tags containerImageTags() - buildArgs(['BASE_IMAGE': project.rootProject.hasProperty(["base-image"]) ? - project.rootProject["base-image"] : - "golang:1.18-bullseye", - 'SDK_TAG': project.rootProject.hasProperty(["sdk-tag"]) ? - project.rootProject["sdk-tag"] : project.rootProject.sdk_version, - 'SDK_TAG_LOCAL': project.rootProject.sdk_version]) + name containerImageName( + name: project.docker_image_default_repo_prefix + "playground-backend-go", + root: project.rootProject.hasProperty(["docker-repository-root"]) ? + project.rootProject["docker-repository-root"] : + project.docker_image_default_repo_root) + files "./build/" + tags containerImageTags() + buildArgs( + ['BASE_IMAGE' : project.rootProject.hasProperty(["base-image"]) ? + project.rootProject["base-image"] : + "golang:1.18-bullseye", + 'SDK_TAG' : project.rootProject.hasProperty(["sdk-tag"]) ? + project.rootProject["sdk-tag"] : project.rootProject.sdk_version, + 'SDK_TAG_LOCAL': project.rootProject.sdk_version, + 'GIT_COMMIT' : getGitCommitHash(), + 'GIT_TIMESTAMP': getGitCommitTimestamp()]) } // Ensure that we build the required resources and copy and file dependencies from related projects diff --git a/playground/backend/containers/java/Dockerfile b/playground/backend/containers/java/Dockerfile index cf47b0c3cb5c..4e3cb2537708 100644 --- a/playground/backend/containers/java/Dockerfile +++ b/playground/backend/containers/java/Dockerfile @@ -18,6 +18,8 @@ ARG BEAM_VERSION=2.44.0 FROM golang:1.18-bullseye AS build ARG BEAM_VERSION +ARG GIT_COMMIT="" +ARG GIT_TIMESTAMP="0" # Setup Go Environment ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH @@ -29,12 +31,12 @@ RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 &&\ COPY src /go/src/playground/backend #COPY playground /go/src/playground/playground WORKDIR /go/src/playground/backend -RUN ls + # Build Application RUN go mod download &&\ go mod tidy &&\ cd cmd/server &&\ - go build -o /go/bin/server_java_backend + go build -ldflags="-X main.BuildCommitHash=$GIT_COMMIT -X main.BuildCommitTimestamp=$GIT_TIMESTAMP" -o /go/bin/server_java_backend FROM maven:3.8.6-openjdk-8 as dep ARG BEAM_VERSION @@ -55,6 +57,7 @@ FROM apache/beam_java8_sdk:$BEAM_VERSION ARG BEAM_VERSION ARG SPRING_VERSION=5.3.25 ARG KAFKA_CLIENTS_VERSION=2.3.1 +ENV BEAM_VERSION=$BEAM_VERSION ENV SERVER_IP=0.0.0.0 ENV SERVER_PORT=8080 ENV APP_WORK_DIR=/opt/playground/backend/ diff --git a/playground/backend/containers/java/build.gradle b/playground/backend/containers/java/build.gradle index 8ef707d9d8e1..de6062e4ecc5 100644 --- a/playground/backend/containers/java/build.gradle +++ b/playground/backend/containers/java/build.gradle @@ -20,6 +20,7 @@ apply plugin: 'org.apache.beam.module' apply plugin: 'base' apply plugin: 'java' +apply from: "$project.rootDir/playground/backend/containers/git-functions.gradle" applyDockerNature() def playgroundJobServerProject = "${project.path.replace('-container', '')}" @@ -27,11 +28,11 @@ def default_beam_version = "2.44.0" description = project(playgroundJobServerProject).description + " :: Container" configurations { - dockerDependency + dockerDependency } dependencies { - dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") + dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") } task copyKafkaEmulator(type: Copy) { @@ -71,16 +72,19 @@ task copyDockerfileDependencies(type: Copy) { } docker { - name containerImageName( - name: project.docker_image_default_repo_prefix + "playground-backend-java", - root: project.rootProject.hasProperty(["docker-repository-root"]) ? - project.rootProject["docker-repository-root"] : - project.docker_image_default_repo_root) - files "./build/" - tags containerImageTags() - buildArgs(['BEAM_VERSION': project.rootProject.hasProperty(["sdk-tag"]) ? - project.rootProject["sdk-tag"] : - default_beam_version ]) + name containerImageName( + name: project.docker_image_default_repo_prefix + "playground-backend-java", + root: project.rootProject.hasProperty(["docker-repository-root"]) ? + project.rootProject["docker-repository-root"] : + project.docker_image_default_repo_root) + files "./build/" + tags containerImageTags() + buildArgs( + ['BEAM_VERSION' : project.rootProject.hasProperty(["sdk-tag"]) ? + project.rootProject["sdk-tag"] : + default_beam_version, + 'GIT_COMMIT' : getGitCommitHash(), + 'GIT_TIMESTAMP': getGitCommitTimestamp()]) } // Ensure that we build the required resources and copy and file dependencies from related projects diff --git a/playground/backend/containers/python/Dockerfile b/playground/backend/containers/python/Dockerfile index 105f9ac29a44..a37da45995eb 100644 --- a/playground/backend/containers/python/Dockerfile +++ b/playground/backend/containers/python/Dockerfile @@ -19,6 +19,8 @@ ARG GO_BASE_IMAGE=golang:1.18-bullseye ARG SDK_TAG ARG BASE_IMAGE=apache/beam_python3.7_sdk:$SDK_TAG FROM $GO_BASE_IMAGE AS build +ARG GIT_COMMIT="" +ARG GIT_TIMESTAMP="0" # Setup Go Environment ENV GOPATH /go @@ -36,9 +38,11 @@ RUN ls RUN go mod download &&\ go mod tidy &&\ cd cmd/server &&\ - go build -o /go/bin/server_python_backend + go build -ldflags="-X main.BuildCommitHash=$GIT_COMMIT -X main.BuildCommitTimestamp=$GIT_TIMESTAMP" -o /go/bin/server_python_backend FROM $BASE_IMAGE +ARG SDK_TAG +ENV BEAM_VERSION=$SDK_TAG ENV SERVER_IP=0.0.0.0 ENV SERVER_PORT=8080 ENV APP_WORK_DIR=/opt/playground/backend/ diff --git a/playground/backend/containers/python/build.gradle b/playground/backend/containers/python/build.gradle index 77d236e556fa..dd665a9645bd 100644 --- a/playground/backend/containers/python/build.gradle +++ b/playground/backend/containers/python/build.gradle @@ -19,6 +19,7 @@ apply plugin: 'org.apache.beam.module' apply plugin: 'base' +apply from: "$project.rootDir/playground/backend/containers/git-functions.gradle" applyDockerNature() def playgroundJobServerProject = "${project.path.replace('-container', '')}" @@ -26,11 +27,11 @@ def playgroundJobServerProject = "${project.path.replace('-container', '')}" description = project(playgroundJobServerProject).description + " :: Container" configurations { - dockerDependency + dockerDependency } dependencies { - dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") + dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") } task copyKafkaEmulator(type: Copy) { @@ -70,19 +71,21 @@ task copyDockerfileDependencies(type: Copy) { } docker { - name containerImageName( - name: project.docker_image_default_repo_prefix + "playground-backend-python", - root: project.rootProject.hasProperty(["docker-repository-root"]) ? - project.rootProject["docker-repository-root"] : - project.docker_image_default_repo_root) - files "./build/" - tags containerImageTags() - buildArgs(['GO_BASE_IMAGE': project.rootProject.hasProperty(["go-base-image"]) ? - project.rootProject["go-base-image"] : - "golang:1.18-bullseye", - 'SDK_TAG': project.rootProject.hasProperty(["sdk-tag"]) ? - project.rootProject["sdk-tag"] : project.rootProject.sdk_version - ]) + name containerImageName( + name: project.docker_image_default_repo_prefix + "playground-backend-python", + root: project.rootProject.hasProperty(["docker-repository-root"]) ? + project.rootProject["docker-repository-root"] : + project.docker_image_default_repo_root) + files "./build/" + tags containerImageTags() + buildArgs( + ['GO_BASE_IMAGE': project.rootProject.hasProperty(["go-base-image"]) ? + project.rootProject["go-base-image"] : + "golang:1.18-bullseye", + 'SDK_TAG' : project.rootProject.hasProperty(["sdk-tag"]) ? + project.rootProject["sdk-tag"] : project.rootProject.sdk_version, + 'GIT_COMMIT' : getGitCommitHash(), + 'GIT_TIMESTAMP': getGitCommitTimestamp()]) } // Ensure that we build the required resources and copy and file dependencies from related projects diff --git a/playground/backend/containers/router/Dockerfile b/playground/backend/containers/router/Dockerfile index 9f79f3a67b31..75d123189d0a 100644 --- a/playground/backend/containers/router/Dockerfile +++ b/playground/backend/containers/router/Dockerfile @@ -19,6 +19,8 @@ ARG BASE_IMAGE=golang:1.18-bullseye #Two-stage assembly FROM $BASE_IMAGE AS build +ARG GIT_COMMIT="" +ARG GIT_TIMESTAMP="0" # Setup Go Environment ENV GOPATH /go @@ -30,13 +32,12 @@ COPY src /go/src/playground/backend # Build Application -#RUN WORKDIR /go/src/playground/backend # Build Application RUN go mod tidy -v &&\ go mod download &&\ cd cmd/server &&\ - go build -o /go/bin/server_go_backend + go build -ldflags="-X main.BuildCommitHash=$GIT_COMMIT -X main.BuildCommitTimestamp=$GIT_TIMESTAMP" -o /go/bin/server_go_backend # Null image FROM debian:stable-20221114-slim diff --git a/playground/backend/containers/router/build.gradle b/playground/backend/containers/router/build.gradle index b1161f0468e2..1dc9af6dd9f8 100644 --- a/playground/backend/containers/router/build.gradle +++ b/playground/backend/containers/router/build.gradle @@ -19,6 +19,7 @@ apply plugin: 'org.apache.beam.module' apply plugin: 'base' +apply from: "$project.rootDir/playground/backend/containers/git-functions.gradle" applyDockerNature() def playgroundJobServerProject = "${project.path.replace('-container', '')}" @@ -67,7 +68,9 @@ docker { tags containerImageTags() buildArgs(['BASE_IMAGE': project.rootProject.hasProperty(["base-image"]) ? project.rootProject["base-image"] : - "golang:1.18-bullseye" ]) + "golang:1.18-bullseye", + 'GIT_COMMIT': getGitCommitHash(), + 'GIT_TIMESTAMP': getGitCommitTimestamp()]) } task dockerComposeLocalUp() { diff --git a/playground/backend/containers/scio/Dockerfile b/playground/backend/containers/scio/Dockerfile index 43feb4ad7744..af79d4265b16 100644 --- a/playground/backend/containers/scio/Dockerfile +++ b/playground/backend/containers/scio/Dockerfile @@ -17,6 +17,8 @@ ############################################################################### ARG BASE_IMAGE=openjdk:8 FROM golang:1.18-bullseye AS build +ARG GIT_COMMIT="" +ARG GIT_TIMESTAMP="0" # Setup Go Environment ENV GOPATH /go @@ -33,7 +35,7 @@ WORKDIR /go/src/playground/backend RUN go mod download &&\ go mod tidy &&\ cd cmd/server &&\ - go build -o /go/bin/server_scio_backend + go build -ldflags="-X main.BuildCommitHash=$GIT_COMMIT -X main.BuildCommitTimestamp=$GIT_TIMESTAMP" -o /go/bin/server_scio_backend FROM $BASE_IMAGE ENV SERVER_IP=0.0.0.0 diff --git a/playground/backend/containers/scio/build.gradle b/playground/backend/containers/scio/build.gradle index de5d1f695ff9..0050849a14f3 100644 --- a/playground/backend/containers/scio/build.gradle +++ b/playground/backend/containers/scio/build.gradle @@ -19,6 +19,7 @@ apply plugin: 'org.apache.beam.module' apply plugin: 'base' +apply from: "$project.rootDir/playground/backend/containers/git-functions.gradle" applyDockerNature() def playgroundJobServerProject = "${project.path.replace('-container', '')}" @@ -26,11 +27,11 @@ def playgroundJobServerProject = "${project.path.replace('-container', '')}" description = project(playgroundJobServerProject).description + " :: Container" configurations { - dockerDependency + dockerDependency } dependencies { - dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") + dockerDependency project(path: playgroundJobServerProject, configuration: "shadow") } task copyKafkaEmulator(type: Copy) { @@ -66,16 +67,19 @@ task copyDockerfileDependencies(type: Copy) { } docker { - name containerImageName( - name: project.docker_image_default_repo_prefix + "playground-backend-scio", - root: project.rootProject.hasProperty(["docker-repository-root"]) ? - project.rootProject["docker-repository-root"] : - project.docker_image_default_repo_root) - files "./build/" - tags containerImageTags() - buildArgs(['BASE_IMAGE': project.rootProject.hasProperty(["base-image"]) ? - project.rootProject["base-image"] : - "openjdk:8" ]) + name containerImageName( + name: project.docker_image_default_repo_prefix + "playground-backend-scio", + root: project.rootProject.hasProperty(["docker-repository-root"]) ? + project.rootProject["docker-repository-root"] : + project.docker_image_default_repo_root) + files "./build/" + tags containerImageTags() + buildArgs( + ['BASE_IMAGE' : project.rootProject.hasProperty(["base-image"]) ? + project.rootProject["base-image"] : + "openjdk:8", + 'GIT_COMMIT' : getGitCommitHash(), + 'GIT_TIMESTAMP': getGitCommitTimestamp()]) } // Ensure that we build the required resources and copy and file dependencies from related projects diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index a3d7e3cd2678..2df53df2bf04 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -2588,6 +2588,117 @@ func (x *GetSnippetResponse) GetComplexity() Complexity { return Complexity_COMPLEXITY_UNSPECIFIED } +// GetMetadataRequest represents request for runner metadata +type GetMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetMetadataRequest) Reset() { + *x = GetMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataRequest) ProtoMessage() {} + +func (x *GetMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[42] + 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 GetMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetMetadataRequest) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{42} +} + +// GetMetadataResponse contains metadata about the runner +type GetMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RunnerSdk string `protobuf:"bytes,1,opt,name=runner_sdk,json=runnerSdk,proto3" json:"runner_sdk,omitempty"` + BuildCommitHash string `protobuf:"bytes,2,opt,name=build_commit_hash,json=buildCommitHash,proto3" json:"build_commit_hash,omitempty"` + BuildCommitTimestampSecondsSinceEpoch int64 `protobuf:"varint,3,opt,name=build_commit_timestamp_seconds_since_epoch,json=buildCommitTimestampSecondsSinceEpoch,proto3" json:"build_commit_timestamp_seconds_since_epoch,omitempty"` + BeamSdkVersion string `protobuf:"bytes,4,opt,name=beam_sdk_version,json=beamSdkVersion,proto3" json:"beam_sdk_version,omitempty"` +} + +func (x *GetMetadataResponse) Reset() { + *x = GetMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataResponse) ProtoMessage() {} + +func (x *GetMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[43] + 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 GetMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetMetadataResponse) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{43} +} + +func (x *GetMetadataResponse) GetRunnerSdk() string { + if x != nil { + return x.RunnerSdk + } + return "" +} + +func (x *GetMetadataResponse) GetBuildCommitHash() string { + if x != nil { + return x.BuildCommitHash + } + return "" +} + +func (x *GetMetadataResponse) GetBuildCommitTimestampSecondsSinceEpoch() int64 { + if x != nil { + return x.BuildCommitTimestampSecondsSinceEpoch + } + return 0 +} + +func (x *GetMetadataResponse) GetBeamSdkVersion() string { + if x != nil { + return x.BeamSdkVersion + } + return "" +} + type Categories_Category struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2600,7 +2711,7 @@ type Categories_Category struct { func (x *Categories_Category) Reset() { *x = Categories_Category{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[43] + mi := &file_api_v1_api_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2613,7 +2724,7 @@ func (x *Categories_Category) String() string { func (*Categories_Category) ProtoMessage() {} func (x *Categories_Category) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[43] + mi := &file_api_v1_api_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2889,163 +3000,183 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, - 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, - 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, - 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, - 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, - 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, - 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, - 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, - 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, - 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, - 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, - 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, - 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, - 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, - 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, - 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe5, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x64, 0x6b, 0x12, 0x2a, 0x0a, + 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x59, 0x0a, 0x2a, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, + 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x25, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x64, 0x6b, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x62, 0x65, 0x61, 0x6d, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x52, + 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, + 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, + 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, + 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, + 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, + 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, + 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, + 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, - 0x2a, 0x6e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x12, 0x1a, - 0x0a, 0x16, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, - 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, - 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x4d, - 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x4c, - 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x44, 0x56, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x03, - 0x2a, 0x46, 0x0a, 0x0c, 0x45, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x17, 0x0a, 0x13, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4b, 0x41, 0x46, 0x4b, 0x41, 0x10, 0x01, 0x32, 0x8b, 0x0d, 0x0a, 0x11, 0x50, 0x6c, 0x61, - 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, - 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, + 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x2a, 0x6e, + 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, + 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, + 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x58, + 0x49, 0x54, 0x59, 0x5f, 0x41, 0x44, 0x56, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x46, + 0x0a, 0x0c, 0x45, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, + 0x0a, 0x19, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, + 0x13, 0x45, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, + 0x41, 0x46, 0x4b, 0x41, 0x10, 0x01, 0x32, 0xd3, 0x0d, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, + 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, + 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x61, 0x76, - 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, - 0x76, 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, - 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, - 0x70, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, - 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x53, + 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x76, 0x65, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, 0x19, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, + 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3061,7 +3192,7 @@ func file_api_v1_api_proto_rawDescGZIP() []byte { } var file_api_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_api_v1_api_proto_goTypes = []interface{}{ (Sdk)(0), // 0: api.v1.Sdk (Status)(0), // 1: api.v1.Status @@ -3110,12 +3241,14 @@ var file_api_v1_api_proto_goTypes = []interface{}{ (*SaveSnippetResponse)(nil), // 44: api.v1.SaveSnippetResponse (*GetSnippetRequest)(nil), // 45: api.v1.GetSnippetRequest (*GetSnippetResponse)(nil), // 46: api.v1.GetSnippetResponse - nil, // 47: api.v1.Dataset.OptionsEntry - (*Categories_Category)(nil), // 48: api.v1.Categories.Category + (*GetMetadataRequest)(nil), // 47: api.v1.GetMetadataRequest + (*GetMetadataResponse)(nil), // 48: api.v1.GetMetadataResponse + nil, // 49: api.v1.Dataset.OptionsEntry + (*Categories_Category)(nil), // 50: api.v1.Categories.Category } var file_api_v1_api_proto_depIdxs = []int32{ 4, // 0: api.v1.Dataset.type:type_name -> api.v1.EmulatorType - 47, // 1: api.v1.Dataset.options:type_name -> api.v1.Dataset.OptionsEntry + 49, // 1: api.v1.Dataset.options:type_name -> api.v1.Dataset.OptionsEntry 0, // 2: api.v1.RunCodeRequest.sdk:type_name -> api.v1.Sdk 5, // 3: api.v1.RunCodeRequest.datasets:type_name -> api.v1.Dataset 42, // 4: api.v1.RunCodeRequest.files:type_name -> api.v1.SnippetFile @@ -3125,7 +3258,7 @@ var file_api_v1_api_proto_depIdxs = []int32{ 3, // 8: api.v1.PrecompiledObject.complexity:type_name -> api.v1.Complexity 5, // 9: api.v1.PrecompiledObject.datasets:type_name -> api.v1.Dataset 0, // 10: api.v1.Categories.sdk:type_name -> api.v1.Sdk - 48, // 11: api.v1.Categories.categories:type_name -> api.v1.Categories.Category + 50, // 11: api.v1.Categories.categories:type_name -> api.v1.Categories.Category 0, // 12: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk 0, // 13: api.v1.GetDefaultPrecompiledObjectRequest.sdk:type_name -> api.v1.Sdk 27, // 14: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories @@ -3158,27 +3291,29 @@ var file_api_v1_api_proto_depIdxs = []int32{ 34, // 41: api.v1.PlaygroundService.GetDefaultPrecompiledObject:input_type -> api.v1.GetDefaultPrecompiledObjectRequest 43, // 42: api.v1.PlaygroundService.SaveSnippet:input_type -> api.v1.SaveSnippetRequest 45, // 43: api.v1.PlaygroundService.GetSnippet:input_type -> api.v1.GetSnippetRequest - 7, // 44: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse - 9, // 45: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse - 17, // 46: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse - 21, // 47: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse - 23, // 48: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse - 19, // 49: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse - 11, // 50: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse - 13, // 51: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse - 15, // 52: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse - 25, // 53: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse - 35, // 54: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse - 36, // 55: api.v1.PlaygroundService.GetPrecompiledObject:output_type -> api.v1.GetPrecompiledObjectResponse - 37, // 56: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse - 38, // 57: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse - 39, // 58: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse - 40, // 59: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse - 41, // 60: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse - 44, // 61: api.v1.PlaygroundService.SaveSnippet:output_type -> api.v1.SaveSnippetResponse - 46, // 62: api.v1.PlaygroundService.GetSnippet:output_type -> api.v1.GetSnippetResponse - 44, // [44:63] is the sub-list for method output_type - 25, // [25:44] is the sub-list for method input_type + 47, // 44: api.v1.PlaygroundService.GetMetadata:input_type -> api.v1.GetMetadataRequest + 7, // 45: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse + 9, // 46: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse + 17, // 47: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse + 21, // 48: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse + 23, // 49: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse + 19, // 50: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse + 11, // 51: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse + 13, // 52: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse + 15, // 53: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse + 25, // 54: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse + 35, // 55: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse + 36, // 56: api.v1.PlaygroundService.GetPrecompiledObject:output_type -> api.v1.GetPrecompiledObjectResponse + 37, // 57: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse + 38, // 58: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse + 39, // 59: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse + 40, // 60: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse + 41, // 61: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse + 44, // 62: api.v1.PlaygroundService.SaveSnippet:output_type -> api.v1.SaveSnippetResponse + 46, // 63: api.v1.PlaygroundService.GetSnippet:output_type -> api.v1.GetSnippetResponse + 48, // 64: api.v1.PlaygroundService.GetMetadata:output_type -> api.v1.GetMetadataResponse + 45, // [45:65] is the sub-list for method output_type + 25, // [25:45] is the sub-list for method input_type 25, // [25:25] is the sub-list for extension type_name 25, // [25:25] is the sub-list for extension extendee 0, // [0:25] is the sub-list for field type_name @@ -3694,7 +3829,31 @@ func file_api_v1_api_proto_init() { return nil } } + file_api_v1_api_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_api_v1_api_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Categories_Category); i { case 0: return &v.state @@ -3713,7 +3872,7 @@ func file_api_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_api_proto_rawDesc, NumEnums: 5, - NumMessages: 44, + NumMessages: 46, NumExtensions: 0, NumServices: 1, }, diff --git a/playground/backend/internal/api/v1/api_grpc.pb.go b/playground/backend/internal/api/v1/api_grpc.pb.go index 2894e8f4ef6a..e6798717e04a 100644 --- a/playground/backend/internal/api/v1/api_grpc.pb.go +++ b/playground/backend/internal/api/v1/api_grpc.pb.go @@ -60,6 +60,8 @@ type PlaygroundServiceClient interface { SaveSnippet(ctx context.Context, in *SaveSnippetRequest, opts ...grpc.CallOption) (*SaveSnippetResponse, error) // Get the snippet of playground. GetSnippet(ctx context.Context, in *GetSnippetRequest, opts ...grpc.CallOption) (*GetSnippetResponse, error) + // Get the runner metadata. + GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) } type playgroundServiceClient struct { @@ -241,6 +243,15 @@ func (c *playgroundServiceClient) GetSnippet(ctx context.Context, in *GetSnippet return out, nil } +func (c *playgroundServiceClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) { + out := new(GetMetadataResponse) + err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PlaygroundServiceServer is the server API for PlaygroundService service. // All implementations should embed UnimplementedPlaygroundServiceServer // for forward compatibility @@ -283,6 +294,8 @@ type PlaygroundServiceServer interface { SaveSnippet(context.Context, *SaveSnippetRequest) (*SaveSnippetResponse, error) // Get the snippet of playground. GetSnippet(context.Context, *GetSnippetRequest) (*GetSnippetResponse, error) + // Get the runner metadata. + GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) } // UnimplementedPlaygroundServiceServer should be embedded to have forward compatible implementations. @@ -346,6 +359,9 @@ func (UnimplementedPlaygroundServiceServer) SaveSnippet(context.Context, *SaveSn func (UnimplementedPlaygroundServiceServer) GetSnippet(context.Context, *GetSnippetRequest) (*GetSnippetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSnippet not implemented") } +func (UnimplementedPlaygroundServiceServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} // UnsafePlaygroundServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PlaygroundServiceServer will @@ -700,6 +716,24 @@ func _PlaygroundService_GetSnippet_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _PlaygroundService_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlaygroundServiceServer).GetMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.PlaygroundService/GetMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlaygroundServiceServer).GetMetadata(ctx, req.(*GetMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PlaygroundService_ServiceDesc is the grpc.ServiceDesc for PlaygroundService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -783,6 +817,10 @@ var PlaygroundService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetSnippet", Handler: _PlaygroundService_GetSnippet_Handler, }, + { + MethodName: "GetMetadata", + Handler: _PlaygroundService_GetMetadata_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/api.proto", diff --git a/playground/backend/internal/environment/beam.go b/playground/backend/internal/environment/beam.go index c40d86e15e5e..9e4574cbae27 100644 --- a/playground/backend/internal/environment/beam.go +++ b/playground/backend/internal/environment/beam.go @@ -43,14 +43,15 @@ func NewExecutorConfig(compileCmd, runCmd, testCmd string, compileArgs, runArgs, // BeamEnvs contains all environments related of ApacheBeam. These will use to run pipelines type BeamEnvs struct { ApacheBeamSdk pb.Sdk + BeamVersion string ExecutorConfig *ExecutorConfig preparedModDir string numOfParallelJobs int } // NewBeamEnvs is a BeamEnvs constructor -func NewBeamEnvs(apacheBeamSdk pb.Sdk, executorConfig *ExecutorConfig, preparedModDir string, numOfParallelJobs int) *BeamEnvs { - return &BeamEnvs{ApacheBeamSdk: apacheBeamSdk, ExecutorConfig: executorConfig, preparedModDir: preparedModDir, numOfParallelJobs: numOfParallelJobs} +func NewBeamEnvs(apacheBeamSdk pb.Sdk, beamVersion string, executorConfig *ExecutorConfig, preparedModDir string, numOfParallelJobs int) *BeamEnvs { + return &BeamEnvs{ApacheBeamSdk: apacheBeamSdk, BeamVersion: beamVersion, ExecutorConfig: executorConfig, preparedModDir: preparedModDir, numOfParallelJobs: numOfParallelJobs} } // PreparedModDir returns the path to the directory where prepared go.mod and go.sum are located diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index c7574c05d5f7..cc2b22b5ce20 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -35,6 +35,7 @@ const ( serverIpKey = "SERVER_IP" serverPortKey = "SERVER_PORT" beamSdkKey = "BEAM_SDK" + beamVersionKey = "BEAM_VERSION" workingDirKey = "APP_WORK_DIR" preparedModDirKey = "PREPARED_MOD_DIR" numOfParallelJobsKey = "NUM_PARALLEL_JOBS" @@ -53,6 +54,7 @@ const ( defaultIp = "localhost" defaultPort = 8080 defaultSdk = pb.Sdk_SDK_JAVA + defaultBeamVersion = "" defaultBeamJarsPath = "/opt/apache/beam/jars/*" defaultDatasetsPath = "/opt/playground/backend/datasets" defaultKafkaEmulatorExecutablePath = "/opt/playground/backend/kafka-emulator/beam-playground-kafka-emulator.jar" @@ -153,6 +155,8 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { preparedModDir, modDirExist := os.LookupEnv(preparedModDirKey) numOfParallelJobs := getEnvAsInt(numOfParallelJobsKey, defaultNumOfParallelJobs) + beamVersion := getEnv(beamVersionKey, defaultBeamVersion) + if value, present := os.LookupEnv(beamSdkKey); present { switch value { @@ -170,14 +174,14 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { } } if sdk == pb.Sdk_SDK_UNSPECIFIED { - return NewBeamEnvs(sdk, nil, preparedModDir, numOfParallelJobs), nil + return NewBeamEnvs(sdk, beamVersion, nil, preparedModDir, numOfParallelJobs), nil } configPath := filepath.Join(workDir, configFolderName, sdk.String()+jsonExt) executorConfig, err := createExecutorConfig(sdk, configPath) if err != nil { return nil, err } - return NewBeamEnvs(sdk, executorConfig, preparedModDir, numOfParallelJobs), nil + return NewBeamEnvs(sdk, beamVersion, executorConfig, preparedModDir, numOfParallelJobs), nil } // createExecutorConfig creates ExecutorConfig that corresponds to specific Apache Beam SDK. diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index eda6979b1ccb..3d298addcc85 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -104,7 +104,7 @@ func TestNewEnvironment(t *testing.T) { }{ {name: "Create env service with default envs", want: &Environment{ NetworkEnvs: *NewNetworkEnvs(defaultIp, defaultPort, defaultProtocol), - BeamSdkEnvs: *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, 0), + BeamSdkEnvs: *NewBeamEnvs(defaultSdk, defaultBeamVersion, executorConfig, preparedModDir, 0), ApplicationEnvs: *NewApplicationEnvs("/app", defaultLaunchSite, defaultProjectId, defaultPipelinesFolder, defaultSDKConfigPath, defaultPropertyPath, defaultKafkaEmulatorExecutablePath, defaultDatasetsPath, &CacheEnvs{defaultCacheType, defaultCacheAddress, defaultCacheKeyExpirationTime}, defaultPipelineExecuteTimeout, defaultCacheRequestTimeout), }}, } @@ -112,7 +112,7 @@ func TestNewEnvironment(t *testing.T) { t.Run(tt.name, func(t *testing.T) { if got := NewEnvironment( *NewNetworkEnvs(defaultIp, defaultPort, defaultProtocol), - *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, 0), + *NewBeamEnvs(defaultSdk, defaultBeamVersion, executorConfig, preparedModDir, 0), *NewApplicationEnvs("/app", defaultLaunchSite, defaultProjectId, defaultPipelinesFolder, defaultSDKConfigPath, defaultPropertyPath, defaultKafkaEmulatorExecutablePath, defaultDatasetsPath, &CacheEnvs{defaultCacheType, defaultCacheAddress, defaultCacheKeyExpirationTime}, defaultPipelineExecuteTimeout, defaultCacheRequestTimeout)); !reflect.DeepEqual(got, tt.want) { t.Errorf("NewEnvironment() = %v, want %v", got, tt.want) } @@ -131,25 +131,25 @@ func Test_getSdkEnvsFromOsEnvs(t *testing.T) { }{ { name: "Not specified beam sdk key in os envs", - want: NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, nil, preparedModDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, defaultBeamVersion, nil, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{}, wantErr: false, }, { name: "Default beam envs", - want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(defaultSdk, defaultBeamVersion, executorConfig, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_JAVA"}, wantErr: false, }, { name: "Specific sdk key in os envs", - want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(defaultSdk, defaultBeamVersion, executorConfig, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_JAVA"}, wantErr: false, }, { name: "Wrong sdk key in os envs", - want: NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, nil, preparedModDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, defaultBeamVersion, nil, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_J"}, wantErr: false, }, @@ -394,7 +394,7 @@ func TestConfigureBeamEnvs(t *testing.T) { { name: "BeamSdkKey set to GO sdk", args: args{workingDir: workingDir}, - want: NewBeamEnvs(pb.Sdk_SDK_GO, goExecutorConfig, modDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_GO, defaultBeamVersion, goExecutorConfig, modDir, defaultNumOfParallelJobs), wantErr: false, envsToSet: map[string]string{beamSdkKey: "SDK_GO", preparedModDirKey: modDir}, }, @@ -407,31 +407,31 @@ func TestConfigureBeamEnvs(t *testing.T) { }, { name: "BeamSdkKey set to Python sdk", - want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, pythonExecutorConfig, modDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, defaultBeamVersion, pythonExecutorConfig, modDir, defaultNumOfParallelJobs), wantErr: false, envsToSet: map[string]string{beamSdkKey: "SDK_PYTHON"}, }, { name: "BeamSdkKey set to SCIO sdk", - want: NewBeamEnvs(pb.Sdk_SDK_SCIO, scioExecutorConfig, modDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_SCIO, defaultBeamVersion, scioExecutorConfig, modDir, defaultNumOfParallelJobs), wantErr: false, envsToSet: map[string]string{beamSdkKey: "SDK_SCIO"}, }, { name: "NumOfParallelJobsKey is set with a positive number", - want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, pythonExecutorConfig, modDir, 1), + want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, defaultBeamVersion, pythonExecutorConfig, modDir, 1), wantErr: false, envsToSet: map[string]string{beamSdkKey: "SDK_PYTHON", numOfParallelJobsKey: "1"}, }, { name: "NumOfParallelJobsKey is set with a negative number", - want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, pythonExecutorConfig, modDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, defaultBeamVersion, pythonExecutorConfig, modDir, defaultNumOfParallelJobs), wantErr: false, envsToSet: map[string]string{beamSdkKey: "SDK_PYTHON", numOfParallelJobsKey: "-1"}, }, { name: "NumOfParallelJobsKey is set with incorrect value", - want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, pythonExecutorConfig, modDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(pb.Sdk_SDK_PYTHON, defaultBeamVersion, pythonExecutorConfig, modDir, defaultNumOfParallelJobs), wantErr: false, envsToSet: map[string]string{beamSdkKey: "SDK_PYTHON", numOfParallelJobsKey: "incorrectValue"}, }, diff --git a/playground/backend/internal/setup_tools/builder/setup_builder_test.go b/playground/backend/internal/setup_tools/builder/setup_builder_test.go index edafd072c4d5..08eaab3d542c 100644 --- a/playground/backend/internal/setup_tools/builder/setup_builder_test.go +++ b/playground/backend/internal/setup_tools/builder/setup_builder_test.go @@ -77,10 +77,10 @@ func setup() { CompileArgs: []string{"MOCK_COMPILE_ARG"}, RunArgs: []string{"MOCK_RUN_CMD"}, } - pythonSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_PYTHON, executorConfig, "", 0) - javaSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_JAVA, executorConfig, "", 0) - goSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_GO, executorConfig, "", 0) - scioSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_SCIO, executorConfig, "", 0) + pythonSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_PYTHON, "", executorConfig, "", 0) + javaSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_JAVA, "", executorConfig, "", 0) + goSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_GO, "", executorConfig, "", 0) + scioSdkEnv = environment.NewBeamEnvs(pb.Sdk_SDK_SCIO, "", executorConfig, "", 0) } func teardown() { @@ -121,7 +121,7 @@ func TestValidator(t *testing.T) { WithValidator(). WithSdkValidators(scioVals) - wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, pythonSdkEnv.ExecutorConfig, "", 0) + wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, "", pythonSdkEnv.ExecutorConfig, "", 0) type args struct { paths *fs_tool.LifeCyclePaths @@ -239,7 +239,7 @@ func TestPreparer(t *testing.T) { WithPreparer(). WithSdkPreparers(scioPrep) - wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, pythonSdkEnv.ExecutorConfig, "", 0) + wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, "", pythonSdkEnv.ExecutorConfig, "", 0) type args struct { paths fs_tool.LifeCyclePaths diff --git a/playground/frontend/CONTRIBUTE.md b/playground/frontend/CONTRIBUTE.md index b6eda60468e8..310b7c5c476e 100644 --- a/playground/frontend/CONTRIBUTE.md +++ b/playground/frontend/CONTRIBUTE.md @@ -66,25 +66,6 @@ contains decoupled playground page state and module providers like `OutputPlacem For quick start up, please take a look to [this guide](https://docs.flutter.dev/development/data-and-backend/state-mgmt/simple) -## Configuration - -The app could be configured using gradle task (e.g. api url) - -``` -cd beam -./gradlew :playground:frontend:createConfig -``` - -The command generates [./lib/config.g.dart](./lib/config.g.dart) file with constants from -gradle.properties which can be used in the app - -To add a new constant do the following steps: - -- Add a new line with const to the `:playground:frontend:createConfig` task - inside [build.gradle](./build.gradle); -- Update [gradle.properties](./gradle.properties); -- Run task to test it and commit [./lib/config.g.dart](./lib/config.g.dart) file. - ## Theming Playground app supports light and dark themes. Component themes are declared diff --git a/playground/frontend/Dockerfile b/playground/frontend/Dockerfile index 7800159255ec..180d096dbefd 100644 --- a/playground/frontend/Dockerfile +++ b/playground/frontend/Dockerfile @@ -18,11 +18,16 @@ FROM debian:11 as build ARG FLUTTER_VERSION=3.7.3 +ARG BUILD_COMMIT_HASH +ARG BUILD_COMMIT_SECONDS_SINCE_EPOCH # ------------------------------------------------ # Setting up. # ------------------------------------------------ +COPY . /app +WORKDIR /app + RUN apt-get update && apt-get install -y wget xz-utils git RUN wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_$FLUTTER_VERSION-stable.tar.xz &&\ @@ -34,13 +39,12 @@ RUN wget https://storage.googleapis.com/flutter_infra_release/releases/stable/li dart pub global activate protoc_plugin &&\ ln -s /root/.pub-cache/bin/protoc-gen-dart /usr/bin/ -COPY . /app -WORKDIR /app - # ------------------------------------------------ # Building the application. # ------------------------------------------------ +RUN /app/playground_components/tools/generate_build_metadata.sh $BUILD_COMMIT_HASH $BUILD_COMMIT_SECONDS_SINCE_EPOCH + RUN cd /app/playground_components &&\ flutter pub get -v diff --git a/playground/frontend/README.md b/playground/frontend/README.md index 440a0d0d627b..7c35b7f88530 100644 --- a/playground/frontend/README.md +++ b/playground/frontend/README.md @@ -27,16 +27,6 @@ without having to install/initialize a Beam environment. ## Getting Started -### Copy the configuration file - -After checkout, run: - -```bash -cp playground/frontend/lib/config.example.dart playground/frontend/lib/config.g.dart -``` - -This is a temporarily required step. See more: https://github.com/apache/beam/issues/24200 - ### Run See [playground/README.md](../README.md) for details on requirements and setup. @@ -57,6 +47,18 @@ flutter build web This produces `build/web` directory with static files. Deploy them to your web server. +### Backend Lookup + +The file [playground_components/lib/src/constants/backend_urls.dart](playground_components/lib/src/constants/backend_urls.dart) +is the location for backend-related constants. + +If the `backendUrlOverrides` map contains a URL for a server then only it will be attempted +for the given container. This is useful for running backend locally. + +Otherwise following patterns are tried when looking up the backend servers: +1. Prepending the frontend host with `router.`, `go.`, `java.`, `python.`, `scio.`. +2. Prepending the the default production frontend URL with the same. + ### Docker The app is deployed to production as a Docker container. diff --git a/playground/frontend/build.gradle b/playground/frontend/build.gradle index 9e1141f11874..3b7085ad3213 100644 --- a/playground/frontend/build.gradle +++ b/playground/frontend/build.gradle @@ -19,6 +19,7 @@ apply(plugin: "org.apache.beam.module") apply(plugin: "base") +apply(from: "$project.rootDir/playground/backend/containers/git-functions.gradle") applyDockerNature() def playgroundJobServerProject = "${project.path.replace("-container", "")}" @@ -294,6 +295,10 @@ docker { : project.docker_image_default_repo_root ) files("./build/") + buildArgs([ + 'BUILD_COMMIT_HASH': getGitCommitHash(), + 'BUILD_COMMIT_SECONDS_SINCE_EPOCH': getGitCommitTimestamp(), + ]) tags(containerImageTags()) } diff --git a/playground/frontend/integration_test/common/common.dart b/playground/frontend/integration_test/common/common.dart index 83575a99cb6c..7ec8318c5a61 100644 --- a/playground/frontend/integration_test/common/common.dart +++ b/playground/frontend/integration_test/common/common.dart @@ -20,7 +20,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:playground/main.dart' as app; Future init(WidgetTester wt) async { - app.main(); + await app.main(); await wt.pumpAndSettle(); } diff --git a/playground/frontend/lib/config.g.dart b/playground/frontend/lib/config.g.dart new file mode 100644 index 000000000000..a4d3b4f8c673 --- /dev/null +++ b/playground/frontend/lib/config.g.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file was auto-generated and used to contain backend URLs. +// They are now determined automatically +// as of https://github.com/apache/beam/pull/25610 +// TODO(alexeyinkin): When it is merged, find a better place for the remaining +// constant and delete this file. + +const String kAnalyticsUA = 'G-BXFP2FNCKC'; diff --git a/playground/frontend/lib/locator.dart b/playground/frontend/lib/locator.dart index 5e5f7ce4e50c..52df0c3d835f 100644 --- a/playground/frontend/lib/locator.dart +++ b/playground/frontend/lib/locator.dart @@ -20,31 +20,35 @@ import 'package:app_state/app_state.dart'; import 'package:get_it/get_it.dart'; import 'package:playground_components/playground_components.dart'; -import 'config.g.dart'; import 'pages/loading/page.dart'; import 'router/page_factory.dart'; import 'router/route_information_parser.dart'; Future initializeServiceLocator() async { - _initializeRepositories(); + await _initializeRepositories(); _initializeRouter(); } -void _initializeRepositories() { +Future _initializeRepositories() async { + final routerUrl = await getRouterUrl(); + final runnerUrls = await waitMap({ + for (final sdk in Sdk.known) sdk.id: getRunnerUrl(sdk), + }); + + final codeClient = GrpcCodeClient( + url: routerUrl, + runnerUrlsById: runnerUrls, + ); + + GetIt.instance.registerSingleton(codeClient); GetIt.instance.registerSingleton(CodeRepository( - client: GrpcCodeClient( - url: kApiClientURL, - runnerUrlsById: { - Sdk.java.id: kApiJavaClientURL, - Sdk.go.id: kApiGoClientURL, - Sdk.python.id: kApiPythonClientURL, - Sdk.scio.id: kApiScioClientURL, - }, - ), + client: codeClient, )); + final exampleClient = GrpcExampleClient(url: routerUrl); + GetIt.instance.registerSingleton(exampleClient); GetIt.instance.registerSingleton(ExampleRepository( - client: GrpcExampleClient(url: kApiClientURL), + client: exampleClient, )); } diff --git a/playground/frontend/lib/main.dart b/playground/frontend/lib/main.dart index dd0b894fb0d4..92ae9088eb95 100644 --- a/playground/frontend/lib/main.dart +++ b/playground/frontend/lib/main.dart @@ -31,7 +31,7 @@ import 'l10n/l10n.dart'; import 'locator.dart'; import 'playground_app.dart'; -void main() async { +Future main() async { FlutterIssue106664Workaround.instance.apply(); setPathUrlStrategy(); WidgetsFlutterBinding.ensureInitialized(); diff --git a/playground/frontend/lib/pages/standalone_playground/widgets/more_actions.dart b/playground/frontend/lib/pages/standalone_playground/widgets/more_actions.dart index f82fb93707f6..3a313ed522f1 100644 --- a/playground/frontend/lib/pages/standalone_playground/widgets/more_actions.dart +++ b/playground/frontend/lib/pages/standalone_playground/widgets/more_actions.dart @@ -16,6 +16,7 @@ * limitations under the License. */ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -28,6 +29,7 @@ import '../../../modules/shortcuts/components/shortcuts_modal.dart'; import '../../../src/assets/assets.gen.dart'; enum HeaderAction { + versions, shortcuts, beamPlaygroundGithub, apacheBeamGithub, @@ -60,6 +62,21 @@ class _MoreActionsState extends State { color: Theme.of(context).extension()?.iconColor, ), itemBuilder: (BuildContext context) => >[ + // + PopupMenuItem( + padding: EdgeInsets.zero, + value: HeaderAction.versions, + child: ListTile( + leading: const Icon(Icons.watch_later_outlined), + title: const Text('widgets.versions.title').tr(), + onTap: () => BeamDialog.show( + context: context, + title: const Text('widgets.versions.title').tr(), + child: const VersionsWidget(sdks: Sdk.known), + ), + ), + ), + PopupMenuItem( padding: EdgeInsets.zero, value: HeaderAction.shortcuts, @@ -77,6 +94,7 @@ class _MoreActionsState extends State { }, ), ), + PopupMenuItem( padding: EdgeInsets.zero, value: HeaderAction.beamPlaygroundGithub, @@ -86,6 +104,7 @@ class _MoreActionsState extends State { onTap: () => _openLink(kBeamPlaygroundGithubLink, context), ), ), + PopupMenuItem( padding: EdgeInsets.zero, value: HeaderAction.apacheBeamGithub, @@ -95,6 +114,7 @@ class _MoreActionsState extends State { onTap: () => _openLink(kApacheBeamGithubLink, context), ), ), + PopupMenuItem( padding: EdgeInsets.zero, value: HeaderAction.scioGithub, @@ -104,7 +124,9 @@ class _MoreActionsState extends State { onTap: () => _openLink(kScioGithubLink, context), ), ), + const PopupMenuDivider(height: 16.0), + PopupMenuItem( padding: EdgeInsets.zero, value: HeaderAction.beamWebsite, @@ -114,6 +136,7 @@ class _MoreActionsState extends State { onTap: () => _openLink(kBeamWebsiteLink, context), ), ), + PopupMenuItem( padding: EdgeInsets.zero, value: HeaderAction.beamWebsite, diff --git a/playground/frontend/playground_components/assets/translations/en.yaml b/playground/frontend/playground_components/assets/translations/en.yaml index 441570837ff8..d13565223a33 100644 --- a/playground/frontend/playground_components/assets/translations/en.yaml +++ b/playground/frontend/playground_components/assets/translations/en.yaml @@ -66,3 +66,12 @@ widgets: notificationTitles: run: 'Run Code' cancelExecution: 'Cancel Execution' + + versions: + beam: 'Beam {version}' + commit: 'Commit {hash} from {date}' + title: 'Versions' + titles: + frontend: 'Frontend' + router: 'Router' + runner: '{sdk} Runner' diff --git a/playground/frontend/playground_components/lib/playground_components.dart b/playground/frontend/playground_components/lib/playground_components.dart index 1278cbc61c68..020fdc4b7a6b 100644 --- a/playground/frontend/playground_components/lib/playground_components.dart +++ b/playground/frontend/playground_components/lib/playground_components.dart @@ -47,14 +47,18 @@ export 'src/models/snippet_file.dart'; export 'src/models/toast.dart'; export 'src/models/toast_type.dart'; export 'src/playground_components.dart'; +export 'src/repositories/backend_urls.dart'; +export 'src/repositories/code_client/code_client.dart'; export 'src/repositories/code_client/grpc_code_client.dart'; export 'src/repositories/code_repository.dart'; +export 'src/repositories/example_client/example_client.dart'; export 'src/repositories/example_client/grpc_example_client.dart'; export 'src/repositories/example_repository.dart'; export 'src/router/router_delegate.dart'; export 'src/services/symbols/loaders/yaml.dart'; export 'src/theme/switch_notifier.dart'; export 'src/theme/theme.dart'; +export 'src/util/async.dart'; export 'src/util/logical_keyboard_key.dart'; export 'src/util/pipeline_options.dart'; export 'src/util/string.dart'; @@ -62,6 +66,7 @@ export 'src/util/string.dart'; export 'src/widgets/bubble.dart'; export 'src/widgets/clickable.dart'; export 'src/widgets/complexity.dart'; +export 'src/widgets/dialog.dart'; export 'src/widgets/divider.dart'; export 'src/widgets/header_icon_button.dart'; export 'src/widgets/loading_error.dart'; @@ -83,3 +88,4 @@ export 'src/widgets/tabs/tab_bar.dart'; export 'src/widgets/toasts/toast_listener.dart'; export 'src/widgets/toggle_theme_button.dart'; export 'src/widgets/toggle_theme_icon_button.dart'; +export 'src/widgets/versions/versions.dart'; diff --git a/playground/frontend/playground_components/lib/src/api/v1/api.pb.dart b/playground/frontend/playground_components/lib/src/api/v1/api.pb.dart index 2b855ff5de6f..43f485839e89 100644 --- a/playground/frontend/playground_components/lib/src/api/v1/api.pb.dart +++ b/playground/frontend/playground_components/lib/src/api/v1/api.pb.dart @@ -7,6 +7,7 @@ import 'dart:core' as $core; +import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'api.pbenum.dart'; @@ -2416,3 +2417,121 @@ class GetSnippetResponse extends $pb.GeneratedMessage { void clearComplexity() => clearField(4); } +class GetMetadataRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetMetadataRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetMetadataRequest._() : super(); + factory GetMetadataRequest() => create(); + factory GetMetadataRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetMetadataRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetMetadataRequest clone() => GetMetadataRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetMetadataRequest copyWith(void Function(GetMetadataRequest) updates) => super.copyWith((message) => updates(message as GetMetadataRequest)) as GetMetadataRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetMetadataRequest create() => GetMetadataRequest._(); + GetMetadataRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetMetadataRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetMetadataRequest? _defaultInstance; +} + +class GetMetadataResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetMetadataResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'runnerSdk') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'buildCommitHash') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'buildCommitTimestampSecondsSinceEpoch') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'beamSdkVersion') + ..hasRequiredFields = false + ; + + GetMetadataResponse._() : super(); + factory GetMetadataResponse({ + $core.String? runnerSdk, + $core.String? buildCommitHash, + $fixnum.Int64? buildCommitTimestampSecondsSinceEpoch, + $core.String? beamSdkVersion, + }) { + final _result = create(); + if (runnerSdk != null) { + _result.runnerSdk = runnerSdk; + } + if (buildCommitHash != null) { + _result.buildCommitHash = buildCommitHash; + } + if (buildCommitTimestampSecondsSinceEpoch != null) { + _result.buildCommitTimestampSecondsSinceEpoch = buildCommitTimestampSecondsSinceEpoch; + } + if (beamSdkVersion != null) { + _result.beamSdkVersion = beamSdkVersion; + } + return _result; + } + factory GetMetadataResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetMetadataResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetMetadataResponse clone() => GetMetadataResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetMetadataResponse copyWith(void Function(GetMetadataResponse) updates) => super.copyWith((message) => updates(message as GetMetadataResponse)) as GetMetadataResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetMetadataResponse create() => GetMetadataResponse._(); + GetMetadataResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetMetadataResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetMetadataResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get runnerSdk => $_getSZ(0); + @$pb.TagNumber(1) + set runnerSdk($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasRunnerSdk() => $_has(0); + @$pb.TagNumber(1) + void clearRunnerSdk() => clearField(1); + + @$pb.TagNumber(2) + $core.String get buildCommitHash => $_getSZ(1); + @$pb.TagNumber(2) + set buildCommitHash($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasBuildCommitHash() => $_has(1); + @$pb.TagNumber(2) + void clearBuildCommitHash() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get buildCommitTimestampSecondsSinceEpoch => $_getI64(2); + @$pb.TagNumber(3) + set buildCommitTimestampSecondsSinceEpoch($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasBuildCommitTimestampSecondsSinceEpoch() => $_has(2); + @$pb.TagNumber(3) + void clearBuildCommitTimestampSecondsSinceEpoch() => clearField(3); + + @$pb.TagNumber(4) + $core.String get beamSdkVersion => $_getSZ(3); + @$pb.TagNumber(4) + set beamSdkVersion($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasBeamSdkVersion() => $_has(3); + @$pb.TagNumber(4) + void clearBeamSdkVersion() => clearField(4); +} + diff --git a/playground/frontend/playground_components/lib/src/api/v1/api.pbgrpc.dart b/playground/frontend/playground_components/lib/src/api/v1/api.pbgrpc.dart index ee779bca39ca..2e54bbcb7294 100644 --- a/playground/frontend/playground_components/lib/src/api/v1/api.pbgrpc.dart +++ b/playground/frontend/playground_components/lib/src/api/v1/api.pbgrpc.dart @@ -132,6 +132,12 @@ class PlaygroundServiceClient extends $grpc.Client { ($0.GetSnippetRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetSnippetResponse.fromBuffer(value)); + static final _$getMetadata = + $grpc.ClientMethod<$0.GetMetadataRequest, $0.GetMetadataResponse>( + '/api.v1.PlaygroundService/GetMetadata', + ($0.GetMetadataRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetMetadataResponse.fromBuffer(value)); PlaygroundServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -252,6 +258,12 @@ class PlaygroundServiceClient extends $grpc.Client { {$grpc.CallOptions? options}) { return $createUnaryCall(_$getSnippet, request, options: options); } + + $grpc.ResponseFuture<$0.GetMetadataResponse> getMetadata( + $0.GetMetadataRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getMetadata, request, options: options); + } } abstract class PlaygroundServiceBase extends $grpc.Service { @@ -421,6 +433,15 @@ abstract class PlaygroundServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.GetSnippetRequest.fromBuffer(value), ($0.GetSnippetResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetMetadataRequest, $0.GetMetadataResponse>( + 'GetMetadata', + getMetadata_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetMetadataRequest.fromBuffer(value), + ($0.GetMetadataResponse value) => value.writeToBuffer())); } $async.Future<$0.RunCodeResponse> runCode_Pre( @@ -529,6 +550,11 @@ abstract class PlaygroundServiceBase extends $grpc.Service { return getSnippet(call, await request); } + $async.Future<$0.GetMetadataResponse> getMetadata_Pre($grpc.ServiceCall call, + $async.Future<$0.GetMetadataRequest> request) async { + return getMetadata(call, await request); + } + $async.Future<$0.RunCodeResponse> runCode( $grpc.ServiceCall call, $0.RunCodeRequest request); $async.Future<$0.CheckStatusResponse> checkStatus( @@ -569,4 +595,6 @@ abstract class PlaygroundServiceBase extends $grpc.Service { $grpc.ServiceCall call, $0.SaveSnippetRequest request); $async.Future<$0.GetSnippetResponse> getSnippet( $grpc.ServiceCall call, $0.GetSnippetRequest request); + $async.Future<$0.GetMetadataResponse> getMetadata( + $grpc.ServiceCall call, $0.GetMetadataRequest request); } diff --git a/playground/frontend/playground_components/lib/src/api/v1/api.pbjson.dart b/playground/frontend/playground_components/lib/src/api/v1/api.pbjson.dart index 92082673e66e..d61d6c2096fd 100644 --- a/playground/frontend/playground_components/lib/src/api/v1/api.pbjson.dart +++ b/playground/frontend/playground_components/lib/src/api/v1/api.pbjson.dart @@ -551,3 +551,23 @@ const GetSnippetResponse$json = const { /// Descriptor for `GetSnippetResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getSnippetResponseDescriptor = $convert.base64Decode('ChJHZXRTbmlwcGV0UmVzcG9uc2USKQoFZmlsZXMYASADKAsyEy5hcGkudjEuU25pcHBldEZpbGVSBWZpbGVzEh0KA3NkaxgCIAEoDjILLmFwaS52MS5TZGtSA3NkaxIpChBwaXBlbGluZV9vcHRpb25zGAMgASgJUg9waXBlbGluZU9wdGlvbnMSMgoKY29tcGxleGl0eRgEIAEoDjISLmFwaS52MS5Db21wbGV4aXR5Ugpjb21wbGV4aXR5'); +@$core.Deprecated('Use getMetadataRequestDescriptor instead') +const GetMetadataRequest$json = const { + '1': 'GetMetadataRequest', +}; + +/// Descriptor for `GetMetadataRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getMetadataRequestDescriptor = $convert.base64Decode('ChJHZXRNZXRhZGF0YVJlcXVlc3Q='); +@$core.Deprecated('Use getMetadataResponseDescriptor instead') +const GetMetadataResponse$json = const { + '1': 'GetMetadataResponse', + '2': const [ + const {'1': 'runner_sdk', '3': 1, '4': 1, '5': 9, '10': 'runnerSdk'}, + const {'1': 'build_commit_hash', '3': 2, '4': 1, '5': 9, '10': 'buildCommitHash'}, + const {'1': 'build_commit_timestamp_seconds_since_epoch', '3': 3, '4': 1, '5': 3, '10': 'buildCommitTimestampSecondsSinceEpoch'}, + const {'1': 'beam_sdk_version', '3': 4, '4': 1, '5': 9, '10': 'beamSdkVersion'}, + ], +}; + +/// Descriptor for `GetMetadataResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getMetadataResponseDescriptor = $convert.base64Decode('ChNHZXRNZXRhZGF0YVJlc3BvbnNlEh0KCnJ1bm5lcl9zZGsYASABKAlSCXJ1bm5lclNkaxIqChFidWlsZF9jb21taXRfaGFzaBgCIAEoCVIPYnVpbGRDb21taXRIYXNoElkKKmJ1aWxkX2NvbW1pdF90aW1lc3RhbXBfc2Vjb25kc19zaW5jZV9lcG9jaBgDIAEoA1IlYnVpbGRDb21taXRUaW1lc3RhbXBTZWNvbmRzU2luY2VFcG9jaBIoChBiZWFtX3Nka192ZXJzaW9uGAQgASgJUg5iZWFtU2RrVmVyc2lvbg=='); diff --git a/playground/frontend/playground_components/lib/src/build_metadata.g.dart b/playground/frontend/playground_components/lib/src/build_metadata.g.dart new file mode 100644 index 000000000000..67e37f9bfdda --- /dev/null +++ b/playground/frontend/playground_components/lib/src/build_metadata.g.dart @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// GENERATED CODE - DO NOT MODIFY BY HAND +// +// This file is generated during deployment to contain data about the commit. +// The copy of this file stored in the repository is for development purpose +// so the project can be started locally. +// Keep these constants `null` in the repository. +const buildCommitHash = null; +const buildCommitSecondsSinceEpoch = null; diff --git a/playground/frontend/playground_components/lib/src/constants/backend_urls.dart b/playground/frontend/playground_components/lib/src/constants/backend_urls.dart new file mode 100644 index 000000000000..670dfea2dad0 --- /dev/null +++ b/playground/frontend/playground_components/lib/src/constants/backend_urls.dart @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: prefer_interpolation_to_compose_strings + +/// The template for production backend URL. +const defaultBackendUrlTemplate = 'https://{node}.play-dev.beam.apache.org'; + +/// The URLs for local backend development. +const backendUrlOverrides = { + // 'router': 'https://router.play-dev.beam.apache.org', + // 'go': 'https://go.play-dev.beam.apache.org', + // 'java': 'https://java.play-dev.beam.apache.org', + // 'python': 'https://python.play-dev.beam.apache.org', + // 'scio': 'https://scio.play-dev.beam.apache.org', +}; + +/// The URL templates that will not be probed +/// if they are generated as the result of auto-composing backend URLs. +/// +/// If any new project is created that uses the Playground Backend, +/// its pattern should be added to this list. +/// Otherwise the first backend candidate will be derived from +/// such project's frontend host and will be probed in vain on every page load. +final skipBackendUrls = [ + 'tour.beam.apache.org' +].map((host) => RegExp(r'^http(s?)://(\w+)\.' + RegExp.escape(host) + r'$')); diff --git a/playground/frontend/playground_components/lib/src/controllers/build_metadata.dart b/playground/frontend/playground_components/lib/src/controllers/build_metadata.dart new file mode 100644 index 000000000000..6455d19b0ea2 --- /dev/null +++ b/playground/frontend/playground_components/lib/src/controllers/build_metadata.dart @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:get_it/get_it.dart'; + +import '../api/v1/api.pbgrpc.dart' show GetMetadataResponse; +import '../models/component_version.dart'; +import '../models/sdk.dart'; +import '../repositories/code_client/code_client.dart'; +import '../repositories/example_client/example_client.dart'; +import '../repositories/get_metadata_response_grpc_extension.dart'; + +/// Obtains versions from the backend. +class BuildMetadataController extends ChangeNotifier { + ComponentVersion? _routerVersion; + Future? _routerVersionFuture; + + final _runnerVersions = {}; + final _runnerVersionFutures = >{}; + + Future getRouterVersion() async { + if (_routerVersionFuture == null) { + await _loadRouterVersion(); + } + return _routerVersion!; + } + + Future _loadRouterVersion() async { + final client = GetIt.instance.get(); + _routerVersionFuture = client.getMetadata(); + + final metadata = await _routerVersionFuture!; + _routerVersion = metadata.componentVersion; + notifyListeners(); + } + + /// Returns the runner version and starts loading if it is not started yet. + Future getRunnerVersion(Sdk sdk) async { + if (!_runnerVersionFutures.containsKey(sdk)) { + await _loadRunnerVersion(sdk); + } + + return _runnerVersions[sdk]!; + } + + Future _loadRunnerVersion(Sdk sdk) async { + final client = GetIt.instance.get(); + _runnerVersionFutures[sdk] = client.getMetadata(sdk); + + final metadata = await _runnerVersionFutures[sdk]!; + _runnerVersions[sdk] = metadata.componentVersion; + notifyListeners(); + } +} diff --git a/playground/frontend/playground_components/lib/src/locator.dart b/playground/frontend/playground_components/lib/src/locator.dart index 004d5cc88837..c7e28bef6e67 100644 --- a/playground/frontend/playground_components/lib/src/locator.dart +++ b/playground/frontend/playground_components/lib/src/locator.dart @@ -18,10 +18,12 @@ import 'package:get_it/get_it.dart'; +import 'controllers/build_metadata.dart'; import 'services/symbols/symbols_notifier.dart'; import 'services/toast_notifier.dart'; Future initializeServiceLocator() async { + GetIt.instance.registerSingleton(BuildMetadataController()); GetIt.instance.registerSingleton(SymbolsNotifier()); GetIt.instance.registerSingleton(ToastNotifier()); } diff --git a/playground/frontend/playground_components/lib/src/models/component_version.dart b/playground/frontend/playground_components/lib/src/models/component_version.dart new file mode 100644 index 000000000000..0bff56950956 --- /dev/null +++ b/playground/frontend/playground_components/lib/src/models/component_version.dart @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: avoid_redundant_argument_values + +import '../build_metadata.g.dart' as frontend_build_metadata; + +class ComponentVersion { + const ComponentVersion({ + this.beamSdkVersion, + this.buildCommitHash, + this.dateTime, + }); + + final String? beamSdkVersion; + final String? buildCommitHash; + final DateTime? dateTime; + + /// The version of the frontend. + static final frontend = ComponentVersion( + buildCommitHash: frontend_build_metadata.buildCommitHash, + dateTime: frontend_build_metadata.buildCommitSecondsSinceEpoch == null + ? null + : DateTime.fromMillisecondsSinceEpoch( + // ignore: avoid_dynamic_calls + frontend_build_metadata.buildCommitSecondsSinceEpoch * 1000, + ), + ); +} diff --git a/playground/frontend/playground_components/lib/src/repositories/backend_urls.dart b/playground/frontend/playground_components/lib/src/repositories/backend_urls.dart new file mode 100644 index 000000000000..7654a8afcd6a --- /dev/null +++ b/playground/frontend/playground_components/lib/src/repositories/backend_urls.dart @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: avoid_print + +import '../../playground_components.dart'; +import '../constants/backend_urls.dart'; + +const _routerNode = 'router'; + +Future getRouterUrl() => _getBackendUrl(_routerNode); +Future getRunnerUrl(Sdk sdk) => _getBackendUrl(sdk.id); + +/// Returns the URL for the backend [node]. +/// +/// Calls [_getBackendUrlOptions] for options. +/// +/// If only one option exists, returns it. +/// This ensures fast initialization in production. +/// +/// If multiple options exist, each of them except the last one is probed +/// with getMetadata() call. This results in slower initialization for +/// custom stages but keeps the configuration simple. +Future _getBackendUrl(String node) async { + final urls = _getBackendUrlOptions(node); + + if (urls.length == 1) { + return urls.first; + } + + print('Probing multiple options for $node backend:'); + urls.forEach(print); + + final lastUrl = urls.removeLast(); + + for (final url in urls) { + try { + final client = GrpcExampleClient(url: url); + await client.getMetadata(); + print('Using $url'); + return url; + } on Exception catch (ex) { + print('$url failed'); + print(ex); + } + } + + print('Using $lastUrl'); + return lastUrl; +} + +/// Returns options for backend URLs for [node]. +/// +/// If an override is given in [backendUrlOverrides], it is the only option. +/// This can be used for development if the production backend +/// must not be used. +/// +/// Otherwise there are 2 options in the following order: +/// 1. [node] is prepended to the host of the current URL. +/// 2. [node] is inserted into [defaultBackendUrlTemplate] (the production URL). +/// If the two are the same, only one is returned. +/// This results in the following when looking up "node": +/// +/// For production Playground: +/// - node.play.beam.apache.org (the production URL). +/// +/// For production Tour of Beam: +/// - node.play.beam.apache.org (as node.tour.beam.apache.org is blacklisted +/// via [skipBackendUrls]). +/// +/// For any other stage of Playground or Tour of Beam (my-stage.com): +/// - node.my-stage.com +/// - node.play.beam.apache.org +/// This means that if the stage runs its own container for the given +/// backend node, it is used. Otherwise the production backend is used. +List _getBackendUrlOptions(String node) { + final override = backendUrlOverrides[node]; + if (override != null) { + return [Uri.parse(override)]; + } + + final currentHost = Uri.base.host; + final nodeUriFromCurrentHost = Uri.base.replace( + host: '$node.$currentHost', + path: '', + queryParameters: {}, + ).removeFragment(); + + return { + nodeUriFromCurrentHost.toString(), + defaultBackendUrlTemplate.replaceAll('{node}', node), + }.where(_shouldAttemptUrl).map(Uri.parse).toList(); +} + +/// Whether [url] does not match any pattern in [skipBackendUrls]. +bool _shouldAttemptUrl(String url) { + return !skipBackendUrls.any((pattern) => pattern.allMatches(url).isNotEmpty); +} diff --git a/playground/frontend/playground_components/lib/src/repositories/code_client/code_client.dart b/playground/frontend/playground_components/lib/src/repositories/code_client/code_client.dart index 2024e0aa82b8..f50a399d3c35 100644 --- a/playground/frontend/playground_components/lib/src/repositories/code_client/code_client.dart +++ b/playground/frontend/playground_components/lib/src/repositories/code_client/code_client.dart @@ -16,12 +16,16 @@ * limitations under the License. */ +import '../../api/v1/api.pb.dart' as grpc; +import '../../models/sdk.dart'; import '../models/check_status_response.dart'; import '../models/output_response.dart'; import '../models/run_code_request.dart'; import '../models/run_code_response.dart'; abstract class CodeClient { + Future getMetadata(Sdk sdk); + Future runCode(RunCodeRequest request); Future cancelExecution(String pipelineUuid); diff --git a/playground/frontend/playground_components/lib/src/repositories/code_client/grpc_code_client.dart b/playground/frontend/playground_components/lib/src/repositories/code_client/grpc_code_client.dart index 6e461d30b446..04f4fb29e2ff 100644 --- a/playground/frontend/playground_components/lib/src/repositories/code_client/grpc_code_client.dart +++ b/playground/frontend/playground_components/lib/src/repositories/code_client/grpc_code_client.dart @@ -38,15 +38,13 @@ const kGeneralError = 'Failed to execute code'; class GrpcCodeClient implements CodeClient { final grpc.PlaygroundServiceClient _defaultClient; - final Map _runnerUrlsById; + final Map _runnerUrlsById; factory GrpcCodeClient({ - required String url, - required Map runnerUrlsById, + required Uri url, + required Map runnerUrlsById, }) { - final channel = IisWorkaroundChannel.xhr( - Uri.parse(url), - ); + final channel = IisWorkaroundChannel.xhr(url); return GrpcCodeClient._( client: grpc.PlaygroundServiceClient(channel), @@ -56,10 +54,20 @@ class GrpcCodeClient implements CodeClient { GrpcCodeClient._({ required grpc.PlaygroundServiceClient client, - required Map runnerUrlsById, + required Map runnerUrlsById, }) : _defaultClient = client, _runnerUrlsById = runnerUrlsById; + @override + Future getMetadata(Sdk sdk) async { + final client = _createRunCodeClient(sdk); + return _runSafely( + () => client.getMetadata( + grpc.GetMetadataRequest(), + ), + ); + } + @override Future runCode(RunCodeRequest request) async { final client = _createRunCodeClient(request.sdk); @@ -217,9 +225,7 @@ class GrpcCodeClient implements CodeClient { throw Exception('Runner not found for ${sdk.id}'); } - final channel = IisWorkaroundChannel.xhr( - Uri.parse(apiClientURL), - ); + final channel = IisWorkaroundChannel.xhr(apiClientURL); return grpc.PlaygroundServiceClient(channel); } diff --git a/playground/frontend/playground_components/lib/src/repositories/code_repository.dart b/playground/frontend/playground_components/lib/src/repositories/code_repository.dart index da630e6c1329..bd6a5206ed1b 100644 --- a/playground/frontend/playground_components/lib/src/repositories/code_repository.dart +++ b/playground/frontend/playground_components/lib/src/repositories/code_repository.dart @@ -156,8 +156,7 @@ class CodeRepository { ); case RunCodeStatus.validationError: - final output = - await _client.getValidationErrorOutput(pipelineUuid); + final output = await _client.getValidationErrorOutput(pipelineUuid); return RunCodeResult( graph: prevGraph, log: prevLog, @@ -167,8 +166,7 @@ class CodeRepository { ); case RunCodeStatus.preparationError: - final output = - await _client.getPreparationErrorOutput(pipelineUuid); + final output = await _client.getPreparationErrorOutput(pipelineUuid); return RunCodeResult( graph: prevGraph, log: prevLog, diff --git a/playground/frontend/playground_components/lib/src/repositories/example_client/example_client.dart b/playground/frontend/playground_components/lib/src/repositories/example_client/example_client.dart index d2bc5a792a93..1987f827343e 100644 --- a/playground/frontend/playground_components/lib/src/repositories/example_client/example_client.dart +++ b/playground/frontend/playground_components/lib/src/repositories/example_client/example_client.dart @@ -16,6 +16,7 @@ * limitations under the License. */ +import '../../api/v1/api.pb.dart' as grpc; import '../models/get_default_precompiled_object_request.dart'; import '../models/get_precompiled_object_code_response.dart'; import '../models/get_precompiled_object_request.dart'; @@ -29,6 +30,8 @@ import '../models/save_snippet_request.dart'; import '../models/save_snippet_response.dart'; abstract class ExampleClient { + Future getMetadata(); + Future getPrecompiledObjects( GetPrecompiledObjectsRequest request, ); diff --git a/playground/frontend/playground_components/lib/src/repositories/example_client/grpc_example_client.dart b/playground/frontend/playground_components/lib/src/repositories/example_client/grpc_example_client.dart index a069806fac4d..c0e7a44f07d0 100644 --- a/playground/frontend/playground_components/lib/src/repositories/example_client/grpc_example_client.dart +++ b/playground/frontend/playground_components/lib/src/repositories/example_client/grpc_example_client.dart @@ -45,11 +45,9 @@ class GrpcExampleClient implements ExampleClient { final grpc.PlaygroundServiceClient _defaultClient; factory GrpcExampleClient({ - required String url, + required Uri url, }) { - final channel = IisWorkaroundChannel.xhr( - Uri.parse(url), - ); + final channel = IisWorkaroundChannel.xhr(url); return GrpcExampleClient._( client: grpc.PlaygroundServiceClient(channel), @@ -60,6 +58,15 @@ class GrpcExampleClient implements ExampleClient { required grpc.PlaygroundServiceClient client, }) : _defaultClient = client; + @override + Future getMetadata() async { + return _runSafely( + () => _defaultClient.getMetadata( + grpc.GetMetadataRequest(), + ), + ); + } + @override Future getPrecompiledObjects( GetPrecompiledObjectsRequest request, diff --git a/playground/frontend/lib/config.example.dart b/playground/frontend/playground_components/lib/src/repositories/get_metadata_response_grpc_extension.dart similarity index 56% rename from playground/frontend/lib/config.example.dart rename to playground/frontend/playground_components/lib/src/repositories/get_metadata_response_grpc_extension.dart index de50eac82492..c45e75fb62a4 100644 --- a/playground/frontend/lib/config.example.dart +++ b/playground/frontend/playground_components/lib/src/repositories/get_metadata_response_grpc_extension.dart @@ -16,14 +16,24 @@ * limitations under the License. */ -// To build and run the app, copy this file to './config.g.dart' -// This is a temporary solution while we cannot have 'config.g.dart' -// in the repository. -// TODO: https://github.com/apache/beam/issues/24200 +import '../api/v1/api.pb.dart'; +import '../models/component_version.dart'; -const String kAnalyticsUA = 'UA-73650088-2'; -const String kApiClientURL = 'https://router.play-dev.beam.apache.org'; -const String kApiJavaClientURL = 'https://java.play-dev.beam.apache.org'; -const String kApiGoClientURL = 'https://go.play-dev.beam.apache.org'; -const String kApiPythonClientURL = 'https://python.play-dev.beam.apache.org'; -const String kApiScioClientURL = 'https://scio.play-dev.beam.apache.org'; +extension MetadataResponseGrpcExtension on GetMetadataResponse { + ComponentVersion get componentVersion { + return ComponentVersion( + beamSdkVersion: beamSdkVersion == '' ? null : beamSdkVersion, + buildCommitHash: buildCommitHash == '' ? null : buildCommitHash, + dateTime: _getDateTime(), + ); + } + + DateTime? _getDateTime() { + final seconds = buildCommitTimestampSecondsSinceEpoch.toInt(); + if (seconds == 0) { + return null; + } + + return DateTime.fromMillisecondsSinceEpoch(seconds * 1000); + } +} diff --git a/playground/frontend/playground_components/lib/src/util/async.dart b/playground/frontend/playground_components/lib/src/util/async.dart new file mode 100644 index 000000000000..44248eeeb67f --- /dev/null +++ b/playground/frontend/playground_components/lib/src/util/async.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// Mimics [Future.wait] for a map. +Future> waitMap(Map> map) async { + final values = await Future.wait(map.values); + return Map.fromIterables(map.keys, values); +} diff --git a/playground/frontend/playground_components/lib/src/widgets/dialog.dart b/playground/frontend/playground_components/lib/src/widgets/dialog.dart new file mode 100644 index 000000000000..1a0a0c8e4d92 --- /dev/null +++ b/playground/frontend/playground_components/lib/src/widgets/dialog.dart @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +// TODO(alexeyinkin): In future convert all dialogs to this one. +class BeamDialog extends StatelessWidget { + const BeamDialog({ + required this.child, + this.title, + }); + + final Widget child; + final Widget? title; + + static Future show({ + required Widget child, + required BuildContext context, + Widget? title, + }) async { + await showDialog( + context: context, + builder: (BuildContext context) => BeamDialog( + child: AlertDialog( + title: title, + content: child, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + return child; + } +} diff --git a/playground/frontend/playground_components/lib/src/widgets/versions/versions.dart b/playground/frontend/playground_components/lib/src/widgets/versions/versions.dart new file mode 100644 index 000000000000..76a2ed69241b --- /dev/null +++ b/playground/frontend/playground_components/lib/src/widgets/versions/versions.dart @@ -0,0 +1,162 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:url_launcher/link.dart'; + +import '../../constants/sizes.dart'; +import '../../controllers/build_metadata.dart'; +import '../../models/component_version.dart'; +import '../../models/sdk.dart'; +import '../loading_indicator.dart'; + +const _commitHashLength = 8; + +/// Shows versions of frontend, router, and [sdks] runners. +class VersionsWidget extends StatelessWidget { + const VersionsWidget({ + required this.sdks, + }); + + final List sdks; + + @override + Widget build(BuildContext context) { + final controller = GetIt.instance.get(); + + return AnimatedBuilder( + animation: controller, + builder: (context, child) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + // + _ComponentVersionWidget( + Future.value(ComponentVersion.frontend), + title: 'widgets.versions.titles.frontend'.tr(), + ), + + const SizedBox(height: BeamSizes.size10), + _ComponentVersionWidget( + controller.getRouterVersion(), // ignore: discarded_futures + title: 'widgets.versions.titles.router'.tr(), + ), + + for (final sdk in sdks) ...[ + const SizedBox(height: BeamSizes.size10), + _ComponentVersionWidget( + controller.getRunnerVersion(sdk), // ignore: discarded_futures + title: 'widgets.versions.titles.runner'.tr( + namedArgs: { + 'sdk': sdk.title, + }, + ), + ), + ], + ], + ), + ); + } +} + +/// A line in [VersionsWidget]. +class _ComponentVersionWidget extends StatelessWidget { + const _ComponentVersionWidget( + this.componentVersionFuture, { + required this.title, + }); + + final Future componentVersionFuture; + final String title; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text(title), + _getContent(), + ], + ); + } + + Widget _getContent() { + return FutureBuilder( + future: componentVersionFuture, + builder: _getContentWithSnapshot, + ); + } + + Widget _getContentWithSnapshot( + BuildContext context, + AsyncSnapshot snapshot, + ) { + final data = snapshot.data; + + if (data == null) { + return const LoadingIndicator(); + } + + final hash = data.buildCommitHash; + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + // + if (data.beamSdkVersion != null) + const Text('widgets.versions.beam').tr( + namedArgs: { + 'version': data.beamSdkVersion!, + }, + ), + + if (hash != null) + Link( + uri: _commitHashToUri(data.buildCommitHash!), + builder: (context, followLink) { + return TextButton( + onPressed: followLink, + child: const Text('widgets.versions.commit').tr( + namedArgs: { + 'hash': hash.substring( + 0, + min(_commitHashLength, hash.length), + ), + 'date': _formatDate(data.dateTime!), + }, + ), + ); + }, + ), + ], + ); + } + + String _formatDate(DateTime dt) { + return dt.toString().substring(0, 'YYYY-MM-DD HH:MM'.length); + } +} + +Uri _commitHashToUri(String commitHash) { + return Uri.parse('https://github.com/apache/beam/tree/$commitHash'); +} diff --git a/playground/frontend/playground_components/pubspec.yaml b/playground/frontend/playground_components/pubspec.yaml index a7c35d9ffa15..4835e8cb45fb 100644 --- a/playground/frontend/playground_components/pubspec.yaml +++ b/playground/frontend/playground_components/pubspec.yaml @@ -52,6 +52,7 @@ dependencies: provider: ^6.0.3 rxdart: ^0.27.7 shared_preferences: ^2.0.15 + url_launcher: ^6.1.10 visibility_detector: ^0.3.3 yaml: ^3.1.1 diff --git a/playground/frontend/playground_components/test/src/common/example_cache.dart b/playground/frontend/playground_components/test/src/common/example_cache.dart index a3017598e4e8..b9cdeec866b4 100644 --- a/playground/frontend/playground_components/test/src/common/example_cache.dart +++ b/playground/frontend/playground_components/test/src/common/example_cache.dart @@ -26,6 +26,8 @@ class _C {} // ignore: unused_element /// Creates an [ExampleCache] with a broken URL so all requests fail. ExampleCache createFailingExampleCache() { return ExampleCache( - exampleRepository: ExampleRepository(client: GrpcExampleClient(url: '')), + exampleRepository: ExampleRepository( + client: GrpcExampleClient(url: Uri.parse('')), + ), ); } diff --git a/playground/frontend/playground_components/test/src/common/example_repository_mock.mocks.dart b/playground/frontend/playground_components/test/src/common/example_repository_mock.mocks.dart index b426f3c01502..f4c79067d5a3 100644 --- a/playground/frontend/playground_components/test/src/common/example_repository_mock.mocks.dart +++ b/playground/frontend/playground_components/test/src/common/example_repository_mock.mocks.dart @@ -3,28 +3,30 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; +import 'dart:async' as _i6; import 'package:mockito/mockito.dart' as _i1; import 'package:playground_components/src/models/category_with_examples.dart' - as _i7; -import 'package:playground_components/src/models/example_base.dart' as _i2; -import 'package:playground_components/src/models/sdk.dart' as _i6; -import 'package:playground_components/src/models/snippet_file.dart' as _i10; + as _i8; +import 'package:playground_components/src/models/example_base.dart' as _i3; +import 'package:playground_components/src/models/sdk.dart' as _i7; +import 'package:playground_components/src/models/snippet_file.dart' as _i11; +import 'package:playground_components/src/repositories/example_client/example_client.dart' + as _i2; import 'package:playground_components/src/repositories/example_repository.dart' - as _i4; + as _i5; import 'package:playground_components/src/repositories/models/get_default_precompiled_object_request.dart' - as _i9; + as _i10; import 'package:playground_components/src/repositories/models/get_precompiled_object_request.dart' - as _i11; + as _i12; import 'package:playground_components/src/repositories/models/get_precompiled_objects_request.dart' - as _i8; + as _i9; import 'package:playground_components/src/repositories/models/get_snippet_request.dart' - as _i12; + as _i13; import 'package:playground_components/src/repositories/models/get_snippet_response.dart' - as _i3; + as _i4; import 'package:playground_components/src/repositories/models/save_snippet_request.dart' - as _i13; + as _i14; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -37,8 +39,8 @@ import 'package:playground_components/src/repositories/models/save_snippet_reque // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeExampleBase_0 extends _i1.SmartFake implements _i2.ExampleBase { - _FakeExampleBase_0( +class _FakeExampleClient_0 extends _i1.SmartFake implements _i2.ExampleClient { + _FakeExampleClient_0( Object parent, Invocation parentInvocation, ) : super( @@ -47,9 +49,19 @@ class _FakeExampleBase_0 extends _i1.SmartFake implements _i2.ExampleBase { ); } -class _FakeGetSnippetResponse_1 extends _i1.SmartFake - implements _i3.GetSnippetResponse { - _FakeGetSnippetResponse_1( +class _FakeExampleBase_1 extends _i1.SmartFake implements _i3.ExampleBase { + _FakeExampleBase_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetSnippetResponse_2 extends _i1.SmartFake + implements _i4.GetSnippetResponse { + _FakeGetSnippetResponse_2( Object parent, Invocation parentInvocation, ) : super( @@ -61,120 +73,128 @@ class _FakeGetSnippetResponse_1 extends _i1.SmartFake /// A class which mocks [ExampleRepository]. /// /// See the documentation for Mockito's code generation for more information. -class MockExampleRepository extends _i1.Mock implements _i4.ExampleRepository { +class MockExampleRepository extends _i1.Mock implements _i5.ExampleRepository { MockExampleRepository() { _i1.throwOnMissingStub(this); } @override - _i5.Future>> - getPrecompiledObjects(_i8.GetPrecompiledObjectsRequest? request) => + _i2.ExampleClient get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeExampleClient_0( + this, + Invocation.getter(#client), + ), + ) as _i2.ExampleClient); + @override + _i6.Future>> + getPrecompiledObjects(_i9.GetPrecompiledObjectsRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjects, [request], ), returnValue: - _i5.Future>>.value( - <_i6.Sdk, List<_i7.CategoryWithExamples>>{}), - ) as _i5.Future>>); + _i6.Future>>.value( + <_i7.Sdk, List<_i8.CategoryWithExamples>>{}), + ) as _i6.Future>>); @override - _i5.Future<_i2.ExampleBase> getDefaultPrecompiledObject( - _i9.GetDefaultPrecompiledObjectRequest? request) => + _i6.Future<_i3.ExampleBase> getDefaultPrecompiledObject( + _i10.GetDefaultPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getDefaultPrecompiledObject, [request], ), - returnValue: _i5.Future<_i2.ExampleBase>.value(_FakeExampleBase_0( + returnValue: _i6.Future<_i3.ExampleBase>.value(_FakeExampleBase_1( this, Invocation.method( #getDefaultPrecompiledObject, [request], ), )), - ) as _i5.Future<_i2.ExampleBase>); + ) as _i6.Future<_i3.ExampleBase>); @override - _i5.Future> getPrecompiledObjectCode( - _i11.GetPrecompiledObjectRequest? request) => + _i6.Future> getPrecompiledObjectCode( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectCode, [request], ), returnValue: - _i5.Future>.value(<_i10.SnippetFile>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i11.SnippetFile>[]), + ) as _i6.Future>); @override - _i5.Future getPrecompiledObjectOutput( - _i11.GetPrecompiledObjectRequest? request) => + _i6.Future getPrecompiledObjectOutput( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectOutput, [request], ), - returnValue: _i5.Future.value(''), - ) as _i5.Future); + returnValue: _i6.Future.value(''), + ) as _i6.Future); @override - _i5.Future getPrecompiledObjectLogs( - _i11.GetPrecompiledObjectRequest? request) => + _i6.Future getPrecompiledObjectLogs( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectLogs, [request], ), - returnValue: _i5.Future.value(''), - ) as _i5.Future); + returnValue: _i6.Future.value(''), + ) as _i6.Future); @override - _i5.Future getPrecompiledObjectGraph( - _i11.GetPrecompiledObjectRequest? request) => + _i6.Future getPrecompiledObjectGraph( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectGraph, [request], ), - returnValue: _i5.Future.value(''), - ) as _i5.Future); + returnValue: _i6.Future.value(''), + ) as _i6.Future); @override - _i5.Future<_i2.ExampleBase> getPrecompiledObject( - _i11.GetPrecompiledObjectRequest? request) => + _i6.Future<_i3.ExampleBase> getPrecompiledObject( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObject, [request], ), - returnValue: _i5.Future<_i2.ExampleBase>.value(_FakeExampleBase_0( + returnValue: _i6.Future<_i3.ExampleBase>.value(_FakeExampleBase_1( this, Invocation.method( #getPrecompiledObject, [request], ), )), - ) as _i5.Future<_i2.ExampleBase>); + ) as _i6.Future<_i3.ExampleBase>); @override - _i5.Future<_i3.GetSnippetResponse> getSnippet( - _i12.GetSnippetRequest? request) => + _i6.Future<_i4.GetSnippetResponse> getSnippet( + _i13.GetSnippetRequest? request) => (super.noSuchMethod( Invocation.method( #getSnippet, [request], ), returnValue: - _i5.Future<_i3.GetSnippetResponse>.value(_FakeGetSnippetResponse_1( + _i6.Future<_i4.GetSnippetResponse>.value(_FakeGetSnippetResponse_2( this, Invocation.method( #getSnippet, [request], ), )), - ) as _i5.Future<_i3.GetSnippetResponse>); + ) as _i6.Future<_i4.GetSnippetResponse>); @override - _i5.Future saveSnippet(_i13.SaveSnippetRequest? request) => + _i6.Future saveSnippet(_i14.SaveSnippetRequest? request) => (super.noSuchMethod( Invocation.method( #saveSnippet, [request], ), - returnValue: _i5.Future.value(''), - ) as _i5.Future); + returnValue: _i6.Future.value(''), + ) as _i6.Future); } diff --git a/playground/frontend/playground_components/test/src/repositories/code_repository_test.mocks.dart b/playground/frontend/playground_components/test/src/repositories/code_repository_test.mocks.dart index 8963431373af..c109bae2a157 100644 --- a/playground/frontend/playground_components/test/src/repositories/code_repository_test.mocks.dart +++ b/playground/frontend/playground_components/test/src/repositories/code_repository_test.mocks.dart @@ -3,19 +3,21 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i7; import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/api/v1/api.pb.dart' as _i2; +import 'package:playground_components/src/models/sdk.dart' as _i8; import 'package:playground_components/src/repositories/code_client/code_client.dart' - as _i5; + as _i6; import 'package:playground_components/src/repositories/models/check_status_response.dart' - as _i3; -import 'package:playground_components/src/repositories/models/output_response.dart' as _i4; +import 'package:playground_components/src/repositories/models/output_response.dart' + as _i5; import 'package:playground_components/src/repositories/models/run_code_request.dart' - as _i7; + as _i9; import 'package:playground_components/src/repositories/models/run_code_response.dart' - as _i2; + as _i3; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -28,9 +30,20 @@ import 'package:playground_components/src/repositories/models/run_code_response. // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeRunCodeResponse_0 extends _i1.SmartFake - implements _i2.RunCodeResponse { - _FakeRunCodeResponse_0( +class _FakeGetMetadataResponse_0 extends _i1.SmartFake + implements _i2.GetMetadataResponse { + _FakeGetMetadataResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRunCodeResponse_1 extends _i1.SmartFake + implements _i3.RunCodeResponse { + _FakeRunCodeResponse_1( Object parent, Invocation parentInvocation, ) : super( @@ -39,9 +52,9 @@ class _FakeRunCodeResponse_0 extends _i1.SmartFake ); } -class _FakeCheckStatusResponse_1 extends _i1.SmartFake - implements _i3.CheckStatusResponse { - _FakeCheckStatusResponse_1( +class _FakeCheckStatusResponse_2 extends _i1.SmartFake + implements _i4.CheckStatusResponse { + _FakeCheckStatusResponse_2( Object parent, Invocation parentInvocation, ) : super( @@ -50,9 +63,9 @@ class _FakeCheckStatusResponse_1 extends _i1.SmartFake ); } -class _FakeOutputResponse_2 extends _i1.SmartFake - implements _i4.OutputResponse { - _FakeOutputResponse_2( +class _FakeOutputResponse_3 extends _i1.SmartFake + implements _i5.OutputResponse { + _FakeOutputResponse_3( Object parent, Invocation parentInvocation, ) : super( @@ -64,157 +77,173 @@ class _FakeOutputResponse_2 extends _i1.SmartFake /// A class which mocks [CodeClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockCodeClient extends _i1.Mock implements _i5.CodeClient { +class MockCodeClient extends _i1.Mock implements _i6.CodeClient { MockCodeClient() { _i1.throwOnMissingStub(this); } @override - _i6.Future<_i2.RunCodeResponse> runCode(_i7.RunCodeRequest? request) => + _i7.Future<_i2.GetMetadataResponse> getMetadata(_i8.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getMetadata, + [sdk], + ), + returnValue: _i7.Future<_i2.GetMetadataResponse>.value( + _FakeGetMetadataResponse_0( + this, + Invocation.method( + #getMetadata, + [sdk], + ), + )), + ) as _i7.Future<_i2.GetMetadataResponse>); + @override + _i7.Future<_i3.RunCodeResponse> runCode(_i9.RunCodeRequest? request) => (super.noSuchMethod( Invocation.method( #runCode, [request], ), returnValue: - _i6.Future<_i2.RunCodeResponse>.value(_FakeRunCodeResponse_0( + _i7.Future<_i3.RunCodeResponse>.value(_FakeRunCodeResponse_1( this, Invocation.method( #runCode, [request], ), )), - ) as _i6.Future<_i2.RunCodeResponse>); + ) as _i7.Future<_i3.RunCodeResponse>); @override - _i6.Future cancelExecution(String? pipelineUuid) => (super.noSuchMethod( + _i7.Future cancelExecution(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #cancelExecution, [pipelineUuid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future<_i3.CheckStatusResponse> checkStatus(String? pipelineUuid) => + _i7.Future<_i4.CheckStatusResponse> checkStatus(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #checkStatus, [pipelineUuid], ), - returnValue: _i6.Future<_i3.CheckStatusResponse>.value( - _FakeCheckStatusResponse_1( + returnValue: _i7.Future<_i4.CheckStatusResponse>.value( + _FakeCheckStatusResponse_2( this, Invocation.method( #checkStatus, [pipelineUuid], ), )), - ) as _i6.Future<_i3.CheckStatusResponse>); + ) as _i7.Future<_i4.CheckStatusResponse>); @override - _i6.Future<_i4.OutputResponse> getCompileOutput(String? pipelineUuid) => + _i7.Future<_i5.OutputResponse> getCompileOutput(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getCompileOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getCompileOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); @override - _i6.Future<_i4.OutputResponse> getRunOutput(String? pipelineUuid) => + _i7.Future<_i5.OutputResponse> getRunOutput(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getRunOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getRunOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); @override - _i6.Future<_i4.OutputResponse> getLogOutput(String? pipelineUuid) => + _i7.Future<_i5.OutputResponse> getLogOutput(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getLogOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getLogOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); @override - _i6.Future<_i4.OutputResponse> getRunErrorOutput(String? pipelineUuid) => + _i7.Future<_i5.OutputResponse> getRunErrorOutput(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getRunErrorOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getRunErrorOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); @override - _i6.Future<_i4.OutputResponse> getValidationErrorOutput( + _i7.Future<_i5.OutputResponse> getValidationErrorOutput( String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getValidationErrorOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getValidationErrorOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); @override - _i6.Future<_i4.OutputResponse> getPreparationErrorOutput( + _i7.Future<_i5.OutputResponse> getPreparationErrorOutput( String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getPreparationErrorOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getPreparationErrorOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); @override - _i6.Future<_i4.OutputResponse> getGraphOutput(String? pipelineUuid) => + _i7.Future<_i5.OutputResponse> getGraphOutput(String? pipelineUuid) => (super.noSuchMethod( Invocation.method( #getGraphOutput, [pipelineUuid], ), - returnValue: _i6.Future<_i4.OutputResponse>.value(_FakeOutputResponse_2( + returnValue: _i7.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( this, Invocation.method( #getGraphOutput, [pipelineUuid], ), )), - ) as _i6.Future<_i4.OutputResponse>); + ) as _i7.Future<_i5.OutputResponse>); } diff --git a/playground/frontend/playground_components/test/src/repositories/example_repository_test.mocks.dart b/playground/frontend/playground_components/test/src/repositories/example_repository_test.mocks.dart index ab944a04c75f..2a1e33bc6a77 100644 --- a/playground/frontend/playground_components/test/src/repositories/example_repository_test.mocks.dart +++ b/playground/frontend/playground_components/test/src/repositories/example_repository_test.mocks.dart @@ -3,33 +3,34 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i9; +import 'dart:async' as _i10; import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/api/v1/api.pb.dart' as _i2; import 'package:playground_components/src/repositories/example_client/example_client.dart' - as _i8; + as _i9; import 'package:playground_components/src/repositories/models/get_default_precompiled_object_request.dart' - as _i12; + as _i13; import 'package:playground_components/src/repositories/models/get_precompiled_object_code_response.dart' - as _i3; + as _i4; import 'package:playground_components/src/repositories/models/get_precompiled_object_request.dart' - as _i11; + as _i12; import 'package:playground_components/src/repositories/models/get_precompiled_object_response.dart' - as _i4; + as _i5; import 'package:playground_components/src/repositories/models/get_precompiled_objects_request.dart' - as _i10; + as _i11; import 'package:playground_components/src/repositories/models/get_precompiled_objects_response.dart' - as _i2; + as _i3; import 'package:playground_components/src/repositories/models/get_snippet_request.dart' - as _i13; + as _i14; import 'package:playground_components/src/repositories/models/get_snippet_response.dart' - as _i6; + as _i7; import 'package:playground_components/src/repositories/models/output_response.dart' - as _i5; + as _i6; import 'package:playground_components/src/repositories/models/save_snippet_request.dart' - as _i14; + as _i15; import 'package:playground_components/src/repositories/models/save_snippet_response.dart' - as _i7; + as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -42,9 +43,20 @@ import 'package:playground_components/src/repositories/models/save_snippet_respo // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeGetPrecompiledObjectsResponse_0 extends _i1.SmartFake - implements _i2.GetPrecompiledObjectsResponse { - _FakeGetPrecompiledObjectsResponse_0( +class _FakeGetMetadataResponse_0 extends _i1.SmartFake + implements _i2.GetMetadataResponse { + _FakeGetMetadataResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetPrecompiledObjectsResponse_1 extends _i1.SmartFake + implements _i3.GetPrecompiledObjectsResponse { + _FakeGetPrecompiledObjectsResponse_1( Object parent, Invocation parentInvocation, ) : super( @@ -53,9 +65,9 @@ class _FakeGetPrecompiledObjectsResponse_0 extends _i1.SmartFake ); } -class _FakeGetPrecompiledObjectCodeResponse_1 extends _i1.SmartFake - implements _i3.GetPrecompiledObjectCodeResponse { - _FakeGetPrecompiledObjectCodeResponse_1( +class _FakeGetPrecompiledObjectCodeResponse_2 extends _i1.SmartFake + implements _i4.GetPrecompiledObjectCodeResponse { + _FakeGetPrecompiledObjectCodeResponse_2( Object parent, Invocation parentInvocation, ) : super( @@ -64,9 +76,9 @@ class _FakeGetPrecompiledObjectCodeResponse_1 extends _i1.SmartFake ); } -class _FakeGetPrecompiledObjectResponse_2 extends _i1.SmartFake - implements _i4.GetPrecompiledObjectResponse { - _FakeGetPrecompiledObjectResponse_2( +class _FakeGetPrecompiledObjectResponse_3 extends _i1.SmartFake + implements _i5.GetPrecompiledObjectResponse { + _FakeGetPrecompiledObjectResponse_3( Object parent, Invocation parentInvocation, ) : super( @@ -75,9 +87,9 @@ class _FakeGetPrecompiledObjectResponse_2 extends _i1.SmartFake ); } -class _FakeOutputResponse_3 extends _i1.SmartFake - implements _i5.OutputResponse { - _FakeOutputResponse_3( +class _FakeOutputResponse_4 extends _i1.SmartFake + implements _i6.OutputResponse { + _FakeOutputResponse_4( Object parent, Invocation parentInvocation, ) : super( @@ -86,9 +98,9 @@ class _FakeOutputResponse_3 extends _i1.SmartFake ); } -class _FakeGetSnippetResponse_4 extends _i1.SmartFake - implements _i6.GetSnippetResponse { - _FakeGetSnippetResponse_4( +class _FakeGetSnippetResponse_5 extends _i1.SmartFake + implements _i7.GetSnippetResponse { + _FakeGetSnippetResponse_5( Object parent, Invocation parentInvocation, ) : super( @@ -97,9 +109,9 @@ class _FakeGetSnippetResponse_4 extends _i1.SmartFake ); } -class _FakeSaveSnippetResponse_5 extends _i1.SmartFake - implements _i7.SaveSnippetResponse { - _FakeSaveSnippetResponse_5( +class _FakeSaveSnippetResponse_6 extends _i1.SmartFake + implements _i8.SaveSnippetResponse { + _FakeSaveSnippetResponse_6( Object parent, Invocation parentInvocation, ) : super( @@ -111,159 +123,177 @@ class _FakeSaveSnippetResponse_5 extends _i1.SmartFake /// A class which mocks [ExampleClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockExampleClient extends _i1.Mock implements _i8.ExampleClient { +class MockExampleClient extends _i1.Mock implements _i9.ExampleClient { MockExampleClient() { _i1.throwOnMissingStub(this); } @override - _i9.Future<_i2.GetPrecompiledObjectsResponse> getPrecompiledObjects( - _i10.GetPrecompiledObjectsRequest? request) => + _i10.Future<_i2.GetMetadataResponse> getMetadata() => (super.noSuchMethod( + Invocation.method( + #getMetadata, + [], + ), + returnValue: _i10.Future<_i2.GetMetadataResponse>.value( + _FakeGetMetadataResponse_0( + this, + Invocation.method( + #getMetadata, + [], + ), + )), + ) as _i10.Future<_i2.GetMetadataResponse>); + @override + _i10.Future<_i3.GetPrecompiledObjectsResponse> getPrecompiledObjects( + _i11.GetPrecompiledObjectsRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjects, [request], ), - returnValue: _i9.Future<_i2.GetPrecompiledObjectsResponse>.value( - _FakeGetPrecompiledObjectsResponse_0( + returnValue: _i10.Future<_i3.GetPrecompiledObjectsResponse>.value( + _FakeGetPrecompiledObjectsResponse_1( this, Invocation.method( #getPrecompiledObjects, [request], ), )), - ) as _i9.Future<_i2.GetPrecompiledObjectsResponse>); + ) as _i10.Future<_i3.GetPrecompiledObjectsResponse>); @override - _i9.Future<_i3.GetPrecompiledObjectCodeResponse> getPrecompiledObjectCode( - _i11.GetPrecompiledObjectRequest? request) => + _i10.Future<_i4.GetPrecompiledObjectCodeResponse> getPrecompiledObjectCode( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectCode, [request], ), - returnValue: _i9.Future<_i3.GetPrecompiledObjectCodeResponse>.value( - _FakeGetPrecompiledObjectCodeResponse_1( + returnValue: _i10.Future<_i4.GetPrecompiledObjectCodeResponse>.value( + _FakeGetPrecompiledObjectCodeResponse_2( this, Invocation.method( #getPrecompiledObjectCode, [request], ), )), - ) as _i9.Future<_i3.GetPrecompiledObjectCodeResponse>); + ) as _i10.Future<_i4.GetPrecompiledObjectCodeResponse>); @override - _i9.Future<_i4.GetPrecompiledObjectResponse> getDefaultPrecompiledObject( - _i12.GetDefaultPrecompiledObjectRequest? request) => + _i10.Future<_i5.GetPrecompiledObjectResponse> getDefaultPrecompiledObject( + _i13.GetDefaultPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getDefaultPrecompiledObject, [request], ), - returnValue: _i9.Future<_i4.GetPrecompiledObjectResponse>.value( - _FakeGetPrecompiledObjectResponse_2( + returnValue: _i10.Future<_i5.GetPrecompiledObjectResponse>.value( + _FakeGetPrecompiledObjectResponse_3( this, Invocation.method( #getDefaultPrecompiledObject, [request], ), )), - ) as _i9.Future<_i4.GetPrecompiledObjectResponse>); + ) as _i10.Future<_i5.GetPrecompiledObjectResponse>); @override - _i9.Future<_i4.GetPrecompiledObjectResponse> getPrecompiledObject( - _i11.GetPrecompiledObjectRequest? request) => + _i10.Future<_i5.GetPrecompiledObjectResponse> getPrecompiledObject( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObject, [request], ), - returnValue: _i9.Future<_i4.GetPrecompiledObjectResponse>.value( - _FakeGetPrecompiledObjectResponse_2( + returnValue: _i10.Future<_i5.GetPrecompiledObjectResponse>.value( + _FakeGetPrecompiledObjectResponse_3( this, Invocation.method( #getPrecompiledObject, [request], ), )), - ) as _i9.Future<_i4.GetPrecompiledObjectResponse>); + ) as _i10.Future<_i5.GetPrecompiledObjectResponse>); @override - _i9.Future<_i5.OutputResponse> getPrecompiledObjectOutput( - _i11.GetPrecompiledObjectRequest? request) => + _i10.Future<_i6.OutputResponse> getPrecompiledObjectOutput( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectOutput, [request], ), - returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + returnValue: + _i10.Future<_i6.OutputResponse>.value(_FakeOutputResponse_4( this, Invocation.method( #getPrecompiledObjectOutput, [request], ), )), - ) as _i9.Future<_i5.OutputResponse>); + ) as _i10.Future<_i6.OutputResponse>); @override - _i9.Future<_i5.OutputResponse> getPrecompiledObjectLogs( - _i11.GetPrecompiledObjectRequest? request) => + _i10.Future<_i6.OutputResponse> getPrecompiledObjectLogs( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectLogs, [request], ), - returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + returnValue: + _i10.Future<_i6.OutputResponse>.value(_FakeOutputResponse_4( this, Invocation.method( #getPrecompiledObjectLogs, [request], ), )), - ) as _i9.Future<_i5.OutputResponse>); + ) as _i10.Future<_i6.OutputResponse>); @override - _i9.Future<_i5.OutputResponse> getPrecompiledObjectGraph( - _i11.GetPrecompiledObjectRequest? request) => + _i10.Future<_i6.OutputResponse> getPrecompiledObjectGraph( + _i12.GetPrecompiledObjectRequest? request) => (super.noSuchMethod( Invocation.method( #getPrecompiledObjectGraph, [request], ), - returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + returnValue: + _i10.Future<_i6.OutputResponse>.value(_FakeOutputResponse_4( this, Invocation.method( #getPrecompiledObjectGraph, [request], ), )), - ) as _i9.Future<_i5.OutputResponse>); + ) as _i10.Future<_i6.OutputResponse>); @override - _i9.Future<_i6.GetSnippetResponse> getSnippet( - _i13.GetSnippetRequest? request) => + _i10.Future<_i7.GetSnippetResponse> getSnippet( + _i14.GetSnippetRequest? request) => (super.noSuchMethod( Invocation.method( #getSnippet, [request], ), returnValue: - _i9.Future<_i6.GetSnippetResponse>.value(_FakeGetSnippetResponse_4( + _i10.Future<_i7.GetSnippetResponse>.value(_FakeGetSnippetResponse_5( this, Invocation.method( #getSnippet, [request], ), )), - ) as _i9.Future<_i6.GetSnippetResponse>); + ) as _i10.Future<_i7.GetSnippetResponse>); @override - _i9.Future<_i7.SaveSnippetResponse> saveSnippet( - _i14.SaveSnippetRequest? request) => + _i10.Future<_i8.SaveSnippetResponse> saveSnippet( + _i15.SaveSnippetRequest? request) => (super.noSuchMethod( Invocation.method( #saveSnippet, [request], ), - returnValue: _i9.Future<_i7.SaveSnippetResponse>.value( - _FakeSaveSnippetResponse_5( + returnValue: _i10.Future<_i8.SaveSnippetResponse>.value( + _FakeSaveSnippetResponse_6( this, Invocation.method( #saveSnippet, [request], ), )), - ) as _i9.Future<_i7.SaveSnippetResponse>); + ) as _i10.Future<_i8.SaveSnippetResponse>); } diff --git a/playground/frontend/playground_components/tools/generate_build_metadata.sh b/playground/frontend/playground_components/tools/generate_build_metadata.sh new file mode 100755 index 000000000000..d06c97f97d4a --- /dev/null +++ b/playground/frontend/playground_components/tools/generate_build_metadata.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Usage +# ./generate_build_metadata.sh + +FILE=$(realpath "$(dirname "$0")/../lib/src/build_metadata.g.dart") + +cat > "$FILE" << EOF +// GENERATED CODE - DO NOT MODIFY BY HAND +// +// This file is generated during deployment to contain data about the commit. +// The copy of this file stored in the repository is for development purpose +// so the project can be started locally. +// Keep these constants \`null\` in the repository. + +const buildCommitHash = '$1'; +const buildCommitSecondsSinceEpoch = $2; +EOF + +echo "Written $FILE:" +cat "$FILE" diff --git a/playground/frontend/pubspec.lock b/playground/frontend/pubspec.lock index 6b1ce7e65e75..c27811a36705 100644 --- a/playground/frontend/pubspec.lock +++ b/playground/frontend/pubspec.lock @@ -1171,10 +1171,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: e8f2efc804810c0f2f5b485f49e7942179f56eabcfe81dce3387fec4bb55876b + sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" url: "https://pub.dev" source: hosted - version: "6.1.9" + version: "6.1.10" url_launcher_android: dependency: transitive description: diff --git a/playground/infrastructure/api/v1/api_pb2.py b/playground/infrastructure/api/v1/api_pb2.py index cf73ac0664a7..2df020a3517a 100644 --- a/playground/infrastructure/api/v1/api_pb2.py +++ b/playground/infrastructure/api/v1/api_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x61pi/v1/api.proto\x12\x06\x61pi.v1\"\xca\x01\n\x07\x44\x61taset\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x14.api.v1.EmulatorTypeR\x04type\x12\x36\n\x07options\x18\x02 \x03(\x0b\x32\x1c.api.v1.Dataset.OptionsEntryR\x07options\x12!\n\x0c\x64\x61taset_path\x18\x03 \x01(\tR\x0b\x64\x61tasetPath\x1a:\n\x0cOptionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xc6\x01\n\x0eRunCodeRequest\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x1d\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12)\n\x10pipeline_options\x18\x03 \x01(\tR\x0fpipelineOptions\x12+\n\x08\x64\x61tasets\x18\x04 \x03(\x0b\x32\x0f.api.v1.DatasetR\x08\x64\x61tasets\x12)\n\x05\x66iles\x18\x05 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\"6\n\x0fRunCodeResponse\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"9\n\x12\x43heckStatusRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"=\n\x13\x43heckStatusResponse\x12&\n\x06status\x18\x01 \x01(\x0e\x32\x0e.api.v1.StatusR\x06status\"A\n\x1aGetValidationOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"5\n\x1bGetValidationOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"B\n\x1bGetPreparationOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"6\n\x1cGetPreparationOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\">\n\x17GetCompileOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"2\n\x18GetCompileOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\":\n\x13GetRunOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\".\n\x14GetRunOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"9\n\x12GetRunErrorRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"-\n\x13GetRunErrorResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"5\n\x0eGetLogsRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\")\n\x0fGetLogsResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"6\n\x0fGetGraphRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"(\n\x10GetGraphResponse\x12\x14\n\x05graph\x18\x01 \x01(\tR\x05graph\"4\n\rCancelRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"\x10\n\x0e\x43\x61ncelResponse\"\x94\x04\n\x11PrecompiledObject\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x31\n\x04type\x18\x04 \x01(\x0e\x32\x1d.api.v1.PrecompiledObjectTypeR\x04type\x12)\n\x10pipeline_options\x18\x05 \x01(\tR\x0fpipelineOptions\x12\x12\n\x04link\x18\x06 \x01(\tR\x04link\x12\x1c\n\tmultifile\x18\x07 \x01(\x08R\tmultifile\x12!\n\x0c\x63ontext_line\x18\x08 \x01(\x05R\x0b\x63ontextLine\x12\'\n\x0f\x64\x65\x66\x61ult_example\x18\t \x01(\x08R\x0e\x64\x65\x66\x61ultExample\x12\x1d\n\x03sdk\x18\n \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12\x32\n\ncomplexity\x18\x0b \x01(\x0e\x32\x12.api.v1.ComplexityR\ncomplexity\x12\x12\n\x04tags\x18\x0c \x03(\tR\x04tags\x12+\n\x08\x64\x61tasets\x18\r \x03(\x0b\x32\x0f.api.v1.DatasetR\x08\x64\x61tasets\x12\x17\n\x07url_vcs\x18\x0e \x01(\tR\x06urlVcs\x12!\n\x0curl_notebook\x18\x0f \x01(\tR\x0burlNotebook\"\xe5\x01\n\nCategories\x12\x1d\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12;\n\ncategories\x18\x02 \x03(\x0b\x32\x1b.api.v1.Categories.CategoryR\ncategories\x1a{\n\x08\x43\x61tegory\x12#\n\rcategory_name\x18\x01 \x01(\tR\x0c\x63\x61tegoryName\x12J\n\x13precompiled_objects\x18\x02 \x03(\x0b\x32\x19.api.v1.PrecompiledObjectR\x12precompiledObjects\"Y\n\x1cGetPrecompiledObjectsRequest\x12\x1d\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12\x1a\n\x08\x63\x61tegory\x18\x02 \x01(\tR\x08\x63\x61tegory\"<\n\x1bGetPrecompiledObjectRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"@\n\x1fGetPrecompiledObjectCodeRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"B\n!GetPrecompiledObjectOutputRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"@\n\x1fGetPrecompiledObjectLogsRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"A\n GetPrecompiledObjectGraphRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"C\n\"GetDefaultPrecompiledObjectRequest\x12\x1d\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\"Z\n\x1dGetPrecompiledObjectsResponse\x12\x39\n\x0esdk_categories\x18\x01 \x03(\x0b\x32\x12.api.v1.CategoriesR\rsdkCategories\"h\n\x1cGetPrecompiledObjectResponse\x12H\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObjectR\x11precompiledObject\"a\n GetPrecompiledObjectCodeResponse\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12)\n\x05\x66iles\x18\x02 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\"<\n\"GetPrecompiledObjectOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\":\n GetPrecompiledObjectLogsResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"9\n!GetPrecompiledObjectGraphResponse\x12\x14\n\x05graph\x18\x01 \x01(\tR\x05graph\"o\n#GetDefaultPrecompiledObjectResponse\x12H\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObjectR\x11precompiledObject\"T\n\x0bSnippetFile\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07\x63ontent\x18\x02 \x01(\tR\x07\x63ontent\x12\x17\n\x07is_main\x18\x03 \x01(\x08R\x06isMain\"\xe6\x01\n\x12SaveSnippetRequest\x12)\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\x12\x1d\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12)\n\x10pipeline_options\x18\x03 \x01(\tR\x0fpipelineOptions\x12\x32\n\ncomplexity\x18\x04 \x01(\x0e\x32\x12.api.v1.ComplexityR\ncomplexity\x12\'\n\x0fpersistence_key\x18\x05 \x01(\tR\x0epersistenceKey\"%\n\x13SaveSnippetResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"#\n\x11GetSnippetRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xbd\x01\n\x12GetSnippetResponse\x12)\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\x12\x1d\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12)\n\x10pipeline_options\x18\x03 \x01(\tR\x0fpipelineOptions\x12\x32\n\ncomplexity\x18\x04 \x01(\x0e\x32\x12.api.v1.ComplexityR\ncomplexity*R\n\x03Sdk\x12\x13\n\x0fSDK_UNSPECIFIED\x10\x00\x12\x0c\n\x08SDK_JAVA\x10\x01\x12\n\n\x06SDK_GO\x10\x02\x12\x0e\n\nSDK_PYTHON\x10\x03\x12\x0c\n\x08SDK_SCIO\x10\x04*\xb8\x02\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_VALIDATING\x10\x01\x12\x1b\n\x17STATUS_VALIDATION_ERROR\x10\x02\x12\x14\n\x10STATUS_PREPARING\x10\x03\x12\x1c\n\x18STATUS_PREPARATION_ERROR\x10\x04\x12\x14\n\x10STATUS_COMPILING\x10\x05\x12\x18\n\x14STATUS_COMPILE_ERROR\x10\x06\x12\x14\n\x10STATUS_EXECUTING\x10\x07\x12\x13\n\x0fSTATUS_FINISHED\x10\x08\x12\x14\n\x10STATUS_RUN_ERROR\x10\t\x12\x10\n\x0cSTATUS_ERROR\x10\n\x12\x16\n\x12STATUS_RUN_TIMEOUT\x10\x0b\x12\x13\n\x0fSTATUS_CANCELED\x10\x0c*\xae\x01\n\x15PrecompiledObjectType\x12\'\n#PRECOMPILED_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fPRECOMPILED_OBJECT_TYPE_EXAMPLE\x10\x01\x12 \n\x1cPRECOMPILED_OBJECT_TYPE_KATA\x10\x02\x12%\n!PRECOMPILED_OBJECT_TYPE_UNIT_TEST\x10\x03*n\n\nComplexity\x12\x1a\n\x16\x43OMPLEXITY_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPLEXITY_BASIC\x10\x01\x12\x15\n\x11\x43OMPLEXITY_MEDIUM\x10\x02\x12\x17\n\x13\x43OMPLEXITY_ADVANCED\x10\x03*F\n\x0c\x45mulatorType\x12\x1d\n\x19\x45MULATOR_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x45MULATOR_TYPE_KAFKA\x10\x01\x32\x8b\r\n\x11PlaygroundService\x12:\n\x07RunCode\x12\x16.api.v1.RunCodeRequest\x1a\x17.api.v1.RunCodeResponse\x12\x46\n\x0b\x43heckStatus\x12\x1a.api.v1.CheckStatusRequest\x1a\x1b.api.v1.CheckStatusResponse\x12I\n\x0cGetRunOutput\x12\x1b.api.v1.GetRunOutputRequest\x1a\x1c.api.v1.GetRunOutputResponse\x12:\n\x07GetLogs\x12\x16.api.v1.GetLogsRequest\x1a\x17.api.v1.GetLogsResponse\x12=\n\x08GetGraph\x12\x17.api.v1.GetGraphRequest\x1a\x18.api.v1.GetGraphResponse\x12\x46\n\x0bGetRunError\x12\x1a.api.v1.GetRunErrorRequest\x1a\x1b.api.v1.GetRunErrorResponse\x12^\n\x13GetValidationOutput\x12\".api.v1.GetValidationOutputRequest\x1a#.api.v1.GetValidationOutputResponse\x12\x61\n\x14GetPreparationOutput\x12#.api.v1.GetPreparationOutputRequest\x1a$.api.v1.GetPreparationOutputResponse\x12U\n\x10GetCompileOutput\x12\x1f.api.v1.GetCompileOutputRequest\x1a .api.v1.GetCompileOutputResponse\x12\x37\n\x06\x43\x61ncel\x12\x15.api.v1.CancelRequest\x1a\x16.api.v1.CancelResponse\x12\x64\n\x15GetPrecompiledObjects\x12$.api.v1.GetPrecompiledObjectsRequest\x1a%.api.v1.GetPrecompiledObjectsResponse\x12\x61\n\x14GetPrecompiledObject\x12#.api.v1.GetPrecompiledObjectRequest\x1a$.api.v1.GetPrecompiledObjectResponse\x12m\n\x18GetPrecompiledObjectCode\x12\'.api.v1.GetPrecompiledObjectCodeRequest\x1a(.api.v1.GetPrecompiledObjectCodeResponse\x12s\n\x1aGetPrecompiledObjectOutput\x12).api.v1.GetPrecompiledObjectOutputRequest\x1a*.api.v1.GetPrecompiledObjectOutputResponse\x12m\n\x18GetPrecompiledObjectLogs\x12\'.api.v1.GetPrecompiledObjectLogsRequest\x1a(.api.v1.GetPrecompiledObjectLogsResponse\x12p\n\x19GetPrecompiledObjectGraph\x12(.api.v1.GetPrecompiledObjectGraphRequest\x1a).api.v1.GetPrecompiledObjectGraphResponse\x12v\n\x1bGetDefaultPrecompiledObject\x12*.api.v1.GetDefaultPrecompiledObjectRequest\x1a+.api.v1.GetDefaultPrecompiledObjectResponse\x12\x46\n\x0bSaveSnippet\x12\x1a.api.v1.SaveSnippetRequest\x1a\x1b.api.v1.SaveSnippetResponse\x12\x43\n\nGetSnippet\x12\x19.api.v1.GetSnippetRequest\x1a\x1a.api.v1.GetSnippetResponseB8Z6beam.apache.org/playground/backend/internal;playgroundb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x61pi/v1/api.proto\x12\x06\x61pi.v1\"\xca\x01\n\x07\x44\x61taset\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x14.api.v1.EmulatorTypeR\x04type\x12\x36\n\x07options\x18\x02 \x03(\x0b\x32\x1c.api.v1.Dataset.OptionsEntryR\x07options\x12!\n\x0c\x64\x61taset_path\x18\x03 \x01(\tR\x0b\x64\x61tasetPath\x1a:\n\x0cOptionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xc6\x01\n\x0eRunCodeRequest\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x1d\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12)\n\x10pipeline_options\x18\x03 \x01(\tR\x0fpipelineOptions\x12+\n\x08\x64\x61tasets\x18\x04 \x03(\x0b\x32\x0f.api.v1.DatasetR\x08\x64\x61tasets\x12)\n\x05\x66iles\x18\x05 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\"6\n\x0fRunCodeResponse\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"9\n\x12\x43heckStatusRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"=\n\x13\x43heckStatusResponse\x12&\n\x06status\x18\x01 \x01(\x0e\x32\x0e.api.v1.StatusR\x06status\"A\n\x1aGetValidationOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"5\n\x1bGetValidationOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"B\n\x1bGetPreparationOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"6\n\x1cGetPreparationOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\">\n\x17GetCompileOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"2\n\x18GetCompileOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\":\n\x13GetRunOutputRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\".\n\x14GetRunOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"9\n\x12GetRunErrorRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"-\n\x13GetRunErrorResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"5\n\x0eGetLogsRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\")\n\x0fGetLogsResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"6\n\x0fGetGraphRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"(\n\x10GetGraphResponse\x12\x14\n\x05graph\x18\x01 \x01(\tR\x05graph\"4\n\rCancelRequest\x12#\n\rpipeline_uuid\x18\x01 \x01(\tR\x0cpipelineUuid\"\x10\n\x0e\x43\x61ncelResponse\"\x94\x04\n\x11PrecompiledObject\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x31\n\x04type\x18\x04 \x01(\x0e\x32\x1d.api.v1.PrecompiledObjectTypeR\x04type\x12)\n\x10pipeline_options\x18\x05 \x01(\tR\x0fpipelineOptions\x12\x12\n\x04link\x18\x06 \x01(\tR\x04link\x12\x1c\n\tmultifile\x18\x07 \x01(\x08R\tmultifile\x12!\n\x0c\x63ontext_line\x18\x08 \x01(\x05R\x0b\x63ontextLine\x12\'\n\x0f\x64\x65\x66\x61ult_example\x18\t \x01(\x08R\x0e\x64\x65\x66\x61ultExample\x12\x1d\n\x03sdk\x18\n \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12\x32\n\ncomplexity\x18\x0b \x01(\x0e\x32\x12.api.v1.ComplexityR\ncomplexity\x12\x12\n\x04tags\x18\x0c \x03(\tR\x04tags\x12+\n\x08\x64\x61tasets\x18\r \x03(\x0b\x32\x0f.api.v1.DatasetR\x08\x64\x61tasets\x12\x17\n\x07url_vcs\x18\x0e \x01(\tR\x06urlVcs\x12!\n\x0curl_notebook\x18\x0f \x01(\tR\x0burlNotebook\"\xe5\x01\n\nCategories\x12\x1d\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12;\n\ncategories\x18\x02 \x03(\x0b\x32\x1b.api.v1.Categories.CategoryR\ncategories\x1a{\n\x08\x43\x61tegory\x12#\n\rcategory_name\x18\x01 \x01(\tR\x0c\x63\x61tegoryName\x12J\n\x13precompiled_objects\x18\x02 \x03(\x0b\x32\x19.api.v1.PrecompiledObjectR\x12precompiledObjects\"Y\n\x1cGetPrecompiledObjectsRequest\x12\x1d\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12\x1a\n\x08\x63\x61tegory\x18\x02 \x01(\tR\x08\x63\x61tegory\"<\n\x1bGetPrecompiledObjectRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"@\n\x1fGetPrecompiledObjectCodeRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"B\n!GetPrecompiledObjectOutputRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"@\n\x1fGetPrecompiledObjectLogsRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"A\n GetPrecompiledObjectGraphRequest\x12\x1d\n\ncloud_path\x18\x01 \x01(\tR\tcloudPath\"C\n\"GetDefaultPrecompiledObjectRequest\x12\x1d\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\"Z\n\x1dGetPrecompiledObjectsResponse\x12\x39\n\x0esdk_categories\x18\x01 \x03(\x0b\x32\x12.api.v1.CategoriesR\rsdkCategories\"h\n\x1cGetPrecompiledObjectResponse\x12H\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObjectR\x11precompiledObject\"a\n GetPrecompiledObjectCodeResponse\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12)\n\x05\x66iles\x18\x02 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\"<\n\"GetPrecompiledObjectOutputResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\":\n GetPrecompiledObjectLogsResponse\x12\x16\n\x06output\x18\x01 \x01(\tR\x06output\"9\n!GetPrecompiledObjectGraphResponse\x12\x14\n\x05graph\x18\x01 \x01(\tR\x05graph\"o\n#GetDefaultPrecompiledObjectResponse\x12H\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObjectR\x11precompiledObject\"T\n\x0bSnippetFile\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07\x63ontent\x18\x02 \x01(\tR\x07\x63ontent\x12\x17\n\x07is_main\x18\x03 \x01(\x08R\x06isMain\"\xe6\x01\n\x12SaveSnippetRequest\x12)\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\x12\x1d\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12)\n\x10pipeline_options\x18\x03 \x01(\tR\x0fpipelineOptions\x12\x32\n\ncomplexity\x18\x04 \x01(\x0e\x32\x12.api.v1.ComplexityR\ncomplexity\x12\'\n\x0fpersistence_key\x18\x05 \x01(\tR\x0epersistenceKey\"%\n\x13SaveSnippetResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"#\n\x11GetSnippetRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xbd\x01\n\x12GetSnippetResponse\x12)\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x13.api.v1.SnippetFileR\x05\x66iles\x12\x1d\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.SdkR\x03sdk\x12)\n\x10pipeline_options\x18\x03 \x01(\tR\x0fpipelineOptions\x12\x32\n\ncomplexity\x18\x04 \x01(\x0e\x32\x12.api.v1.ComplexityR\ncomplexity\"\x14\n\x12GetMetadataRequest\"\xe5\x01\n\x13GetMetadataResponse\x12\x1d\n\nrunner_sdk\x18\x01 \x01(\tR\trunnerSdk\x12*\n\x11\x62uild_commit_hash\x18\x02 \x01(\tR\x0f\x62uildCommitHash\x12Y\n*build_commit_timestamp_seconds_since_epoch\x18\x03 \x01(\x03R%buildCommitTimestampSecondsSinceEpoch\x12(\n\x10\x62\x65\x61m_sdk_version\x18\x04 \x01(\tR\x0e\x62\x65\x61mSdkVersion*R\n\x03Sdk\x12\x13\n\x0fSDK_UNSPECIFIED\x10\x00\x12\x0c\n\x08SDK_JAVA\x10\x01\x12\n\n\x06SDK_GO\x10\x02\x12\x0e\n\nSDK_PYTHON\x10\x03\x12\x0c\n\x08SDK_SCIO\x10\x04*\xb8\x02\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_VALIDATING\x10\x01\x12\x1b\n\x17STATUS_VALIDATION_ERROR\x10\x02\x12\x14\n\x10STATUS_PREPARING\x10\x03\x12\x1c\n\x18STATUS_PREPARATION_ERROR\x10\x04\x12\x14\n\x10STATUS_COMPILING\x10\x05\x12\x18\n\x14STATUS_COMPILE_ERROR\x10\x06\x12\x14\n\x10STATUS_EXECUTING\x10\x07\x12\x13\n\x0fSTATUS_FINISHED\x10\x08\x12\x14\n\x10STATUS_RUN_ERROR\x10\t\x12\x10\n\x0cSTATUS_ERROR\x10\n\x12\x16\n\x12STATUS_RUN_TIMEOUT\x10\x0b\x12\x13\n\x0fSTATUS_CANCELED\x10\x0c*\xae\x01\n\x15PrecompiledObjectType\x12\'\n#PRECOMPILED_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fPRECOMPILED_OBJECT_TYPE_EXAMPLE\x10\x01\x12 \n\x1cPRECOMPILED_OBJECT_TYPE_KATA\x10\x02\x12%\n!PRECOMPILED_OBJECT_TYPE_UNIT_TEST\x10\x03*n\n\nComplexity\x12\x1a\n\x16\x43OMPLEXITY_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPLEXITY_BASIC\x10\x01\x12\x15\n\x11\x43OMPLEXITY_MEDIUM\x10\x02\x12\x17\n\x13\x43OMPLEXITY_ADVANCED\x10\x03*F\n\x0c\x45mulatorType\x12\x1d\n\x19\x45MULATOR_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x45MULATOR_TYPE_KAFKA\x10\x01\x32\xd3\r\n\x11PlaygroundService\x12:\n\x07RunCode\x12\x16.api.v1.RunCodeRequest\x1a\x17.api.v1.RunCodeResponse\x12\x46\n\x0b\x43heckStatus\x12\x1a.api.v1.CheckStatusRequest\x1a\x1b.api.v1.CheckStatusResponse\x12I\n\x0cGetRunOutput\x12\x1b.api.v1.GetRunOutputRequest\x1a\x1c.api.v1.GetRunOutputResponse\x12:\n\x07GetLogs\x12\x16.api.v1.GetLogsRequest\x1a\x17.api.v1.GetLogsResponse\x12=\n\x08GetGraph\x12\x17.api.v1.GetGraphRequest\x1a\x18.api.v1.GetGraphResponse\x12\x46\n\x0bGetRunError\x12\x1a.api.v1.GetRunErrorRequest\x1a\x1b.api.v1.GetRunErrorResponse\x12^\n\x13GetValidationOutput\x12\".api.v1.GetValidationOutputRequest\x1a#.api.v1.GetValidationOutputResponse\x12\x61\n\x14GetPreparationOutput\x12#.api.v1.GetPreparationOutputRequest\x1a$.api.v1.GetPreparationOutputResponse\x12U\n\x10GetCompileOutput\x12\x1f.api.v1.GetCompileOutputRequest\x1a .api.v1.GetCompileOutputResponse\x12\x37\n\x06\x43\x61ncel\x12\x15.api.v1.CancelRequest\x1a\x16.api.v1.CancelResponse\x12\x64\n\x15GetPrecompiledObjects\x12$.api.v1.GetPrecompiledObjectsRequest\x1a%.api.v1.GetPrecompiledObjectsResponse\x12\x61\n\x14GetPrecompiledObject\x12#.api.v1.GetPrecompiledObjectRequest\x1a$.api.v1.GetPrecompiledObjectResponse\x12m\n\x18GetPrecompiledObjectCode\x12\'.api.v1.GetPrecompiledObjectCodeRequest\x1a(.api.v1.GetPrecompiledObjectCodeResponse\x12s\n\x1aGetPrecompiledObjectOutput\x12).api.v1.GetPrecompiledObjectOutputRequest\x1a*.api.v1.GetPrecompiledObjectOutputResponse\x12m\n\x18GetPrecompiledObjectLogs\x12\'.api.v1.GetPrecompiledObjectLogsRequest\x1a(.api.v1.GetPrecompiledObjectLogsResponse\x12p\n\x19GetPrecompiledObjectGraph\x12(.api.v1.GetPrecompiledObjectGraphRequest\x1a).api.v1.GetPrecompiledObjectGraphResponse\x12v\n\x1bGetDefaultPrecompiledObject\x12*.api.v1.GetDefaultPrecompiledObjectRequest\x1a+.api.v1.GetDefaultPrecompiledObjectResponse\x12\x46\n\x0bSaveSnippet\x12\x1a.api.v1.SaveSnippetRequest\x1a\x1b.api.v1.SaveSnippetResponse\x12\x43\n\nGetSnippet\x12\x19.api.v1.GetSnippetRequest\x1a\x1a.api.v1.GetSnippetResponse\x12\x46\n\x0bGetMetadata\x12\x1a.api.v1.GetMetadataRequest\x1a\x1b.api.v1.GetMetadataResponseB8Z6beam.apache.org/playground/backend/internal;playgroundb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,16 +24,16 @@ DESCRIPTOR._serialized_options = b'Z6beam.apache.org/playground/backend/internal;playground' _DATASET_OPTIONSENTRY._options = None _DATASET_OPTIONSENTRY._serialized_options = b'8\001' - _globals['_SDK']._serialized_start=3890 - _globals['_SDK']._serialized_end=3972 - _globals['_STATUS']._serialized_start=3975 - _globals['_STATUS']._serialized_end=4287 - _globals['_PRECOMPILEDOBJECTTYPE']._serialized_start=4290 - _globals['_PRECOMPILEDOBJECTTYPE']._serialized_end=4464 - _globals['_COMPLEXITY']._serialized_start=4466 - _globals['_COMPLEXITY']._serialized_end=4576 - _globals['_EMULATORTYPE']._serialized_start=4578 - _globals['_EMULATORTYPE']._serialized_end=4648 + _globals['_SDK']._serialized_start=4144 + _globals['_SDK']._serialized_end=4226 + _globals['_STATUS']._serialized_start=4229 + _globals['_STATUS']._serialized_end=4541 + _globals['_PRECOMPILEDOBJECTTYPE']._serialized_start=4544 + _globals['_PRECOMPILEDOBJECTTYPE']._serialized_end=4718 + _globals['_COMPLEXITY']._serialized_start=4720 + _globals['_COMPLEXITY']._serialized_end=4830 + _globals['_EMULATORTYPE']._serialized_start=4832 + _globals['_EMULATORTYPE']._serialized_end=4902 _globals['_DATASET']._serialized_start=29 _globals['_DATASET']._serialized_end=231 _globals['_DATASET_OPTIONSENTRY']._serialized_start=173 @@ -122,6 +122,10 @@ _globals['_GETSNIPPETREQUEST']._serialized_end=3696 _globals['_GETSNIPPETRESPONSE']._serialized_start=3699 _globals['_GETSNIPPETRESPONSE']._serialized_end=3888 - _globals['_PLAYGROUNDSERVICE']._serialized_start=4651 - _globals['_PLAYGROUNDSERVICE']._serialized_end=6326 + _globals['_GETMETADATAREQUEST']._serialized_start=3890 + _globals['_GETMETADATAREQUEST']._serialized_end=3910 + _globals['_GETMETADATARESPONSE']._serialized_start=3913 + _globals['_GETMETADATARESPONSE']._serialized_end=4142 + _globals['_PLAYGROUNDSERVICE']._serialized_start=4905 + _globals['_PLAYGROUNDSERVICE']._serialized_end=6652 # @@protoc_insertion_point(module_scope) diff --git a/playground/infrastructure/api/v1/api_pb2.pyi b/playground/infrastructure/api/v1/api_pb2.pyi index e109393a754a..cab03195c6a2 100644 --- a/playground/infrastructure/api/v1/api_pb2.pyi +++ b/playground/infrastructure/api/v1/api_pb2.pyi @@ -404,3 +404,19 @@ class GetSnippetResponse(_message.Message): pipeline_options: str complexity: Complexity def __init__(self, files: _Optional[_Iterable[_Union[SnippetFile, _Mapping]]] = ..., sdk: _Optional[_Union[Sdk, str]] = ..., pipeline_options: _Optional[str] = ..., complexity: _Optional[_Union[Complexity, str]] = ...) -> None: ... + +class GetMetadataRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class GetMetadataResponse(_message.Message): + __slots__ = ["runner_sdk", "build_commit_hash", "build_commit_timestamp_seconds_since_epoch", "beam_sdk_version"] + RUNNER_SDK_FIELD_NUMBER: _ClassVar[int] + BUILD_COMMIT_HASH_FIELD_NUMBER: _ClassVar[int] + BUILD_COMMIT_TIMESTAMP_SECONDS_SINCE_EPOCH_FIELD_NUMBER: _ClassVar[int] + BEAM_SDK_VERSION_FIELD_NUMBER: _ClassVar[int] + runner_sdk: str + build_commit_hash: str + build_commit_timestamp_seconds_since_epoch: int + beam_sdk_version: str + def __init__(self, runner_sdk: _Optional[str] = ..., build_commit_hash: _Optional[str] = ..., build_commit_timestamp_seconds_since_epoch: _Optional[int] = ..., beam_sdk_version: _Optional[str] = ...) -> None: ... diff --git a/playground/infrastructure/api/v1/api_pb2_grpc.py b/playground/infrastructure/api/v1/api_pb2_grpc.py index 108d5b45e7c6..91c33e3611ba 100644 --- a/playground/infrastructure/api/v1/api_pb2_grpc.py +++ b/playground/infrastructure/api/v1/api_pb2_grpc.py @@ -109,6 +109,11 @@ def __init__(self, channel): request_serializer=api_dot_v1_dot_api__pb2.GetSnippetRequest.SerializeToString, response_deserializer=api_dot_v1_dot_api__pb2.GetSnippetResponse.FromString, ) + self.GetMetadata = channel.unary_unary( + '/api.v1.PlaygroundService/GetMetadata', + request_serializer=api_dot_v1_dot_api__pb2.GetMetadataRequest.SerializeToString, + response_deserializer=api_dot_v1_dot_api__pb2.GetMetadataResponse.FromString, + ) class PlaygroundServiceServicer(object): @@ -247,6 +252,13 @@ def GetSnippet(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetMetadata(self, request, context): + """Get the runner metadata. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_PlaygroundServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -345,6 +357,11 @@ def add_PlaygroundServiceServicer_to_server(servicer, server): request_deserializer=api_dot_v1_dot_api__pb2.GetSnippetRequest.FromString, response_serializer=api_dot_v1_dot_api__pb2.GetSnippetResponse.SerializeToString, ), + 'GetMetadata': grpc.unary_unary_rpc_method_handler( + servicer.GetMetadata, + request_deserializer=api_dot_v1_dot_api__pb2.GetMetadataRequest.FromString, + response_serializer=api_dot_v1_dot_api__pb2.GetMetadataResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'api.v1.PlaygroundService', rpc_method_handlers) @@ -677,3 +694,20 @@ def GetSnippet(request, api_dot_v1_dot_api__pb2.GetSnippetResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetMetadata(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/api.v1.PlaygroundService/GetMetadata', + api_dot_v1_dot_api__pb2.GetMetadataRequest.SerializeToString, + api_dot_v1_dot_api__pb2.GetMetadataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/playground/infrastructure/cloudbuild/cloudbuild_pg_to_gke.yaml b/playground/infrastructure/cloudbuild/cloudbuild_pg_to_gke.yaml index 3d9c8d405668..fc20d1bcb035 100644 --- a/playground/infrastructure/cloudbuild/cloudbuild_pg_to_gke.yaml +++ b/playground/infrastructure/cloudbuild/cloudbuild_pg_to_gke.yaml @@ -37,7 +37,6 @@ steps: 'bucket = "$_STATE_BUCKET"'\ > playground/terraform/environment/$_ENVIRONMENT_NAME/state.tfbackend gcloud container clusters get-credentials --region '$_PLAYGROUND_ZONE' '$_GKE_NAME' --project '$PROJECT_ID' - ./gradlew playground:terraform:prepareConfig -Pdns-name="$_DNS_NAME" ./gradlew playground:terraform:gkebackend -Pdocker-repository-root="$_DOCKER_REPOSITORY_ROOT" \ -Pproject_environment="$_ENVIRONMENT_NAME" -Pdocker-tag="$_TAG" -Psdk-tag="$_SDK_TAG" -Pdns-name="$_DNS_NAME" diff --git a/playground/terraform/build.gradle.kts b/playground/terraform/build.gradle.kts index 93318d182572..dcafbbc382a8 100644 --- a/playground/terraform/build.gradle.kts +++ b/playground/terraform/build.gradle.kts @@ -285,56 +285,15 @@ tasks.register("pushFront") { dependsOn(":playground:frontend:dockerTagsPush") } -tasks.register("prepareConfig") { - group = "deploy" - doLast { - var dns_name = "" - if (project.hasProperty("dns-name")) { - dns_name = project.property("dns-name") as String - } - val configFileName = "config.g.dart" - val modulePath = project(":playground:frontend").projectDir.absolutePath - var file = File("$modulePath/lib/$configFileName") - - file.writeText( - """ -const String kAnalyticsUA = 'UA-73650088-2'; -const String kApiClientURL = - 'https://router.${dns_name}'; -const String kApiJavaClientURL = - 'https://java.${dns_name}'; -const String kApiGoClientURL = - 'https://go.${dns_name}'; -const String kApiPythonClientURL = - 'https://python.${dns_name}'; -const String kApiScioClientURL = - 'https://scio.${dns_name}'; -""" - ) - try { - var stdout = ByteArrayOutputStream() - //set Docker Registry - exec { - commandLine = listOf("terraform", "output", "docker-repository-root") - standardOutput = stdout - } - project.rootProject.extra["docker-repository-root"] = stdout.toString().trim().replace("\"", "") - } catch (e: Exception) { - } - } -} /* initialization infrastructure */ tasks.register("InitInfrastructure") { group = "deploy" description = "initialization infrastructure" val init = tasks.getByName("terraformInit") val apply = tasks.getByName("terraformApplyInf") - val prepare = tasks.getByName("prepareConfig") dependsOn(init) dependsOn(apply) - dependsOn(prepare) apply.mustRunAfter(init) - prepare.mustRunAfter(apply) } tasks.register("indexcreate") {