From fabe7eca45e5346930e58c84b885c471135b7d8b Mon Sep 17 00:00:00 2001 From: alishakawaguchi Date: Fri, 26 Jan 2024 11:10:42 -0800 Subject: [PATCH] add job run logs when running in kubernetes (#1186) --- .mockery.yml | 1 + .../charts/api/templates/api-env-vars.yaml | 10 + .../charts/api/templates/role-binding.yaml | 13 + backend/charts/api/templates/role.yaml | 14 + backend/charts/api/values.yaml | 13 +- backend/gen/go/protos/mgmt/v1alpha1/job.pb.go | 1029 +++++++----- .../protos/mgmt/v1alpha1/job.pb.validate.go | 219 +++ .../mgmtv1alpha1connect/job.connect.go | 27 + .../mock_JobServiceClient.go | 59 + .../mock_JobServiceHandler.go | 1444 +++++++++++++++++ backend/go.mod | 24 +- backend/go.sum | 47 +- .../internal/cmds/mgmt/serve/connect/cmd.go | 17 +- backend/protos/mgmt/v1alpha1/job.proto | 18 + .../connection-data_test.go | 4 +- .../connection-data-service/service.go | 4 +- .../mgmt/v1alpha1/job-service/runs.go | 111 ++ .../mgmt/v1alpha1/job-service/service.go | 5 +- cli/go.mod | 5 +- cli/go.sum | 9 +- docs/protos/data/proto_docs.json | 136 ++ .../runs/[id]/components/JobRunLogs.tsx | 120 ++ .../app/(mgmt)/[account]/runs/[id]/page.tsx | 10 + .../[accountId]/runs/[id]/logs/route.ts | 42 + frontend/apps/web/app/api/config/config.ts | 1 + frontend/apps/web/app/config/app-config.ts | 1 + .../charts/app/templates/app-env-vars.yaml | 2 + frontend/apps/web/charts/app/values.yaml | 3 + .../apps/web/libs/hooks/useGetJobRunLogs.ts | 34 + .../src/client/mgmt/v1alpha1/job_connect.ts | 11 +- .../sdk/src/client/mgmt/v1alpha1/job_pb.ts | 130 ++ worker/go.mod | 5 +- worker/go.sum | 9 +- .../datasync/activities/activities.go | 8 +- .../datasync/activities/activities_test.go | 8 +- .../workflows/datasync/workflow/workflow.go | 12 +- .../datasync/workflow/workflow_test.go | 28 +- 37 files changed, 3183 insertions(+), 450 deletions(-) create mode 100644 backend/charts/api/templates/role-binding.yaml create mode 100644 backend/charts/api/templates/role.yaml create mode 100644 backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceHandler.go create mode 100644 frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogs.tsx create mode 100644 frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts create mode 100644 frontend/apps/web/libs/hooks/useGetJobRunLogs.ts diff --git a/.mockery.yml b/.mockery.yml index 4aa1a3740a..1f07694929 100644 --- a/.mockery.yml +++ b/.mockery.yml @@ -28,6 +28,7 @@ packages: interfaces: UserAccountServiceClient: JobServiceClient: + JobServiceHandler: ConnectionServiceClient: AuthServiceClient: TransformersServiceClient: diff --git a/backend/charts/api/templates/api-env-vars.yaml b/backend/charts/api/templates/api-env-vars.yaml index c03938ceb4..924a60e0d5 100644 --- a/backend/charts/api/templates/api-env-vars.yaml +++ b/backend/charts/api/templates/api-env-vars.yaml @@ -92,3 +92,13 @@ stringData: NEOSYNC_CLOUD: {{ .Values.neosyncCloud.enabled | default "false" | quote }} NEOSYNC_CLOUD_ALLOWED_WORKER_API_KEYS: {{ join "," .Values.neosyncCloud.workerApiKeys }} + + KUBERNETES_ENABLED: {{ .Values.kubernetes.enabled | default "false" | quote }} + + {{- if and .Values.kubernetes .Values.kubernetes.namespace }} + KUBERNETES_NAMESPACE: {{ .Values.kubernetes.namespace }} + {{- end }} + + {{- if and .Values.kubernetes .Values.kubernetes.workerAppName }} + KUBERNETES_WORKER_APP_NAME: {{ .Values.kubernetes.workerAppName }} + {{- end }} diff --git a/backend/charts/api/templates/role-binding.yaml b/backend/charts/api/templates/role-binding.yaml new file mode 100644 index 0000000000..e6c68861ed --- /dev/null +++ b/backend/charts/api/templates/role-binding.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + namespace: neosync + name: {{ template "neosync-api.fullname" . }}-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "neosync-api.fullname" . }}-role +subjects: + - kind: ServiceAccount + name: {{ include "neosync-api.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} diff --git a/backend/charts/api/templates/role.yaml b/backend/charts/api/templates/role.yaml new file mode 100644 index 0000000000..2e74fc10ed --- /dev/null +++ b/backend/charts/api/templates/role.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: neosync + name: {{ template "neosync-api.fullname" . }}-role +rules: + - apiGroups: [""] + resources: + - pods + - pods/log + verbs: + - get + - list + - watch diff --git a/backend/charts/api/values.yaml b/backend/charts/api/values.yaml index 040b71b58a..3bed182f45 100644 --- a/backend/charts/api/values.yaml +++ b/backend/charts/api/values.yaml @@ -42,11 +42,11 @@ migrations: resources: # These are low-usage defaults. Change these depending on your needs. requests: - cpu: "100m" - memory: "128Mi" + cpu: '100m' + memory: '128Mi' limits: - cpu: "300m" - memory: "384Mi" + cpu: '300m' + memory: '384Mi' autoscaling: enabled: true @@ -98,3 +98,8 @@ volumeMounts: [] neosyncCloud: enabled: false workerApiKeys: [] + +kubernetes: + enabled: false + namespace: neosync + workerAppName: neosync-worker diff --git a/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go index 7b5721833a..3984f1fe3d 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go @@ -193,6 +193,58 @@ func (JobRunStatus) EnumDescriptor() ([]byte, []int) { return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{2} } +type LogWindow int32 + +const ( + LogWindow_LOG_WINDOW_NO_TIME_UNSPECIFIED LogWindow = 0 + LogWindow_LOG_WINDOW_FIFTEEN_MIN LogWindow = 1 + LogWindow_LOG_WINDOW_ONE_HOUR LogWindow = 2 + LogWindow_LOG_WINDOW_ONE_DAY LogWindow = 3 +) + +// Enum value maps for LogWindow. +var ( + LogWindow_name = map[int32]string{ + 0: "LOG_WINDOW_NO_TIME_UNSPECIFIED", + 1: "LOG_WINDOW_FIFTEEN_MIN", + 2: "LOG_WINDOW_ONE_HOUR", + 3: "LOG_WINDOW_ONE_DAY", + } + LogWindow_value = map[string]int32{ + "LOG_WINDOW_NO_TIME_UNSPECIFIED": 0, + "LOG_WINDOW_FIFTEEN_MIN": 1, + "LOG_WINDOW_ONE_HOUR": 2, + "LOG_WINDOW_ONE_DAY": 3, + } +) + +func (x LogWindow) Enum() *LogWindow { + p := new(LogWindow) + *p = x + return p +} + +func (x LogWindow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LogWindow) Descriptor() protoreflect.EnumDescriptor { + return file_mgmt_v1alpha1_job_proto_enumTypes[3].Descriptor() +} + +func (LogWindow) Type() protoreflect.EnumType { + return &file_mgmt_v1alpha1_job_proto_enumTypes[3] +} + +func (x LogWindow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LogWindow.Descriptor instead. +func (LogWindow) EnumDescriptor() ([]byte, []int) { + return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{3} +} + type GetJobsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4821,6 +4873,132 @@ func (*TerminateJobRunResponse) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{82} } +type GetJobRunLogsStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobRunId string `protobuf:"bytes,1,opt,name=job_run_id,json=jobRunId,proto3" json:"job_run_id,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Window LogWindow `protobuf:"varint,3,opt,name=window,proto3,enum=mgmt.v1alpha1.LogWindow" json:"window,omitempty"` + ShouldTail bool `protobuf:"varint,4,opt,name=should_tail,json=shouldTail,proto3" json:"should_tail,omitempty"` + MaxLogLines *int64 `protobuf:"varint,5,opt,name=max_log_lines,json=maxLogLines,proto3,oneof" json:"max_log_lines,omitempty"` +} + +func (x *GetJobRunLogsStreamRequest) Reset() { + *x = GetJobRunLogsStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_v1alpha1_job_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRunLogsStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRunLogsStreamRequest) ProtoMessage() {} + +func (x *GetJobRunLogsStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_v1alpha1_job_proto_msgTypes[83] + 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 GetJobRunLogsStreamRequest.ProtoReflect.Descriptor instead. +func (*GetJobRunLogsStreamRequest) Descriptor() ([]byte, []int) { + return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{83} +} + +func (x *GetJobRunLogsStreamRequest) GetJobRunId() string { + if x != nil { + return x.JobRunId + } + return "" +} + +func (x *GetJobRunLogsStreamRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *GetJobRunLogsStreamRequest) GetWindow() LogWindow { + if x != nil { + return x.Window + } + return LogWindow_LOG_WINDOW_NO_TIME_UNSPECIFIED +} + +func (x *GetJobRunLogsStreamRequest) GetShouldTail() bool { + if x != nil { + return x.ShouldTail + } + return false +} + +func (x *GetJobRunLogsStreamRequest) GetMaxLogLines() int64 { + if x != nil && x.MaxLogLines != nil { + return *x.MaxLogLines + } + return 0 +} + +type GetJobRunLogsStreamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LogLine string `protobuf:"bytes,1,opt,name=log_line,json=logLine,proto3" json:"log_line,omitempty"` +} + +func (x *GetJobRunLogsStreamResponse) Reset() { + *x = GetJobRunLogsStreamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_v1alpha1_job_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRunLogsStreamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRunLogsStreamResponse) ProtoMessage() {} + +func (x *GetJobRunLogsStreamResponse) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_v1alpha1_job_proto_msgTypes[84] + 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 GetJobRunLogsStreamResponse.ProtoReflect.Descriptor instead. +func (*GetJobRunLogsStreamResponse) Descriptor() ([]byte, []int) { + return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{84} +} + +func (x *GetJobRunLogsStreamResponse) GetLogLine() string { + if x != nil { + return x.LogLine + } + return "" +} + var File_mgmt_v1alpha1_job_proto protoreflect.FileDescriptor var file_mgmt_v1alpha1_job_proto_rawDesc = []byte{ @@ -5432,202 +5610,236 @@ var file_mgmt_v1alpha1_job_proto_rawDesc = []byte{ 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x6f, 0x0a, 0x09, 0x4a, 0x6f, - 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4a, - 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, - 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xa7, 0x01, 0x0a, 0x0e, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, - 0x0a, 0x1b, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, - 0x0a, 0x17, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x41, - 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, - 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xf4, 0x01, 0x0a, 0x0c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x1a, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, - 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, - 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1b, - 0x0a, 0x17, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x4a, - 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, - 0x10, 0x05, 0x12, 0x1d, 0x0a, 0x19, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, - 0x06, 0x12, 0x19, 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x32, 0xc3, 0x12, 0x0a, - 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x12, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x50, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, - 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, - 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, - 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x68, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, + 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x30, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4c, 0x6f, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x69, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x54, + 0x61, 0x69, 0x6c, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, + 0x69, 0x6e, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, + 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, + 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x6f, + 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, + 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, + 0x65, 0x2a, 0x6f, 0x0a, 0x09, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, + 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x4f, + 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x04, 0x2a, 0xa7, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, + 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, + 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, + 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, + 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x03, + 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xf4, 0x01, 0x0a, + 0x0c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, + 0x1a, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, + 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, + 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, + 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, + 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x1d, 0x0a, 0x19, 0x4a, 0x4f, 0x42, + 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x52, 0x4d, + 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, + 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x07, 0x2a, 0x7c, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x12, 0x22, 0x0a, 0x1e, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4e, + 0x4f, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, + 0x4f, 0x57, 0x5f, 0x46, 0x49, 0x46, 0x54, 0x45, 0x45, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4f, + 0x4e, 0x45, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, + 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x44, 0x41, 0x59, 0x10, + 0x03, 0x32, 0xb5, 0x13, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x49, 0x73, 0x4a, + 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x95, - 0x01, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, - 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, + 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x80, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x95, 0x01, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, + 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x1f, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4d, 0x0a, 0x08, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, - 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, - 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, - 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x92, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x08, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, + 0x12, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, + 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, - 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, + 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, - 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, - 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, - 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, - 0x0a, 0x0f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0xc4, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x08, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, - 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, - 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, - 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, - 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x29, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0xc4, 0x01, 0x0a, 0x11, 0x63, 0x6f, + 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x08, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5642,219 +5854,225 @@ func file_mgmt_v1alpha1_job_proto_rawDescGZIP() []byte { return file_mgmt_v1alpha1_job_proto_rawDescData } -var file_mgmt_v1alpha1_job_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_mgmt_v1alpha1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 83) +var file_mgmt_v1alpha1_job_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_mgmt_v1alpha1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 85) var file_mgmt_v1alpha1_job_proto_goTypes = []interface{}{ (JobStatus)(0), // 0: mgmt.v1alpha1.JobStatus (ActivityStatus)(0), // 1: mgmt.v1alpha1.ActivityStatus (JobRunStatus)(0), // 2: mgmt.v1alpha1.JobRunStatus - (*GetJobsRequest)(nil), // 3: mgmt.v1alpha1.GetJobsRequest - (*GetJobsResponse)(nil), // 4: mgmt.v1alpha1.GetJobsResponse - (*JobSource)(nil), // 5: mgmt.v1alpha1.JobSource - (*JobSourceOptions)(nil), // 6: mgmt.v1alpha1.JobSourceOptions - (*CreateJobDestination)(nil), // 7: mgmt.v1alpha1.CreateJobDestination - (*JobDestination)(nil), // 8: mgmt.v1alpha1.JobDestination - (*GenerateSourceOptions)(nil), // 9: mgmt.v1alpha1.GenerateSourceOptions - (*GenerateSourceSchemaOption)(nil), // 10: mgmt.v1alpha1.GenerateSourceSchemaOption - (*GenerateSourceTableOption)(nil), // 11: mgmt.v1alpha1.GenerateSourceTableOption - (*PostgresSourceConnectionOptions)(nil), // 12: mgmt.v1alpha1.PostgresSourceConnectionOptions - (*PostgresSourceSchemaOption)(nil), // 13: mgmt.v1alpha1.PostgresSourceSchemaOption - (*PostgresSourceTableOption)(nil), // 14: mgmt.v1alpha1.PostgresSourceTableOption - (*MysqlSourceConnectionOptions)(nil), // 15: mgmt.v1alpha1.MysqlSourceConnectionOptions - (*MysqlSourceSchemaOption)(nil), // 16: mgmt.v1alpha1.MysqlSourceSchemaOption - (*MysqlSourceTableOption)(nil), // 17: mgmt.v1alpha1.MysqlSourceTableOption - (*AwsS3SourceConnectionOptions)(nil), // 18: mgmt.v1alpha1.AwsS3SourceConnectionOptions - (*JobDestinationOptions)(nil), // 19: mgmt.v1alpha1.JobDestinationOptions - (*PostgresDestinationConnectionOptions)(nil), // 20: mgmt.v1alpha1.PostgresDestinationConnectionOptions - (*PostgresTruncateTableConfig)(nil), // 21: mgmt.v1alpha1.PostgresTruncateTableConfig - (*MysqlDestinationConnectionOptions)(nil), // 22: mgmt.v1alpha1.MysqlDestinationConnectionOptions - (*MysqlTruncateTableConfig)(nil), // 23: mgmt.v1alpha1.MysqlTruncateTableConfig - (*AwsS3DestinationConnectionOptions)(nil), // 24: mgmt.v1alpha1.AwsS3DestinationConnectionOptions - (*CreateJobRequest)(nil), // 25: mgmt.v1alpha1.CreateJobRequest - (*CreateJobResponse)(nil), // 26: mgmt.v1alpha1.CreateJobResponse - (*JobMappingTransformer)(nil), // 27: mgmt.v1alpha1.JobMappingTransformer - (*JobMapping)(nil), // 28: mgmt.v1alpha1.JobMapping - (*GetJobRequest)(nil), // 29: mgmt.v1alpha1.GetJobRequest - (*GetJobResponse)(nil), // 30: mgmt.v1alpha1.GetJobResponse - (*UpdateJobScheduleRequest)(nil), // 31: mgmt.v1alpha1.UpdateJobScheduleRequest - (*UpdateJobScheduleResponse)(nil), // 32: mgmt.v1alpha1.UpdateJobScheduleResponse - (*PauseJobRequest)(nil), // 33: mgmt.v1alpha1.PauseJobRequest - (*PauseJobResponse)(nil), // 34: mgmt.v1alpha1.PauseJobResponse - (*UpdateJobSourceConnectionRequest)(nil), // 35: mgmt.v1alpha1.UpdateJobSourceConnectionRequest - (*UpdateJobSourceConnectionResponse)(nil), // 36: mgmt.v1alpha1.UpdateJobSourceConnectionResponse - (*PostgresSourceSchemaSubset)(nil), // 37: mgmt.v1alpha1.PostgresSourceSchemaSubset - (*MysqlSourceSchemaSubset)(nil), // 38: mgmt.v1alpha1.MysqlSourceSchemaSubset - (*JobSourceSqlSubetSchemas)(nil), // 39: mgmt.v1alpha1.JobSourceSqlSubetSchemas - (*SetJobSourceSqlConnectionSubsetsRequest)(nil), // 40: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest - (*SetJobSourceSqlConnectionSubsetsResponse)(nil), // 41: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse - (*UpdateJobDestinationConnectionRequest)(nil), // 42: mgmt.v1alpha1.UpdateJobDestinationConnectionRequest - (*UpdateJobDestinationConnectionResponse)(nil), // 43: mgmt.v1alpha1.UpdateJobDestinationConnectionResponse - (*DeleteJobDestinationConnectionRequest)(nil), // 44: mgmt.v1alpha1.DeleteJobDestinationConnectionRequest - (*DeleteJobDestinationConnectionResponse)(nil), // 45: mgmt.v1alpha1.DeleteJobDestinationConnectionResponse - (*CreateJobDestinationConnectionsRequest)(nil), // 46: mgmt.v1alpha1.CreateJobDestinationConnectionsRequest - (*CreateJobDestinationConnectionsResponse)(nil), // 47: mgmt.v1alpha1.CreateJobDestinationConnectionsResponse - (*DeleteJobRequest)(nil), // 48: mgmt.v1alpha1.DeleteJobRequest - (*DeleteJobResponse)(nil), // 49: mgmt.v1alpha1.DeleteJobResponse - (*IsJobNameAvailableRequest)(nil), // 50: mgmt.v1alpha1.IsJobNameAvailableRequest - (*IsJobNameAvailableResponse)(nil), // 51: mgmt.v1alpha1.IsJobNameAvailableResponse - (*GetJobRunsRequest)(nil), // 52: mgmt.v1alpha1.GetJobRunsRequest - (*GetJobRunsResponse)(nil), // 53: mgmt.v1alpha1.GetJobRunsResponse - (*GetJobRunRequest)(nil), // 54: mgmt.v1alpha1.GetJobRunRequest - (*GetJobRunResponse)(nil), // 55: mgmt.v1alpha1.GetJobRunResponse - (*CreateJobRunRequest)(nil), // 56: mgmt.v1alpha1.CreateJobRunRequest - (*CreateJobRunResponse)(nil), // 57: mgmt.v1alpha1.CreateJobRunResponse - (*CancelJobRunRequest)(nil), // 58: mgmt.v1alpha1.CancelJobRunRequest - (*CancelJobRunResponse)(nil), // 59: mgmt.v1alpha1.CancelJobRunResponse - (*Job)(nil), // 60: mgmt.v1alpha1.Job - (*JobRecentRun)(nil), // 61: mgmt.v1alpha1.JobRecentRun - (*GetJobRecentRunsRequest)(nil), // 62: mgmt.v1alpha1.GetJobRecentRunsRequest - (*GetJobRecentRunsResponse)(nil), // 63: mgmt.v1alpha1.GetJobRecentRunsResponse - (*JobNextRuns)(nil), // 64: mgmt.v1alpha1.JobNextRuns - (*GetJobNextRunsRequest)(nil), // 65: mgmt.v1alpha1.GetJobNextRunsRequest - (*GetJobNextRunsResponse)(nil), // 66: mgmt.v1alpha1.GetJobNextRunsResponse - (*GetJobStatusRequest)(nil), // 67: mgmt.v1alpha1.GetJobStatusRequest - (*GetJobStatusResponse)(nil), // 68: mgmt.v1alpha1.GetJobStatusResponse - (*JobStatusRecord)(nil), // 69: mgmt.v1alpha1.JobStatusRecord - (*GetJobStatusesRequest)(nil), // 70: mgmt.v1alpha1.GetJobStatusesRequest - (*GetJobStatusesResponse)(nil), // 71: mgmt.v1alpha1.GetJobStatusesResponse - (*ActivityFailure)(nil), // 72: mgmt.v1alpha1.ActivityFailure - (*PendingActivity)(nil), // 73: mgmt.v1alpha1.PendingActivity - (*JobRun)(nil), // 74: mgmt.v1alpha1.JobRun - (*JobRunEventTaskError)(nil), // 75: mgmt.v1alpha1.JobRunEventTaskError - (*JobRunEventTask)(nil), // 76: mgmt.v1alpha1.JobRunEventTask - (*JobRunSyncMetadata)(nil), // 77: mgmt.v1alpha1.JobRunSyncMetadata - (*JobRunEventMetadata)(nil), // 78: mgmt.v1alpha1.JobRunEventMetadata - (*JobRunEvent)(nil), // 79: mgmt.v1alpha1.JobRunEvent - (*GetJobRunEventsRequest)(nil), // 80: mgmt.v1alpha1.GetJobRunEventsRequest - (*GetJobRunEventsResponse)(nil), // 81: mgmt.v1alpha1.GetJobRunEventsResponse - (*DeleteJobRunRequest)(nil), // 82: mgmt.v1alpha1.DeleteJobRunRequest - (*DeleteJobRunResponse)(nil), // 83: mgmt.v1alpha1.DeleteJobRunResponse - (*TerminateJobRunRequest)(nil), // 84: mgmt.v1alpha1.TerminateJobRunRequest - (*TerminateJobRunResponse)(nil), // 85: mgmt.v1alpha1.TerminateJobRunResponse - (*TransformerConfig)(nil), // 86: mgmt.v1alpha1.TransformerConfig - (*timestamppb.Timestamp)(nil), // 87: google.protobuf.Timestamp + (LogWindow)(0), // 3: mgmt.v1alpha1.LogWindow + (*GetJobsRequest)(nil), // 4: mgmt.v1alpha1.GetJobsRequest + (*GetJobsResponse)(nil), // 5: mgmt.v1alpha1.GetJobsResponse + (*JobSource)(nil), // 6: mgmt.v1alpha1.JobSource + (*JobSourceOptions)(nil), // 7: mgmt.v1alpha1.JobSourceOptions + (*CreateJobDestination)(nil), // 8: mgmt.v1alpha1.CreateJobDestination + (*JobDestination)(nil), // 9: mgmt.v1alpha1.JobDestination + (*GenerateSourceOptions)(nil), // 10: mgmt.v1alpha1.GenerateSourceOptions + (*GenerateSourceSchemaOption)(nil), // 11: mgmt.v1alpha1.GenerateSourceSchemaOption + (*GenerateSourceTableOption)(nil), // 12: mgmt.v1alpha1.GenerateSourceTableOption + (*PostgresSourceConnectionOptions)(nil), // 13: mgmt.v1alpha1.PostgresSourceConnectionOptions + (*PostgresSourceSchemaOption)(nil), // 14: mgmt.v1alpha1.PostgresSourceSchemaOption + (*PostgresSourceTableOption)(nil), // 15: mgmt.v1alpha1.PostgresSourceTableOption + (*MysqlSourceConnectionOptions)(nil), // 16: mgmt.v1alpha1.MysqlSourceConnectionOptions + (*MysqlSourceSchemaOption)(nil), // 17: mgmt.v1alpha1.MysqlSourceSchemaOption + (*MysqlSourceTableOption)(nil), // 18: mgmt.v1alpha1.MysqlSourceTableOption + (*AwsS3SourceConnectionOptions)(nil), // 19: mgmt.v1alpha1.AwsS3SourceConnectionOptions + (*JobDestinationOptions)(nil), // 20: mgmt.v1alpha1.JobDestinationOptions + (*PostgresDestinationConnectionOptions)(nil), // 21: mgmt.v1alpha1.PostgresDestinationConnectionOptions + (*PostgresTruncateTableConfig)(nil), // 22: mgmt.v1alpha1.PostgresTruncateTableConfig + (*MysqlDestinationConnectionOptions)(nil), // 23: mgmt.v1alpha1.MysqlDestinationConnectionOptions + (*MysqlTruncateTableConfig)(nil), // 24: mgmt.v1alpha1.MysqlTruncateTableConfig + (*AwsS3DestinationConnectionOptions)(nil), // 25: mgmt.v1alpha1.AwsS3DestinationConnectionOptions + (*CreateJobRequest)(nil), // 26: mgmt.v1alpha1.CreateJobRequest + (*CreateJobResponse)(nil), // 27: mgmt.v1alpha1.CreateJobResponse + (*JobMappingTransformer)(nil), // 28: mgmt.v1alpha1.JobMappingTransformer + (*JobMapping)(nil), // 29: mgmt.v1alpha1.JobMapping + (*GetJobRequest)(nil), // 30: mgmt.v1alpha1.GetJobRequest + (*GetJobResponse)(nil), // 31: mgmt.v1alpha1.GetJobResponse + (*UpdateJobScheduleRequest)(nil), // 32: mgmt.v1alpha1.UpdateJobScheduleRequest + (*UpdateJobScheduleResponse)(nil), // 33: mgmt.v1alpha1.UpdateJobScheduleResponse + (*PauseJobRequest)(nil), // 34: mgmt.v1alpha1.PauseJobRequest + (*PauseJobResponse)(nil), // 35: mgmt.v1alpha1.PauseJobResponse + (*UpdateJobSourceConnectionRequest)(nil), // 36: mgmt.v1alpha1.UpdateJobSourceConnectionRequest + (*UpdateJobSourceConnectionResponse)(nil), // 37: mgmt.v1alpha1.UpdateJobSourceConnectionResponse + (*PostgresSourceSchemaSubset)(nil), // 38: mgmt.v1alpha1.PostgresSourceSchemaSubset + (*MysqlSourceSchemaSubset)(nil), // 39: mgmt.v1alpha1.MysqlSourceSchemaSubset + (*JobSourceSqlSubetSchemas)(nil), // 40: mgmt.v1alpha1.JobSourceSqlSubetSchemas + (*SetJobSourceSqlConnectionSubsetsRequest)(nil), // 41: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest + (*SetJobSourceSqlConnectionSubsetsResponse)(nil), // 42: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse + (*UpdateJobDestinationConnectionRequest)(nil), // 43: mgmt.v1alpha1.UpdateJobDestinationConnectionRequest + (*UpdateJobDestinationConnectionResponse)(nil), // 44: mgmt.v1alpha1.UpdateJobDestinationConnectionResponse + (*DeleteJobDestinationConnectionRequest)(nil), // 45: mgmt.v1alpha1.DeleteJobDestinationConnectionRequest + (*DeleteJobDestinationConnectionResponse)(nil), // 46: mgmt.v1alpha1.DeleteJobDestinationConnectionResponse + (*CreateJobDestinationConnectionsRequest)(nil), // 47: mgmt.v1alpha1.CreateJobDestinationConnectionsRequest + (*CreateJobDestinationConnectionsResponse)(nil), // 48: mgmt.v1alpha1.CreateJobDestinationConnectionsResponse + (*DeleteJobRequest)(nil), // 49: mgmt.v1alpha1.DeleteJobRequest + (*DeleteJobResponse)(nil), // 50: mgmt.v1alpha1.DeleteJobResponse + (*IsJobNameAvailableRequest)(nil), // 51: mgmt.v1alpha1.IsJobNameAvailableRequest + (*IsJobNameAvailableResponse)(nil), // 52: mgmt.v1alpha1.IsJobNameAvailableResponse + (*GetJobRunsRequest)(nil), // 53: mgmt.v1alpha1.GetJobRunsRequest + (*GetJobRunsResponse)(nil), // 54: mgmt.v1alpha1.GetJobRunsResponse + (*GetJobRunRequest)(nil), // 55: mgmt.v1alpha1.GetJobRunRequest + (*GetJobRunResponse)(nil), // 56: mgmt.v1alpha1.GetJobRunResponse + (*CreateJobRunRequest)(nil), // 57: mgmt.v1alpha1.CreateJobRunRequest + (*CreateJobRunResponse)(nil), // 58: mgmt.v1alpha1.CreateJobRunResponse + (*CancelJobRunRequest)(nil), // 59: mgmt.v1alpha1.CancelJobRunRequest + (*CancelJobRunResponse)(nil), // 60: mgmt.v1alpha1.CancelJobRunResponse + (*Job)(nil), // 61: mgmt.v1alpha1.Job + (*JobRecentRun)(nil), // 62: mgmt.v1alpha1.JobRecentRun + (*GetJobRecentRunsRequest)(nil), // 63: mgmt.v1alpha1.GetJobRecentRunsRequest + (*GetJobRecentRunsResponse)(nil), // 64: mgmt.v1alpha1.GetJobRecentRunsResponse + (*JobNextRuns)(nil), // 65: mgmt.v1alpha1.JobNextRuns + (*GetJobNextRunsRequest)(nil), // 66: mgmt.v1alpha1.GetJobNextRunsRequest + (*GetJobNextRunsResponse)(nil), // 67: mgmt.v1alpha1.GetJobNextRunsResponse + (*GetJobStatusRequest)(nil), // 68: mgmt.v1alpha1.GetJobStatusRequest + (*GetJobStatusResponse)(nil), // 69: mgmt.v1alpha1.GetJobStatusResponse + (*JobStatusRecord)(nil), // 70: mgmt.v1alpha1.JobStatusRecord + (*GetJobStatusesRequest)(nil), // 71: mgmt.v1alpha1.GetJobStatusesRequest + (*GetJobStatusesResponse)(nil), // 72: mgmt.v1alpha1.GetJobStatusesResponse + (*ActivityFailure)(nil), // 73: mgmt.v1alpha1.ActivityFailure + (*PendingActivity)(nil), // 74: mgmt.v1alpha1.PendingActivity + (*JobRun)(nil), // 75: mgmt.v1alpha1.JobRun + (*JobRunEventTaskError)(nil), // 76: mgmt.v1alpha1.JobRunEventTaskError + (*JobRunEventTask)(nil), // 77: mgmt.v1alpha1.JobRunEventTask + (*JobRunSyncMetadata)(nil), // 78: mgmt.v1alpha1.JobRunSyncMetadata + (*JobRunEventMetadata)(nil), // 79: mgmt.v1alpha1.JobRunEventMetadata + (*JobRunEvent)(nil), // 80: mgmt.v1alpha1.JobRunEvent + (*GetJobRunEventsRequest)(nil), // 81: mgmt.v1alpha1.GetJobRunEventsRequest + (*GetJobRunEventsResponse)(nil), // 82: mgmt.v1alpha1.GetJobRunEventsResponse + (*DeleteJobRunRequest)(nil), // 83: mgmt.v1alpha1.DeleteJobRunRequest + (*DeleteJobRunResponse)(nil), // 84: mgmt.v1alpha1.DeleteJobRunResponse + (*TerminateJobRunRequest)(nil), // 85: mgmt.v1alpha1.TerminateJobRunRequest + (*TerminateJobRunResponse)(nil), // 86: mgmt.v1alpha1.TerminateJobRunResponse + (*GetJobRunLogsStreamRequest)(nil), // 87: mgmt.v1alpha1.GetJobRunLogsStreamRequest + (*GetJobRunLogsStreamResponse)(nil), // 88: mgmt.v1alpha1.GetJobRunLogsStreamResponse + (*TransformerConfig)(nil), // 89: mgmt.v1alpha1.TransformerConfig + (*timestamppb.Timestamp)(nil), // 90: google.protobuf.Timestamp } var file_mgmt_v1alpha1_job_proto_depIdxs = []int32{ - 60, // 0: mgmt.v1alpha1.GetJobsResponse.jobs:type_name -> mgmt.v1alpha1.Job - 6, // 1: mgmt.v1alpha1.JobSource.options:type_name -> mgmt.v1alpha1.JobSourceOptions - 12, // 2: mgmt.v1alpha1.JobSourceOptions.postgres:type_name -> mgmt.v1alpha1.PostgresSourceConnectionOptions - 18, // 3: mgmt.v1alpha1.JobSourceOptions.aws_s3:type_name -> mgmt.v1alpha1.AwsS3SourceConnectionOptions - 15, // 4: mgmt.v1alpha1.JobSourceOptions.mysql:type_name -> mgmt.v1alpha1.MysqlSourceConnectionOptions - 9, // 5: mgmt.v1alpha1.JobSourceOptions.generate:type_name -> mgmt.v1alpha1.GenerateSourceOptions - 19, // 6: mgmt.v1alpha1.CreateJobDestination.options:type_name -> mgmt.v1alpha1.JobDestinationOptions - 19, // 7: mgmt.v1alpha1.JobDestination.options:type_name -> mgmt.v1alpha1.JobDestinationOptions - 10, // 8: mgmt.v1alpha1.GenerateSourceOptions.schemas:type_name -> mgmt.v1alpha1.GenerateSourceSchemaOption - 11, // 9: mgmt.v1alpha1.GenerateSourceSchemaOption.tables:type_name -> mgmt.v1alpha1.GenerateSourceTableOption - 13, // 10: mgmt.v1alpha1.PostgresSourceConnectionOptions.schemas:type_name -> mgmt.v1alpha1.PostgresSourceSchemaOption - 14, // 11: mgmt.v1alpha1.PostgresSourceSchemaOption.tables:type_name -> mgmt.v1alpha1.PostgresSourceTableOption - 16, // 12: mgmt.v1alpha1.MysqlSourceConnectionOptions.schemas:type_name -> mgmt.v1alpha1.MysqlSourceSchemaOption - 17, // 13: mgmt.v1alpha1.MysqlSourceSchemaOption.tables:type_name -> mgmt.v1alpha1.MysqlSourceTableOption - 20, // 14: mgmt.v1alpha1.JobDestinationOptions.postgres_options:type_name -> mgmt.v1alpha1.PostgresDestinationConnectionOptions - 24, // 15: mgmt.v1alpha1.JobDestinationOptions.aws_s3_options:type_name -> mgmt.v1alpha1.AwsS3DestinationConnectionOptions - 22, // 16: mgmt.v1alpha1.JobDestinationOptions.mysql_options:type_name -> mgmt.v1alpha1.MysqlDestinationConnectionOptions - 21, // 17: mgmt.v1alpha1.PostgresDestinationConnectionOptions.truncate_table:type_name -> mgmt.v1alpha1.PostgresTruncateTableConfig - 23, // 18: mgmt.v1alpha1.MysqlDestinationConnectionOptions.truncate_table:type_name -> mgmt.v1alpha1.MysqlTruncateTableConfig - 28, // 19: mgmt.v1alpha1.CreateJobRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping - 5, // 20: mgmt.v1alpha1.CreateJobRequest.source:type_name -> mgmt.v1alpha1.JobSource - 7, // 21: mgmt.v1alpha1.CreateJobRequest.destinations:type_name -> mgmt.v1alpha1.CreateJobDestination - 60, // 22: mgmt.v1alpha1.CreateJobResponse.job:type_name -> mgmt.v1alpha1.Job - 86, // 23: mgmt.v1alpha1.JobMappingTransformer.config:type_name -> mgmt.v1alpha1.TransformerConfig - 27, // 24: mgmt.v1alpha1.JobMapping.transformer:type_name -> mgmt.v1alpha1.JobMappingTransformer - 60, // 25: mgmt.v1alpha1.GetJobResponse.job:type_name -> mgmt.v1alpha1.Job - 60, // 26: mgmt.v1alpha1.UpdateJobScheduleResponse.job:type_name -> mgmt.v1alpha1.Job - 60, // 27: mgmt.v1alpha1.PauseJobResponse.job:type_name -> mgmt.v1alpha1.Job - 5, // 28: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.source:type_name -> mgmt.v1alpha1.JobSource - 28, // 29: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping - 60, // 30: mgmt.v1alpha1.UpdateJobSourceConnectionResponse.job:type_name -> mgmt.v1alpha1.Job - 13, // 31: mgmt.v1alpha1.PostgresSourceSchemaSubset.postgres_schemas:type_name -> mgmt.v1alpha1.PostgresSourceSchemaOption - 16, // 32: mgmt.v1alpha1.MysqlSourceSchemaSubset.mysql_schemas:type_name -> mgmt.v1alpha1.MysqlSourceSchemaOption - 37, // 33: mgmt.v1alpha1.JobSourceSqlSubetSchemas.postgres_subset:type_name -> mgmt.v1alpha1.PostgresSourceSchemaSubset - 38, // 34: mgmt.v1alpha1.JobSourceSqlSubetSchemas.mysql_subset:type_name -> mgmt.v1alpha1.MysqlSourceSchemaSubset - 39, // 35: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest.schemas:type_name -> mgmt.v1alpha1.JobSourceSqlSubetSchemas - 60, // 36: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse.job:type_name -> mgmt.v1alpha1.Job - 19, // 37: mgmt.v1alpha1.UpdateJobDestinationConnectionRequest.options:type_name -> mgmt.v1alpha1.JobDestinationOptions - 60, // 38: mgmt.v1alpha1.UpdateJobDestinationConnectionResponse.job:type_name -> mgmt.v1alpha1.Job - 7, // 39: mgmt.v1alpha1.CreateJobDestinationConnectionsRequest.destinations:type_name -> mgmt.v1alpha1.CreateJobDestination - 60, // 40: mgmt.v1alpha1.CreateJobDestinationConnectionsResponse.job:type_name -> mgmt.v1alpha1.Job - 74, // 41: mgmt.v1alpha1.GetJobRunsResponse.job_runs:type_name -> mgmt.v1alpha1.JobRun - 74, // 42: mgmt.v1alpha1.GetJobRunResponse.job_run:type_name -> mgmt.v1alpha1.JobRun - 87, // 43: mgmt.v1alpha1.Job.created_at:type_name -> google.protobuf.Timestamp - 87, // 44: mgmt.v1alpha1.Job.updated_at:type_name -> google.protobuf.Timestamp - 5, // 45: mgmt.v1alpha1.Job.source:type_name -> mgmt.v1alpha1.JobSource - 8, // 46: mgmt.v1alpha1.Job.destinations:type_name -> mgmt.v1alpha1.JobDestination - 28, // 47: mgmt.v1alpha1.Job.mappings:type_name -> mgmt.v1alpha1.JobMapping - 87, // 48: mgmt.v1alpha1.JobRecentRun.start_time:type_name -> google.protobuf.Timestamp - 61, // 49: mgmt.v1alpha1.GetJobRecentRunsResponse.recent_runs:type_name -> mgmt.v1alpha1.JobRecentRun - 87, // 50: mgmt.v1alpha1.JobNextRuns.next_run_times:type_name -> google.protobuf.Timestamp - 64, // 51: mgmt.v1alpha1.GetJobNextRunsResponse.next_runs:type_name -> mgmt.v1alpha1.JobNextRuns + 61, // 0: mgmt.v1alpha1.GetJobsResponse.jobs:type_name -> mgmt.v1alpha1.Job + 7, // 1: mgmt.v1alpha1.JobSource.options:type_name -> mgmt.v1alpha1.JobSourceOptions + 13, // 2: mgmt.v1alpha1.JobSourceOptions.postgres:type_name -> mgmt.v1alpha1.PostgresSourceConnectionOptions + 19, // 3: mgmt.v1alpha1.JobSourceOptions.aws_s3:type_name -> mgmt.v1alpha1.AwsS3SourceConnectionOptions + 16, // 4: mgmt.v1alpha1.JobSourceOptions.mysql:type_name -> mgmt.v1alpha1.MysqlSourceConnectionOptions + 10, // 5: mgmt.v1alpha1.JobSourceOptions.generate:type_name -> mgmt.v1alpha1.GenerateSourceOptions + 20, // 6: mgmt.v1alpha1.CreateJobDestination.options:type_name -> mgmt.v1alpha1.JobDestinationOptions + 20, // 7: mgmt.v1alpha1.JobDestination.options:type_name -> mgmt.v1alpha1.JobDestinationOptions + 11, // 8: mgmt.v1alpha1.GenerateSourceOptions.schemas:type_name -> mgmt.v1alpha1.GenerateSourceSchemaOption + 12, // 9: mgmt.v1alpha1.GenerateSourceSchemaOption.tables:type_name -> mgmt.v1alpha1.GenerateSourceTableOption + 14, // 10: mgmt.v1alpha1.PostgresSourceConnectionOptions.schemas:type_name -> mgmt.v1alpha1.PostgresSourceSchemaOption + 15, // 11: mgmt.v1alpha1.PostgresSourceSchemaOption.tables:type_name -> mgmt.v1alpha1.PostgresSourceTableOption + 17, // 12: mgmt.v1alpha1.MysqlSourceConnectionOptions.schemas:type_name -> mgmt.v1alpha1.MysqlSourceSchemaOption + 18, // 13: mgmt.v1alpha1.MysqlSourceSchemaOption.tables:type_name -> mgmt.v1alpha1.MysqlSourceTableOption + 21, // 14: mgmt.v1alpha1.JobDestinationOptions.postgres_options:type_name -> mgmt.v1alpha1.PostgresDestinationConnectionOptions + 25, // 15: mgmt.v1alpha1.JobDestinationOptions.aws_s3_options:type_name -> mgmt.v1alpha1.AwsS3DestinationConnectionOptions + 23, // 16: mgmt.v1alpha1.JobDestinationOptions.mysql_options:type_name -> mgmt.v1alpha1.MysqlDestinationConnectionOptions + 22, // 17: mgmt.v1alpha1.PostgresDestinationConnectionOptions.truncate_table:type_name -> mgmt.v1alpha1.PostgresTruncateTableConfig + 24, // 18: mgmt.v1alpha1.MysqlDestinationConnectionOptions.truncate_table:type_name -> mgmt.v1alpha1.MysqlTruncateTableConfig + 29, // 19: mgmt.v1alpha1.CreateJobRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping + 6, // 20: mgmt.v1alpha1.CreateJobRequest.source:type_name -> mgmt.v1alpha1.JobSource + 8, // 21: mgmt.v1alpha1.CreateJobRequest.destinations:type_name -> mgmt.v1alpha1.CreateJobDestination + 61, // 22: mgmt.v1alpha1.CreateJobResponse.job:type_name -> mgmt.v1alpha1.Job + 89, // 23: mgmt.v1alpha1.JobMappingTransformer.config:type_name -> mgmt.v1alpha1.TransformerConfig + 28, // 24: mgmt.v1alpha1.JobMapping.transformer:type_name -> mgmt.v1alpha1.JobMappingTransformer + 61, // 25: mgmt.v1alpha1.GetJobResponse.job:type_name -> mgmt.v1alpha1.Job + 61, // 26: mgmt.v1alpha1.UpdateJobScheduleResponse.job:type_name -> mgmt.v1alpha1.Job + 61, // 27: mgmt.v1alpha1.PauseJobResponse.job:type_name -> mgmt.v1alpha1.Job + 6, // 28: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.source:type_name -> mgmt.v1alpha1.JobSource + 29, // 29: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping + 61, // 30: mgmt.v1alpha1.UpdateJobSourceConnectionResponse.job:type_name -> mgmt.v1alpha1.Job + 14, // 31: mgmt.v1alpha1.PostgresSourceSchemaSubset.postgres_schemas:type_name -> mgmt.v1alpha1.PostgresSourceSchemaOption + 17, // 32: mgmt.v1alpha1.MysqlSourceSchemaSubset.mysql_schemas:type_name -> mgmt.v1alpha1.MysqlSourceSchemaOption + 38, // 33: mgmt.v1alpha1.JobSourceSqlSubetSchemas.postgres_subset:type_name -> mgmt.v1alpha1.PostgresSourceSchemaSubset + 39, // 34: mgmt.v1alpha1.JobSourceSqlSubetSchemas.mysql_subset:type_name -> mgmt.v1alpha1.MysqlSourceSchemaSubset + 40, // 35: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest.schemas:type_name -> mgmt.v1alpha1.JobSourceSqlSubetSchemas + 61, // 36: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse.job:type_name -> mgmt.v1alpha1.Job + 20, // 37: mgmt.v1alpha1.UpdateJobDestinationConnectionRequest.options:type_name -> mgmt.v1alpha1.JobDestinationOptions + 61, // 38: mgmt.v1alpha1.UpdateJobDestinationConnectionResponse.job:type_name -> mgmt.v1alpha1.Job + 8, // 39: mgmt.v1alpha1.CreateJobDestinationConnectionsRequest.destinations:type_name -> mgmt.v1alpha1.CreateJobDestination + 61, // 40: mgmt.v1alpha1.CreateJobDestinationConnectionsResponse.job:type_name -> mgmt.v1alpha1.Job + 75, // 41: mgmt.v1alpha1.GetJobRunsResponse.job_runs:type_name -> mgmt.v1alpha1.JobRun + 75, // 42: mgmt.v1alpha1.GetJobRunResponse.job_run:type_name -> mgmt.v1alpha1.JobRun + 90, // 43: mgmt.v1alpha1.Job.created_at:type_name -> google.protobuf.Timestamp + 90, // 44: mgmt.v1alpha1.Job.updated_at:type_name -> google.protobuf.Timestamp + 6, // 45: mgmt.v1alpha1.Job.source:type_name -> mgmt.v1alpha1.JobSource + 9, // 46: mgmt.v1alpha1.Job.destinations:type_name -> mgmt.v1alpha1.JobDestination + 29, // 47: mgmt.v1alpha1.Job.mappings:type_name -> mgmt.v1alpha1.JobMapping + 90, // 48: mgmt.v1alpha1.JobRecentRun.start_time:type_name -> google.protobuf.Timestamp + 62, // 49: mgmt.v1alpha1.GetJobRecentRunsResponse.recent_runs:type_name -> mgmt.v1alpha1.JobRecentRun + 90, // 50: mgmt.v1alpha1.JobNextRuns.next_run_times:type_name -> google.protobuf.Timestamp + 65, // 51: mgmt.v1alpha1.GetJobNextRunsResponse.next_runs:type_name -> mgmt.v1alpha1.JobNextRuns 0, // 52: mgmt.v1alpha1.GetJobStatusResponse.status:type_name -> mgmt.v1alpha1.JobStatus 0, // 53: mgmt.v1alpha1.JobStatusRecord.status:type_name -> mgmt.v1alpha1.JobStatus - 69, // 54: mgmt.v1alpha1.GetJobStatusesResponse.statuses:type_name -> mgmt.v1alpha1.JobStatusRecord + 70, // 54: mgmt.v1alpha1.GetJobStatusesResponse.statuses:type_name -> mgmt.v1alpha1.JobStatusRecord 1, // 55: mgmt.v1alpha1.PendingActivity.status:type_name -> mgmt.v1alpha1.ActivityStatus - 72, // 56: mgmt.v1alpha1.PendingActivity.last_failure:type_name -> mgmt.v1alpha1.ActivityFailure + 73, // 56: mgmt.v1alpha1.PendingActivity.last_failure:type_name -> mgmt.v1alpha1.ActivityFailure 2, // 57: mgmt.v1alpha1.JobRun.status:type_name -> mgmt.v1alpha1.JobRunStatus - 87, // 58: mgmt.v1alpha1.JobRun.started_at:type_name -> google.protobuf.Timestamp - 87, // 59: mgmt.v1alpha1.JobRun.completed_at:type_name -> google.protobuf.Timestamp - 73, // 60: mgmt.v1alpha1.JobRun.pending_activities:type_name -> mgmt.v1alpha1.PendingActivity - 87, // 61: mgmt.v1alpha1.JobRunEventTask.event_time:type_name -> google.protobuf.Timestamp - 75, // 62: mgmt.v1alpha1.JobRunEventTask.error:type_name -> mgmt.v1alpha1.JobRunEventTaskError - 77, // 63: mgmt.v1alpha1.JobRunEventMetadata.sync_metadata:type_name -> mgmt.v1alpha1.JobRunSyncMetadata - 87, // 64: mgmt.v1alpha1.JobRunEvent.start_time:type_name -> google.protobuf.Timestamp - 87, // 65: mgmt.v1alpha1.JobRunEvent.close_time:type_name -> google.protobuf.Timestamp - 78, // 66: mgmt.v1alpha1.JobRunEvent.metadata:type_name -> mgmt.v1alpha1.JobRunEventMetadata - 76, // 67: mgmt.v1alpha1.JobRunEvent.tasks:type_name -> mgmt.v1alpha1.JobRunEventTask - 79, // 68: mgmt.v1alpha1.GetJobRunEventsResponse.events:type_name -> mgmt.v1alpha1.JobRunEvent - 3, // 69: mgmt.v1alpha1.JobService.GetJobs:input_type -> mgmt.v1alpha1.GetJobsRequest - 29, // 70: mgmt.v1alpha1.JobService.GetJob:input_type -> mgmt.v1alpha1.GetJobRequest - 25, // 71: mgmt.v1alpha1.JobService.CreateJob:input_type -> mgmt.v1alpha1.CreateJobRequest - 48, // 72: mgmt.v1alpha1.JobService.DeleteJob:input_type -> mgmt.v1alpha1.DeleteJobRequest - 50, // 73: mgmt.v1alpha1.JobService.IsJobNameAvailable:input_type -> mgmt.v1alpha1.IsJobNameAvailableRequest - 31, // 74: mgmt.v1alpha1.JobService.UpdateJobSchedule:input_type -> mgmt.v1alpha1.UpdateJobScheduleRequest - 35, // 75: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:input_type -> mgmt.v1alpha1.UpdateJobSourceConnectionRequest - 40, // 76: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:input_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest - 42, // 77: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:input_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionRequest - 44, // 78: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:input_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionRequest - 46, // 79: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:input_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsRequest - 33, // 80: mgmt.v1alpha1.JobService.PauseJob:input_type -> mgmt.v1alpha1.PauseJobRequest - 62, // 81: mgmt.v1alpha1.JobService.GetJobRecentRuns:input_type -> mgmt.v1alpha1.GetJobRecentRunsRequest - 65, // 82: mgmt.v1alpha1.JobService.GetJobNextRuns:input_type -> mgmt.v1alpha1.GetJobNextRunsRequest - 67, // 83: mgmt.v1alpha1.JobService.GetJobStatus:input_type -> mgmt.v1alpha1.GetJobStatusRequest - 70, // 84: mgmt.v1alpha1.JobService.GetJobStatuses:input_type -> mgmt.v1alpha1.GetJobStatusesRequest - 52, // 85: mgmt.v1alpha1.JobService.GetJobRuns:input_type -> mgmt.v1alpha1.GetJobRunsRequest - 80, // 86: mgmt.v1alpha1.JobService.GetJobRunEvents:input_type -> mgmt.v1alpha1.GetJobRunEventsRequest - 54, // 87: mgmt.v1alpha1.JobService.GetJobRun:input_type -> mgmt.v1alpha1.GetJobRunRequest - 82, // 88: mgmt.v1alpha1.JobService.DeleteJobRun:input_type -> mgmt.v1alpha1.DeleteJobRunRequest - 56, // 89: mgmt.v1alpha1.JobService.CreateJobRun:input_type -> mgmt.v1alpha1.CreateJobRunRequest - 58, // 90: mgmt.v1alpha1.JobService.CancelJobRun:input_type -> mgmt.v1alpha1.CancelJobRunRequest - 84, // 91: mgmt.v1alpha1.JobService.TerminateJobRun:input_type -> mgmt.v1alpha1.TerminateJobRunRequest - 4, // 92: mgmt.v1alpha1.JobService.GetJobs:output_type -> mgmt.v1alpha1.GetJobsResponse - 30, // 93: mgmt.v1alpha1.JobService.GetJob:output_type -> mgmt.v1alpha1.GetJobResponse - 26, // 94: mgmt.v1alpha1.JobService.CreateJob:output_type -> mgmt.v1alpha1.CreateJobResponse - 49, // 95: mgmt.v1alpha1.JobService.DeleteJob:output_type -> mgmt.v1alpha1.DeleteJobResponse - 51, // 96: mgmt.v1alpha1.JobService.IsJobNameAvailable:output_type -> mgmt.v1alpha1.IsJobNameAvailableResponse - 32, // 97: mgmt.v1alpha1.JobService.UpdateJobSchedule:output_type -> mgmt.v1alpha1.UpdateJobScheduleResponse - 36, // 98: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:output_type -> mgmt.v1alpha1.UpdateJobSourceConnectionResponse - 41, // 99: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:output_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse - 43, // 100: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:output_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionResponse - 45, // 101: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:output_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionResponse - 47, // 102: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:output_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsResponse - 34, // 103: mgmt.v1alpha1.JobService.PauseJob:output_type -> mgmt.v1alpha1.PauseJobResponse - 63, // 104: mgmt.v1alpha1.JobService.GetJobRecentRuns:output_type -> mgmt.v1alpha1.GetJobRecentRunsResponse - 66, // 105: mgmt.v1alpha1.JobService.GetJobNextRuns:output_type -> mgmt.v1alpha1.GetJobNextRunsResponse - 68, // 106: mgmt.v1alpha1.JobService.GetJobStatus:output_type -> mgmt.v1alpha1.GetJobStatusResponse - 71, // 107: mgmt.v1alpha1.JobService.GetJobStatuses:output_type -> mgmt.v1alpha1.GetJobStatusesResponse - 53, // 108: mgmt.v1alpha1.JobService.GetJobRuns:output_type -> mgmt.v1alpha1.GetJobRunsResponse - 81, // 109: mgmt.v1alpha1.JobService.GetJobRunEvents:output_type -> mgmt.v1alpha1.GetJobRunEventsResponse - 55, // 110: mgmt.v1alpha1.JobService.GetJobRun:output_type -> mgmt.v1alpha1.GetJobRunResponse - 83, // 111: mgmt.v1alpha1.JobService.DeleteJobRun:output_type -> mgmt.v1alpha1.DeleteJobRunResponse - 57, // 112: mgmt.v1alpha1.JobService.CreateJobRun:output_type -> mgmt.v1alpha1.CreateJobRunResponse - 59, // 113: mgmt.v1alpha1.JobService.CancelJobRun:output_type -> mgmt.v1alpha1.CancelJobRunResponse - 85, // 114: mgmt.v1alpha1.JobService.TerminateJobRun:output_type -> mgmt.v1alpha1.TerminateJobRunResponse - 92, // [92:115] is the sub-list for method output_type - 69, // [69:92] is the sub-list for method input_type - 69, // [69:69] is the sub-list for extension type_name - 69, // [69:69] is the sub-list for extension extendee - 0, // [0:69] is the sub-list for field type_name + 90, // 58: mgmt.v1alpha1.JobRun.started_at:type_name -> google.protobuf.Timestamp + 90, // 59: mgmt.v1alpha1.JobRun.completed_at:type_name -> google.protobuf.Timestamp + 74, // 60: mgmt.v1alpha1.JobRun.pending_activities:type_name -> mgmt.v1alpha1.PendingActivity + 90, // 61: mgmt.v1alpha1.JobRunEventTask.event_time:type_name -> google.protobuf.Timestamp + 76, // 62: mgmt.v1alpha1.JobRunEventTask.error:type_name -> mgmt.v1alpha1.JobRunEventTaskError + 78, // 63: mgmt.v1alpha1.JobRunEventMetadata.sync_metadata:type_name -> mgmt.v1alpha1.JobRunSyncMetadata + 90, // 64: mgmt.v1alpha1.JobRunEvent.start_time:type_name -> google.protobuf.Timestamp + 90, // 65: mgmt.v1alpha1.JobRunEvent.close_time:type_name -> google.protobuf.Timestamp + 79, // 66: mgmt.v1alpha1.JobRunEvent.metadata:type_name -> mgmt.v1alpha1.JobRunEventMetadata + 77, // 67: mgmt.v1alpha1.JobRunEvent.tasks:type_name -> mgmt.v1alpha1.JobRunEventTask + 80, // 68: mgmt.v1alpha1.GetJobRunEventsResponse.events:type_name -> mgmt.v1alpha1.JobRunEvent + 3, // 69: mgmt.v1alpha1.GetJobRunLogsStreamRequest.window:type_name -> mgmt.v1alpha1.LogWindow + 4, // 70: mgmt.v1alpha1.JobService.GetJobs:input_type -> mgmt.v1alpha1.GetJobsRequest + 30, // 71: mgmt.v1alpha1.JobService.GetJob:input_type -> mgmt.v1alpha1.GetJobRequest + 26, // 72: mgmt.v1alpha1.JobService.CreateJob:input_type -> mgmt.v1alpha1.CreateJobRequest + 49, // 73: mgmt.v1alpha1.JobService.DeleteJob:input_type -> mgmt.v1alpha1.DeleteJobRequest + 51, // 74: mgmt.v1alpha1.JobService.IsJobNameAvailable:input_type -> mgmt.v1alpha1.IsJobNameAvailableRequest + 32, // 75: mgmt.v1alpha1.JobService.UpdateJobSchedule:input_type -> mgmt.v1alpha1.UpdateJobScheduleRequest + 36, // 76: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:input_type -> mgmt.v1alpha1.UpdateJobSourceConnectionRequest + 41, // 77: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:input_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest + 43, // 78: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:input_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionRequest + 45, // 79: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:input_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionRequest + 47, // 80: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:input_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsRequest + 34, // 81: mgmt.v1alpha1.JobService.PauseJob:input_type -> mgmt.v1alpha1.PauseJobRequest + 63, // 82: mgmt.v1alpha1.JobService.GetJobRecentRuns:input_type -> mgmt.v1alpha1.GetJobRecentRunsRequest + 66, // 83: mgmt.v1alpha1.JobService.GetJobNextRuns:input_type -> mgmt.v1alpha1.GetJobNextRunsRequest + 68, // 84: mgmt.v1alpha1.JobService.GetJobStatus:input_type -> mgmt.v1alpha1.GetJobStatusRequest + 71, // 85: mgmt.v1alpha1.JobService.GetJobStatuses:input_type -> mgmt.v1alpha1.GetJobStatusesRequest + 53, // 86: mgmt.v1alpha1.JobService.GetJobRuns:input_type -> mgmt.v1alpha1.GetJobRunsRequest + 81, // 87: mgmt.v1alpha1.JobService.GetJobRunEvents:input_type -> mgmt.v1alpha1.GetJobRunEventsRequest + 55, // 88: mgmt.v1alpha1.JobService.GetJobRun:input_type -> mgmt.v1alpha1.GetJobRunRequest + 83, // 89: mgmt.v1alpha1.JobService.DeleteJobRun:input_type -> mgmt.v1alpha1.DeleteJobRunRequest + 57, // 90: mgmt.v1alpha1.JobService.CreateJobRun:input_type -> mgmt.v1alpha1.CreateJobRunRequest + 59, // 91: mgmt.v1alpha1.JobService.CancelJobRun:input_type -> mgmt.v1alpha1.CancelJobRunRequest + 85, // 92: mgmt.v1alpha1.JobService.TerminateJobRun:input_type -> mgmt.v1alpha1.TerminateJobRunRequest + 87, // 93: mgmt.v1alpha1.JobService.GetJobRunLogsStream:input_type -> mgmt.v1alpha1.GetJobRunLogsStreamRequest + 5, // 94: mgmt.v1alpha1.JobService.GetJobs:output_type -> mgmt.v1alpha1.GetJobsResponse + 31, // 95: mgmt.v1alpha1.JobService.GetJob:output_type -> mgmt.v1alpha1.GetJobResponse + 27, // 96: mgmt.v1alpha1.JobService.CreateJob:output_type -> mgmt.v1alpha1.CreateJobResponse + 50, // 97: mgmt.v1alpha1.JobService.DeleteJob:output_type -> mgmt.v1alpha1.DeleteJobResponse + 52, // 98: mgmt.v1alpha1.JobService.IsJobNameAvailable:output_type -> mgmt.v1alpha1.IsJobNameAvailableResponse + 33, // 99: mgmt.v1alpha1.JobService.UpdateJobSchedule:output_type -> mgmt.v1alpha1.UpdateJobScheduleResponse + 37, // 100: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:output_type -> mgmt.v1alpha1.UpdateJobSourceConnectionResponse + 42, // 101: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:output_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse + 44, // 102: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:output_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionResponse + 46, // 103: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:output_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionResponse + 48, // 104: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:output_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsResponse + 35, // 105: mgmt.v1alpha1.JobService.PauseJob:output_type -> mgmt.v1alpha1.PauseJobResponse + 64, // 106: mgmt.v1alpha1.JobService.GetJobRecentRuns:output_type -> mgmt.v1alpha1.GetJobRecentRunsResponse + 67, // 107: mgmt.v1alpha1.JobService.GetJobNextRuns:output_type -> mgmt.v1alpha1.GetJobNextRunsResponse + 69, // 108: mgmt.v1alpha1.JobService.GetJobStatus:output_type -> mgmt.v1alpha1.GetJobStatusResponse + 72, // 109: mgmt.v1alpha1.JobService.GetJobStatuses:output_type -> mgmt.v1alpha1.GetJobStatusesResponse + 54, // 110: mgmt.v1alpha1.JobService.GetJobRuns:output_type -> mgmt.v1alpha1.GetJobRunsResponse + 82, // 111: mgmt.v1alpha1.JobService.GetJobRunEvents:output_type -> mgmt.v1alpha1.GetJobRunEventsResponse + 56, // 112: mgmt.v1alpha1.JobService.GetJobRun:output_type -> mgmt.v1alpha1.GetJobRunResponse + 84, // 113: mgmt.v1alpha1.JobService.DeleteJobRun:output_type -> mgmt.v1alpha1.DeleteJobRunResponse + 58, // 114: mgmt.v1alpha1.JobService.CreateJobRun:output_type -> mgmt.v1alpha1.CreateJobRunResponse + 60, // 115: mgmt.v1alpha1.JobService.CancelJobRun:output_type -> mgmt.v1alpha1.CancelJobRunResponse + 86, // 116: mgmt.v1alpha1.JobService.TerminateJobRun:output_type -> mgmt.v1alpha1.TerminateJobRunResponse + 88, // 117: mgmt.v1alpha1.JobService.GetJobRunLogsStream:output_type -> mgmt.v1alpha1.GetJobRunLogsStreamResponse + 94, // [94:118] is the sub-list for method output_type + 70, // [70:94] is the sub-list for method input_type + 70, // [70:70] is the sub-list for extension type_name + 70, // [70:70] is the sub-list for extension extendee + 0, // [0:70] is the sub-list for field type_name } func init() { file_mgmt_v1alpha1_job_proto_init() } @@ -6860,6 +7078,30 @@ func file_mgmt_v1alpha1_job_proto_init() { return nil } } + file_mgmt_v1alpha1_job_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJobRunLogsStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_v1alpha1_job_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJobRunLogsStreamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_mgmt_v1alpha1_job_proto_msgTypes[3].OneofWrappers = []interface{}{ (*JobSourceOptions_Postgres)(nil), @@ -6892,13 +7134,14 @@ func file_mgmt_v1alpha1_job_proto_init() { file_mgmt_v1alpha1_job_proto_msgTypes[75].OneofWrappers = []interface{}{ (*JobRunEventMetadata_SyncMetadata)(nil), } + file_mgmt_v1alpha1_job_proto_msgTypes[83].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_v1alpha1_job_proto_rawDesc, - NumEnums: 3, - NumMessages: 83, + NumEnums: 4, + NumMessages: 85, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/gen/go/protos/mgmt/v1alpha1/job.pb.validate.go b/backend/gen/go/protos/mgmt/v1alpha1/job.pb.validate.go index 8697b4fba1..202892e63e 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/job.pb.validate.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/job.pb.validate.go @@ -10862,3 +10862,222 @@ var _ interface { Cause() error ErrorName() string } = TerminateJobRunResponseValidationError{} + +// Validate checks the field values on GetJobRunLogsStreamRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetJobRunLogsStreamRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetJobRunLogsStreamRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetJobRunLogsStreamRequestMultiError, or nil if none found. +func (m *GetJobRunLogsStreamRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetJobRunLogsStreamRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for JobRunId + + // no validation rules for AccountId + + // no validation rules for Window + + // no validation rules for ShouldTail + + if m.MaxLogLines != nil { + // no validation rules for MaxLogLines + } + + if len(errors) > 0 { + return GetJobRunLogsStreamRequestMultiError(errors) + } + + return nil +} + +// GetJobRunLogsStreamRequestMultiError is an error wrapping multiple +// validation errors returned by GetJobRunLogsStreamRequest.ValidateAll() if +// the designated constraints aren't met. +type GetJobRunLogsStreamRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetJobRunLogsStreamRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetJobRunLogsStreamRequestMultiError) AllErrors() []error { return m } + +// GetJobRunLogsStreamRequestValidationError is the validation error returned +// by GetJobRunLogsStreamRequest.Validate if the designated constraints aren't met. +type GetJobRunLogsStreamRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetJobRunLogsStreamRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetJobRunLogsStreamRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetJobRunLogsStreamRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetJobRunLogsStreamRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetJobRunLogsStreamRequestValidationError) ErrorName() string { + return "GetJobRunLogsStreamRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetJobRunLogsStreamRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetJobRunLogsStreamRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetJobRunLogsStreamRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetJobRunLogsStreamRequestValidationError{} + +// Validate checks the field values on GetJobRunLogsStreamResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetJobRunLogsStreamResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetJobRunLogsStreamResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetJobRunLogsStreamResponseMultiError, or nil if none found. +func (m *GetJobRunLogsStreamResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetJobRunLogsStreamResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for LogLine + + if len(errors) > 0 { + return GetJobRunLogsStreamResponseMultiError(errors) + } + + return nil +} + +// GetJobRunLogsStreamResponseMultiError is an error wrapping multiple +// validation errors returned by GetJobRunLogsStreamResponse.ValidateAll() if +// the designated constraints aren't met. +type GetJobRunLogsStreamResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetJobRunLogsStreamResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetJobRunLogsStreamResponseMultiError) AllErrors() []error { return m } + +// GetJobRunLogsStreamResponseValidationError is the validation error returned +// by GetJobRunLogsStreamResponse.Validate if the designated constraints +// aren't met. +type GetJobRunLogsStreamResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetJobRunLogsStreamResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetJobRunLogsStreamResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetJobRunLogsStreamResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetJobRunLogsStreamResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetJobRunLogsStreamResponseValidationError) ErrorName() string { + return "GetJobRunLogsStreamResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetJobRunLogsStreamResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetJobRunLogsStreamResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetJobRunLogsStreamResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetJobRunLogsStreamResponseValidationError{} diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/job.connect.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/job.connect.go index a51f13ba23..b55c4d1640 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/job.connect.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/job.connect.go @@ -91,6 +91,9 @@ const ( // JobServiceTerminateJobRunProcedure is the fully-qualified name of the JobService's // TerminateJobRun RPC. JobServiceTerminateJobRunProcedure = "/mgmt.v1alpha1.JobService/TerminateJobRun" + // JobServiceGetJobRunLogsStreamProcedure is the fully-qualified name of the JobService's + // GetJobRunLogsStream RPC. + JobServiceGetJobRunLogsStreamProcedure = "/mgmt.v1alpha1.JobService/GetJobRunLogsStream" ) // JobServiceClient is a client for the mgmt.v1alpha1.JobService service. @@ -118,6 +121,7 @@ type JobServiceClient interface { CreateJobRun(context.Context, *connect.Request[v1alpha1.CreateJobRunRequest]) (*connect.Response[v1alpha1.CreateJobRunResponse], error) CancelJobRun(context.Context, *connect.Request[v1alpha1.CancelJobRunRequest]) (*connect.Response[v1alpha1.CancelJobRunResponse], error) TerminateJobRun(context.Context, *connect.Request[v1alpha1.TerminateJobRunRequest]) (*connect.Response[v1alpha1.TerminateJobRunResponse], error) + GetJobRunLogsStream(context.Context, *connect.Request[v1alpha1.GetJobRunLogsStreamRequest]) (*connect.ServerStreamForClient[v1alpha1.GetJobRunLogsStreamResponse], error) } // NewJobServiceClient constructs a client for the mgmt.v1alpha1.JobService service. By default, it @@ -245,6 +249,11 @@ func NewJobServiceClient(httpClient connect.HTTPClient, baseURL string, opts ... baseURL+JobServiceTerminateJobRunProcedure, opts..., ), + getJobRunLogsStream: connect.NewClient[v1alpha1.GetJobRunLogsStreamRequest, v1alpha1.GetJobRunLogsStreamResponse]( + httpClient, + baseURL+JobServiceGetJobRunLogsStreamProcedure, + opts..., + ), } } @@ -273,6 +282,7 @@ type jobServiceClient struct { createJobRun *connect.Client[v1alpha1.CreateJobRunRequest, v1alpha1.CreateJobRunResponse] cancelJobRun *connect.Client[v1alpha1.CancelJobRunRequest, v1alpha1.CancelJobRunResponse] terminateJobRun *connect.Client[v1alpha1.TerminateJobRunRequest, v1alpha1.TerminateJobRunResponse] + getJobRunLogsStream *connect.Client[v1alpha1.GetJobRunLogsStreamRequest, v1alpha1.GetJobRunLogsStreamResponse] } // GetJobs calls mgmt.v1alpha1.JobService.GetJobs. @@ -390,6 +400,11 @@ func (c *jobServiceClient) TerminateJobRun(ctx context.Context, req *connect.Req return c.terminateJobRun.CallUnary(ctx, req) } +// GetJobRunLogsStream calls mgmt.v1alpha1.JobService.GetJobRunLogsStream. +func (c *jobServiceClient) GetJobRunLogsStream(ctx context.Context, req *connect.Request[v1alpha1.GetJobRunLogsStreamRequest]) (*connect.ServerStreamForClient[v1alpha1.GetJobRunLogsStreamResponse], error) { + return c.getJobRunLogsStream.CallServerStream(ctx, req) +} + // JobServiceHandler is an implementation of the mgmt.v1alpha1.JobService service. type JobServiceHandler interface { GetJobs(context.Context, *connect.Request[v1alpha1.GetJobsRequest]) (*connect.Response[v1alpha1.GetJobsResponse], error) @@ -415,6 +430,7 @@ type JobServiceHandler interface { CreateJobRun(context.Context, *connect.Request[v1alpha1.CreateJobRunRequest]) (*connect.Response[v1alpha1.CreateJobRunResponse], error) CancelJobRun(context.Context, *connect.Request[v1alpha1.CancelJobRunRequest]) (*connect.Response[v1alpha1.CancelJobRunResponse], error) TerminateJobRun(context.Context, *connect.Request[v1alpha1.TerminateJobRunRequest]) (*connect.Response[v1alpha1.TerminateJobRunResponse], error) + GetJobRunLogsStream(context.Context, *connect.Request[v1alpha1.GetJobRunLogsStreamRequest], *connect.ServerStream[v1alpha1.GetJobRunLogsStreamResponse]) error } // NewJobServiceHandler builds an HTTP handler from the service implementation. It returns the path @@ -538,6 +554,11 @@ func NewJobServiceHandler(svc JobServiceHandler, opts ...connect.HandlerOption) svc.TerminateJobRun, opts..., ) + jobServiceGetJobRunLogsStreamHandler := connect.NewServerStreamHandler( + JobServiceGetJobRunLogsStreamProcedure, + svc.GetJobRunLogsStream, + opts..., + ) return "/mgmt.v1alpha1.JobService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case JobServiceGetJobsProcedure: @@ -586,6 +607,8 @@ func NewJobServiceHandler(svc JobServiceHandler, opts ...connect.HandlerOption) jobServiceCancelJobRunHandler.ServeHTTP(w, r) case JobServiceTerminateJobRunProcedure: jobServiceTerminateJobRunHandler.ServeHTTP(w, r) + case JobServiceGetJobRunLogsStreamProcedure: + jobServiceGetJobRunLogsStreamHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -686,3 +709,7 @@ func (UnimplementedJobServiceHandler) CancelJobRun(context.Context, *connect.Req func (UnimplementedJobServiceHandler) TerminateJobRun(context.Context, *connect.Request[v1alpha1.TerminateJobRunRequest]) (*connect.Response[v1alpha1.TerminateJobRunResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.JobService.TerminateJobRun is not implemented")) } + +func (UnimplementedJobServiceHandler) GetJobRunLogsStream(context.Context, *connect.Request[v1alpha1.GetJobRunLogsStreamRequest], *connect.ServerStream[v1alpha1.GetJobRunLogsStreamResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.JobService.GetJobRunLogsStream is not implemented")) +} diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceClient.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceClient.go index dbef4a74c3..e0e38f17bf 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceClient.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceClient.go @@ -732,6 +732,65 @@ func (_c *MockJobServiceClient_GetJobRunEvents_Call) RunAndReturn(run func(conte return _c } +// GetJobRunLogsStream provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceClient) GetJobRunLogsStream(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest]) (*connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobRunLogsStream") + } + + var r0 *connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest]) (*connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest]) *connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceClient_GetJobRunLogsStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobRunLogsStream' +type MockJobServiceClient_GetJobRunLogsStream_Call struct { + *mock.Call +} + +// GetJobRunLogsStream is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest] +func (_e *MockJobServiceClient_Expecter) GetJobRunLogsStream(_a0 interface{}, _a1 interface{}) *MockJobServiceClient_GetJobRunLogsStream_Call { + return &MockJobServiceClient_GetJobRunLogsStream_Call{Call: _e.mock.On("GetJobRunLogsStream", _a0, _a1)} +} + +func (_c *MockJobServiceClient_GetJobRunLogsStream_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest])) *MockJobServiceClient_GetJobRunLogsStream_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest])) + }) + return _c +} + +func (_c *MockJobServiceClient_GetJobRunLogsStream_Call) Return(_a0 *connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse], _a1 error) *MockJobServiceClient_GetJobRunLogsStream_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceClient_GetJobRunLogsStream_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest]) (*connect.ServerStreamForClient[mgmtv1alpha1.GetJobRunLogsStreamResponse], error)) *MockJobServiceClient_GetJobRunLogsStream_Call { + _c.Call.Return(run) + return _c +} + // GetJobRuns provides a mock function with given fields: _a0, _a1 func (_m *MockJobServiceClient) GetJobRuns(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunsResponse], error) { ret := _m.Called(_a0, _a1) diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceHandler.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceHandler.go new file mode 100644 index 0000000000..5f5046fd15 --- /dev/null +++ b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_JobServiceHandler.go @@ -0,0 +1,1444 @@ +// Code generated by mockery. DO NOT EDIT. + +package mgmtv1alpha1connect + +import ( + context "context" + + connect "connectrpc.com/connect" + + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + mock "github.com/stretchr/testify/mock" +) + +// MockJobServiceHandler is an autogenerated mock type for the JobServiceHandler type +type MockJobServiceHandler struct { + mock.Mock +} + +type MockJobServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *MockJobServiceHandler) EXPECT() *MockJobServiceHandler_Expecter { + return &MockJobServiceHandler_Expecter{mock: &_m.Mock} +} + +// CancelJobRun provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) CancelJobRun(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CancelJobRunRequest]) (*connect.Response[mgmtv1alpha1.CancelJobRunResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CancelJobRun") + } + + var r0 *connect.Response[mgmtv1alpha1.CancelJobRunResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CancelJobRunRequest]) (*connect.Response[mgmtv1alpha1.CancelJobRunResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CancelJobRunRequest]) *connect.Response[mgmtv1alpha1.CancelJobRunResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CancelJobRunResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CancelJobRunRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_CancelJobRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelJobRun' +type MockJobServiceHandler_CancelJobRun_Call struct { + *mock.Call +} + +// CancelJobRun is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.CancelJobRunRequest] +func (_e *MockJobServiceHandler_Expecter) CancelJobRun(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_CancelJobRun_Call { + return &MockJobServiceHandler_CancelJobRun_Call{Call: _e.mock.On("CancelJobRun", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_CancelJobRun_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CancelJobRunRequest])) *MockJobServiceHandler_CancelJobRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CancelJobRunRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_CancelJobRun_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CancelJobRunResponse], _a1 error) *MockJobServiceHandler_CancelJobRun_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_CancelJobRun_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CancelJobRunRequest]) (*connect.Response[mgmtv1alpha1.CancelJobRunResponse], error)) *MockJobServiceHandler_CancelJobRun_Call { + _c.Call.Return(run) + return _c +} + +// CreateJob provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) CreateJob(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateJobRequest]) (*connect.Response[mgmtv1alpha1.CreateJobResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CreateJob") + } + + var r0 *connect.Response[mgmtv1alpha1.CreateJobResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRequest]) (*connect.Response[mgmtv1alpha1.CreateJobResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRequest]) *connect.Response[mgmtv1alpha1.CreateJobResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CreateJobResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_CreateJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJob' +type MockJobServiceHandler_CreateJob_Call struct { + *mock.Call +} + +// CreateJob is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.CreateJobRequest] +func (_e *MockJobServiceHandler_Expecter) CreateJob(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_CreateJob_Call { + return &MockJobServiceHandler_CreateJob_Call{Call: _e.mock.On("CreateJob", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_CreateJob_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateJobRequest])) *MockJobServiceHandler_CreateJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CreateJobRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_CreateJob_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CreateJobResponse], _a1 error) *MockJobServiceHandler_CreateJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_CreateJob_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRequest]) (*connect.Response[mgmtv1alpha1.CreateJobResponse], error)) *MockJobServiceHandler_CreateJob_Call { + _c.Call.Return(run) + return _c +} + +// CreateJobDestinationConnections provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) CreateJobDestinationConnections(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest]) (*connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CreateJobDestinationConnections") + } + + var r0 *connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest]) (*connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest]) *connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_CreateJobDestinationConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJobDestinationConnections' +type MockJobServiceHandler_CreateJobDestinationConnections_Call struct { + *mock.Call +} + +// CreateJobDestinationConnections is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest] +func (_e *MockJobServiceHandler_Expecter) CreateJobDestinationConnections(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_CreateJobDestinationConnections_Call { + return &MockJobServiceHandler_CreateJobDestinationConnections_Call{Call: _e.mock.On("CreateJobDestinationConnections", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_CreateJobDestinationConnections_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest])) *MockJobServiceHandler_CreateJobDestinationConnections_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_CreateJobDestinationConnections_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse], _a1 error) *MockJobServiceHandler_CreateJobDestinationConnections_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_CreateJobDestinationConnections_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobDestinationConnectionsRequest]) (*connect.Response[mgmtv1alpha1.CreateJobDestinationConnectionsResponse], error)) *MockJobServiceHandler_CreateJobDestinationConnections_Call { + _c.Call.Return(run) + return _c +} + +// CreateJobRun provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) CreateJobRun(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateJobRunRequest]) (*connect.Response[mgmtv1alpha1.CreateJobRunResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CreateJobRun") + } + + var r0 *connect.Response[mgmtv1alpha1.CreateJobRunResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRunRequest]) (*connect.Response[mgmtv1alpha1.CreateJobRunResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRunRequest]) *connect.Response[mgmtv1alpha1.CreateJobRunResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CreateJobRunResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRunRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_CreateJobRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJobRun' +type MockJobServiceHandler_CreateJobRun_Call struct { + *mock.Call +} + +// CreateJobRun is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.CreateJobRunRequest] +func (_e *MockJobServiceHandler_Expecter) CreateJobRun(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_CreateJobRun_Call { + return &MockJobServiceHandler_CreateJobRun_Call{Call: _e.mock.On("CreateJobRun", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_CreateJobRun_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateJobRunRequest])) *MockJobServiceHandler_CreateJobRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CreateJobRunRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_CreateJobRun_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CreateJobRunResponse], _a1 error) *MockJobServiceHandler_CreateJobRun_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_CreateJobRun_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CreateJobRunRequest]) (*connect.Response[mgmtv1alpha1.CreateJobRunResponse], error)) *MockJobServiceHandler_CreateJobRun_Call { + _c.Call.Return(run) + return _c +} + +// DeleteJob provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) DeleteJob(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteJobRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for DeleteJob") + } + + var r0 *connect.Response[mgmtv1alpha1.DeleteJobResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRequest]) *connect.Response[mgmtv1alpha1.DeleteJobResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.DeleteJobResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_DeleteJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJob' +type MockJobServiceHandler_DeleteJob_Call struct { + *mock.Call +} + +// DeleteJob is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.DeleteJobRequest] +func (_e *MockJobServiceHandler_Expecter) DeleteJob(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_DeleteJob_Call { + return &MockJobServiceHandler_DeleteJob_Call{Call: _e.mock.On("DeleteJob", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_DeleteJob_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteJobRequest])) *MockJobServiceHandler_DeleteJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.DeleteJobRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_DeleteJob_Call) Return(_a0 *connect.Response[mgmtv1alpha1.DeleteJobResponse], _a1 error) *MockJobServiceHandler_DeleteJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_DeleteJob_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobResponse], error)) *MockJobServiceHandler_DeleteJob_Call { + _c.Call.Return(run) + return _c +} + +// DeleteJobDestinationConnection provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) DeleteJobDestinationConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for DeleteJobDestinationConnection") + } + + var r0 *connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest]) *connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_DeleteJobDestinationConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJobDestinationConnection' +type MockJobServiceHandler_DeleteJobDestinationConnection_Call struct { + *mock.Call +} + +// DeleteJobDestinationConnection is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest] +func (_e *MockJobServiceHandler_Expecter) DeleteJobDestinationConnection(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_DeleteJobDestinationConnection_Call { + return &MockJobServiceHandler_DeleteJobDestinationConnection_Call{Call: _e.mock.On("DeleteJobDestinationConnection", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_DeleteJobDestinationConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest])) *MockJobServiceHandler_DeleteJobDestinationConnection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_DeleteJobDestinationConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse], _a1 error) *MockJobServiceHandler_DeleteJobDestinationConnection_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_DeleteJobDestinationConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobDestinationConnectionRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobDestinationConnectionResponse], error)) *MockJobServiceHandler_DeleteJobDestinationConnection_Call { + _c.Call.Return(run) + return _c +} + +// DeleteJobRun provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) DeleteJobRun(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteJobRunRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobRunResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for DeleteJobRun") + } + + var r0 *connect.Response[mgmtv1alpha1.DeleteJobRunResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRunRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobRunResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRunRequest]) *connect.Response[mgmtv1alpha1.DeleteJobRunResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.DeleteJobRunResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRunRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_DeleteJobRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJobRun' +type MockJobServiceHandler_DeleteJobRun_Call struct { + *mock.Call +} + +// DeleteJobRun is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.DeleteJobRunRequest] +func (_e *MockJobServiceHandler_Expecter) DeleteJobRun(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_DeleteJobRun_Call { + return &MockJobServiceHandler_DeleteJobRun_Call{Call: _e.mock.On("DeleteJobRun", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_DeleteJobRun_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteJobRunRequest])) *MockJobServiceHandler_DeleteJobRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.DeleteJobRunRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_DeleteJobRun_Call) Return(_a0 *connect.Response[mgmtv1alpha1.DeleteJobRunResponse], _a1 error) *MockJobServiceHandler_DeleteJobRun_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_DeleteJobRun_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.DeleteJobRunRequest]) (*connect.Response[mgmtv1alpha1.DeleteJobRunResponse], error)) *MockJobServiceHandler_DeleteJobRun_Call { + _c.Call.Return(run) + return _c +} + +// GetJob provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJob(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJob") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRequest]) *connect.Response[mgmtv1alpha1.GetJobResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJob' +type MockJobServiceHandler_GetJob_Call struct { + *mock.Call +} + +// GetJob is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRequest] +func (_e *MockJobServiceHandler_Expecter) GetJob(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJob_Call { + return &MockJobServiceHandler_GetJob_Call{Call: _e.mock.On("GetJob", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJob_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRequest])) *MockJobServiceHandler_GetJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJob_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobResponse], _a1 error) *MockJobServiceHandler_GetJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJob_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error)) *MockJobServiceHandler_GetJob_Call { + _c.Call.Return(run) + return _c +} + +// GetJobNextRuns provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobNextRuns(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobNextRunsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobNextRuns") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobNextRunsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobNextRunsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest]) *connect.Response[mgmtv1alpha1.GetJobNextRunsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobNextRunsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobNextRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobNextRuns' +type MockJobServiceHandler_GetJobNextRuns_Call struct { + *mock.Call +} + +// GetJobNextRuns is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobNextRuns(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobNextRuns_Call { + return &MockJobServiceHandler_GetJobNextRuns_Call{Call: _e.mock.On("GetJobNextRuns", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobNextRuns_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest])) *MockJobServiceHandler_GetJobNextRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobNextRunsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobNextRuns_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobNextRunsResponse], _a1 error) *MockJobServiceHandler_GetJobNextRuns_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobNextRuns_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobNextRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobNextRunsResponse], error)) *MockJobServiceHandler_GetJobNextRuns_Call { + _c.Call.Return(run) + return _c +} + +// GetJobRecentRuns provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobRecentRuns(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobRecentRuns") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest]) *connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobRecentRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobRecentRuns' +type MockJobServiceHandler_GetJobRecentRuns_Call struct { + *mock.Call +} + +// GetJobRecentRuns is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobRecentRuns(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobRecentRuns_Call { + return &MockJobServiceHandler_GetJobRecentRuns_Call{Call: _e.mock.On("GetJobRecentRuns", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobRecentRuns_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest])) *MockJobServiceHandler_GetJobRecentRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRecentRuns_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse], _a1 error) *MockJobServiceHandler_GetJobRecentRuns_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRecentRuns_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRecentRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRecentRunsResponse], error)) *MockJobServiceHandler_GetJobRecentRuns_Call { + _c.Call.Return(run) + return _c +} + +// GetJobRun provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobRun(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobRun") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobRunResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunRequest]) *connect.Response[mgmtv1alpha1.GetJobRunResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobRunResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobRun' +type MockJobServiceHandler_GetJobRun_Call struct { + *mock.Call +} + +// GetJobRun is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRunRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobRun(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobRun_Call { + return &MockJobServiceHandler_GetJobRun_Call{Call: _e.mock.On("GetJobRun", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobRun_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunRequest])) *MockJobServiceHandler_GetJobRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRunRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRun_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobRunResponse], _a1 error) *MockJobServiceHandler_GetJobRun_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRun_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunResponse], error)) *MockJobServiceHandler_GetJobRun_Call { + _c.Call.Return(run) + return _c +} + +// GetJobRunEvents provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobRunEvents(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunEventsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobRunEvents") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobRunEventsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunEventsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest]) *connect.Response[mgmtv1alpha1.GetJobRunEventsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobRunEventsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobRunEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobRunEvents' +type MockJobServiceHandler_GetJobRunEvents_Call struct { + *mock.Call +} + +// GetJobRunEvents is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobRunEvents(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobRunEvents_Call { + return &MockJobServiceHandler_GetJobRunEvents_Call{Call: _e.mock.On("GetJobRunEvents", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobRunEvents_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest])) *MockJobServiceHandler_GetJobRunEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRunEventsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRunEvents_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobRunEventsResponse], _a1 error) *MockJobServiceHandler_GetJobRunEvents_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRunEvents_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunEventsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunEventsResponse], error)) *MockJobServiceHandler_GetJobRunEvents_Call { + _c.Call.Return(run) + return _c +} + +// GetJobRunLogsStream provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockJobServiceHandler) GetJobRunLogsStream(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest], _a2 *connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse]) error { + ret := _m.Called(_a0, _a1, _a2) + + if len(ret) == 0 { + panic("no return value specified for GetJobRunLogsStream") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest], *connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse]) error); ok { + r0 = rf(_a0, _a1, _a2) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockJobServiceHandler_GetJobRunLogsStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobRunLogsStream' +type MockJobServiceHandler_GetJobRunLogsStream_Call struct { + *mock.Call +} + +// GetJobRunLogsStream is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest] +// - _a2 *connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse] +func (_e *MockJobServiceHandler_Expecter) GetJobRunLogsStream(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockJobServiceHandler_GetJobRunLogsStream_Call { + return &MockJobServiceHandler_GetJobRunLogsStream_Call{Call: _e.mock.On("GetJobRunLogsStream", _a0, _a1, _a2)} +} + +func (_c *MockJobServiceHandler_GetJobRunLogsStream_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest], _a2 *connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse])) *MockJobServiceHandler_GetJobRunLogsStream_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest]), args[2].(*connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRunLogsStream_Call) Return(_a0 error) *MockJobServiceHandler_GetJobRunLogsStream_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRunLogsStream_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest], *connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse]) error) *MockJobServiceHandler_GetJobRunLogsStream_Call { + _c.Call.Return(run) + return _c +} + +// GetJobRuns provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobRuns(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobRuns") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobRunsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunsRequest]) *connect.Response[mgmtv1alpha1.GetJobRunsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobRunsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobRuns' +type MockJobServiceHandler_GetJobRuns_Call struct { + *mock.Call +} + +// GetJobRuns is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobRunsRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobRuns(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobRuns_Call { + return &MockJobServiceHandler_GetJobRuns_Call{Call: _e.mock.On("GetJobRuns", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobRuns_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobRunsRequest])) *MockJobServiceHandler_GetJobRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobRunsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRuns_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobRunsResponse], _a1 error) *MockJobServiceHandler_GetJobRuns_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobRuns_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobRunsRequest]) (*connect.Response[mgmtv1alpha1.GetJobRunsResponse], error)) *MockJobServiceHandler_GetJobRuns_Call { + _c.Call.Return(run) + return _c +} + +// GetJobStatus provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobStatus(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobStatusRequest]) (*connect.Response[mgmtv1alpha1.GetJobStatusResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobStatus") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobStatusResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusRequest]) (*connect.Response[mgmtv1alpha1.GetJobStatusResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusRequest]) *connect.Response[mgmtv1alpha1.GetJobStatusResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobStatusResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobStatus' +type MockJobServiceHandler_GetJobStatus_Call struct { + *mock.Call +} + +// GetJobStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobStatusRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobStatus(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobStatus_Call { + return &MockJobServiceHandler_GetJobStatus_Call{Call: _e.mock.On("GetJobStatus", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobStatus_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobStatusRequest])) *MockJobServiceHandler_GetJobStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobStatusRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobStatus_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobStatusResponse], _a1 error) *MockJobServiceHandler_GetJobStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobStatus_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusRequest]) (*connect.Response[mgmtv1alpha1.GetJobStatusResponse], error)) *MockJobServiceHandler_GetJobStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetJobStatuses provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobStatuses(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobStatusesRequest]) (*connect.Response[mgmtv1alpha1.GetJobStatusesResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobStatuses") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobStatusesResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusesRequest]) (*connect.Response[mgmtv1alpha1.GetJobStatusesResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusesRequest]) *connect.Response[mgmtv1alpha1.GetJobStatusesResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobStatusesResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusesRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobStatuses' +type MockJobServiceHandler_GetJobStatuses_Call struct { + *mock.Call +} + +// GetJobStatuses is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobStatusesRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobStatuses(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobStatuses_Call { + return &MockJobServiceHandler_GetJobStatuses_Call{Call: _e.mock.On("GetJobStatuses", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobStatuses_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobStatusesRequest])) *MockJobServiceHandler_GetJobStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobStatusesRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobStatuses_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobStatusesResponse], _a1 error) *MockJobServiceHandler_GetJobStatuses_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobStatuses_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobStatusesRequest]) (*connect.Response[mgmtv1alpha1.GetJobStatusesResponse], error)) *MockJobServiceHandler_GetJobStatuses_Call { + _c.Call.Return(run) + return _c +} + +// GetJobs provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) GetJobs(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobsRequest]) (*connect.Response[mgmtv1alpha1.GetJobsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetJobs") + } + + var r0 *connect.Response[mgmtv1alpha1.GetJobsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobsRequest]) (*connect.Response[mgmtv1alpha1.GetJobsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobsRequest]) *connect.Response[mgmtv1alpha1.GetJobsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetJobsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetJobsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_GetJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobs' +type MockJobServiceHandler_GetJobs_Call struct { + *mock.Call +} + +// GetJobs is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.GetJobsRequest] +func (_e *MockJobServiceHandler_Expecter) GetJobs(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_GetJobs_Call { + return &MockJobServiceHandler_GetJobs_Call{Call: _e.mock.On("GetJobs", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_GetJobs_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetJobsRequest])) *MockJobServiceHandler_GetJobs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetJobsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_GetJobs_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetJobsResponse], _a1 error) *MockJobServiceHandler_GetJobs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_GetJobs_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetJobsRequest]) (*connect.Response[mgmtv1alpha1.GetJobsResponse], error)) *MockJobServiceHandler_GetJobs_Call { + _c.Call.Return(run) + return _c +} + +// IsJobNameAvailable provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) IsJobNameAvailable(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest]) (*connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for IsJobNameAvailable") + } + + var r0 *connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest]) (*connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest]) *connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_IsJobNameAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsJobNameAvailable' +type MockJobServiceHandler_IsJobNameAvailable_Call struct { + *mock.Call +} + +// IsJobNameAvailable is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest] +func (_e *MockJobServiceHandler_Expecter) IsJobNameAvailable(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_IsJobNameAvailable_Call { + return &MockJobServiceHandler_IsJobNameAvailable_Call{Call: _e.mock.On("IsJobNameAvailable", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_IsJobNameAvailable_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest])) *MockJobServiceHandler_IsJobNameAvailable_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_IsJobNameAvailable_Call) Return(_a0 *connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse], _a1 error) *MockJobServiceHandler_IsJobNameAvailable_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_IsJobNameAvailable_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.IsJobNameAvailableRequest]) (*connect.Response[mgmtv1alpha1.IsJobNameAvailableResponse], error)) *MockJobServiceHandler_IsJobNameAvailable_Call { + _c.Call.Return(run) + return _c +} + +// PauseJob provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) PauseJob(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.PauseJobRequest]) (*connect.Response[mgmtv1alpha1.PauseJobResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for PauseJob") + } + + var r0 *connect.Response[mgmtv1alpha1.PauseJobResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.PauseJobRequest]) (*connect.Response[mgmtv1alpha1.PauseJobResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.PauseJobRequest]) *connect.Response[mgmtv1alpha1.PauseJobResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.PauseJobResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.PauseJobRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_PauseJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PauseJob' +type MockJobServiceHandler_PauseJob_Call struct { + *mock.Call +} + +// PauseJob is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.PauseJobRequest] +func (_e *MockJobServiceHandler_Expecter) PauseJob(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_PauseJob_Call { + return &MockJobServiceHandler_PauseJob_Call{Call: _e.mock.On("PauseJob", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_PauseJob_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.PauseJobRequest])) *MockJobServiceHandler_PauseJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.PauseJobRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_PauseJob_Call) Return(_a0 *connect.Response[mgmtv1alpha1.PauseJobResponse], _a1 error) *MockJobServiceHandler_PauseJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_PauseJob_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.PauseJobRequest]) (*connect.Response[mgmtv1alpha1.PauseJobResponse], error)) *MockJobServiceHandler_PauseJob_Call { + _c.Call.Return(run) + return _c +} + +// SetJobSourceSqlConnectionSubsets provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) SetJobSourceSqlConnectionSubsets(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest]) (*connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for SetJobSourceSqlConnectionSubsets") + } + + var r0 *connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest]) (*connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest]) *connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetJobSourceSqlConnectionSubsets' +type MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call struct { + *mock.Call +} + +// SetJobSourceSqlConnectionSubsets is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest] +func (_e *MockJobServiceHandler_Expecter) SetJobSourceSqlConnectionSubsets(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call { + return &MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call{Call: _e.mock.On("SetJobSourceSqlConnectionSubsets", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest])) *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call) Return(_a0 *connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse], _a1 error) *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsRequest]) (*connect.Response[mgmtv1alpha1.SetJobSourceSqlConnectionSubsetsResponse], error)) *MockJobServiceHandler_SetJobSourceSqlConnectionSubsets_Call { + _c.Call.Return(run) + return _c +} + +// TerminateJobRun provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) TerminateJobRun(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.TerminateJobRunRequest]) (*connect.Response[mgmtv1alpha1.TerminateJobRunResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for TerminateJobRun") + } + + var r0 *connect.Response[mgmtv1alpha1.TerminateJobRunResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.TerminateJobRunRequest]) (*connect.Response[mgmtv1alpha1.TerminateJobRunResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.TerminateJobRunRequest]) *connect.Response[mgmtv1alpha1.TerminateJobRunResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.TerminateJobRunResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.TerminateJobRunRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_TerminateJobRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TerminateJobRun' +type MockJobServiceHandler_TerminateJobRun_Call struct { + *mock.Call +} + +// TerminateJobRun is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.TerminateJobRunRequest] +func (_e *MockJobServiceHandler_Expecter) TerminateJobRun(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_TerminateJobRun_Call { + return &MockJobServiceHandler_TerminateJobRun_Call{Call: _e.mock.On("TerminateJobRun", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_TerminateJobRun_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.TerminateJobRunRequest])) *MockJobServiceHandler_TerminateJobRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.TerminateJobRunRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_TerminateJobRun_Call) Return(_a0 *connect.Response[mgmtv1alpha1.TerminateJobRunResponse], _a1 error) *MockJobServiceHandler_TerminateJobRun_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_TerminateJobRun_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.TerminateJobRunRequest]) (*connect.Response[mgmtv1alpha1.TerminateJobRunResponse], error)) *MockJobServiceHandler_TerminateJobRun_Call { + _c.Call.Return(run) + return _c +} + +// UpdateJobDestinationConnection provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) UpdateJobDestinationConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateJobDestinationConnection") + } + + var r0 *connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest]) *connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_UpdateJobDestinationConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateJobDestinationConnection' +type MockJobServiceHandler_UpdateJobDestinationConnection_Call struct { + *mock.Call +} + +// UpdateJobDestinationConnection is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest] +func (_e *MockJobServiceHandler_Expecter) UpdateJobDestinationConnection(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_UpdateJobDestinationConnection_Call { + return &MockJobServiceHandler_UpdateJobDestinationConnection_Call{Call: _e.mock.On("UpdateJobDestinationConnection", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_UpdateJobDestinationConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest])) *MockJobServiceHandler_UpdateJobDestinationConnection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_UpdateJobDestinationConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse], _a1 error) *MockJobServiceHandler_UpdateJobDestinationConnection_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_UpdateJobDestinationConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobDestinationConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobDestinationConnectionResponse], error)) *MockJobServiceHandler_UpdateJobDestinationConnection_Call { + _c.Call.Return(run) + return _c +} + +// UpdateJobSchedule provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) UpdateJobSchedule(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateJobSchedule") + } + + var r0 *connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest]) *connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_UpdateJobSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateJobSchedule' +type MockJobServiceHandler_UpdateJobSchedule_Call struct { + *mock.Call +} + +// UpdateJobSchedule is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest] +func (_e *MockJobServiceHandler_Expecter) UpdateJobSchedule(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_UpdateJobSchedule_Call { + return &MockJobServiceHandler_UpdateJobSchedule_Call{Call: _e.mock.On("UpdateJobSchedule", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_UpdateJobSchedule_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest])) *MockJobServiceHandler_UpdateJobSchedule_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_UpdateJobSchedule_Call) Return(_a0 *connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse], _a1 error) *MockJobServiceHandler_UpdateJobSchedule_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_UpdateJobSchedule_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobScheduleRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobScheduleResponse], error)) *MockJobServiceHandler_UpdateJobSchedule_Call { + _c.Call.Return(run) + return _c +} + +// UpdateJobSourceConnection provides a mock function with given fields: _a0, _a1 +func (_m *MockJobServiceHandler) UpdateJobSourceConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse], error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateJobSourceConnection") + } + + var r0 *connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse], error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest]) *connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse]); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest]) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockJobServiceHandler_UpdateJobSourceConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateJobSourceConnection' +type MockJobServiceHandler_UpdateJobSourceConnection_Call struct { + *mock.Call +} + +// UpdateJobSourceConnection is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest] +func (_e *MockJobServiceHandler_Expecter) UpdateJobSourceConnection(_a0 interface{}, _a1 interface{}) *MockJobServiceHandler_UpdateJobSourceConnection_Call { + return &MockJobServiceHandler_UpdateJobSourceConnection_Call{Call: _e.mock.On("UpdateJobSourceConnection", _a0, _a1)} +} + +func (_c *MockJobServiceHandler_UpdateJobSourceConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest])) *MockJobServiceHandler_UpdateJobSourceConnection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest])) + }) + return _c +} + +func (_c *MockJobServiceHandler_UpdateJobSourceConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse], _a1 error) *MockJobServiceHandler_UpdateJobSourceConnection_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockJobServiceHandler_UpdateJobSourceConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.UpdateJobSourceConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateJobSourceConnectionResponse], error)) *MockJobServiceHandler_UpdateJobSourceConnection_Call { + _c.Call.Return(run) + return _c +} + +// NewMockJobServiceHandler creates a new instance of MockJobServiceHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockJobServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *MockJobServiceHandler { + mock := &MockJobServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/backend/go.mod b/backend/go.mod index bee300ce3b..d13021c379 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -35,6 +35,9 @@ require ( golang.org/x/sync v0.6.0 google.golang.org/grpc v1.60.1 google.golang.org/protobuf v1.32.0 + k8s.io/api v0.29.1 + k8s.io/apimachinery v0.29.1 + k8s.io/client-go v0.29.1 ) require ( @@ -118,6 +121,7 @@ require ( github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/envoyproxy/go-control-plane v0.11.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect @@ -132,6 +136,9 @@ require ( github.com/go-faster/errors v0.6.1 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/goccy/go-json v0.10.2 // indirect @@ -151,9 +158,11 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/cel-go v0.17.4 // indirect github.com/google/flatbuffers v23.5.26+incompatible // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-github/v39 v39.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect @@ -196,6 +205,7 @@ require ( github.com/jhump/protoreflect v1.15.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/k0kubun/pp v2.3.0+incompatible // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect @@ -221,9 +231,12 @@ require ( github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/montanaflynn/stats v0.7.0 // indirect github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mutecomm/go-sqlcipher/v4 v4.4.0 // indirect github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8 // indirect github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba // indirect @@ -298,13 +311,13 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.13.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.16.1 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.153.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -319,7 +332,11 @@ require ( gopkg.in/jcmturner/gokrb5.v6 v6.1.1 // indirect gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect lukechampine.com/uint128 v1.2.0 // indirect modernc.org/b v1.0.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect @@ -340,4 +357,7 @@ require ( modernc.org/strutil v1.1.3 // indirect modernc.org/token v1.1.0 // indirect modernc.org/zappy v1.0.0 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index 2cdcf282be..87ea449c2b 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -317,6 +317,7 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 h1:aaQcKT9WumO6JEJcRyTqFVq4XUZiUcKR2/GI31TOcz8= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw= github.com/emicklei/proto v1.10.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -379,6 +380,9 @@ github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-quicktest/qt v1.100.0 h1:I7iSLgIwNp0E0UnSvKJzs7ig0jg/Iq83zsZjtQNW7jY= github.com/go-quicktest/qt v1.100.0/go.mod h1:leyLsQ4jksGmF1KaQEyabnqGIiJTbOU5S46QegToEj4= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= @@ -389,6 +393,7 @@ github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrt github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= @@ -466,6 +471,7 @@ github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -476,6 +482,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v39 v39.2.0 h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ= @@ -483,6 +490,9 @@ github.com/google/go-github/v39 v39.2.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= @@ -664,6 +674,8 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= @@ -771,6 +783,11 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= @@ -782,6 +799,7 @@ github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de h1:D5x39vF5KCwKQaw+OC9 github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de/go.mod h1:kJun4WP5gFuHZgRjZUWWuH1DTxCtxbHDOIJsudS8jzY= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/mutecomm/go-sqlcipher/v4 v4.4.0 h1:sV1tWCWGAVlPhNGT95Q+z/txFxuhAYWwHD1afF5bMZg= github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8 h1:P48LjvUQpTReR3TQRbxSeSBsMXzfK0uol7eRcr7VBYQ= @@ -806,11 +824,11 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= @@ -1127,8 +1145,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1315,8 +1333,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1467,6 +1485,17 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= +k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ= +k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc= +k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= +k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/b v1.0.0 h1:vpvqeyp17ddcQWF29Czawql4lDdABCDRbXRAS4+aF2o= @@ -1520,3 +1549,9 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/backend/internal/cmds/mgmt/serve/connect/cmd.go b/backend/internal/cmds/mgmt/serve/connect/cmd.go index 436177cb32..212a7df0dc 100644 --- a/backend/internal/cmds/mgmt/serve/connect/cmd.go +++ b/backend/internal/cmds/mgmt/serve/connect/cmd.go @@ -289,7 +289,10 @@ func serve(ctx context.Context) error { ) jobServiceConfig := &v1alpha1_jobservice.Config{ - IsAuthEnabled: isAuthEnabled, + IsAuthEnabled: isAuthEnabled, + IsKubernetesEnabled: getIsKubernetes(), + KubernetesNamespace: getKubernetesNamespace(), + KubernetesWorkerAppName: getKubernetesWorkerAppName(), } jobService := v1alpha1_jobservice.New( jobServiceConfig, @@ -595,3 +598,15 @@ func getAllowedWorkerApiKeys(isNeosyncCloud bool) []string { } return []string{} } + +func getIsKubernetes() bool { + return viper.GetBool("KUBERNETES_ENABLED") +} + +func getKubernetesNamespace() string { + return viper.GetString("KUBERNETES_NAMESPACE") +} + +func getKubernetesWorkerAppName() string { + return viper.GetString("KUBERNETES_WORKER_APP_NAME") +} diff --git a/backend/protos/mgmt/v1alpha1/job.proto b/backend/protos/mgmt/v1alpha1/job.proto index 0986314a8d..2b3639dea3 100644 --- a/backend/protos/mgmt/v1alpha1/job.proto +++ b/backend/protos/mgmt/v1alpha1/job.proto @@ -425,6 +425,23 @@ message TerminateJobRunRequest { } message TerminateJobRunResponse {} +enum LogWindow { + LOG_WINDOW_NO_TIME_UNSPECIFIED = 0; + LOG_WINDOW_FIFTEEN_MIN = 1; + LOG_WINDOW_ONE_HOUR = 2; + LOG_WINDOW_ONE_DAY = 3; +} +message GetJobRunLogsStreamRequest { + string job_run_id = 1; + string account_id = 2 [(buf.validate.field).string.uuid = true]; + LogWindow window = 3; + bool should_tail = 4; + optional int64 max_log_lines = 5 [(buf.validate.field).int64.gte = 1]; +} +message GetJobRunLogsStreamResponse { + string log_line = 1; +} + service JobService { rpc GetJobs(GetJobsRequest) returns (GetJobsResponse) {} rpc GetJob(GetJobRequest) returns (GetJobResponse) {} @@ -450,4 +467,5 @@ service JobService { rpc CreateJobRun(CreateJobRunRequest) returns (CreateJobRunResponse) {} rpc CancelJobRun(CancelJobRunRequest) returns (CancelJobRunResponse) {} rpc TerminateJobRun(TerminateJobRunRequest) returns (TerminateJobRunResponse) {} + rpc GetJobRunLogsStream(GetJobRunLogsStreamRequest) returns (stream GetJobRunLogsStreamResponse) {} } diff --git a/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go b/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go index 7b338b2eab..3d3aa206ae 100644 --- a/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go +++ b/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go @@ -485,7 +485,7 @@ type serviceMocks struct { QuerierMock *db_queries.MockQuerier UserAccountServiceMock *mgmtv1alpha1connect.MockUserAccountServiceClient ConnectionServiceMock *mgmtv1alpha1connect.MockConnectionServiceClient - JobServiceMock *mgmtv1alpha1connect.MockJobServiceClient + JobServiceMock *mgmtv1alpha1connect.MockJobServiceHandler SqlMock sqlmock.Sqlmock SqlDbMock *sql.DB PgQueierMock *pg_queries.MockQuerier @@ -499,7 +499,7 @@ func createServiceMock(t *testing.T) *serviceMocks { mockQuerier := db_queries.NewMockQuerier(t) mockUserAccountService := mgmtv1alpha1connect.NewMockUserAccountServiceClient(t) mockConnectionService := mgmtv1alpha1connect.NewMockConnectionServiceClient(t) - mockJobService := mgmtv1alpha1connect.NewMockJobServiceClient(t) + mockJobService := mgmtv1alpha1connect.NewMockJobServiceHandler(t) mockPgquerier := pg_queries.NewMockQuerier(t) mockMysqlquerier := mysql_queries.NewMockQuerier(t) mockSqlConnector := sqlconnect.NewMockSqlConnector(t) diff --git a/backend/services/mgmt/v1alpha1/connection-data-service/service.go b/backend/services/mgmt/v1alpha1/connection-data-service/service.go index 7f1f8fd0a5..1e11e202b9 100644 --- a/backend/services/mgmt/v1alpha1/connection-data-service/service.go +++ b/backend/services/mgmt/v1alpha1/connection-data-service/service.go @@ -12,7 +12,7 @@ type Service struct { cfg *Config useraccountService mgmtv1alpha1connect.UserAccountServiceClient connectionService mgmtv1alpha1connect.ConnectionServiceClient - jobService mgmtv1alpha1connect.JobServiceClient + jobService mgmtv1alpha1connect.JobServiceHandler awsManager awsmanager.NeosyncAwsManagerClient @@ -28,7 +28,7 @@ func New( cfg *Config, useraccountService mgmtv1alpha1connect.UserAccountServiceClient, connectionService mgmtv1alpha1connect.ConnectionServiceClient, - jobService mgmtv1alpha1connect.JobServiceClient, + jobService mgmtv1alpha1connect.JobServiceHandler, awsManager awsmanager.NeosyncAwsManagerClient, diff --git a/backend/services/mgmt/v1alpha1/job-service/runs.go b/backend/services/mgmt/v1alpha1/job-service/runs.go index 08b35f0181..a8d198cd16 100644 --- a/backend/services/mgmt/v1alpha1/job-service/runs.go +++ b/backend/services/mgmt/v1alpha1/job-service/runs.go @@ -1,10 +1,14 @@ package v1alpha1_jobservice import ( + "bufio" "context" + "encoding/json" "fmt" + "io" "log/slog" "strings" + "time" "connectrpc.com/connect" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" @@ -22,6 +26,13 @@ import ( "go.temporal.io/sdk/converter" "golang.org/x/sync/errgroup" "google.golang.org/protobuf/types/known/timestamppb" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" ) func (s *Service) GetJobRuns( @@ -439,3 +450,103 @@ func (s *Service) getVerifiedJobRun( TemporalConfig: tconfig, }, nil } + +type LogLine struct { + WorkflowID string `json:"WorkflowID"` +} + +func (s *Service) GetJobRunLogsStream( + ctx context.Context, + req *connect.Request[mgmtv1alpha1.GetJobRunLogsStreamRequest], + stream *connect.ServerStream[mgmtv1alpha1.GetJobRunLogsStreamResponse], +) error { + logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) + logger = logger.With("jobRunId", req.Msg.JobRunId) + if s.cfg.IsKubernetesEnabled { + verifResp, err := s.getVerifiedJobRun(ctx, logger, req.Msg.JobRunId, req.Msg.AccountId) + if err != nil { + return err + } + + kubeConfig, err := rest.InClusterConfig() + if err != nil { + logger.Error(fmt.Errorf("error getting kubernetes config: %w", err).Error()) + return err + } + + clientset, err := kubernetes.NewForConfig(kubeConfig) + if err != nil { + logger.Error(fmt.Errorf("error getting kubernetes clientset: %w", err).Error()) + return err + } + + appNameSelector, err := labels.NewRequirement("app", selection.Equals, []string{s.cfg.KubernetesWorkerAppName}) + if err != nil { + logger.Error(fmt.Errorf("unable to build label selector to find logs: %w", err).Error()) + return err + } + pods, err := clientset.CoreV1().Pods(s.cfg.KubernetesNamespace).List(context.Background(), metav1.ListOptions{ + LabelSelector: appNameSelector.String(), + }) + if err != nil { + logger.Error(fmt.Errorf("error getting pods: %w", err).Error()) + return err + } + for idx := range pods.Items { + pod := pods.Items[idx] + logsReq := clientset.CoreV1().Pods(s.cfg.KubernetesNamespace).GetLogs(pod.Name, &corev1.PodLogOptions{ + Follow: req.Msg.ShouldTail, + TailLines: req.Msg.MaxLogLines, + SinceTime: getLogFilterTime(req.Msg.GetWindow()), + }) + logstream, err := logsReq.Stream(ctx) + if err != nil && !errors.IsNotFound(err) { + return err + } else if err != nil && errors.IsNotFound(err) { + return nucleuserrors.NewNotFound("pod no longer exists") + } + + scanner := bufio.NewScanner(logstream) + + for scanner.Scan() { + txt := scanner.Text() + var logLine LogLine + err := json.Unmarshal([]byte(txt), &logLine) + if err != nil { + logger.Error("error unmarshaling log line: %v\n", err) + continue // Skip lines that can't be unmarshaled + } + + if logLine.WorkflowID == verifResp.WorkflowExecution.Execution.WorkflowId { + if err := stream.Send(&mgmtv1alpha1.GetJobRunLogsStreamResponse{LogLine: txt}); err != nil { + if err == io.EOF { + return nil + } + return err + } + } + } + logstream.Close() + } + return nil + } + return nucleuserrors.NewNotImplemented("streaming log pods not implemented for this container type") +} + +func getLogFilterTime(window mgmtv1alpha1.LogWindow) *metav1.Time { + switch window { + case mgmtv1alpha1.LogWindow_LOG_WINDOW_FIFTEEN_MIN: + return &metav1.Time{ + Time: time.Now().Add(-15 * time.Minute), + } + case mgmtv1alpha1.LogWindow_LOG_WINDOW_ONE_HOUR: + return &metav1.Time{ + Time: time.Now().Add(-1 * time.Hour), + } + case mgmtv1alpha1.LogWindow_LOG_WINDOW_ONE_DAY: + return &metav1.Time{ + Time: time.Now().Add(-24 * time.Hour), + } + } + return nil +} diff --git a/backend/services/mgmt/v1alpha1/job-service/service.go b/backend/services/mgmt/v1alpha1/job-service/service.go index 660422ce29..c512058151 100644 --- a/backend/services/mgmt/v1alpha1/job-service/service.go +++ b/backend/services/mgmt/v1alpha1/job-service/service.go @@ -16,7 +16,10 @@ type Service struct { } type Config struct { - IsAuthEnabled bool + IsAuthEnabled bool + IsKubernetesEnabled bool + KubernetesNamespace string + KubernetesWorkerAppName string } func New( diff --git a/cli/go.mod b/cli/go.mod index 893dee73b9..ab6f9bdabe 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -167,6 +167,7 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olivere/elastic/v7 v7.0.32 // indirect + github.com/onsi/gomega v1.29.0 // indirect github.com/paulmach/orb v0.10.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pierrec/lz4/v4 v4.1.18 // indirect @@ -223,11 +224,11 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.13.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.16.1 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.32.0 // indirect diff --git a/cli/go.sum b/cli/go.sum index bc1b8b393a..6b1327e35d 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -543,8 +543,7 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olivere/elastic/v7 v7.0.32 h1:R7CXvbu8Eq+WlsLgxmKVKPox0oOwAE/2T9Si5BnvK6E= github.com/olivere/elastic/v7 v7.0.32/go.mod h1:c7PVmLe3Fxq77PIfY/bZmxY/TAamBhCzZ8xDOE09a9k= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= @@ -796,8 +795,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -944,8 +942,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/docs/protos/data/proto_docs.json b/docs/protos/data/proto_docs.json index ac7cab9b44..af8c3b9374 100644 --- a/docs/protos/data/proto_docs.json +++ b/docs/protos/data/proto_docs.json @@ -5364,6 +5364,34 @@ "description": "" } ] + }, + { + "name": "LogWindow", + "longName": "LogWindow", + "fullName": "mgmt.v1alpha1.LogWindow", + "description": "", + "values": [ + { + "name": "LOG_WINDOW_NO_TIME_UNSPECIFIED", + "number": "0", + "description": "" + }, + { + "name": "LOG_WINDOW_FIFTEEN_MIN", + "number": "1", + "description": "" + }, + { + "name": "LOG_WINDOW_ONE_HOUR", + "number": "2", + "description": "" + }, + { + "name": "LOG_WINDOW_ONE_DAY", + "number": "3", + "description": "" + } + ] } ], "extensions": [], @@ -6166,6 +6194,102 @@ } ] }, + { + "name": "GetJobRunLogsStreamRequest", + "longName": "GetJobRunLogsStreamRequest", + "fullName": "mgmt.v1alpha1.GetJobRunLogsStreamRequest", + "description": "", + "hasExtensions": false, + "hasFields": true, + "hasOneofs": true, + "extensions": [], + "fields": [ + { + "name": "job_run_id", + "description": "", + "label": "", + "type": "string", + "longType": "string", + "fullType": "string", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "account_id", + "description": "", + "label": "", + "type": "string", + "longType": "string", + "fullType": "string", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "window", + "description": "", + "label": "", + "type": "LogWindow", + "longType": "LogWindow", + "fullType": "mgmt.v1alpha1.LogWindow", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "should_tail", + "description": "", + "label": "", + "type": "bool", + "longType": "bool", + "fullType": "bool", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "max_log_lines", + "description": "", + "label": "optional", + "type": "int64", + "longType": "int64", + "fullType": "int64", + "ismap": false, + "isoneof": true, + "oneofdecl": "_max_log_lines", + "defaultValue": "" + } + ] + }, + { + "name": "GetJobRunLogsStreamResponse", + "longName": "GetJobRunLogsStreamResponse", + "fullName": "mgmt.v1alpha1.GetJobRunLogsStreamResponse", + "description": "", + "hasExtensions": false, + "hasFields": true, + "hasOneofs": false, + "extensions": [], + "fields": [ + { + "name": "log_line", + "description": "", + "label": "", + "type": "string", + "longType": "string", + "fullType": "string", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + } + ] + }, { "name": "GetJobRunRequest", "longName": "GetJobRunRequest", @@ -8524,6 +8648,18 @@ "responseLongType": "TerminateJobRunResponse", "responseFullType": "mgmt.v1alpha1.TerminateJobRunResponse", "responseStreaming": false + }, + { + "name": "GetJobRunLogsStream", + "description": "", + "requestType": "GetJobRunLogsStreamRequest", + "requestLongType": "GetJobRunLogsStreamRequest", + "requestFullType": "mgmt.v1alpha1.GetJobRunLogsStreamRequest", + "requestStreaming": false, + "responseType": "GetJobRunLogsStreamResponse", + "responseLongType": "GetJobRunLogsStreamResponse", + "responseFullType": "mgmt.v1alpha1.GetJobRunLogsStreamResponse", + "responseStreaming": true } ] } diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogs.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogs.tsx new file mode 100644 index 0000000000..f114e62108 --- /dev/null +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogs.tsx @@ -0,0 +1,120 @@ +import SkeletonTable from '@/components/skeleton/SkeletonTable'; +import { Alert, AlertTitle } from '@/components/ui/alert'; +import { Button } from '@/components/ui/button'; +import { + refreshLogsWhenRunNotComplete, + useGetJobRunLogs, +} from '@/libs/hooks/useGetJobRunLogs'; +import { ReloadIcon } from '@radix-ui/react-icons'; +import { ReactElement, useEffect, useRef, useState } from 'react'; +import AutoSizer from 'react-virtualized-auto-sizer'; +import { VariableSizeList as List } from 'react-window'; + +interface JobRunLogsProps { + accountId: string; + runId: string; +} + +export default function JobRunLogs({ + accountId, + runId, +}: JobRunLogsProps): ReactElement { + const { + data: logsData, + isLoading: isLogsLoading, + isValidating: isLogsValidating, + mutate: logsMutate, + error: logsError, + } = useGetJobRunLogs(runId, accountId, { + refreshIntervalFn: refreshLogsWhenRunNotComplete, + }); + + const logs = logsData || []; + + const [windowWidth, setWindowWidth] = useState(window.innerWidth); + const listRef = useRef | null>(null); + + useEffect(() => { + function handleResize() { + setWindowWidth(window.innerWidth); + if (listRef.current) { + listRef.current.resetAfterIndex(0); + } + } + + window.addEventListener('resize', handleResize); + handleResize(); + return () => window.removeEventListener('resize', handleResize); + }, []); + + function onRefreshClick(): void { + logsMutate(); + } + + function getLogLineSize(index: number): number { + const log = logs[index]; + const maxLineWidth = windowWidth; + const estimatedLineWidth = log.length * 10; + const numberOfLines = Math.ceil(estimatedLineWidth / maxLineWidth) + 1; + const height = 5 + numberOfLines * 20; + return height; + } + + if (logsError) { + return ( + + {logsError.message} + + ); + } + + return ( +
+ {logs?.some((l) => l.includes('ERROR')) && ( + + {`Log Errors: check logs for errors`} + + )} +
+

Logs

+ +
+ {isLogsLoading ? ( + + ) : ( +
+ + {({ height, width }) => ( + logs[index]} + itemData={logs} + > + {({ index, style }) => { + return ( +

+ {logs[index]} +

+ ); + }} +
+ )} +
+
+ )} +
+ ); +} diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/page.tsx index 349b015044..fc3295af85 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/page.tsx @@ -23,12 +23,14 @@ import { refreshEventsWhenEventsIncomplete, useGetJobRunEvents, } from '@/libs/hooks/useGetJobRunEvents'; +import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { formatDateTime, getErrorMessage } from '@/util/util'; import { ArrowRightIcon, Cross2Icon, TrashIcon } from '@radix-ui/react-icons'; import { useRouter } from 'next/navigation'; import { ReactElement } from 'react'; import JobRunStatus from '../components/JobRunStatus'; import JobRunActivityTable from './components/JobRunActivityTable'; +import JobRunLogs from './components/JobRunLogs'; export default function Page({ params }: PageProps): ReactElement { const { account } = useAccount(); @@ -36,6 +38,8 @@ export default function Page({ params }: PageProps): ReactElement { const id = params?.id ?? ''; const router = useRouter(); const { toast } = useToast(); + const { data: systemAppConfigData, isLoading: isSystemAppConfigDataLoading } = + useGetSystemAppConfig(); const { data, isLoading, mutate } = useGetJobRun(id, accountId, { refreshIntervalFn: refreshWhenJobRunning, }); @@ -221,6 +225,12 @@ export default function Page({ params }: PageProps): ReactElement { } })} + {!isSystemAppConfigDataLoading && + systemAppConfigData?.isKubernetes && ( +
+ +
+ )}

Activity

diff --git a/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts b/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts new file mode 100644 index 0000000000..8f036912b9 --- /dev/null +++ b/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts @@ -0,0 +1,42 @@ +import { withNeosyncContext } from '@/api-only/neosync-context'; +import { RequestContext } from '@/shared'; +import { GetJobRunLogsStreamRequest, LogWindow } from '@neosync/sdk'; +import { NextRequest, NextResponse } from 'next/server'; + +export async function GET( + req: NextRequest, + { params }: RequestContext +): Promise { + return withNeosyncContext(async (ctx) => { + const response = ctx.client.jobs.getJobRunLogsStream( + new GetJobRunLogsStreamRequest({ + jobRunId: params.id, + accountId: params.accountId, + window: getWindow('1d'), + shouldTail: false, + maxLogLines: BigInt('1000'), + }) + ); + const logs: string[] = []; + for await (const logRes of response) { + logs.push(logRes.logLine); + } + return logs; + })(req); +} + +function getWindow(window?: string): LogWindow { + if (!window) { + return LogWindow.NO_TIME_UNSPECIFIED; + } + if (window === '15m' || window === '15min') { + return LogWindow.FIFTEEN_MIN; + } + if (window === '1h') { + return LogWindow.ONE_HOUR; + } + if (window === '1d') { + return LogWindow.ONE_DAY; + } + return LogWindow.NO_TIME_UNSPECIFIED; +} diff --git a/frontend/apps/web/app/api/config/config.ts b/frontend/apps/web/app/api/config/config.ts index 811044f39f..487fd84bb4 100644 --- a/frontend/apps/web/app/api/config/config.ts +++ b/frontend/apps/web/app/api/config/config.ts @@ -18,5 +18,6 @@ export function getSystemAppConfig(): SystemAppConfig { key: process.env.POSTHOG_KEY, }, isNeosyncCloud: process.env.NEOSYNC_CLOUD === 'true', + isKubernetes: process.env.KUBERNETES_ENABLED === 'true', }; } diff --git a/frontend/apps/web/app/config/app-config.ts b/frontend/apps/web/app/config/app-config.ts index f92548fa88..ac3865b467 100644 --- a/frontend/apps/web/app/config/app-config.ts +++ b/frontend/apps/web/app/config/app-config.ts @@ -3,6 +3,7 @@ export interface SystemAppConfig { publicAppBaseUrl: string; posthog: PosthogConfig; isNeosyncCloud: boolean; + isKubernetes: boolean; } interface PosthogConfig { diff --git a/frontend/apps/web/charts/app/templates/app-env-vars.yaml b/frontend/apps/web/charts/app/templates/app-env-vars.yaml index 751ea4d7ac..aa62d1b836 100644 --- a/frontend/apps/web/charts/app/templates/app-env-vars.yaml +++ b/frontend/apps/web/charts/app/templates/app-env-vars.yaml @@ -81,3 +81,5 @@ stringData: {{- end }} NEOSYNC_CLOUD: {{ .Values.neosyncCloud.enabled | default "false" | quote }} + + KUBERNETES_ENABLED: {{ .Values.kubernetes.enabled | default "false" | quote }} diff --git a/frontend/apps/web/charts/app/values.yaml b/frontend/apps/web/charts/app/values.yaml index e789a3cb80..d3df66367f 100644 --- a/frontend/apps/web/charts/app/values.yaml +++ b/frontend/apps/web/charts/app/values.yaml @@ -65,3 +65,6 @@ nodeSelector: {} neosyncCloud: enabled: false + +kubernetes: + enabled: false diff --git a/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts b/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts new file mode 100644 index 0000000000..bf00012186 --- /dev/null +++ b/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts @@ -0,0 +1,34 @@ +import { JsonValue } from '@bufbuild/protobuf'; +import { getRefreshIntervalFn } from '../utils'; +import { HookReply } from './types'; +import { useNucleusAuthenticatedFetch } from './useNucleusAuthenticatedFetch'; + +interface GetJobRunLogsOptions { + refreshIntervalFn?(data: JsonValue): number; +} + +export function useGetJobRunLogs( + runId: string, + accountId: string, + opts: GetJobRunLogsOptions = {} +): HookReply { + const { refreshIntervalFn } = opts; + return useNucleusAuthenticatedFetch( + `/api/accounts/${accountId}/runs/${runId}/logs`, + !!runId || !!accountId, + { + refreshInterval: getRefreshIntervalFn(refreshIntervalFn), + }, + (data) => data + ); +} + +const TEN_SECONDS = 5 * 1000; + +export function refreshLogsWhenRunNotComplete(data: string[]): number { + return data.some( + (l) => l.includes('context canceled') || l.includes('workflow completed') + ) + ? 0 + : TEN_SECONDS; +} diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts index 675aedf458..a58d805203 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { CancelJobRunRequest, CancelJobRunResponse, CreateJobDestinationConnectionsRequest, CreateJobDestinationConnectionsResponse, CreateJobRequest, CreateJobResponse, CreateJobRunRequest, CreateJobRunResponse, DeleteJobDestinationConnectionRequest, DeleteJobDestinationConnectionResponse, DeleteJobRequest, DeleteJobResponse, DeleteJobRunRequest, DeleteJobRunResponse, GetJobNextRunsRequest, GetJobNextRunsResponse, GetJobRecentRunsRequest, GetJobRecentRunsResponse, GetJobRequest, GetJobResponse, GetJobRunEventsRequest, GetJobRunEventsResponse, GetJobRunRequest, GetJobRunResponse, GetJobRunsRequest, GetJobRunsResponse, GetJobsRequest, GetJobsResponse, GetJobStatusesRequest, GetJobStatusesResponse, GetJobStatusRequest, GetJobStatusResponse, IsJobNameAvailableRequest, IsJobNameAvailableResponse, PauseJobRequest, PauseJobResponse, SetJobSourceSqlConnectionSubsetsRequest, SetJobSourceSqlConnectionSubsetsResponse, TerminateJobRunRequest, TerminateJobRunResponse, UpdateJobDestinationConnectionRequest, UpdateJobDestinationConnectionResponse, UpdateJobScheduleRequest, UpdateJobScheduleResponse, UpdateJobSourceConnectionRequest, UpdateJobSourceConnectionResponse } from "./job_pb.js"; +import { CancelJobRunRequest, CancelJobRunResponse, CreateJobDestinationConnectionsRequest, CreateJobDestinationConnectionsResponse, CreateJobRequest, CreateJobResponse, CreateJobRunRequest, CreateJobRunResponse, DeleteJobDestinationConnectionRequest, DeleteJobDestinationConnectionResponse, DeleteJobRequest, DeleteJobResponse, DeleteJobRunRequest, DeleteJobRunResponse, GetJobNextRunsRequest, GetJobNextRunsResponse, GetJobRecentRunsRequest, GetJobRecentRunsResponse, GetJobRequest, GetJobResponse, GetJobRunEventsRequest, GetJobRunEventsResponse, GetJobRunLogsStreamRequest, GetJobRunLogsStreamResponse, GetJobRunRequest, GetJobRunResponse, GetJobRunsRequest, GetJobRunsResponse, GetJobsRequest, GetJobsResponse, GetJobStatusesRequest, GetJobStatusesResponse, GetJobStatusRequest, GetJobStatusResponse, IsJobNameAvailableRequest, IsJobNameAvailableResponse, PauseJobRequest, PauseJobResponse, SetJobSourceSqlConnectionSubsetsRequest, SetJobSourceSqlConnectionSubsetsResponse, TerminateJobRunRequest, TerminateJobRunResponse, UpdateJobDestinationConnectionRequest, UpdateJobDestinationConnectionResponse, UpdateJobScheduleRequest, UpdateJobScheduleResponse, UpdateJobSourceConnectionRequest, UpdateJobSourceConnectionResponse } from "./job_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -219,6 +219,15 @@ export const JobService = { O: TerminateJobRunResponse, kind: MethodKind.Unary, }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.GetJobRunLogsStream + */ + getJobRunLogsStream: { + name: "GetJobRunLogsStream", + I: GetJobRunLogsStreamRequest, + O: GetJobRunLogsStreamResponse, + kind: MethodKind.ServerStreaming, + }, } } as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts index 0e0ecc1fad..c1cbd449fe 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts @@ -133,6 +133,38 @@ proto3.util.setEnumType(JobRunStatus, "mgmt.v1alpha1.JobRunStatus", [ { no: 7, name: "JOB_RUN_STATUS_FAILED" }, ]); +/** + * @generated from enum mgmt.v1alpha1.LogWindow + */ +export enum LogWindow { + /** + * @generated from enum value: LOG_WINDOW_NO_TIME_UNSPECIFIED = 0; + */ + NO_TIME_UNSPECIFIED = 0, + + /** + * @generated from enum value: LOG_WINDOW_FIFTEEN_MIN = 1; + */ + FIFTEEN_MIN = 1, + + /** + * @generated from enum value: LOG_WINDOW_ONE_HOUR = 2; + */ + ONE_HOUR = 2, + + /** + * @generated from enum value: LOG_WINDOW_ONE_DAY = 3; + */ + ONE_DAY = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(LogWindow) +proto3.util.setEnumType(LogWindow, "mgmt.v1alpha1.LogWindow", [ + { no: 0, name: "LOG_WINDOW_NO_TIME_UNSPECIFIED" }, + { no: 1, name: "LOG_WINDOW_FIFTEEN_MIN" }, + { no: 2, name: "LOG_WINDOW_ONE_HOUR" }, + { no: 3, name: "LOG_WINDOW_ONE_DAY" }, +]); + /** * @generated from message mgmt.v1alpha1.GetJobsRequest */ @@ -3685,3 +3717,101 @@ export class TerminateJobRunResponse extends Message { } } +/** + * @generated from message mgmt.v1alpha1.GetJobRunLogsStreamRequest + */ +export class GetJobRunLogsStreamRequest extends Message { + /** + * @generated from field: string job_run_id = 1; + */ + jobRunId = ""; + + /** + * @generated from field: string account_id = 2; + */ + accountId = ""; + + /** + * @generated from field: mgmt.v1alpha1.LogWindow window = 3; + */ + window = LogWindow.NO_TIME_UNSPECIFIED; + + /** + * @generated from field: bool should_tail = 4; + */ + shouldTail = false; + + /** + * @generated from field: optional int64 max_log_lines = 5; + */ + maxLogLines?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "mgmt.v1alpha1.GetJobRunLogsStreamRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "window", kind: "enum", T: proto3.getEnumType(LogWindow) }, + { no: 4, name: "should_tail", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "max_log_lines", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunLogsStreamRequest { + return new GetJobRunLogsStreamRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunLogsStreamRequest { + return new GetJobRunLogsStreamRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetJobRunLogsStreamRequest { + return new GetJobRunLogsStreamRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetJobRunLogsStreamRequest | PlainMessage | undefined, b: GetJobRunLogsStreamRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetJobRunLogsStreamRequest, a, b); + } +} + +/** + * @generated from message mgmt.v1alpha1.GetJobRunLogsStreamResponse + */ +export class GetJobRunLogsStreamResponse extends Message { + /** + * @generated from field: string log_line = 1; + */ + logLine = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "mgmt.v1alpha1.GetJobRunLogsStreamResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "log_line", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunLogsStreamResponse { + return new GetJobRunLogsStreamResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunLogsStreamResponse { + return new GetJobRunLogsStreamResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetJobRunLogsStreamResponse { + return new GetJobRunLogsStreamResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetJobRunLogsStreamResponse | PlainMessage | undefined, b: GetJobRunLogsStreamResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetJobRunLogsStreamResponse, a, b); + } +} + diff --git a/worker/go.mod b/worker/go.mod index 7711ff360d..719c4ecf1b 100644 --- a/worker/go.mod +++ b/worker/go.mod @@ -164,6 +164,7 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olivere/elastic/v7 v7.0.32 // indirect + github.com/onsi/gomega v1.29.0 // indirect github.com/paulmach/orb v0.10.0 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect @@ -222,14 +223,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.13.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.16.1 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect diff --git a/worker/go.sum b/worker/go.sum index ec7c9404c3..2461449c99 100644 --- a/worker/go.sum +++ b/worker/go.sum @@ -556,8 +556,7 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olivere/elastic/v7 v7.0.32 h1:R7CXvbu8Eq+WlsLgxmKVKPox0oOwAE/2T9Si5BnvK6E= github.com/olivere/elastic/v7 v7.0.32/go.mod h1:c7PVmLe3Fxq77PIfY/bZmxY/TAamBhCzZ8xDOE09a9k= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= @@ -819,8 +818,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -972,8 +970,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/worker/pkg/workflows/datasync/activities/activities.go b/worker/pkg/workflows/datasync/activities/activities.go index e67996d823..69bc1eec5b 100644 --- a/worker/pkg/workflows/datasync/activities/activities.go +++ b/worker/pkg/workflows/datasync/activities/activities.go @@ -401,12 +401,16 @@ type SyncMetadata struct { Schema string Table string } +type WorkflowMetadata struct { + WorkflowId string + RunId string +} type SyncRequest struct { BenthosConfig string } type SyncResponse struct{} -func (a *Activities) Sync(ctx context.Context, req *SyncRequest, metadata *SyncMetadata) (*SyncResponse, error) { +func (a *Activities) Sync(ctx context.Context, req *SyncRequest, metadata *SyncMetadata, workflowMetadata *WorkflowMetadata) (*SyncResponse, error) { logger := activity.GetLogger(ctx) var benthosStream *service.Stream go func() { @@ -434,6 +438,8 @@ func (a *Activities) Sync(ctx context.Context, req *SyncRequest, metadata *SyncM streambldr.SetLogger(benthoslogger.With( "metadata", metadata, "benthos", "true", + "WorkflowID", workflowMetadata.WorkflowId, + "RunID", workflowMetadata.RunId, )) err := streambldr.SetYAML(req.BenthosConfig) diff --git a/worker/pkg/workflows/datasync/activities/activities_test.go b/worker/pkg/workflows/datasync/activities/activities_test.go index 8a277986b0..a5737fc370 100644 --- a/worker/pkg/workflows/datasync/activities/activities_test.go +++ b/worker/pkg/workflows/datasync/activities/activities_test.go @@ -151,7 +151,7 @@ output: stdout: codec: lines `), - }, &SyncMetadata{Schema: "public", Table: "test"}) + }, &SyncMetadata{Schema: "public", Table: "test"}, &WorkflowMetadata{WorkflowId: "workflow-id", RunId: "run-id"}) require.NoError(t, err) res := &SyncResponse{} err = val.Get(res) @@ -182,7 +182,7 @@ output: stdout: codec: lines `), - }, &SyncMetadata{Schema: "public", Table: "test"}) + }, &SyncMetadata{Schema: "public", Table: "test"}, &WorkflowMetadata{WorkflowId: "workflow-id", RunId: "RunId"}) require.NoError(t, err) res := &SyncResponse{} err = val.Get(res) @@ -228,7 +228,7 @@ output: path: %s codec: lines `, tmpFile.Name())), - }, &SyncMetadata{Schema: "public", Table: "test"}) + }, &SyncMetadata{Schema: "public", Table: "test"}, &WorkflowMetadata{WorkflowId: "workflow-id", RunId: "run-id"}) assert.NoError(t, err) res := &SyncResponse{} err = val.Get(res) @@ -286,7 +286,7 @@ output: path: %s codec: lines `, tmpFile.Name())), - }, &SyncMetadata{Schema: "public", Table: "test"}) + }, &SyncMetadata{Schema: "public", Table: "test"}, &WorkflowMetadata{WorkflowId: "workflow-id", RunId: "run-id"}) assert.NoError(t, err) res := &SyncResponse{} err = val.Get(res) diff --git a/worker/pkg/workflows/datasync/workflow/workflow.go b/worker/pkg/workflows/datasync/workflow/workflow.go index a404a8cec0..64b52f9761 100644 --- a/worker/pkg/workflows/datasync/workflow/workflow.go +++ b/worker/pkg/workflows/datasync/workflow/workflow.go @@ -34,6 +34,11 @@ func Workflow(wfctx workflow.Context, req *WorkflowRequest) (*WorkflowResponse, logger := workflow.GetLogger(ctx) _ = logger + workflowMetadata := &datasync_activities.WorkflowMetadata{ + WorkflowId: wfinfo.WorkflowExecution.ID, + RunId: wfinfo.WorkflowExecution.RunID, + } + var wfActivites *datasync_activities.Activities var bcResp *datasync_activities.GenerateBenthosConfigsResponse err := workflow.ExecuteActivity(ctx, wfActivites.GenerateBenthosConfigs, &datasync_activities.GenerateBenthosConfigsRequest{ @@ -72,7 +77,7 @@ func Workflow(wfctx workflow.Context, req *WorkflowRequest) (*WorkflowResponse, } for _, bc := range splitConfigs.Root { bc := bc - future := invokeSync(bc, childctx, started, completed, logger) + future := invokeSync(bc, childctx, started, completed, workflowMetadata, logger) workselector.AddFuture(future, func(f workflow.Future) { logger.Info("config sync completed", "name", bc.Name) var result datasync_activities.SyncResponse @@ -103,7 +108,7 @@ func Workflow(wfctx workflow.Context, req *WorkflowRequest) (*WorkflowResponse, continue } - future := invokeSync(bc, childctx, started, completed, logger) + future := invokeSync(bc, childctx, started, completed, workflowMetadata, logger) workselector.AddFuture(future, func(f workflow.Future) { logger.Info("config sync completed", "name", bc.Name) var result datasync_activities.SyncResponse @@ -133,6 +138,7 @@ func invokeSync( ctx workflow.Context, started map[string]struct{}, completed map[string][]string, + workflowMetadata *datasync_activities.WorkflowMetadata, logger log.Logger, ) workflow.Future { metadata := getSyncMetadata(config) @@ -151,7 +157,7 @@ func invokeSync( err = workflow.ExecuteActivity( ctx, wfActivites.Sync, - &datasync_activities.SyncRequest{BenthosConfig: string(configbits)}, metadata).Get(ctx, &result) + &datasync_activities.SyncRequest{BenthosConfig: string(configbits)}, metadata, workflowMetadata).Get(ctx, &result) tn := fmt.Sprintf("%s.%s", config.TableSchema, config.TableName) _, ok := completed[tn] if ok { diff --git a/worker/pkg/workflows/datasync/workflow/workflow_test.go b/worker/pkg/workflows/datasync/workflow/workflow_test.go index 3a73d25051..a95421dd0f 100644 --- a/worker/pkg/workflows/datasync/workflow/workflow_test.go +++ b/worker/pkg/workflows/datasync/workflow/workflow_test.go @@ -74,7 +74,7 @@ func Test_Workflow_Succeeds_SingleSync(t *testing.T) { }}, nil) env.OnActivity(activities.RunSqlInitTableStatements, mock.Anything, mock.Anything). Return(&datasync_activities.RunSqlInitTableStatementsResponse{}, nil) - env.OnActivity(activities.Sync, mock.Anything, mock.Anything, mock.Anything).Return(&datasync_activities.SyncResponse{}, nil) + env.OnActivity(activities.Sync, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&datasync_activities.SyncResponse{}, nil) env.ExecuteWorkflow(Workflow, &WorkflowRequest{}) @@ -139,15 +139,15 @@ func Test_Workflow_Follows_Synchronous_DependentFlow(t *testing.T) { Return(&datasync_activities.RunSqlInitTableStatementsResponse{}, nil) count := 0 env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "users"}). - Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata) (*datasync_activities.SyncResponse, error) { + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "users"}, mock.Anything). + Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata, workflowMetadata *datasync_activities.WorkflowMetadata) (*datasync_activities.SyncResponse, error) { assert.Equal(t, count, 0) count += 1 return &datasync_activities.SyncResponse{}, nil }) env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "foo"}). - Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata) (*datasync_activities.SyncResponse, error) { + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "foo"}, mock.Anything). + Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata, workflowMetadata *datasync_activities.WorkflowMetadata) (*datasync_activities.SyncResponse, error) { assert.Equal(t, count, 1) count += 1 return &datasync_activities.SyncResponse{}, nil @@ -235,20 +235,20 @@ func Test_Workflow_Follows_Multiple_Dependents(t *testing.T) { Return(&datasync_activities.RunSqlInitTableStatementsResponse{}, nil) counter := atomic.NewInt32(0) env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "users"}). - Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata) (*datasync_activities.SyncResponse, error) { + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "users"}, mock.Anything). + Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata, workflowMetadata *datasync_activities.WorkflowMetadata) (*datasync_activities.SyncResponse, error) { counter.Add(1) return &datasync_activities.SyncResponse{}, nil }) env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "accounts"}). - Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata) (*datasync_activities.SyncResponse, error) { + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "accounts"}, mock.Anything). + Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata, workflowMetadata *datasync_activities.WorkflowMetadata) (*datasync_activities.SyncResponse, error) { counter.Add(1) return &datasync_activities.SyncResponse{}, nil }) env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "foo"}). - Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata) (*datasync_activities.SyncResponse, error) { + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "foo"}, mock.Anything). + Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata, workflowMetadata *datasync_activities.WorkflowMetadata) (*datasync_activities.SyncResponse, error) { assert.Equal(t, counter.Load(), int32(2)) counter.Add(1) return &datasync_activities.SyncResponse{}, nil @@ -336,12 +336,12 @@ func Test_Workflow_Halts_Activities_OnError(t *testing.T) { Return(&datasync_activities.RunSqlInitTableStatementsResponse{}, nil) env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "users"}). - Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata) (*datasync_activities.SyncResponse, error) { + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "users"}, mock.Anything). + Return(func(ctx context.Context, req *datasync_activities.SyncRequest, metadata *datasync_activities.SyncMetadata, workflowMetadata *datasync_activities.WorkflowMetadata) (*datasync_activities.SyncResponse, error) { return &datasync_activities.SyncResponse{}, nil }) env. - OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "accounts"}). + OnActivity(activities.Sync, mock.Anything, mock.Anything, &datasync_activities.SyncMetadata{Schema: "public", Table: "accounts"}, mock.Anything). Return(nil, errors.New("TestFailure")) env.ExecuteWorkflow(Workflow, &WorkflowRequest{})