From 8c8a682bb936613cd0026294dd605390f2f686ea Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 23 Jan 2024 11:37:21 -0800 Subject: [PATCH 1/7] Update flyteAgent protos Signed-off-by: Haytham Abuelfutuh --- flyteidl/protos/flyteidl/admin/agent.proto | 95 +++++++++++++------- flyteidl/protos/flyteidl/service/agent.proto | 43 +++++++-- 2 files changed, 100 insertions(+), 38 deletions(-) diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index 601e8b61e6..3ffbe90db1 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -11,14 +11,9 @@ import "flyteidl/core/metrics.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; - -// The state of the execution is used to control its visibility in the UI/CLI. -enum State { - RETRYABLE_FAILURE = 0; - PERMANENT_FAILURE = 1; - PENDING = 2; - RUNNING = 3; - SUCCEEDED = 4; +message TaskOverrides { + core.Resources resources = 1; + core.ExtendedResources extended_resources = 2; } // Represents a subset of runtime task execution metadata that are relevant to external plugins. @@ -35,65 +30,94 @@ message TaskExecutionMetadata { string k8s_service_account = 5; // Environment variables attached to the task execution map environment_variables = 6; + int32 max_attempts = 7; + bool interruptible = 8; + int32 interruptible_failure_threshold = 9; + TaskOverrides overrides = 10; } // Represents a request structure to create task. message CreateTaskRequest { - // The inputs required to start the execution. All required inputs must be - // included in this map. If not required and not provided, defaults apply. - // +optional - core.LiteralMap inputs = 1; + oneof part { + CreateRequestHeader header = 1; + // The inputs required to start the execution. All required inputs must be + // included in this map. If not required and not provided, defaults apply. + // +optional + core.LiteralMap inputs = 2; + } +} + +message CreateRequestHeader { // Template of the task that encapsulates all the metadata of the task. - core.TaskTemplate template = 2; + core.TaskTemplate template = 1; // Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring) - string output_prefix = 3; + string output_prefix = 2; // subset of runtime task execution metadata. - TaskExecutionMetadata task_execution_metadata = 4; + TaskExecutionMetadata task_execution_metadata = 3; + // MaxDatasetSizeBytes is the maximum size of the dataset that can be generated by the task. + int64 max_dataset_size_bytes = 4; } // Represents a create response structure. message CreateTaskResponse { + // ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + bytes resource_meta = 1; +} + +message ExecuteTaskSyncRequest { + oneof part { + CreateRequestHeader header = 1; + core.LiteralMap inputs = 2; + } +} + +message ExecuteTaskSyncResponseHeader { + Resource resource = 1; +} + +message ExecuteTaskSyncResponse { // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). // Resource is for synchronous task execution. oneof res { - bytes resource_meta = 1; - Resource resource = 2; + ExecuteTaskSyncResponseHeader header = 1; + core.LiteralMap outputs = 2; } } + // A message used to fetch a job resource from flyte agent server. message GetTaskRequest { // A predefined yet extensible Task type identifier. - string task_type = 1; + TaskType task_type = 1; // Metadata about the resource to be pass to the agent. bytes resource_meta = 2; } // Response to get an individual task resource. message GetTaskResponse { - Resource resource = 1; + oneof part { + GetTaskResponseHeader header = 1; + core.LiteralMap outputs = 2; + } +} - // log information for the task execution - repeated core.TaskLog log_links = 2; +message GetTaskResponseHeader { + Resource resource = 1; } message Resource { // The state of the execution is used to control its visibility in the UI/CLI. - State state = 1; - // The outputs of the execution. It's typically used by sql task. Agent service will create a - // Structured dataset pointing to the query result table. - // +optional - core.LiteralMap outputs = 2; + core.TaskExecution.Phase phase = 1; // A descriptive message for the current state. e.g. waiting for cluster. - string message = 3; + string message = 2; // log information for the task execution. - repeated core.TaskLog log_links = 4; + repeated core.TaskLog log_links = 3; } // A message used to delete a task. message DeleteTaskRequest { // A predefined yet extensible Task type identifier. - string task_type = 1; + TaskType task_type = 1; // Metadata about the resource to be pass to the agent. bytes resource_meta = 2; } @@ -107,7 +131,14 @@ message Agent { string name = 1; // SupportedTaskTypes are the types of the tasks that the agent can handle. - repeated string supported_task_types = 2; + repeated TaskType supported_task_types = 2; +} + +message TaskType { + // The name of the task type. + string name = 1; + // The version of the task type. + int32 version = 2; } // A request to get an agent. @@ -132,7 +163,7 @@ message ListAgentsResponse { // A request to get the metrics from a task execution. message GetTaskMetricsRequest { // A predefined yet extensible Task type identifier. - string task_type = 1; + TaskType task_type = 1; // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). bytes resource_meta = 2; // The metrics to query. If empty, will return a default set of metrics. @@ -155,7 +186,7 @@ message GetTaskMetricsResponse { // A request to get the log from a task execution. message GetTaskLogsRequest { // A predefined yet extensible Task type identifier. - string task_type = 1; + TaskType task_type = 1; // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). bytes resource_meta = 2; // Number of lines to return. diff --git a/flyteidl/protos/flyteidl/service/agent.proto b/flyteidl/protos/flyteidl/service/agent.proto index 7538c0b819..2a9db3b11e 100644 --- a/flyteidl/protos/flyteidl/service/agent.proto +++ b/flyteidl/protos/flyteidl/service/agent.proto @@ -8,22 +8,53 @@ import "flyteidl/admin/agent.proto"; // AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. service AsyncAgentService { - // Send a task create request to the agent server. - rpc CreateTask (flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){}; + // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + rpc ExecuteTaskSync (stream flyteidl.admin.ExecuteTaskSyncRequest) returns (stream flyteidl.admin.ExecuteTaskSyncResponse){ + option (google.api.http) = { + post: "/api/v1/agent/task/stream" + body: "*" + }; + }; + + // CreateTask sends a task create request to the agent service. + rpc CreateTask (stream flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){ + option (google.api.http) = { + post: "/api/v1/agent/task" + body: "*" + }; + }; + // Get job status. - rpc GetTask (flyteidl.admin.GetTaskRequest) returns (flyteidl.admin.GetTaskResponse){}; + rpc GetTask (flyteidl.admin.GetTaskRequest) returns (stream flyteidl.admin.GetTaskResponse){ + option (google.api.http) = { + get: "/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}" + }; + }; + // Delete the task resource. - rpc DeleteTask (flyteidl.admin.DeleteTaskRequest) returns (flyteidl.admin.DeleteTaskResponse){}; + rpc DeleteTask (flyteidl.admin.DeleteTaskRequest) returns (flyteidl.admin.DeleteTaskResponse){ + option (google.api.http) = { + delete: "/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}" + }; + }; // GetTaskMetrics returns one or more task execution metrics, if available. // // Errors include // * OutOfRange if metrics are not available for the specified task time range // * various other errors - rpc GetTaskMetrics(flyteidl.admin.GetTaskMetricsRequest) returns (flyteidl.admin.GetTaskMetricsResponse){}; + rpc GetTaskMetrics(flyteidl.admin.GetTaskMetricsRequest) returns (flyteidl.admin.GetTaskMetricsResponse){ + option (google.api.http) = { + get: "/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}" + }; + }; // GetTaskLogs returns task execution logs, if available. - rpc GetTaskLogs(flyteidl.admin.GetTaskLogsRequest) returns (flyteidl.admin.GetTaskLogsResponse){}; + rpc GetTaskLogs(flyteidl.admin.GetTaskLogsRequest) returns (stream flyteidl.admin.GetTaskLogsResponse){ + option (google.api.http) = { + get: "/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}" + }; + }; } // AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. From 5e79773f9bc936f298f894a8fe0bb9dd0ce4255d Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Wed, 24 Jan 2024 12:49:22 -0800 Subject: [PATCH 2/7] More updates Signed-off-by: Haytham Abuelfutuh --- flyteidl/protos/flyteidl/admin/agent.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index 5c862fbc8d..a5b9c242a2 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -20,6 +20,7 @@ enum State { SUCCEEDED = 4; } +// TaskOverrides is a set of overrides that can be applied to a task. message TaskOverrides { core.Resources resources = 1; core.ExtendedResources extended_resources = 2; From 8317a3d5f7f9e277aa76ba2082ee5f2e4777b6cf Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Wed, 24 Jan 2024 14:00:35 -0800 Subject: [PATCH 3/7] Log streaming Signed-off-by: Haytham Abuelfutuh --- flyteidl/protos/flyteidl/admin/agent.proto | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index a5b9c242a2..d8b59270ec 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -212,11 +212,21 @@ message GetTaskLogsRequest { string token = 4; } -// A response containing the logs for a task execution. -message GetTaskLogsResponse { - // The execution log results. - repeated string results = 1; +message GetTaskLogsResponseHeader { // In the case of multiple pages of results, the server-provided token can be used to fetch the next page // in a query. If there are no more results, this value will be empty. - string token = 2; + string token = 1; +} + +message GetTaskLogsResponseBody { + // The execution log results. + repeated string results = 1; +} + +// A response containing the logs for a task execution. +message GetTaskLogsResponse { + oneof part { + GetTaskLogsResponseHeader header = 1; + GetTaskLogsResponseBody body = 2; + } } \ No newline at end of file From 94bff4d081675279a7ca23e29376e2df7207c428 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Tue, 30 Jan 2024 13:01:17 -0800 Subject: [PATCH 4/7] update idl Signed-off-by: Kevin Su --- flyteidl/protos/flyteidl/admin/agent.proto | 48 ++++++++++------------ 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index d8b59270ec..07360af1ab 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -5,6 +5,7 @@ option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin import "flyteidl/core/literals.proto"; import "flyteidl/core/tasks.proto"; +import "flyteidl/core/workflow.proto"; import "flyteidl/core/identifier.proto"; import "flyteidl/core/execution.proto"; import "flyteidl/core/metrics.proto"; @@ -20,12 +21,6 @@ enum State { SUCCEEDED = 4; } -// TaskOverrides is a set of overrides that can be applied to a task. -message TaskOverrides { - core.Resources resources = 1; - core.ExtendedResources extended_resources = 2; -} - // Represents a subset of runtime task execution metadata that are relevant to external plugins. message TaskExecutionMetadata { // ID of the task execution @@ -43,18 +38,27 @@ message TaskExecutionMetadata { int32 max_attempts = 7; bool interruptible = 8; int32 interruptible_failure_threshold = 9; - TaskOverrides overrides = 10; + core.TaskNodeOverrides overrides = 10; } // Represents a request structure to create task. message CreateTaskRequest { - oneof part { - CreateRequestHeader header = 1; - // The inputs required to start the execution. All required inputs must be - // included in this map. If not required and not provided, defaults apply. - // +optional - core.LiteralMap inputs = 2; - } + // The inputs required to start the execution. All required inputs must be + // included in this map. If not required and not provided, defaults apply. + // +optional + core.LiteralMap inputs = 1; + // Template of the task that encapsulates all the metadata of the task. + core.TaskTemplate template = 2; + // Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring) + string output_prefix = 3; + // subset of runtime task execution metadata. + TaskExecutionMetadata task_execution_metadata = 4; +} + +// Represents a create response structure. +message CreateTaskResponse { + // ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + bytes resource_meta = 1; } message CreateRequestHeader { @@ -68,11 +72,6 @@ message CreateRequestHeader { int64 max_dataset_size_bytes = 4; } -// Represents a create response structure. -message CreateTaskResponse { - // ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata). - bytes resource_meta = 1; -} message ExecuteTaskSyncRequest { oneof part { @@ -94,7 +93,6 @@ message ExecuteTaskSyncResponse { } } - // A message used to fetch a job resource from flyte agent server. message GetTaskRequest { // A predefined yet extensible Task type identifier. @@ -105,14 +103,10 @@ message GetTaskRequest { // Response to get an individual task resource. message GetTaskResponse { - oneof part { - GetTaskResponseHeader header = 1; - core.LiteralMap outputs = 2; - } -} - -message GetTaskResponseHeader { Resource resource = 1; + + // log information for the task execution + repeated core.TaskLog log_links = 2; } message Resource { From 6ee774cc8f67ea62cbeb9d03da8d65ad331308d3 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Tue, 6 Feb 2024 17:33:11 -0800 Subject: [PATCH 5/7] Generate code from proto Signed-off-by: Kevin Su --- .../go/admin/mocks/AsyncAgentServiceClient.go | 60 +- .../go/admin/mocks/AsyncAgentServiceServer.go | 59 +- .../AsyncAgentService_CreateTaskClient.go | 296 ++++ .../AsyncAgentService_CreateTaskServer.go | 258 +++ ...AsyncAgentService_ExecuteTaskSyncClient.go | 296 ++++ ...AsyncAgentService_ExecuteTaskSyncServer.go | 258 +++ .../mocks/AsyncAgentService_GetTaskClient.go | 264 +++ .../AsyncAgentService_GetTaskLogsClient.go | 264 +++ .../AsyncAgentService_GetTaskLogsServer.go | 217 +++ .../mocks/AsyncAgentService_GetTaskServer.go | 217 +++ flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts | 430 ++++- .../pb-es/flyteidl/service/agent_connect.ts | 17 +- flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go | 1365 ++++++++++++---- .../gen/pb-go/flyteidl/service/agent.pb.go | 200 ++- .../pb-go/flyteidl/service/agent_grpc.pb.go | 165 +- .../gateway/flyteidl/service/agent.pb.gw.go | 796 +++++++++ .../flyteidl/service/agent.swagger.json | 475 +++++- flyteidl/gen/pb-js/flyteidl.d.ts | 499 +++++- flyteidl/gen/pb-js/flyteidl.js | 1433 ++++++++++++++--- .../gen/pb_python/flyteidl/admin/agent_pb2.py | 101 +- .../pb_python/flyteidl/admin/agent_pb2.pyi | 101 +- .../pb_python/flyteidl/service/agent_pb2.py | 20 +- .../flyteidl/service/agent_pb2_grpc.py | 42 +- flyteidl/gen/pb_rust/flyteidl.admin.rs | 131 +- flyteidl/gen/pb_rust/flyteidl.core.rs | 386 ++--- flyteidl/protos/flyteidl/service/agent.proto | 4 +- 26 files changed, 7288 insertions(+), 1066 deletions(-) create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskClient.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskServer.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncClient.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncServer.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskClient.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsClient.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsServer.go create mode 100644 flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskServer.go diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go index f11ef1adfe..2eb8c79639 100644 --- a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go @@ -10,6 +10,8 @@ import ( grpc "google.golang.org/grpc" mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) // AsyncAgentServiceClient is an autogenerated mock type for the AsyncAgentServiceClient type @@ -113,6 +115,54 @@ func (_m *AsyncAgentServiceClient) DeleteTask(ctx context.Context, in *admin.Del return r0, r1 } +type AsyncAgentServiceClient_ExecuteTaskSync struct { + *mock.Call +} + +func (_m AsyncAgentServiceClient_ExecuteTaskSync) Return(_a0 service.AsyncAgentService_ExecuteTaskSyncClient, _a1 error) *AsyncAgentServiceClient_ExecuteTaskSync { + return &AsyncAgentServiceClient_ExecuteTaskSync{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentServiceClient) OnExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) *AsyncAgentServiceClient_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", ctx, opts) + return &AsyncAgentServiceClient_ExecuteTaskSync{Call: c_call} +} + +func (_m *AsyncAgentServiceClient) OnExecuteTaskSyncMatch(matchers ...interface{}) *AsyncAgentServiceClient_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", matchers...) + return &AsyncAgentServiceClient_ExecuteTaskSync{Call: c_call} +} + +// ExecuteTaskSync provides a mock function with given fields: ctx, opts +func (_m *AsyncAgentServiceClient) ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (service.AsyncAgentService_ExecuteTaskSyncClient, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 service.AsyncAgentService_ExecuteTaskSyncClient + if rf, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) service.AsyncAgentService_ExecuteTaskSyncClient); ok { + r0 = rf(ctx, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(service.AsyncAgentService_ExecuteTaskSyncClient) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, ...grpc.CallOption) error); ok { + r1 = rf(ctx, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AsyncAgentServiceClient_GetTask struct { *mock.Call } @@ -165,7 +215,7 @@ type AsyncAgentServiceClient_GetTaskLogs struct { *mock.Call } -func (_m AsyncAgentServiceClient_GetTaskLogs) Return(_a0 *admin.GetTaskLogsResponse, _a1 error) *AsyncAgentServiceClient_GetTaskLogs { +func (_m AsyncAgentServiceClient_GetTaskLogs) Return(_a0 service.AsyncAgentService_GetTaskLogsClient, _a1 error) *AsyncAgentServiceClient_GetTaskLogs { return &AsyncAgentServiceClient_GetTaskLogs{Call: _m.Call.Return(_a0, _a1)} } @@ -180,7 +230,7 @@ func (_m *AsyncAgentServiceClient) OnGetTaskLogsMatch(matchers ...interface{}) * } // GetTaskLogs provides a mock function with given fields: ctx, in, opts -func (_m *AsyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (*admin.GetTaskLogsResponse, error) { +func (_m *AsyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (service.AsyncAgentService_GetTaskLogsClient, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -190,12 +240,12 @@ func (_m *AsyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.Ge _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *admin.GetTaskLogsResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetTaskLogsRequest, ...grpc.CallOption) *admin.GetTaskLogsResponse); ok { + var r0 service.AsyncAgentService_GetTaskLogsClient + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetTaskLogsRequest, ...grpc.CallOption) service.AsyncAgentService_GetTaskLogsClient); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.GetTaskLogsResponse) + r0 = ret.Get(0).(service.AsyncAgentService_GetTaskLogsClient) } } diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go index 1803e286eb..7f3397fa5e 100644 --- a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go @@ -8,6 +8,8 @@ import ( admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) // AsyncAgentServiceServer is an autogenerated mock type for the AsyncAgentServiceServer type @@ -97,6 +99,38 @@ func (_m *AsyncAgentServiceServer) DeleteTask(_a0 context.Context, _a1 *admin.De return r0, r1 } +type AsyncAgentServiceServer_ExecuteTaskSync struct { + *mock.Call +} + +func (_m AsyncAgentServiceServer_ExecuteTaskSync) Return(_a0 error) *AsyncAgentServiceServer_ExecuteTaskSync { + return &AsyncAgentServiceServer_ExecuteTaskSync{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentServiceServer) OnExecuteTaskSync(_a0 service.AsyncAgentService_ExecuteTaskSyncServer) *AsyncAgentServiceServer_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", _a0) + return &AsyncAgentServiceServer_ExecuteTaskSync{Call: c_call} +} + +func (_m *AsyncAgentServiceServer) OnExecuteTaskSyncMatch(matchers ...interface{}) *AsyncAgentServiceServer_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", matchers...) + return &AsyncAgentServiceServer_ExecuteTaskSync{Call: c_call} +} + +// ExecuteTaskSync provides a mock function with given fields: _a0 +func (_m *AsyncAgentServiceServer) ExecuteTaskSync(_a0 service.AsyncAgentService_ExecuteTaskSyncServer) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(service.AsyncAgentService_ExecuteTaskSyncServer) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type AsyncAgentServiceServer_GetTask struct { *mock.Call } @@ -142,11 +176,11 @@ type AsyncAgentServiceServer_GetTaskLogs struct { *mock.Call } -func (_m AsyncAgentServiceServer_GetTaskLogs) Return(_a0 *admin.GetTaskLogsResponse, _a1 error) *AsyncAgentServiceServer_GetTaskLogs { - return &AsyncAgentServiceServer_GetTaskLogs{Call: _m.Call.Return(_a0, _a1)} +func (_m AsyncAgentServiceServer_GetTaskLogs) Return(_a0 error) *AsyncAgentServiceServer_GetTaskLogs { + return &AsyncAgentServiceServer_GetTaskLogs{Call: _m.Call.Return(_a0)} } -func (_m *AsyncAgentServiceServer) OnGetTaskLogs(_a0 context.Context, _a1 *admin.GetTaskLogsRequest) *AsyncAgentServiceServer_GetTaskLogs { +func (_m *AsyncAgentServiceServer) OnGetTaskLogs(_a0 *admin.GetTaskLogsRequest, _a1 service.AsyncAgentService_GetTaskLogsServer) *AsyncAgentServiceServer_GetTaskLogs { c_call := _m.On("GetTaskLogs", _a0, _a1) return &AsyncAgentServiceServer_GetTaskLogs{Call: c_call} } @@ -157,26 +191,17 @@ func (_m *AsyncAgentServiceServer) OnGetTaskLogsMatch(matchers ...interface{}) * } // GetTaskLogs provides a mock function with given fields: _a0, _a1 -func (_m *AsyncAgentServiceServer) GetTaskLogs(_a0 context.Context, _a1 *admin.GetTaskLogsRequest) (*admin.GetTaskLogsResponse, error) { +func (_m *AsyncAgentServiceServer) GetTaskLogs(_a0 *admin.GetTaskLogsRequest, _a1 service.AsyncAgentService_GetTaskLogsServer) error { ret := _m.Called(_a0, _a1) - var r0 *admin.GetTaskLogsResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetTaskLogsRequest) *admin.GetTaskLogsResponse); ok { + var r0 error + if rf, ok := ret.Get(0).(func(*admin.GetTaskLogsRequest, service.AsyncAgentService_GetTaskLogsServer) error); ok { r0 = rf(_a0, _a1) } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.GetTaskLogsResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.GetTaskLogsRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) + r0 = ret.Error(0) } - return r0, r1 + return r0 } type AsyncAgentServiceServer_GetTaskMetrics struct { diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskClient.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskClient.go new file mode 100644 index 0000000000..52c063d197 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskClient.go @@ -0,0 +1,296 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_CreateTaskClient is an autogenerated mock type for the AsyncAgentService_CreateTaskClient type +type AsyncAgentService_CreateTaskClient struct { + mock.Mock +} + +type AsyncAgentService_CreateTaskClient_CloseAndRecv struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_CloseAndRecv) Return(_a0 *admin.CreateTaskResponse, _a1 error) *AsyncAgentService_CreateTaskClient_CloseAndRecv { + return &AsyncAgentService_CreateTaskClient_CloseAndRecv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnCloseAndRecv() *AsyncAgentService_CreateTaskClient_CloseAndRecv { + c_call := _m.On("CloseAndRecv") + return &AsyncAgentService_CreateTaskClient_CloseAndRecv{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnCloseAndRecvMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_CloseAndRecv { + c_call := _m.On("CloseAndRecv", matchers...) + return &AsyncAgentService_CreateTaskClient_CloseAndRecv{Call: c_call} +} + +// CloseAndRecv provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskClient) CloseAndRecv() (*admin.CreateTaskResponse, error) { + ret := _m.Called() + + var r0 *admin.CreateTaskResponse + if rf, ok := ret.Get(0).(func() *admin.CreateTaskResponse); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.CreateTaskResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_CreateTaskClient_CloseSend struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_CloseSend) Return(_a0 error) *AsyncAgentService_CreateTaskClient_CloseSend { + return &AsyncAgentService_CreateTaskClient_CloseSend{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnCloseSend() *AsyncAgentService_CreateTaskClient_CloseSend { + c_call := _m.On("CloseSend") + return &AsyncAgentService_CreateTaskClient_CloseSend{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnCloseSendMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_CloseSend { + c_call := _m.On("CloseSend", matchers...) + return &AsyncAgentService_CreateTaskClient_CloseSend{Call: c_call} +} + +// CloseSend provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskClient) CloseSend() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskClient_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_Context) Return(_a0 context.Context) *AsyncAgentService_CreateTaskClient_Context { + return &AsyncAgentService_CreateTaskClient_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnContext() *AsyncAgentService_CreateTaskClient_Context { + c_call := _m.On("Context") + return &AsyncAgentService_CreateTaskClient_Context{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnContextMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_CreateTaskClient_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskClient) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_CreateTaskClient_Header struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_Header) Return(_a0 metadata.MD, _a1 error) *AsyncAgentService_CreateTaskClient_Header { + return &AsyncAgentService_CreateTaskClient_Header{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnHeader() *AsyncAgentService_CreateTaskClient_Header { + c_call := _m.On("Header") + return &AsyncAgentService_CreateTaskClient_Header{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnHeaderMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_Header { + c_call := _m.On("Header", matchers...) + return &AsyncAgentService_CreateTaskClient_Header{Call: c_call} +} + +// Header provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskClient) Header() (metadata.MD, error) { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_CreateTaskClient_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_RecvMsg) Return(_a0 error) *AsyncAgentService_CreateTaskClient_RecvMsg { + return &AsyncAgentService_CreateTaskClient_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnRecvMsg(m interface{}) *AsyncAgentService_CreateTaskClient_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_CreateTaskClient_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_CreateTaskClient_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_CreateTaskClient) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskClient_Send struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_Send) Return(_a0 error) *AsyncAgentService_CreateTaskClient_Send { + return &AsyncAgentService_CreateTaskClient_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnSend(_a0 *admin.CreateTaskRequest) *AsyncAgentService_CreateTaskClient_Send { + c_call := _m.On("Send", _a0) + return &AsyncAgentService_CreateTaskClient_Send{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnSendMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_Send { + c_call := _m.On("Send", matchers...) + return &AsyncAgentService_CreateTaskClient_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_CreateTaskClient) Send(_a0 *admin.CreateTaskRequest) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.CreateTaskRequest) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskClient_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_SendMsg) Return(_a0 error) *AsyncAgentService_CreateTaskClient_SendMsg { + return &AsyncAgentService_CreateTaskClient_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnSendMsg(m interface{}) *AsyncAgentService_CreateTaskClient_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_CreateTaskClient_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_CreateTaskClient_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_CreateTaskClient) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskClient_Trailer struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskClient_Trailer) Return(_a0 metadata.MD) *AsyncAgentService_CreateTaskClient_Trailer { + return &AsyncAgentService_CreateTaskClient_Trailer{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnTrailer() *AsyncAgentService_CreateTaskClient_Trailer { + c_call := _m.On("Trailer") + return &AsyncAgentService_CreateTaskClient_Trailer{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskClient) OnTrailerMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskClient_Trailer { + c_call := _m.On("Trailer", matchers...) + return &AsyncAgentService_CreateTaskClient_Trailer{Call: c_call} +} + +// Trailer provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskClient) Trailer() metadata.MD { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + return r0 +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskServer.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskServer.go new file mode 100644 index 0000000000..68268ce939 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_CreateTaskServer.go @@ -0,0 +1,258 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_CreateTaskServer is an autogenerated mock type for the AsyncAgentService_CreateTaskServer type +type AsyncAgentService_CreateTaskServer struct { + mock.Mock +} + +type AsyncAgentService_CreateTaskServer_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_Context) Return(_a0 context.Context) *AsyncAgentService_CreateTaskServer_Context { + return &AsyncAgentService_CreateTaskServer_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnContext() *AsyncAgentService_CreateTaskServer_Context { + c_call := _m.On("Context") + return &AsyncAgentService_CreateTaskServer_Context{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnContextMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_CreateTaskServer_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskServer) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_CreateTaskServer_Recv struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_Recv) Return(_a0 *admin.CreateTaskRequest, _a1 error) *AsyncAgentService_CreateTaskServer_Recv { + return &AsyncAgentService_CreateTaskServer_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnRecv() *AsyncAgentService_CreateTaskServer_Recv { + c_call := _m.On("Recv") + return &AsyncAgentService_CreateTaskServer_Recv{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnRecvMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_Recv { + c_call := _m.On("Recv", matchers...) + return &AsyncAgentService_CreateTaskServer_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *AsyncAgentService_CreateTaskServer) Recv() (*admin.CreateTaskRequest, error) { + ret := _m.Called() + + var r0 *admin.CreateTaskRequest + if rf, ok := ret.Get(0).(func() *admin.CreateTaskRequest); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.CreateTaskRequest) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_CreateTaskServer_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_RecvMsg) Return(_a0 error) *AsyncAgentService_CreateTaskServer_RecvMsg { + return &AsyncAgentService_CreateTaskServer_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnRecvMsg(m interface{}) *AsyncAgentService_CreateTaskServer_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_CreateTaskServer_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_CreateTaskServer_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_CreateTaskServer) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskServer_SendAndClose struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_SendAndClose) Return(_a0 error) *AsyncAgentService_CreateTaskServer_SendAndClose { + return &AsyncAgentService_CreateTaskServer_SendAndClose{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSendAndClose(_a0 *admin.CreateTaskResponse) *AsyncAgentService_CreateTaskServer_SendAndClose { + c_call := _m.On("SendAndClose", _a0) + return &AsyncAgentService_CreateTaskServer_SendAndClose{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSendAndCloseMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_SendAndClose { + c_call := _m.On("SendAndClose", matchers...) + return &AsyncAgentService_CreateTaskServer_SendAndClose{Call: c_call} +} + +// SendAndClose provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_CreateTaskServer) SendAndClose(_a0 *admin.CreateTaskResponse) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.CreateTaskResponse) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskServer_SendHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_SendHeader) Return(_a0 error) *AsyncAgentService_CreateTaskServer_SendHeader { + return &AsyncAgentService_CreateTaskServer_SendHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSendHeader(_a0 metadata.MD) *AsyncAgentService_CreateTaskServer_SendHeader { + c_call := _m.On("SendHeader", _a0) + return &AsyncAgentService_CreateTaskServer_SendHeader{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSendHeaderMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_SendHeader { + c_call := _m.On("SendHeader", matchers...) + return &AsyncAgentService_CreateTaskServer_SendHeader{Call: c_call} +} + +// SendHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_CreateTaskServer) SendHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskServer_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_SendMsg) Return(_a0 error) *AsyncAgentService_CreateTaskServer_SendMsg { + return &AsyncAgentService_CreateTaskServer_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSendMsg(m interface{}) *AsyncAgentService_CreateTaskServer_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_CreateTaskServer_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_CreateTaskServer_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_CreateTaskServer) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_CreateTaskServer_SetHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_CreateTaskServer_SetHeader) Return(_a0 error) *AsyncAgentService_CreateTaskServer_SetHeader { + return &AsyncAgentService_CreateTaskServer_SetHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSetHeader(_a0 metadata.MD) *AsyncAgentService_CreateTaskServer_SetHeader { + c_call := _m.On("SetHeader", _a0) + return &AsyncAgentService_CreateTaskServer_SetHeader{Call: c_call} +} + +func (_m *AsyncAgentService_CreateTaskServer) OnSetHeaderMatch(matchers ...interface{}) *AsyncAgentService_CreateTaskServer_SetHeader { + c_call := _m.On("SetHeader", matchers...) + return &AsyncAgentService_CreateTaskServer_SetHeader{Call: c_call} +} + +// SetHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_CreateTaskServer) SetHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SetTrailer provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_CreateTaskServer) SetTrailer(_a0 metadata.MD) { + _m.Called(_a0) +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncClient.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncClient.go new file mode 100644 index 0000000000..d75c24464e --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncClient.go @@ -0,0 +1,296 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_ExecuteTaskSyncClient is an autogenerated mock type for the AsyncAgentService_ExecuteTaskSyncClient type +type AsyncAgentService_ExecuteTaskSyncClient struct { + mock.Mock +} + +type AsyncAgentService_ExecuteTaskSyncClient_CloseSend struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_CloseSend) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncClient_CloseSend { + return &AsyncAgentService_ExecuteTaskSyncClient_CloseSend{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnCloseSend() *AsyncAgentService_ExecuteTaskSyncClient_CloseSend { + c_call := _m.On("CloseSend") + return &AsyncAgentService_ExecuteTaskSyncClient_CloseSend{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnCloseSendMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_CloseSend { + c_call := _m.On("CloseSend", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_CloseSend{Call: c_call} +} + +// CloseSend provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncClient) CloseSend() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncClient_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_Context) Return(_a0 context.Context) *AsyncAgentService_ExecuteTaskSyncClient_Context { + return &AsyncAgentService_ExecuteTaskSyncClient_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnContext() *AsyncAgentService_ExecuteTaskSyncClient_Context { + c_call := _m.On("Context") + return &AsyncAgentService_ExecuteTaskSyncClient_Context{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnContextMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncClient) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncClient_Header struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_Header) Return(_a0 metadata.MD, _a1 error) *AsyncAgentService_ExecuteTaskSyncClient_Header { + return &AsyncAgentService_ExecuteTaskSyncClient_Header{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnHeader() *AsyncAgentService_ExecuteTaskSyncClient_Header { + c_call := _m.On("Header") + return &AsyncAgentService_ExecuteTaskSyncClient_Header{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnHeaderMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_Header { + c_call := _m.On("Header", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_Header{Call: c_call} +} + +// Header provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncClient) Header() (metadata.MD, error) { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_ExecuteTaskSyncClient_Recv struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_Recv) Return(_a0 *admin.ExecuteTaskSyncResponse, _a1 error) *AsyncAgentService_ExecuteTaskSyncClient_Recv { + return &AsyncAgentService_ExecuteTaskSyncClient_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnRecv() *AsyncAgentService_ExecuteTaskSyncClient_Recv { + c_call := _m.On("Recv") + return &AsyncAgentService_ExecuteTaskSyncClient_Recv{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnRecvMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_Recv { + c_call := _m.On("Recv", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncResponse, error) { + ret := _m.Called() + + var r0 *admin.ExecuteTaskSyncResponse + if rf, ok := ret.Get(0).(func() *admin.ExecuteTaskSyncResponse); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecuteTaskSyncResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_ExecuteTaskSyncClient_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_RecvMsg) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncClient_RecvMsg { + return &AsyncAgentService_ExecuteTaskSyncClient_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnRecvMsg(m interface{}) *AsyncAgentService_ExecuteTaskSyncClient_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_ExecuteTaskSyncClient_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_ExecuteTaskSyncClient) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncClient_Send struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_Send) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncClient_Send { + return &AsyncAgentService_ExecuteTaskSyncClient_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnSend(_a0 *admin.ExecuteTaskSyncRequest) *AsyncAgentService_ExecuteTaskSyncClient_Send { + c_call := _m.On("Send", _a0) + return &AsyncAgentService_ExecuteTaskSyncClient_Send{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnSendMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_Send { + c_call := _m.On("Send", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_ExecuteTaskSyncClient) Send(_a0 *admin.ExecuteTaskSyncRequest) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.ExecuteTaskSyncRequest) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncClient_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_SendMsg) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncClient_SendMsg { + return &AsyncAgentService_ExecuteTaskSyncClient_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnSendMsg(m interface{}) *AsyncAgentService_ExecuteTaskSyncClient_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_ExecuteTaskSyncClient_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_ExecuteTaskSyncClient) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncClient_Trailer struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncClient_Trailer) Return(_a0 metadata.MD) *AsyncAgentService_ExecuteTaskSyncClient_Trailer { + return &AsyncAgentService_ExecuteTaskSyncClient_Trailer{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnTrailer() *AsyncAgentService_ExecuteTaskSyncClient_Trailer { + c_call := _m.On("Trailer") + return &AsyncAgentService_ExecuteTaskSyncClient_Trailer{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncClient) OnTrailerMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncClient_Trailer { + c_call := _m.On("Trailer", matchers...) + return &AsyncAgentService_ExecuteTaskSyncClient_Trailer{Call: c_call} +} + +// Trailer provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncClient) Trailer() metadata.MD { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + return r0 +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncServer.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncServer.go new file mode 100644 index 0000000000..a42eb507a3 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_ExecuteTaskSyncServer.go @@ -0,0 +1,258 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_ExecuteTaskSyncServer is an autogenerated mock type for the AsyncAgentService_ExecuteTaskSyncServer type +type AsyncAgentService_ExecuteTaskSyncServer struct { + mock.Mock +} + +type AsyncAgentService_ExecuteTaskSyncServer_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_Context) Return(_a0 context.Context) *AsyncAgentService_ExecuteTaskSyncServer_Context { + return &AsyncAgentService_ExecuteTaskSyncServer_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnContext() *AsyncAgentService_ExecuteTaskSyncServer_Context { + c_call := _m.On("Context") + return &AsyncAgentService_ExecuteTaskSyncServer_Context{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnContextMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncServer) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncServer_Recv struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_Recv) Return(_a0 *admin.ExecuteTaskSyncRequest, _a1 error) *AsyncAgentService_ExecuteTaskSyncServer_Recv { + return &AsyncAgentService_ExecuteTaskSyncServer_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnRecv() *AsyncAgentService_ExecuteTaskSyncServer_Recv { + c_call := _m.On("Recv") + return &AsyncAgentService_ExecuteTaskSyncServer_Recv{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnRecvMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_Recv { + c_call := _m.On("Recv", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *AsyncAgentService_ExecuteTaskSyncServer) Recv() (*admin.ExecuteTaskSyncRequest, error) { + ret := _m.Called() + + var r0 *admin.ExecuteTaskSyncRequest + if rf, ok := ret.Get(0).(func() *admin.ExecuteTaskSyncRequest); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecuteTaskSyncRequest) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_ExecuteTaskSyncServer_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_RecvMsg) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncServer_RecvMsg { + return &AsyncAgentService_ExecuteTaskSyncServer_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnRecvMsg(m interface{}) *AsyncAgentService_ExecuteTaskSyncServer_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_ExecuteTaskSyncServer_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_ExecuteTaskSyncServer) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncServer_Send struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_Send) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncServer_Send { + return &AsyncAgentService_ExecuteTaskSyncServer_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSend(_a0 *admin.ExecuteTaskSyncResponse) *AsyncAgentService_ExecuteTaskSyncServer_Send { + c_call := _m.On("Send", _a0) + return &AsyncAgentService_ExecuteTaskSyncServer_Send{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSendMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_Send { + c_call := _m.On("Send", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_ExecuteTaskSyncServer) Send(_a0 *admin.ExecuteTaskSyncResponse) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.ExecuteTaskSyncResponse) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncServer_SendHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_SendHeader) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncServer_SendHeader { + return &AsyncAgentService_ExecuteTaskSyncServer_SendHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSendHeader(_a0 metadata.MD) *AsyncAgentService_ExecuteTaskSyncServer_SendHeader { + c_call := _m.On("SendHeader", _a0) + return &AsyncAgentService_ExecuteTaskSyncServer_SendHeader{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSendHeaderMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_SendHeader { + c_call := _m.On("SendHeader", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_SendHeader{Call: c_call} +} + +// SendHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_ExecuteTaskSyncServer) SendHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncServer_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_SendMsg) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncServer_SendMsg { + return &AsyncAgentService_ExecuteTaskSyncServer_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSendMsg(m interface{}) *AsyncAgentService_ExecuteTaskSyncServer_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_ExecuteTaskSyncServer_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_ExecuteTaskSyncServer) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_ExecuteTaskSyncServer_SetHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_ExecuteTaskSyncServer_SetHeader) Return(_a0 error) *AsyncAgentService_ExecuteTaskSyncServer_SetHeader { + return &AsyncAgentService_ExecuteTaskSyncServer_SetHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSetHeader(_a0 metadata.MD) *AsyncAgentService_ExecuteTaskSyncServer_SetHeader { + c_call := _m.On("SetHeader", _a0) + return &AsyncAgentService_ExecuteTaskSyncServer_SetHeader{Call: c_call} +} + +func (_m *AsyncAgentService_ExecuteTaskSyncServer) OnSetHeaderMatch(matchers ...interface{}) *AsyncAgentService_ExecuteTaskSyncServer_SetHeader { + c_call := _m.On("SetHeader", matchers...) + return &AsyncAgentService_ExecuteTaskSyncServer_SetHeader{Call: c_call} +} + +// SetHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_ExecuteTaskSyncServer) SetHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SetTrailer provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_ExecuteTaskSyncServer) SetTrailer(_a0 metadata.MD) { + _m.Called(_a0) +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskClient.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskClient.go new file mode 100644 index 0000000000..d163efb098 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskClient.go @@ -0,0 +1,264 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_GetTaskClient is an autogenerated mock type for the AsyncAgentService_GetTaskClient type +type AsyncAgentService_GetTaskClient struct { + mock.Mock +} + +type AsyncAgentService_GetTaskClient_CloseSend struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_CloseSend) Return(_a0 error) *AsyncAgentService_GetTaskClient_CloseSend { + return &AsyncAgentService_GetTaskClient_CloseSend{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnCloseSend() *AsyncAgentService_GetTaskClient_CloseSend { + c_call := _m.On("CloseSend") + return &AsyncAgentService_GetTaskClient_CloseSend{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnCloseSendMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_CloseSend { + c_call := _m.On("CloseSend", matchers...) + return &AsyncAgentService_GetTaskClient_CloseSend{Call: c_call} +} + +// CloseSend provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskClient) CloseSend() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskClient_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_Context) Return(_a0 context.Context) *AsyncAgentService_GetTaskClient_Context { + return &AsyncAgentService_GetTaskClient_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnContext() *AsyncAgentService_GetTaskClient_Context { + c_call := _m.On("Context") + return &AsyncAgentService_GetTaskClient_Context{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnContextMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_GetTaskClient_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskClient) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_GetTaskClient_Header struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_Header) Return(_a0 metadata.MD, _a1 error) *AsyncAgentService_GetTaskClient_Header { + return &AsyncAgentService_GetTaskClient_Header{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnHeader() *AsyncAgentService_GetTaskClient_Header { + c_call := _m.On("Header") + return &AsyncAgentService_GetTaskClient_Header{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnHeaderMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_Header { + c_call := _m.On("Header", matchers...) + return &AsyncAgentService_GetTaskClient_Header{Call: c_call} +} + +// Header provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskClient) Header() (metadata.MD, error) { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_GetTaskClient_Recv struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_Recv) Return(_a0 *admin.GetTaskResponse, _a1 error) *AsyncAgentService_GetTaskClient_Recv { + return &AsyncAgentService_GetTaskClient_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnRecv() *AsyncAgentService_GetTaskClient_Recv { + c_call := _m.On("Recv") + return &AsyncAgentService_GetTaskClient_Recv{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnRecvMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_Recv { + c_call := _m.On("Recv", matchers...) + return &AsyncAgentService_GetTaskClient_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskClient) Recv() (*admin.GetTaskResponse, error) { + ret := _m.Called() + + var r0 *admin.GetTaskResponse + if rf, ok := ret.Get(0).(func() *admin.GetTaskResponse); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetTaskResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_GetTaskClient_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_RecvMsg) Return(_a0 error) *AsyncAgentService_GetTaskClient_RecvMsg { + return &AsyncAgentService_GetTaskClient_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnRecvMsg(m interface{}) *AsyncAgentService_GetTaskClient_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_GetTaskClient_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_GetTaskClient_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskClient) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskClient_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_SendMsg) Return(_a0 error) *AsyncAgentService_GetTaskClient_SendMsg { + return &AsyncAgentService_GetTaskClient_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnSendMsg(m interface{}) *AsyncAgentService_GetTaskClient_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_GetTaskClient_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_GetTaskClient_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskClient) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskClient_Trailer struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskClient_Trailer) Return(_a0 metadata.MD) *AsyncAgentService_GetTaskClient_Trailer { + return &AsyncAgentService_GetTaskClient_Trailer{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskClient) OnTrailer() *AsyncAgentService_GetTaskClient_Trailer { + c_call := _m.On("Trailer") + return &AsyncAgentService_GetTaskClient_Trailer{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskClient) OnTrailerMatch(matchers ...interface{}) *AsyncAgentService_GetTaskClient_Trailer { + c_call := _m.On("Trailer", matchers...) + return &AsyncAgentService_GetTaskClient_Trailer{Call: c_call} +} + +// Trailer provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskClient) Trailer() metadata.MD { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + return r0 +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsClient.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsClient.go new file mode 100644 index 0000000000..a28d4ac497 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsClient.go @@ -0,0 +1,264 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_GetTaskLogsClient is an autogenerated mock type for the AsyncAgentService_GetTaskLogsClient type +type AsyncAgentService_GetTaskLogsClient struct { + mock.Mock +} + +type AsyncAgentService_GetTaskLogsClient_CloseSend struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_CloseSend) Return(_a0 error) *AsyncAgentService_GetTaskLogsClient_CloseSend { + return &AsyncAgentService_GetTaskLogsClient_CloseSend{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnCloseSend() *AsyncAgentService_GetTaskLogsClient_CloseSend { + c_call := _m.On("CloseSend") + return &AsyncAgentService_GetTaskLogsClient_CloseSend{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnCloseSendMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_CloseSend { + c_call := _m.On("CloseSend", matchers...) + return &AsyncAgentService_GetTaskLogsClient_CloseSend{Call: c_call} +} + +// CloseSend provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskLogsClient) CloseSend() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsClient_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_Context) Return(_a0 context.Context) *AsyncAgentService_GetTaskLogsClient_Context { + return &AsyncAgentService_GetTaskLogsClient_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnContext() *AsyncAgentService_GetTaskLogsClient_Context { + c_call := _m.On("Context") + return &AsyncAgentService_GetTaskLogsClient_Context{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnContextMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_GetTaskLogsClient_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskLogsClient) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsClient_Header struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_Header) Return(_a0 metadata.MD, _a1 error) *AsyncAgentService_GetTaskLogsClient_Header { + return &AsyncAgentService_GetTaskLogsClient_Header{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnHeader() *AsyncAgentService_GetTaskLogsClient_Header { + c_call := _m.On("Header") + return &AsyncAgentService_GetTaskLogsClient_Header{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnHeaderMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_Header { + c_call := _m.On("Header", matchers...) + return &AsyncAgentService_GetTaskLogsClient_Header{Call: c_call} +} + +// Header provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskLogsClient) Header() (metadata.MD, error) { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_GetTaskLogsClient_Recv struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_Recv) Return(_a0 *admin.GetTaskLogsResponse, _a1 error) *AsyncAgentService_GetTaskLogsClient_Recv { + return &AsyncAgentService_GetTaskLogsClient_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnRecv() *AsyncAgentService_GetTaskLogsClient_Recv { + c_call := _m.On("Recv") + return &AsyncAgentService_GetTaskLogsClient_Recv{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnRecvMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_Recv { + c_call := _m.On("Recv", matchers...) + return &AsyncAgentService_GetTaskLogsClient_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskLogsClient) Recv() (*admin.GetTaskLogsResponse, error) { + ret := _m.Called() + + var r0 *admin.GetTaskLogsResponse + if rf, ok := ret.Get(0).(func() *admin.GetTaskLogsResponse); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetTaskLogsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AsyncAgentService_GetTaskLogsClient_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_RecvMsg) Return(_a0 error) *AsyncAgentService_GetTaskLogsClient_RecvMsg { + return &AsyncAgentService_GetTaskLogsClient_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnRecvMsg(m interface{}) *AsyncAgentService_GetTaskLogsClient_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_GetTaskLogsClient_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_GetTaskLogsClient_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskLogsClient) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsClient_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_SendMsg) Return(_a0 error) *AsyncAgentService_GetTaskLogsClient_SendMsg { + return &AsyncAgentService_GetTaskLogsClient_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnSendMsg(m interface{}) *AsyncAgentService_GetTaskLogsClient_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_GetTaskLogsClient_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_GetTaskLogsClient_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskLogsClient) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsClient_Trailer struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsClient_Trailer) Return(_a0 metadata.MD) *AsyncAgentService_GetTaskLogsClient_Trailer { + return &AsyncAgentService_GetTaskLogsClient_Trailer{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnTrailer() *AsyncAgentService_GetTaskLogsClient_Trailer { + c_call := _m.On("Trailer") + return &AsyncAgentService_GetTaskLogsClient_Trailer{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsClient) OnTrailerMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsClient_Trailer { + c_call := _m.On("Trailer", matchers...) + return &AsyncAgentService_GetTaskLogsClient_Trailer{Call: c_call} +} + +// Trailer provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskLogsClient) Trailer() metadata.MD { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + return r0 +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsServer.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsServer.go new file mode 100644 index 0000000000..00d5ad6b48 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskLogsServer.go @@ -0,0 +1,217 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_GetTaskLogsServer is an autogenerated mock type for the AsyncAgentService_GetTaskLogsServer type +type AsyncAgentService_GetTaskLogsServer struct { + mock.Mock +} + +type AsyncAgentService_GetTaskLogsServer_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsServer_Context) Return(_a0 context.Context) *AsyncAgentService_GetTaskLogsServer_Context { + return &AsyncAgentService_GetTaskLogsServer_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnContext() *AsyncAgentService_GetTaskLogsServer_Context { + c_call := _m.On("Context") + return &AsyncAgentService_GetTaskLogsServer_Context{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnContextMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsServer_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_GetTaskLogsServer_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskLogsServer) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsServer_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsServer_RecvMsg) Return(_a0 error) *AsyncAgentService_GetTaskLogsServer_RecvMsg { + return &AsyncAgentService_GetTaskLogsServer_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnRecvMsg(m interface{}) *AsyncAgentService_GetTaskLogsServer_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_GetTaskLogsServer_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsServer_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_GetTaskLogsServer_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskLogsServer) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsServer_Send struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsServer_Send) Return(_a0 error) *AsyncAgentService_GetTaskLogsServer_Send { + return &AsyncAgentService_GetTaskLogsServer_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSend(_a0 *admin.GetTaskLogsResponse) *AsyncAgentService_GetTaskLogsServer_Send { + c_call := _m.On("Send", _a0) + return &AsyncAgentService_GetTaskLogsServer_Send{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSendMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsServer_Send { + c_call := _m.On("Send", matchers...) + return &AsyncAgentService_GetTaskLogsServer_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskLogsServer) Send(_a0 *admin.GetTaskLogsResponse) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.GetTaskLogsResponse) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsServer_SendHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsServer_SendHeader) Return(_a0 error) *AsyncAgentService_GetTaskLogsServer_SendHeader { + return &AsyncAgentService_GetTaskLogsServer_SendHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSendHeader(_a0 metadata.MD) *AsyncAgentService_GetTaskLogsServer_SendHeader { + c_call := _m.On("SendHeader", _a0) + return &AsyncAgentService_GetTaskLogsServer_SendHeader{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSendHeaderMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsServer_SendHeader { + c_call := _m.On("SendHeader", matchers...) + return &AsyncAgentService_GetTaskLogsServer_SendHeader{Call: c_call} +} + +// SendHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskLogsServer) SendHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsServer_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsServer_SendMsg) Return(_a0 error) *AsyncAgentService_GetTaskLogsServer_SendMsg { + return &AsyncAgentService_GetTaskLogsServer_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSendMsg(m interface{}) *AsyncAgentService_GetTaskLogsServer_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_GetTaskLogsServer_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsServer_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_GetTaskLogsServer_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskLogsServer) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskLogsServer_SetHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskLogsServer_SetHeader) Return(_a0 error) *AsyncAgentService_GetTaskLogsServer_SetHeader { + return &AsyncAgentService_GetTaskLogsServer_SetHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSetHeader(_a0 metadata.MD) *AsyncAgentService_GetTaskLogsServer_SetHeader { + c_call := _m.On("SetHeader", _a0) + return &AsyncAgentService_GetTaskLogsServer_SetHeader{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskLogsServer) OnSetHeaderMatch(matchers ...interface{}) *AsyncAgentService_GetTaskLogsServer_SetHeader { + c_call := _m.On("SetHeader", matchers...) + return &AsyncAgentService_GetTaskLogsServer_SetHeader{Call: c_call} +} + +// SetHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskLogsServer) SetHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SetTrailer provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskLogsServer) SetTrailer(_a0 metadata.MD) { + _m.Called(_a0) +} diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskServer.go b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskServer.go new file mode 100644 index 0000000000..e16fd3591a --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentService_GetTaskServer.go @@ -0,0 +1,217 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// AsyncAgentService_GetTaskServer is an autogenerated mock type for the AsyncAgentService_GetTaskServer type +type AsyncAgentService_GetTaskServer struct { + mock.Mock +} + +type AsyncAgentService_GetTaskServer_Context struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskServer_Context) Return(_a0 context.Context) *AsyncAgentService_GetTaskServer_Context { + return &AsyncAgentService_GetTaskServer_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskServer) OnContext() *AsyncAgentService_GetTaskServer_Context { + c_call := _m.On("Context") + return &AsyncAgentService_GetTaskServer_Context{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskServer) OnContextMatch(matchers ...interface{}) *AsyncAgentService_GetTaskServer_Context { + c_call := _m.On("Context", matchers...) + return &AsyncAgentService_GetTaskServer_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *AsyncAgentService_GetTaskServer) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type AsyncAgentService_GetTaskServer_RecvMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskServer_RecvMsg) Return(_a0 error) *AsyncAgentService_GetTaskServer_RecvMsg { + return &AsyncAgentService_GetTaskServer_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskServer) OnRecvMsg(m interface{}) *AsyncAgentService_GetTaskServer_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &AsyncAgentService_GetTaskServer_RecvMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskServer) OnRecvMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskServer_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &AsyncAgentService_GetTaskServer_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskServer) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskServer_Send struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskServer_Send) Return(_a0 error) *AsyncAgentService_GetTaskServer_Send { + return &AsyncAgentService_GetTaskServer_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSend(_a0 *admin.GetTaskResponse) *AsyncAgentService_GetTaskServer_Send { + c_call := _m.On("Send", _a0) + return &AsyncAgentService_GetTaskServer_Send{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSendMatch(matchers ...interface{}) *AsyncAgentService_GetTaskServer_Send { + c_call := _m.On("Send", matchers...) + return &AsyncAgentService_GetTaskServer_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskServer) Send(_a0 *admin.GetTaskResponse) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.GetTaskResponse) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskServer_SendHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskServer_SendHeader) Return(_a0 error) *AsyncAgentService_GetTaskServer_SendHeader { + return &AsyncAgentService_GetTaskServer_SendHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSendHeader(_a0 metadata.MD) *AsyncAgentService_GetTaskServer_SendHeader { + c_call := _m.On("SendHeader", _a0) + return &AsyncAgentService_GetTaskServer_SendHeader{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSendHeaderMatch(matchers ...interface{}) *AsyncAgentService_GetTaskServer_SendHeader { + c_call := _m.On("SendHeader", matchers...) + return &AsyncAgentService_GetTaskServer_SendHeader{Call: c_call} +} + +// SendHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskServer) SendHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskServer_SendMsg struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskServer_SendMsg) Return(_a0 error) *AsyncAgentService_GetTaskServer_SendMsg { + return &AsyncAgentService_GetTaskServer_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSendMsg(m interface{}) *AsyncAgentService_GetTaskServer_SendMsg { + c_call := _m.On("SendMsg", m) + return &AsyncAgentService_GetTaskServer_SendMsg{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSendMsgMatch(matchers ...interface{}) *AsyncAgentService_GetTaskServer_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &AsyncAgentService_GetTaskServer_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *AsyncAgentService_GetTaskServer) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AsyncAgentService_GetTaskServer_SetHeader struct { + *mock.Call +} + +func (_m AsyncAgentService_GetTaskServer_SetHeader) Return(_a0 error) *AsyncAgentService_GetTaskServer_SetHeader { + return &AsyncAgentService_GetTaskServer_SetHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSetHeader(_a0 metadata.MD) *AsyncAgentService_GetTaskServer_SetHeader { + c_call := _m.On("SetHeader", _a0) + return &AsyncAgentService_GetTaskServer_SetHeader{Call: c_call} +} + +func (_m *AsyncAgentService_GetTaskServer) OnSetHeaderMatch(matchers ...interface{}) *AsyncAgentService_GetTaskServer_SetHeader { + c_call := _m.On("SetHeader", matchers...) + return &AsyncAgentService_GetTaskServer_SetHeader{Call: c_call} +} + +// SetHeader provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskServer) SetHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SetTrailer provides a mock function with given fields: _a0 +func (_m *AsyncAgentService_GetTaskServer) SetTrailer(_a0 metadata.MD) { + _m.Called(_a0) +} diff --git a/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts b/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts index 834197a299..e0e06096fb 100644 --- a/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts @@ -6,6 +6,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; import { TaskExecutionIdentifier } from "../core/identifier_pb.js"; +import { TaskNodeOverrides } from "../core/workflow_pb.js"; import { LiteralMap } from "../core/literals_pb.js"; import { TaskTemplate } from "../core/tasks_pb.js"; import { TaskExecution_Phase, TaskLog } from "../core/execution_pb.js"; @@ -99,6 +100,26 @@ export class TaskExecutionMetadata extends Message { */ environmentVariables: { [key: string]: string } = {}; + /** + * @generated from field: int32 max_attempts = 7; + */ + maxAttempts = 0; + + /** + * @generated from field: bool interruptible = 8; + */ + interruptible = false; + + /** + * @generated from field: int32 interruptible_failure_threshold = 9; + */ + interruptibleFailureThreshold = 0; + + /** + * @generated from field: flyteidl.core.TaskNodeOverrides overrides = 10; + */ + overrides?: TaskNodeOverrides; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -113,6 +134,10 @@ export class TaskExecutionMetadata extends Message { { no: 4, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, { no: 5, name: "k8s_service_account", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 6, name: "environment_variables", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 7, name: "max_attempts", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 8, name: "interruptible", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 9, name: "interruptible_failure_threshold", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 10, name: "overrides", kind: "message", T: TaskNodeOverrides }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TaskExecutionMetadata { @@ -206,24 +231,11 @@ export class CreateTaskRequest extends Message { */ export class CreateTaskResponse extends Message { /** - * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). - * Resource is for synchronous task execution. + * ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata). * - * @generated from oneof flyteidl.admin.CreateTaskResponse.res + * @generated from field: bytes resource_meta = 1; */ - res: { - /** - * @generated from field: bytes resource_meta = 1; - */ - value: Uint8Array; - case: "resourceMeta"; - } | { - /** - * @generated from field: flyteidl.admin.Resource resource = 2; - */ - value: Resource; - case: "resource"; - } | { case: undefined; value?: undefined } = { case: undefined }; + resourceMeta = new Uint8Array(0); constructor(data?: PartialMessage) { super(); @@ -233,8 +245,7 @@ export class CreateTaskResponse extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "flyteidl.admin.CreateTaskResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "res" }, - { no: 2, name: "resource", kind: "message", T: Resource, oneof: "res" }, + { no: 1, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): CreateTaskResponse { @@ -254,6 +265,209 @@ export class CreateTaskResponse extends Message { } } +/** + * @generated from message flyteidl.admin.CreateRequestHeader + */ +export class CreateRequestHeader extends Message { + /** + * Template of the task that encapsulates all the metadata of the task. + * + * @generated from field: flyteidl.core.TaskTemplate template = 1; + */ + template?: TaskTemplate; + + /** + * Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring) + * + * @generated from field: string output_prefix = 2; + */ + outputPrefix = ""; + + /** + * subset of runtime task execution metadata. + * + * @generated from field: flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 3; + */ + taskExecutionMetadata?: TaskExecutionMetadata; + + /** + * MaxDatasetSizeBytes is the maximum size of the dataset that can be generated by the task. + * + * @generated from field: int64 max_dataset_size_bytes = 4; + */ + maxDatasetSizeBytes = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.CreateRequestHeader"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "template", kind: "message", T: TaskTemplate }, + { no: 2, name: "output_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "task_execution_metadata", kind: "message", T: TaskExecutionMetadata }, + { no: 4, name: "max_dataset_size_bytes", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateRequestHeader { + return new CreateRequestHeader().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateRequestHeader { + return new CreateRequestHeader().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateRequestHeader { + return new CreateRequestHeader().fromJsonString(jsonString, options); + } + + static equals(a: CreateRequestHeader | PlainMessage | undefined, b: CreateRequestHeader | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateRequestHeader, a, b); + } +} + +/** + * @generated from message flyteidl.admin.ExecuteTaskSyncRequest + */ +export class ExecuteTaskSyncRequest extends Message { + /** + * @generated from oneof flyteidl.admin.ExecuteTaskSyncRequest.part + */ + part: { + /** + * @generated from field: flyteidl.admin.CreateRequestHeader header = 1; + */ + value: CreateRequestHeader; + case: "header"; + } | { + /** + * @generated from field: flyteidl.core.LiteralMap inputs = 2; + */ + value: LiteralMap; + case: "inputs"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.ExecuteTaskSyncRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "header", kind: "message", T: CreateRequestHeader, oneof: "part" }, + { no: 2, name: "inputs", kind: "message", T: LiteralMap, oneof: "part" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecuteTaskSyncRequest { + return new ExecuteTaskSyncRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecuteTaskSyncRequest { + return new ExecuteTaskSyncRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecuteTaskSyncRequest { + return new ExecuteTaskSyncRequest().fromJsonString(jsonString, options); + } + + static equals(a: ExecuteTaskSyncRequest | PlainMessage | undefined, b: ExecuteTaskSyncRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecuteTaskSyncRequest, a, b); + } +} + +/** + * @generated from message flyteidl.admin.ExecuteTaskSyncResponseHeader + */ +export class ExecuteTaskSyncResponseHeader extends Message { + /** + * @generated from field: flyteidl.admin.Resource resource = 1; + */ + resource?: Resource; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.ExecuteTaskSyncResponseHeader"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "resource", kind: "message", T: Resource }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecuteTaskSyncResponseHeader { + return new ExecuteTaskSyncResponseHeader().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecuteTaskSyncResponseHeader { + return new ExecuteTaskSyncResponseHeader().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecuteTaskSyncResponseHeader { + return new ExecuteTaskSyncResponseHeader().fromJsonString(jsonString, options); + } + + static equals(a: ExecuteTaskSyncResponseHeader | PlainMessage | undefined, b: ExecuteTaskSyncResponseHeader | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecuteTaskSyncResponseHeader, a, b); + } +} + +/** + * @generated from message flyteidl.admin.ExecuteTaskSyncResponse + */ +export class ExecuteTaskSyncResponse extends Message { + /** + * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + * Resource is for synchronous task execution. + * + * @generated from oneof flyteidl.admin.ExecuteTaskSyncResponse.res + */ + res: { + /** + * @generated from field: flyteidl.admin.ExecuteTaskSyncResponseHeader header = 1; + */ + value: ExecuteTaskSyncResponseHeader; + case: "header"; + } | { + /** + * @generated from field: flyteidl.core.LiteralMap outputs = 2; + */ + value: LiteralMap; + case: "outputs"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.ExecuteTaskSyncResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "header", kind: "message", T: ExecuteTaskSyncResponseHeader, oneof: "res" }, + { no: 2, name: "outputs", kind: "message", T: LiteralMap, oneof: "res" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecuteTaskSyncResponse { + return new ExecuteTaskSyncResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecuteTaskSyncResponse { + return new ExecuteTaskSyncResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecuteTaskSyncResponse { + return new ExecuteTaskSyncResponse().fromJsonString(jsonString, options); + } + + static equals(a: ExecuteTaskSyncResponse | PlainMessage | undefined, b: ExecuteTaskSyncResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecuteTaskSyncResponse, a, b); + } +} + /** * A message used to fetch a job resource from flyte agent server. * @@ -263,9 +477,9 @@ export class GetTaskRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: flyteidl.admin.TaskType task_type = 1; */ - taskType = ""; + taskType?: TaskType; /** * Metadata about the resource to be pass to the agent. @@ -282,7 +496,7 @@ export class GetTaskRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "flyteidl.admin.GetTaskRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "task_type", kind: "message", T: TaskType }, { no: 2, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, ]); @@ -433,9 +647,9 @@ export class DeleteTaskRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: flyteidl.admin.TaskType task_type = 1; */ - taskType = ""; + taskType?: TaskType; /** * Metadata about the resource to be pass to the agent. @@ -452,7 +666,7 @@ export class DeleteTaskRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "flyteidl.admin.DeleteTaskRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "task_type", kind: "message", T: TaskType }, { no: 2, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, ]); @@ -522,9 +736,9 @@ export class Agent extends Message { /** * SupportedTaskTypes are the types of the tasks that the agent can handle. * - * @generated from field: repeated string supported_task_types = 2; + * @generated from field: repeated flyteidl.admin.TaskType supported_task_types = 2; */ - supportedTaskTypes: string[] = []; + supportedTaskTypes: TaskType[] = []; constructor(data?: PartialMessage) { super(); @@ -535,7 +749,7 @@ export class Agent extends Message { static readonly typeName = "flyteidl.admin.Agent"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "supported_task_types", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "supported_task_types", kind: "message", T: TaskType, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Agent { @@ -555,6 +769,53 @@ export class Agent extends Message { } } +/** + * @generated from message flyteidl.admin.TaskType + */ +export class TaskType extends Message { + /** + * The name of the task type. + * + * @generated from field: string name = 1; + */ + name = ""; + + /** + * The version of the task type. + * + * @generated from field: int32 version = 2; + */ + version = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.TaskType"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TaskType { + return new TaskType().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TaskType { + return new TaskType().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TaskType { + return new TaskType().fromJsonString(jsonString, options); + } + + static equals(a: TaskType | PlainMessage | undefined, b: TaskType | PlainMessage | undefined): boolean { + return proto3.util.equals(TaskType, a, b); + } +} + /** * A request to get an agent. * @@ -716,9 +977,9 @@ export class GetTaskMetricsRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: flyteidl.admin.TaskType task_type = 1; */ - taskType = ""; + taskType?: TaskType; /** * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). @@ -764,7 +1025,7 @@ export class GetTaskMetricsRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "flyteidl.admin.GetTaskMetricsRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "task_type", kind: "message", T: TaskType }, { no: 2, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 3, name: "queries", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, { no: 4, name: "start_time", kind: "message", T: Timestamp }, @@ -839,9 +1100,9 @@ export class GetTaskLogsRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: flyteidl.admin.TaskType task_type = 1; */ - taskType = ""; + taskType?: TaskType; /** * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). @@ -873,7 +1134,7 @@ export class GetTaskLogsRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "flyteidl.admin.GetTaskLogsRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "task_type", kind: "message", T: TaskType }, { no: 2, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 3, name: "lines", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 4, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -897,11 +1158,49 @@ export class GetTaskLogsRequest extends Message { } /** - * A response containing the logs for a task execution. - * - * @generated from message flyteidl.admin.GetTaskLogsResponse + * @generated from message flyteidl.admin.GetTaskLogsResponseHeader */ -export class GetTaskLogsResponse extends Message { +export class GetTaskLogsResponseHeader extends Message { + /** + * In the case of multiple pages of results, the server-provided token can be used to fetch the next page + * in a query. If there are no more results, this value will be empty. + * + * @generated from field: string token = 1; + */ + token = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.GetTaskLogsResponseHeader"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskLogsResponseHeader { + return new GetTaskLogsResponseHeader().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetTaskLogsResponseHeader { + return new GetTaskLogsResponseHeader().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetTaskLogsResponseHeader { + return new GetTaskLogsResponseHeader().fromJsonString(jsonString, options); + } + + static equals(a: GetTaskLogsResponseHeader | PlainMessage | undefined, b: GetTaskLogsResponseHeader | PlainMessage | undefined): boolean { + return proto3.util.equals(GetTaskLogsResponseHeader, a, b); + } +} + +/** + * @generated from message flyteidl.admin.GetTaskLogsResponseBody + */ +export class GetTaskLogsResponseBody extends Message { /** * The execution log results. * @@ -909,13 +1208,56 @@ export class GetTaskLogsResponse extends Message { */ results: string[] = []; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.GetTaskLogsResponseBody"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "results", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskLogsResponseBody { + return new GetTaskLogsResponseBody().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetTaskLogsResponseBody { + return new GetTaskLogsResponseBody().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetTaskLogsResponseBody { + return new GetTaskLogsResponseBody().fromJsonString(jsonString, options); + } + + static equals(a: GetTaskLogsResponseBody | PlainMessage | undefined, b: GetTaskLogsResponseBody | PlainMessage | undefined): boolean { + return proto3.util.equals(GetTaskLogsResponseBody, a, b); + } +} + +/** + * A response containing the logs for a task execution. + * + * @generated from message flyteidl.admin.GetTaskLogsResponse + */ +export class GetTaskLogsResponse extends Message { /** - * In the case of multiple pages of results, the server-provided token can be used to fetch the next page - * in a query. If there are no more results, this value will be empty. - * - * @generated from field: string token = 2; + * @generated from oneof flyteidl.admin.GetTaskLogsResponse.part */ - token = ""; + part: { + /** + * @generated from field: flyteidl.admin.GetTaskLogsResponseHeader header = 1; + */ + value: GetTaskLogsResponseHeader; + case: "header"; + } | { + /** + * @generated from field: flyteidl.admin.GetTaskLogsResponseBody body = 2; + */ + value: GetTaskLogsResponseBody; + case: "body"; + } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { super(); @@ -925,8 +1267,8 @@ export class GetTaskLogsResponse extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "flyteidl.admin.GetTaskLogsResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "results", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "header", kind: "message", T: GetTaskLogsResponseHeader, oneof: "part" }, + { no: 2, name: "body", kind: "message", T: GetTaskLogsResponseBody, oneof: "part" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskLogsResponse { diff --git a/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts b/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts index 3068a3181a..37b536b8f5 100644 --- a/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts +++ b/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { CreateTaskRequest, CreateTaskResponse, DeleteTaskRequest, DeleteTaskResponse, GetAgentRequest, GetAgentResponse, GetTaskLogsRequest, GetTaskLogsResponse, GetTaskMetricsRequest, GetTaskMetricsResponse, GetTaskRequest, GetTaskResponse, ListAgentsRequest, ListAgentsResponse } from "../admin/agent_pb.js"; +import { CreateTaskRequest, CreateTaskResponse, DeleteTaskRequest, DeleteTaskResponse, ExecuteTaskSyncRequest, ExecuteTaskSyncResponse, GetAgentRequest, GetAgentResponse, GetTaskLogsRequest, GetTaskLogsResponse, GetTaskMetricsRequest, GetTaskMetricsResponse, GetTaskRequest, GetTaskResponse, ListAgentsRequest, ListAgentsResponse } from "../admin/agent_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -15,7 +15,18 @@ export const AsyncAgentService = { typeName: "flyteidl.service.AsyncAgentService", methods: { /** - * Send a task create request to the agent server. + * ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + * + * @generated from rpc flyteidl.service.AsyncAgentService.ExecuteTaskSync + */ + executeTaskSync: { + name: "ExecuteTaskSync", + I: ExecuteTaskSyncRequest, + O: ExecuteTaskSyncResponse, + kind: MethodKind.BiDiStreaming, + }, + /** + * CreateTask sends a task create request to the agent service. * * @generated from rpc flyteidl.service.AsyncAgentService.CreateTask */ @@ -71,7 +82,7 @@ export const AsyncAgentService = { name: "GetTaskLogs", I: GetTaskLogsRequest, O: GetTaskLogsResponse, - kind: MethodKind.Unary, + kind: MethodKind.ServerStreaming, }, } } as const; diff --git a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go index de0a0f0244..0badb46537 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go @@ -96,7 +96,11 @@ type TaskExecutionMetadata struct { // k8s service account associated with the task execution K8SServiceAccount string `protobuf:"bytes,5,opt,name=k8s_service_account,json=k8sServiceAccount,proto3" json:"k8s_service_account,omitempty"` // Environment variables attached to the task execution - EnvironmentVariables map[string]string `protobuf:"bytes,6,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + EnvironmentVariables map[string]string `protobuf:"bytes,6,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MaxAttempts int32 `protobuf:"varint,7,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"` + Interruptible bool `protobuf:"varint,8,opt,name=interruptible,proto3" json:"interruptible,omitempty"` + InterruptibleFailureThreshold int32 `protobuf:"varint,9,opt,name=interruptible_failure_threshold,json=interruptibleFailureThreshold,proto3" json:"interruptible_failure_threshold,omitempty"` + Overrides *core.TaskNodeOverrides `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` } func (x *TaskExecutionMetadata) Reset() { @@ -173,6 +177,34 @@ func (x *TaskExecutionMetadata) GetEnvironmentVariables() map[string]string { return nil } +func (x *TaskExecutionMetadata) GetMaxAttempts() int32 { + if x != nil { + return x.MaxAttempts + } + return 0 +} + +func (x *TaskExecutionMetadata) GetInterruptible() bool { + if x != nil { + return x.Interruptible + } + return false +} + +func (x *TaskExecutionMetadata) GetInterruptibleFailureThreshold() int32 { + if x != nil { + return x.InterruptibleFailureThreshold + } + return 0 +} + +func (x *TaskExecutionMetadata) GetOverrides() *core.TaskNodeOverrides { + if x != nil { + return x.Overrides + } + return nil +} + // Represents a request structure to create task. type CreateTaskRequest struct { state protoimpl.MessageState @@ -257,14 +289,8 @@ type CreateTaskResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). - // Resource is for synchronous task execution. - // - // Types that are assignable to Res: - // - // *CreateTaskResponse_ResourceMeta - // *CreateTaskResponse_Resource - Res isCreateTaskResponse_Res `protobuf_oneof:"res"` + // ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + ResourceMeta []byte `protobuf:"bytes,1,opt,name=resource_meta,json=resourceMeta,proto3" json:"resource_meta,omitempty"` } func (x *CreateTaskResponse) Reset() { @@ -299,42 +325,299 @@ func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{2} } -func (m *CreateTaskResponse) GetRes() isCreateTaskResponse_Res { +func (x *CreateTaskResponse) GetResourceMeta() []byte { + if x != nil { + return x.ResourceMeta + } + return nil +} + +type CreateRequestHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Template of the task that encapsulates all the metadata of the task. + Template *core.TaskTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` + // Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring) + OutputPrefix string `protobuf:"bytes,2,opt,name=output_prefix,json=outputPrefix,proto3" json:"output_prefix,omitempty"` + // subset of runtime task execution metadata. + TaskExecutionMetadata *TaskExecutionMetadata `protobuf:"bytes,3,opt,name=task_execution_metadata,json=taskExecutionMetadata,proto3" json:"task_execution_metadata,omitempty"` + // MaxDatasetSizeBytes is the maximum size of the dataset that can be generated by the task. + MaxDatasetSizeBytes int64 `protobuf:"varint,4,opt,name=max_dataset_size_bytes,json=maxDatasetSizeBytes,proto3" json:"max_dataset_size_bytes,omitempty"` +} + +func (x *CreateRequestHeader) Reset() { + *x = CreateRequestHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequestHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequestHeader) ProtoMessage() {} + +func (x *CreateRequestHeader) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[3] + 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 CreateRequestHeader.ProtoReflect.Descriptor instead. +func (*CreateRequestHeader) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateRequestHeader) GetTemplate() *core.TaskTemplate { + if x != nil { + return x.Template + } + return nil +} + +func (x *CreateRequestHeader) GetOutputPrefix() string { + if x != nil { + return x.OutputPrefix + } + return "" +} + +func (x *CreateRequestHeader) GetTaskExecutionMetadata() *TaskExecutionMetadata { + if x != nil { + return x.TaskExecutionMetadata + } + return nil +} + +func (x *CreateRequestHeader) GetMaxDatasetSizeBytes() int64 { + if x != nil { + return x.MaxDatasetSizeBytes + } + return 0 +} + +type ExecuteTaskSyncRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Part: + // + // *ExecuteTaskSyncRequest_Header + // *ExecuteTaskSyncRequest_Inputs + Part isExecuteTaskSyncRequest_Part `protobuf_oneof:"part"` +} + +func (x *ExecuteTaskSyncRequest) Reset() { + *x = ExecuteTaskSyncRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteTaskSyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteTaskSyncRequest) ProtoMessage() {} + +func (x *ExecuteTaskSyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[4] + 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 ExecuteTaskSyncRequest.ProtoReflect.Descriptor instead. +func (*ExecuteTaskSyncRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{4} +} + +func (m *ExecuteTaskSyncRequest) GetPart() isExecuteTaskSyncRequest_Part { if m != nil { - return m.Res + return m.Part } return nil } -func (x *CreateTaskResponse) GetResourceMeta() []byte { - if x, ok := x.GetRes().(*CreateTaskResponse_ResourceMeta); ok { - return x.ResourceMeta +func (x *ExecuteTaskSyncRequest) GetHeader() *CreateRequestHeader { + if x, ok := x.GetPart().(*ExecuteTaskSyncRequest_Header); ok { + return x.Header } return nil } -func (x *CreateTaskResponse) GetResource() *Resource { - if x, ok := x.GetRes().(*CreateTaskResponse_Resource); ok { +func (x *ExecuteTaskSyncRequest) GetInputs() *core.LiteralMap { + if x, ok := x.GetPart().(*ExecuteTaskSyncRequest_Inputs); ok { + return x.Inputs + } + return nil +} + +type isExecuteTaskSyncRequest_Part interface { + isExecuteTaskSyncRequest_Part() +} + +type ExecuteTaskSyncRequest_Header struct { + Header *CreateRequestHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type ExecuteTaskSyncRequest_Inputs struct { + Inputs *core.LiteralMap `protobuf:"bytes,2,opt,name=inputs,proto3,oneof"` +} + +func (*ExecuteTaskSyncRequest_Header) isExecuteTaskSyncRequest_Part() {} + +func (*ExecuteTaskSyncRequest_Inputs) isExecuteTaskSyncRequest_Part() {} + +type ExecuteTaskSyncResponseHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` +} + +func (x *ExecuteTaskSyncResponseHeader) Reset() { + *x = ExecuteTaskSyncResponseHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteTaskSyncResponseHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteTaskSyncResponseHeader) ProtoMessage() {} + +func (x *ExecuteTaskSyncResponseHeader) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[5] + 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 ExecuteTaskSyncResponseHeader.ProtoReflect.Descriptor instead. +func (*ExecuteTaskSyncResponseHeader) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{5} +} + +func (x *ExecuteTaskSyncResponseHeader) GetResource() *Resource { + if x != nil { return x.Resource } return nil } -type isCreateTaskResponse_Res interface { - isCreateTaskResponse_Res() +type ExecuteTaskSyncResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + // Resource is for synchronous task execution. + // + // Types that are assignable to Res: + // + // *ExecuteTaskSyncResponse_Header + // *ExecuteTaskSyncResponse_Outputs + Res isExecuteTaskSyncResponse_Res `protobuf_oneof:"res"` } -type CreateTaskResponse_ResourceMeta struct { - ResourceMeta []byte `protobuf:"bytes,1,opt,name=resource_meta,json=resourceMeta,proto3,oneof"` +func (x *ExecuteTaskSyncResponse) Reset() { + *x = ExecuteTaskSyncResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -type CreateTaskResponse_Resource struct { - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3,oneof"` +func (x *ExecuteTaskSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (*CreateTaskResponse_ResourceMeta) isCreateTaskResponse_Res() {} +func (*ExecuteTaskSyncResponse) ProtoMessage() {} -func (*CreateTaskResponse_Resource) isCreateTaskResponse_Res() {} +func (x *ExecuteTaskSyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[6] + 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 ExecuteTaskSyncResponse.ProtoReflect.Descriptor instead. +func (*ExecuteTaskSyncResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{6} +} + +func (m *ExecuteTaskSyncResponse) GetRes() isExecuteTaskSyncResponse_Res { + if m != nil { + return m.Res + } + return nil +} + +func (x *ExecuteTaskSyncResponse) GetHeader() *ExecuteTaskSyncResponseHeader { + if x, ok := x.GetRes().(*ExecuteTaskSyncResponse_Header); ok { + return x.Header + } + return nil +} + +func (x *ExecuteTaskSyncResponse) GetOutputs() *core.LiteralMap { + if x, ok := x.GetRes().(*ExecuteTaskSyncResponse_Outputs); ok { + return x.Outputs + } + return nil +} + +type isExecuteTaskSyncResponse_Res interface { + isExecuteTaskSyncResponse_Res() +} + +type ExecuteTaskSyncResponse_Header struct { + Header *ExecuteTaskSyncResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type ExecuteTaskSyncResponse_Outputs struct { + Outputs *core.LiteralMap `protobuf:"bytes,2,opt,name=outputs,proto3,oneof"` +} + +func (*ExecuteTaskSyncResponse_Header) isExecuteTaskSyncResponse_Res() {} + +func (*ExecuteTaskSyncResponse_Outputs) isExecuteTaskSyncResponse_Res() {} // A message used to fetch a job resource from flyte agent server. type GetTaskRequest struct { @@ -343,7 +626,7 @@ type GetTaskRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. - TaskType string `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` + TaskType *TaskType `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` // Metadata about the resource to be pass to the agent. ResourceMeta []byte `protobuf:"bytes,2,opt,name=resource_meta,json=resourceMeta,proto3" json:"resource_meta,omitempty"` } @@ -351,7 +634,7 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[3] + mi := &file_flyteidl_admin_agent_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -364,7 +647,7 @@ func (x *GetTaskRequest) String() string { func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[3] + mi := &file_flyteidl_admin_agent_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -377,14 +660,14 @@ func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead. func (*GetTaskRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{3} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{7} } -func (x *GetTaskRequest) GetTaskType() string { +func (x *GetTaskRequest) GetTaskType() *TaskType { if x != nil { return x.TaskType } - return "" + return nil } func (x *GetTaskRequest) GetResourceMeta() []byte { @@ -408,7 +691,7 @@ type GetTaskResponse struct { func (x *GetTaskResponse) Reset() { *x = GetTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[4] + mi := &file_flyteidl_admin_agent_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -421,7 +704,7 @@ func (x *GetTaskResponse) String() string { func (*GetTaskResponse) ProtoMessage() {} func (x *GetTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[4] + mi := &file_flyteidl_admin_agent_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -434,7 +717,7 @@ func (x *GetTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskResponse.ProtoReflect.Descriptor instead. func (*GetTaskResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{4} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{8} } func (x *GetTaskResponse) GetResource() *Resource { @@ -475,7 +758,7 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[5] + mi := &file_flyteidl_admin_agent_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -488,7 +771,7 @@ func (x *Resource) String() string { func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[5] + mi := &file_flyteidl_admin_agent_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -501,7 +784,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{5} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{9} } // Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. @@ -547,7 +830,7 @@ type DeleteTaskRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. - TaskType string `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` + TaskType *TaskType `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` // Metadata about the resource to be pass to the agent. ResourceMeta []byte `protobuf:"bytes,2,opt,name=resource_meta,json=resourceMeta,proto3" json:"resource_meta,omitempty"` } @@ -555,7 +838,7 @@ type DeleteTaskRequest struct { func (x *DeleteTaskRequest) Reset() { *x = DeleteTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[6] + mi := &file_flyteidl_admin_agent_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -568,7 +851,7 @@ func (x *DeleteTaskRequest) String() string { func (*DeleteTaskRequest) ProtoMessage() {} func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[6] + mi := &file_flyteidl_admin_agent_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -581,14 +864,14 @@ func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTaskRequest.ProtoReflect.Descriptor instead. func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{6} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{10} } -func (x *DeleteTaskRequest) GetTaskType() string { +func (x *DeleteTaskRequest) GetTaskType() *TaskType { if x != nil { return x.TaskType } - return "" + return nil } func (x *DeleteTaskRequest) GetResourceMeta() []byte { @@ -608,7 +891,7 @@ type DeleteTaskResponse struct { func (x *DeleteTaskResponse) Reset() { *x = DeleteTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[7] + mi := &file_flyteidl_admin_agent_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -621,7 +904,7 @@ func (x *DeleteTaskResponse) String() string { func (*DeleteTaskResponse) ProtoMessage() {} func (x *DeleteTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[7] + mi := &file_flyteidl_admin_agent_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -634,38 +917,95 @@ func (x *DeleteTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTaskResponse.ProtoReflect.Descriptor instead. func (*DeleteTaskResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{7} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{11} +} + +// A message containing the agent metadata. +type Agent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is the developer-assigned name of the agent. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // SupportedTaskTypes are the types of the tasks that the agent can handle. + SupportedTaskTypes []*TaskType `protobuf:"bytes,2,rep,name=supported_task_types,json=supportedTaskTypes,proto3" json:"supported_task_types,omitempty"` +} + +func (x *Agent) Reset() { + *x = Agent{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Agent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Agent) ProtoMessage() {} + +func (x *Agent) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[12] + 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 Agent.ProtoReflect.Descriptor instead. +func (*Agent) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{12} +} + +func (x *Agent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Agent) GetSupportedTaskTypes() []*TaskType { + if x != nil { + return x.SupportedTaskTypes + } + return nil } -// A message containing the agent metadata. -type Agent struct { +type TaskType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name is the developer-assigned name of the agent. + // The name of the task type. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // SupportedTaskTypes are the types of the tasks that the agent can handle. - SupportedTaskTypes []string `protobuf:"bytes,2,rep,name=supported_task_types,json=supportedTaskTypes,proto3" json:"supported_task_types,omitempty"` + // The version of the task type. + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` } -func (x *Agent) Reset() { - *x = Agent{} +func (x *TaskType) Reset() { + *x = TaskType{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[8] + mi := &file_flyteidl_admin_agent_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Agent) String() string { +func (x *TaskType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Agent) ProtoMessage() {} +func (*TaskType) ProtoMessage() {} -func (x *Agent) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[8] +func (x *TaskType) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -676,23 +1016,23 @@ func (x *Agent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Agent.ProtoReflect.Descriptor instead. -func (*Agent) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{8} +// Deprecated: Use TaskType.ProtoReflect.Descriptor instead. +func (*TaskType) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{13} } -func (x *Agent) GetName() string { +func (x *TaskType) GetName() string { if x != nil { return x.Name } return "" } -func (x *Agent) GetSupportedTaskTypes() []string { +func (x *TaskType) GetVersion() int32 { if x != nil { - return x.SupportedTaskTypes + return x.Version } - return nil + return 0 } // A request to get an agent. @@ -708,7 +1048,7 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[9] + mi := &file_flyteidl_admin_agent_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -721,7 +1061,7 @@ func (x *GetAgentRequest) String() string { func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[9] + mi := &file_flyteidl_admin_agent_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -734,7 +1074,7 @@ func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentRequest.ProtoReflect.Descriptor instead. func (*GetAgentRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{9} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{14} } func (x *GetAgentRequest) GetName() string { @@ -756,7 +1096,7 @@ type GetAgentResponse struct { func (x *GetAgentResponse) Reset() { *x = GetAgentResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[10] + mi := &file_flyteidl_admin_agent_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -769,7 +1109,7 @@ func (x *GetAgentResponse) String() string { func (*GetAgentResponse) ProtoMessage() {} func (x *GetAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[10] + mi := &file_flyteidl_admin_agent_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -782,7 +1122,7 @@ func (x *GetAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentResponse.ProtoReflect.Descriptor instead. func (*GetAgentResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{10} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{15} } func (x *GetAgentResponse) GetAgent() *Agent { @@ -802,7 +1142,7 @@ type ListAgentsRequest struct { func (x *ListAgentsRequest) Reset() { *x = ListAgentsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[11] + mi := &file_flyteidl_admin_agent_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -815,7 +1155,7 @@ func (x *ListAgentsRequest) String() string { func (*ListAgentsRequest) ProtoMessage() {} func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[11] + mi := &file_flyteidl_admin_agent_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -828,7 +1168,7 @@ func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAgentsRequest.ProtoReflect.Descriptor instead. func (*ListAgentsRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{11} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{16} } // A response containing a list of agents. @@ -843,7 +1183,7 @@ type ListAgentsResponse struct { func (x *ListAgentsResponse) Reset() { *x = ListAgentsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[12] + mi := &file_flyteidl_admin_agent_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -856,7 +1196,7 @@ func (x *ListAgentsResponse) String() string { func (*ListAgentsResponse) ProtoMessage() {} func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[12] + mi := &file_flyteidl_admin_agent_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -869,7 +1209,7 @@ func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAgentsResponse.ProtoReflect.Descriptor instead. func (*ListAgentsResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{12} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{17} } func (x *ListAgentsResponse) GetAgents() []*Agent { @@ -886,7 +1226,7 @@ type GetTaskMetricsRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. - TaskType string `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` + TaskType *TaskType `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). ResourceMeta []byte `protobuf:"bytes,2,opt,name=resource_meta,json=resourceMeta,proto3" json:"resource_meta,omitempty"` // The metrics to query. If empty, will return a default set of metrics. @@ -903,7 +1243,7 @@ type GetTaskMetricsRequest struct { func (x *GetTaskMetricsRequest) Reset() { *x = GetTaskMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[13] + mi := &file_flyteidl_admin_agent_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -916,7 +1256,7 @@ func (x *GetTaskMetricsRequest) String() string { func (*GetTaskMetricsRequest) ProtoMessage() {} func (x *GetTaskMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[13] + mi := &file_flyteidl_admin_agent_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -929,14 +1269,14 @@ func (x *GetTaskMetricsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskMetricsRequest.ProtoReflect.Descriptor instead. func (*GetTaskMetricsRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{13} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{18} } -func (x *GetTaskMetricsRequest) GetTaskType() string { +func (x *GetTaskMetricsRequest) GetTaskType() *TaskType { if x != nil { return x.TaskType } - return "" + return nil } func (x *GetTaskMetricsRequest) GetResourceMeta() []byte { @@ -987,7 +1327,7 @@ type GetTaskMetricsResponse struct { func (x *GetTaskMetricsResponse) Reset() { *x = GetTaskMetricsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[14] + mi := &file_flyteidl_admin_agent_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1000,7 +1340,7 @@ func (x *GetTaskMetricsResponse) String() string { func (*GetTaskMetricsResponse) ProtoMessage() {} func (x *GetTaskMetricsResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[14] + mi := &file_flyteidl_admin_agent_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1013,7 +1353,7 @@ func (x *GetTaskMetricsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskMetricsResponse.ProtoReflect.Descriptor instead. func (*GetTaskMetricsResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{14} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{19} } func (x *GetTaskMetricsResponse) GetResults() []*core.ExecutionMetricResult { @@ -1030,7 +1370,7 @@ type GetTaskLogsRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. - TaskType string `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` + TaskType *TaskType `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). ResourceMeta []byte `protobuf:"bytes,2,opt,name=resource_meta,json=resourceMeta,proto3" json:"resource_meta,omitempty"` // Number of lines to return. @@ -1043,7 +1383,7 @@ type GetTaskLogsRequest struct { func (x *GetTaskLogsRequest) Reset() { *x = GetTaskLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[15] + mi := &file_flyteidl_admin_agent_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1056,7 +1396,7 @@ func (x *GetTaskLogsRequest) String() string { func (*GetTaskLogsRequest) ProtoMessage() {} func (x *GetTaskLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[15] + mi := &file_flyteidl_admin_agent_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1069,14 +1409,14 @@ func (x *GetTaskLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskLogsRequest.ProtoReflect.Descriptor instead. func (*GetTaskLogsRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{15} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{20} } -func (x *GetTaskLogsRequest) GetTaskType() string { +func (x *GetTaskLogsRequest) GetTaskType() *TaskType { if x != nil { return x.TaskType } - return "" + return nil } func (x *GetTaskLogsRequest) GetResourceMeta() []byte { @@ -1100,23 +1440,120 @@ func (x *GetTaskLogsRequest) GetToken() string { return "" } -// A response containing the logs for a task execution. -type GetTaskLogsResponse struct { +type GetTaskLogsResponseHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The execution log results. - Results []string `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // In the case of multiple pages of results, the server-provided token can be used to fetch the next page // in a query. If there are no more results, this value will be empty. - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *GetTaskLogsResponseHeader) Reset() { + *x = GetTaskLogsResponseHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaskLogsResponseHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTaskLogsResponseHeader) ProtoMessage() {} + +func (x *GetTaskLogsResponseHeader) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[21] + 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 GetTaskLogsResponseHeader.ProtoReflect.Descriptor instead. +func (*GetTaskLogsResponseHeader) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{21} +} + +func (x *GetTaskLogsResponseHeader) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type GetTaskLogsResponseBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The execution log results. + Results []string `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (x *GetTaskLogsResponseBody) Reset() { + *x = GetTaskLogsResponseBody{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaskLogsResponseBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTaskLogsResponseBody) ProtoMessage() {} + +func (x *GetTaskLogsResponseBody) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_agent_proto_msgTypes[22] + 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 GetTaskLogsResponseBody.ProtoReflect.Descriptor instead. +func (*GetTaskLogsResponseBody) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{22} +} + +func (x *GetTaskLogsResponseBody) GetResults() []string { + if x != nil { + return x.Results + } + return nil +} + +// A response containing the logs for a task execution. +type GetTaskLogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Part: + // + // *GetTaskLogsResponse_Header + // *GetTaskLogsResponse_Body + Part isGetTaskLogsResponse_Part `protobuf_oneof:"part"` } func (x *GetTaskLogsResponse) Reset() { *x = GetTaskLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[16] + mi := &file_flyteidl_admin_agent_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1129,7 +1566,7 @@ func (x *GetTaskLogsResponse) String() string { func (*GetTaskLogsResponse) ProtoMessage() {} func (x *GetTaskLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[16] + mi := &file_flyteidl_admin_agent_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1142,23 +1579,46 @@ func (x *GetTaskLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskLogsResponse.ProtoReflect.Descriptor instead. func (*GetTaskLogsResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{16} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{23} } -func (x *GetTaskLogsResponse) GetResults() []string { - if x != nil { - return x.Results +func (m *GetTaskLogsResponse) GetPart() isGetTaskLogsResponse_Part { + if m != nil { + return m.Part } return nil } -func (x *GetTaskLogsResponse) GetToken() string { - if x != nil { - return x.Token +func (x *GetTaskLogsResponse) GetHeader() *GetTaskLogsResponseHeader { + if x, ok := x.GetPart().(*GetTaskLogsResponse_Header); ok { + return x.Header } - return "" + return nil +} + +func (x *GetTaskLogsResponse) GetBody() *GetTaskLogsResponseBody { + if x, ok := x.GetPart().(*GetTaskLogsResponse_Body); ok { + return x.Body + } + return nil +} + +type isGetTaskLogsResponse_Part interface { + isGetTaskLogsResponse_Part() +} + +type GetTaskLogsResponse_Header struct { + Header *GetTaskLogsResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type GetTaskLogsResponse_Body struct { + Body *GetTaskLogsResponseBody `protobuf:"bytes,2,opt,name=body,proto3,oneof"` } +func (*GetTaskLogsResponse_Header) isGetTaskLogsResponse_Part() {} + +func (*GetTaskLogsResponse_Body) isGetTaskLogsResponse_Part() {} + var File_flyteidl_admin_agent_proto protoreflect.FileDescriptor var file_flyteidl_admin_agent_proto_rawDesc = []byte{ @@ -1168,189 +1628,266 @@ var file_flyteidl_admin_agent_proto_rawDesc = []byte{ 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x98, 0x05, 0x0a, 0x15, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x11, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, - 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x49, - 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x58, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6b, 0x38, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x6b, 0x38, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x14, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xe9, 0x06, 0x0a, 0x15, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x11, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0f, 0x74, + 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x58, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6b, 0x38, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x6b, 0x38, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x74, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x83, 0x02, - 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x79, 0x52, 0x14, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x61, + 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, + 0x61, 0x78, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x62, 0x6c, 0x65, + 0x12, 0x46, 0x0a, 0x1f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x62, 0x6c, + 0x65, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1d, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x72, 0x75, 0x70, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x3e, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x4e, 0x6f, 0x64, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x09, 0x6f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x83, 0x02, 0x0a, + 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x06, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x5d, 0x0a, 0x17, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x15, 0x74, 0x61, 0x73, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x39, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x87, 0x02, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x5d, 0x0a, 0x17, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x15, 0x74, 0x61, 0x73, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x53, 0x69, + 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x33, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x06, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, 0x72, 0x74, 0x22, 0x55, + 0x0a, 0x1d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, + 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x22, 0x6c, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x06, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x5d, 0x0a, 0x17, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x15, 0x74, 0x61, - 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x7a, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x07, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x6c, 0x6f, + 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, + 0x22, 0x6f, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x22, - 0x52, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x22, 0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x09, - 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x6b, - 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x33, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x07, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, - 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x69, - 0x6e, 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x55, 0x0a, - 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x05, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x22, 0x38, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x3f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x94, 0x02, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x82, 0x01, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x45, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0x5e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x52, 0x59, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, - 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, - 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, - 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x42, 0xb6, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, - 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, - 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x41, 0x58, - 0xaa, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0xca, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0xe2, 0x02, 0x1a, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0f, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, + 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x3f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, + 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xae, 0x02, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, + 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x58, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, + 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, + 0x6e, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x31, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x6f, 0x64, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xa1, + 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, + 0x64, 0x79, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, + 0x72, 0x74, 0x2a, 0x5e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x52, + 0x45, 0x54, 0x52, 0x59, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, + 0x10, 0x04, 0x42, 0xb6, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xca, 0x02, 0x0e, 0x46, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xe2, 0x02, 0x1a, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x46, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1366,64 +1903,86 @@ func file_flyteidl_admin_agent_proto_rawDescGZIP() []byte { } var file_flyteidl_admin_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_flyteidl_admin_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_flyteidl_admin_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_flyteidl_admin_agent_proto_goTypes = []interface{}{ - (State)(0), // 0: flyteidl.admin.State - (*TaskExecutionMetadata)(nil), // 1: flyteidl.admin.TaskExecutionMetadata - (*CreateTaskRequest)(nil), // 2: flyteidl.admin.CreateTaskRequest - (*CreateTaskResponse)(nil), // 3: flyteidl.admin.CreateTaskResponse - (*GetTaskRequest)(nil), // 4: flyteidl.admin.GetTaskRequest - (*GetTaskResponse)(nil), // 5: flyteidl.admin.GetTaskResponse - (*Resource)(nil), // 6: flyteidl.admin.Resource - (*DeleteTaskRequest)(nil), // 7: flyteidl.admin.DeleteTaskRequest - (*DeleteTaskResponse)(nil), // 8: flyteidl.admin.DeleteTaskResponse - (*Agent)(nil), // 9: flyteidl.admin.Agent - (*GetAgentRequest)(nil), // 10: flyteidl.admin.GetAgentRequest - (*GetAgentResponse)(nil), // 11: flyteidl.admin.GetAgentResponse - (*ListAgentsRequest)(nil), // 12: flyteidl.admin.ListAgentsRequest - (*ListAgentsResponse)(nil), // 13: flyteidl.admin.ListAgentsResponse - (*GetTaskMetricsRequest)(nil), // 14: flyteidl.admin.GetTaskMetricsRequest - (*GetTaskMetricsResponse)(nil), // 15: flyteidl.admin.GetTaskMetricsResponse - (*GetTaskLogsRequest)(nil), // 16: flyteidl.admin.GetTaskLogsRequest - (*GetTaskLogsResponse)(nil), // 17: flyteidl.admin.GetTaskLogsResponse - nil, // 18: flyteidl.admin.TaskExecutionMetadata.LabelsEntry - nil, // 19: flyteidl.admin.TaskExecutionMetadata.AnnotationsEntry - nil, // 20: flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntry - (*core.TaskExecutionIdentifier)(nil), // 21: flyteidl.core.TaskExecutionIdentifier - (*core.LiteralMap)(nil), // 22: flyteidl.core.LiteralMap - (*core.TaskTemplate)(nil), // 23: flyteidl.core.TaskTemplate - (*core.TaskLog)(nil), // 24: flyteidl.core.TaskLog - (core.TaskExecution_Phase)(0), // 25: flyteidl.core.TaskExecution.Phase - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 27: google.protobuf.Duration - (*core.ExecutionMetricResult)(nil), // 28: flyteidl.core.ExecutionMetricResult + (State)(0), // 0: flyteidl.admin.State + (*TaskExecutionMetadata)(nil), // 1: flyteidl.admin.TaskExecutionMetadata + (*CreateTaskRequest)(nil), // 2: flyteidl.admin.CreateTaskRequest + (*CreateTaskResponse)(nil), // 3: flyteidl.admin.CreateTaskResponse + (*CreateRequestHeader)(nil), // 4: flyteidl.admin.CreateRequestHeader + (*ExecuteTaskSyncRequest)(nil), // 5: flyteidl.admin.ExecuteTaskSyncRequest + (*ExecuteTaskSyncResponseHeader)(nil), // 6: flyteidl.admin.ExecuteTaskSyncResponseHeader + (*ExecuteTaskSyncResponse)(nil), // 7: flyteidl.admin.ExecuteTaskSyncResponse + (*GetTaskRequest)(nil), // 8: flyteidl.admin.GetTaskRequest + (*GetTaskResponse)(nil), // 9: flyteidl.admin.GetTaskResponse + (*Resource)(nil), // 10: flyteidl.admin.Resource + (*DeleteTaskRequest)(nil), // 11: flyteidl.admin.DeleteTaskRequest + (*DeleteTaskResponse)(nil), // 12: flyteidl.admin.DeleteTaskResponse + (*Agent)(nil), // 13: flyteidl.admin.Agent + (*TaskType)(nil), // 14: flyteidl.admin.TaskType + (*GetAgentRequest)(nil), // 15: flyteidl.admin.GetAgentRequest + (*GetAgentResponse)(nil), // 16: flyteidl.admin.GetAgentResponse + (*ListAgentsRequest)(nil), // 17: flyteidl.admin.ListAgentsRequest + (*ListAgentsResponse)(nil), // 18: flyteidl.admin.ListAgentsResponse + (*GetTaskMetricsRequest)(nil), // 19: flyteidl.admin.GetTaskMetricsRequest + (*GetTaskMetricsResponse)(nil), // 20: flyteidl.admin.GetTaskMetricsResponse + (*GetTaskLogsRequest)(nil), // 21: flyteidl.admin.GetTaskLogsRequest + (*GetTaskLogsResponseHeader)(nil), // 22: flyteidl.admin.GetTaskLogsResponseHeader + (*GetTaskLogsResponseBody)(nil), // 23: flyteidl.admin.GetTaskLogsResponseBody + (*GetTaskLogsResponse)(nil), // 24: flyteidl.admin.GetTaskLogsResponse + nil, // 25: flyteidl.admin.TaskExecutionMetadata.LabelsEntry + nil, // 26: flyteidl.admin.TaskExecutionMetadata.AnnotationsEntry + nil, // 27: flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntry + (*core.TaskExecutionIdentifier)(nil), // 28: flyteidl.core.TaskExecutionIdentifier + (*core.TaskNodeOverrides)(nil), // 29: flyteidl.core.TaskNodeOverrides + (*core.LiteralMap)(nil), // 30: flyteidl.core.LiteralMap + (*core.TaskTemplate)(nil), // 31: flyteidl.core.TaskTemplate + (*core.TaskLog)(nil), // 32: flyteidl.core.TaskLog + (core.TaskExecution_Phase)(0), // 33: flyteidl.core.TaskExecution.Phase + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 35: google.protobuf.Duration + (*core.ExecutionMetricResult)(nil), // 36: flyteidl.core.ExecutionMetricResult } var file_flyteidl_admin_agent_proto_depIdxs = []int32{ - 21, // 0: flyteidl.admin.TaskExecutionMetadata.task_execution_id:type_name -> flyteidl.core.TaskExecutionIdentifier - 18, // 1: flyteidl.admin.TaskExecutionMetadata.labels:type_name -> flyteidl.admin.TaskExecutionMetadata.LabelsEntry - 19, // 2: flyteidl.admin.TaskExecutionMetadata.annotations:type_name -> flyteidl.admin.TaskExecutionMetadata.AnnotationsEntry - 20, // 3: flyteidl.admin.TaskExecutionMetadata.environment_variables:type_name -> flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntry - 22, // 4: flyteidl.admin.CreateTaskRequest.inputs:type_name -> flyteidl.core.LiteralMap - 23, // 5: flyteidl.admin.CreateTaskRequest.template:type_name -> flyteidl.core.TaskTemplate - 1, // 6: flyteidl.admin.CreateTaskRequest.task_execution_metadata:type_name -> flyteidl.admin.TaskExecutionMetadata - 6, // 7: flyteidl.admin.CreateTaskResponse.resource:type_name -> flyteidl.admin.Resource - 6, // 8: flyteidl.admin.GetTaskResponse.resource:type_name -> flyteidl.admin.Resource - 24, // 9: flyteidl.admin.GetTaskResponse.log_links:type_name -> flyteidl.core.TaskLog - 0, // 10: flyteidl.admin.Resource.state:type_name -> flyteidl.admin.State - 22, // 11: flyteidl.admin.Resource.outputs:type_name -> flyteidl.core.LiteralMap - 24, // 12: flyteidl.admin.Resource.log_links:type_name -> flyteidl.core.TaskLog - 25, // 13: flyteidl.admin.Resource.phase:type_name -> flyteidl.core.TaskExecution.Phase - 9, // 14: flyteidl.admin.GetAgentResponse.agent:type_name -> flyteidl.admin.Agent - 9, // 15: flyteidl.admin.ListAgentsResponse.agents:type_name -> flyteidl.admin.Agent - 26, // 16: flyteidl.admin.GetTaskMetricsRequest.start_time:type_name -> google.protobuf.Timestamp - 26, // 17: flyteidl.admin.GetTaskMetricsRequest.end_time:type_name -> google.protobuf.Timestamp - 27, // 18: flyteidl.admin.GetTaskMetricsRequest.step:type_name -> google.protobuf.Duration - 28, // 19: flyteidl.admin.GetTaskMetricsResponse.results:type_name -> flyteidl.core.ExecutionMetricResult - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 28, // 0: flyteidl.admin.TaskExecutionMetadata.task_execution_id:type_name -> flyteidl.core.TaskExecutionIdentifier + 25, // 1: flyteidl.admin.TaskExecutionMetadata.labels:type_name -> flyteidl.admin.TaskExecutionMetadata.LabelsEntry + 26, // 2: flyteidl.admin.TaskExecutionMetadata.annotations:type_name -> flyteidl.admin.TaskExecutionMetadata.AnnotationsEntry + 27, // 3: flyteidl.admin.TaskExecutionMetadata.environment_variables:type_name -> flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntry + 29, // 4: flyteidl.admin.TaskExecutionMetadata.overrides:type_name -> flyteidl.core.TaskNodeOverrides + 30, // 5: flyteidl.admin.CreateTaskRequest.inputs:type_name -> flyteidl.core.LiteralMap + 31, // 6: flyteidl.admin.CreateTaskRequest.template:type_name -> flyteidl.core.TaskTemplate + 1, // 7: flyteidl.admin.CreateTaskRequest.task_execution_metadata:type_name -> flyteidl.admin.TaskExecutionMetadata + 31, // 8: flyteidl.admin.CreateRequestHeader.template:type_name -> flyteidl.core.TaskTemplate + 1, // 9: flyteidl.admin.CreateRequestHeader.task_execution_metadata:type_name -> flyteidl.admin.TaskExecutionMetadata + 4, // 10: flyteidl.admin.ExecuteTaskSyncRequest.header:type_name -> flyteidl.admin.CreateRequestHeader + 30, // 11: flyteidl.admin.ExecuteTaskSyncRequest.inputs:type_name -> flyteidl.core.LiteralMap + 10, // 12: flyteidl.admin.ExecuteTaskSyncResponseHeader.resource:type_name -> flyteidl.admin.Resource + 6, // 13: flyteidl.admin.ExecuteTaskSyncResponse.header:type_name -> flyteidl.admin.ExecuteTaskSyncResponseHeader + 30, // 14: flyteidl.admin.ExecuteTaskSyncResponse.outputs:type_name -> flyteidl.core.LiteralMap + 14, // 15: flyteidl.admin.GetTaskRequest.task_type:type_name -> flyteidl.admin.TaskType + 10, // 16: flyteidl.admin.GetTaskResponse.resource:type_name -> flyteidl.admin.Resource + 32, // 17: flyteidl.admin.GetTaskResponse.log_links:type_name -> flyteidl.core.TaskLog + 0, // 18: flyteidl.admin.Resource.state:type_name -> flyteidl.admin.State + 30, // 19: flyteidl.admin.Resource.outputs:type_name -> flyteidl.core.LiteralMap + 32, // 20: flyteidl.admin.Resource.log_links:type_name -> flyteidl.core.TaskLog + 33, // 21: flyteidl.admin.Resource.phase:type_name -> flyteidl.core.TaskExecution.Phase + 14, // 22: flyteidl.admin.DeleteTaskRequest.task_type:type_name -> flyteidl.admin.TaskType + 14, // 23: flyteidl.admin.Agent.supported_task_types:type_name -> flyteidl.admin.TaskType + 13, // 24: flyteidl.admin.GetAgentResponse.agent:type_name -> flyteidl.admin.Agent + 13, // 25: flyteidl.admin.ListAgentsResponse.agents:type_name -> flyteidl.admin.Agent + 14, // 26: flyteidl.admin.GetTaskMetricsRequest.task_type:type_name -> flyteidl.admin.TaskType + 34, // 27: flyteidl.admin.GetTaskMetricsRequest.start_time:type_name -> google.protobuf.Timestamp + 34, // 28: flyteidl.admin.GetTaskMetricsRequest.end_time:type_name -> google.protobuf.Timestamp + 35, // 29: flyteidl.admin.GetTaskMetricsRequest.step:type_name -> google.protobuf.Duration + 36, // 30: flyteidl.admin.GetTaskMetricsResponse.results:type_name -> flyteidl.core.ExecutionMetricResult + 14, // 31: flyteidl.admin.GetTaskLogsRequest.task_type:type_name -> flyteidl.admin.TaskType + 22, // 32: flyteidl.admin.GetTaskLogsResponse.header:type_name -> flyteidl.admin.GetTaskLogsResponseHeader + 23, // 33: flyteidl.admin.GetTaskLogsResponse.body:type_name -> flyteidl.admin.GetTaskLogsResponseBody + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_flyteidl_admin_agent_proto_init() } @@ -1469,7 +2028,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskRequest); i { + switch v := v.(*CreateRequestHeader); i { case 0: return &v.state case 1: @@ -1481,7 +2040,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskResponse); i { + switch v := v.(*ExecuteTaskSyncRequest); i { case 0: return &v.state case 1: @@ -1493,7 +2052,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { + switch v := v.(*ExecuteTaskSyncResponseHeader); i { case 0: return &v.state case 1: @@ -1505,7 +2064,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTaskRequest); i { + switch v := v.(*ExecuteTaskSyncResponse); i { case 0: return &v.state case 1: @@ -1517,7 +2076,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTaskResponse); i { + switch v := v.(*GetTaskRequest); i { case 0: return &v.state case 1: @@ -1529,7 +2088,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Agent); i { + switch v := v.(*GetTaskResponse); i { case 0: return &v.state case 1: @@ -1541,7 +2100,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAgentRequest); i { + switch v := v.(*Resource); i { case 0: return &v.state case 1: @@ -1553,7 +2112,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAgentResponse); i { + switch v := v.(*DeleteTaskRequest); i { case 0: return &v.state case 1: @@ -1565,7 +2124,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAgentsRequest); i { + switch v := v.(*DeleteTaskResponse); i { case 0: return &v.state case 1: @@ -1577,7 +2136,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAgentsResponse); i { + switch v := v.(*Agent); i { case 0: return &v.state case 1: @@ -1589,7 +2148,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskMetricsRequest); i { + switch v := v.(*TaskType); i { case 0: return &v.state case 1: @@ -1601,7 +2160,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskMetricsResponse); i { + switch v := v.(*GetAgentRequest); i { case 0: return &v.state case 1: @@ -1613,7 +2172,7 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskLogsRequest); i { + switch v := v.(*GetAgentResponse); i { case 0: return &v.state case 1: @@ -1625,6 +2184,90 @@ func file_flyteidl_admin_agent_proto_init() { } } file_flyteidl_admin_agent_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAgentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAgentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskLogsResponseHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskLogsResponseBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_agent_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTaskLogsResponse); i { case 0: return &v.state @@ -1637,9 +2280,17 @@ func file_flyteidl_admin_agent_proto_init() { } } } - file_flyteidl_admin_agent_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*CreateTaskResponse_ResourceMeta)(nil), - (*CreateTaskResponse_Resource)(nil), + file_flyteidl_admin_agent_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*ExecuteTaskSyncRequest_Header)(nil), + (*ExecuteTaskSyncRequest_Inputs)(nil), + } + file_flyteidl_admin_agent_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*ExecuteTaskSyncResponse_Header)(nil), + (*ExecuteTaskSyncResponse_Outputs)(nil), + } + file_flyteidl_admin_agent_proto_msgTypes[23].OneofWrappers = []interface{}{ + (*GetTaskLogsResponse_Header)(nil), + (*GetTaskLogsResponse_Body)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1647,7 +2298,7 @@ func file_flyteidl_admin_agent_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_admin_agent_proto_rawDesc, NumEnums: 1, - NumMessages: 20, + NumMessages: 27, NumExtensions: 0, NumServices: 0, }, diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go index c9ffc4fa68..257c8254a9 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go @@ -30,99 +30,135 @@ var file_flyteidl_service_agent_proto_rawDesc = []byte{ 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xcc, 0x03, 0x0a, 0x11, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd2, 0x07, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x55, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x12, 0x8c, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x79, 0x6e, 0x63, 0x12, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, + 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x72, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, + 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x12, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x12, 0x47, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x7b, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x25, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x58, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x22, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x2a, + 0x52, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x7d, 0x12, 0xae, + 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xf0, 0x01, 0x0a, 0x14, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1f, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, - 0x6b, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x42, 0xc2, 0x01, 0x0a, - 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, - 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x46, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, - 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, + 0x4c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x7d, 0x30, 0x01, 0x32, + 0xf0, 0x01, 0x0a, 0x14, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, + 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6b, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0a, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, + 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_flyteidl_service_agent_proto_goTypes = []interface{}{ - (*admin.CreateTaskRequest)(nil), // 0: flyteidl.admin.CreateTaskRequest - (*admin.GetTaskRequest)(nil), // 1: flyteidl.admin.GetTaskRequest - (*admin.DeleteTaskRequest)(nil), // 2: flyteidl.admin.DeleteTaskRequest - (*admin.GetTaskMetricsRequest)(nil), // 3: flyteidl.admin.GetTaskMetricsRequest - (*admin.GetTaskLogsRequest)(nil), // 4: flyteidl.admin.GetTaskLogsRequest - (*admin.GetAgentRequest)(nil), // 5: flyteidl.admin.GetAgentRequest - (*admin.ListAgentsRequest)(nil), // 6: flyteidl.admin.ListAgentsRequest - (*admin.CreateTaskResponse)(nil), // 7: flyteidl.admin.CreateTaskResponse - (*admin.GetTaskResponse)(nil), // 8: flyteidl.admin.GetTaskResponse - (*admin.DeleteTaskResponse)(nil), // 9: flyteidl.admin.DeleteTaskResponse - (*admin.GetTaskMetricsResponse)(nil), // 10: flyteidl.admin.GetTaskMetricsResponse - (*admin.GetTaskLogsResponse)(nil), // 11: flyteidl.admin.GetTaskLogsResponse - (*admin.GetAgentResponse)(nil), // 12: flyteidl.admin.GetAgentResponse - (*admin.ListAgentsResponse)(nil), // 13: flyteidl.admin.ListAgentsResponse + (*admin.ExecuteTaskSyncRequest)(nil), // 0: flyteidl.admin.ExecuteTaskSyncRequest + (*admin.CreateTaskRequest)(nil), // 1: flyteidl.admin.CreateTaskRequest + (*admin.GetTaskRequest)(nil), // 2: flyteidl.admin.GetTaskRequest + (*admin.DeleteTaskRequest)(nil), // 3: flyteidl.admin.DeleteTaskRequest + (*admin.GetTaskMetricsRequest)(nil), // 4: flyteidl.admin.GetTaskMetricsRequest + (*admin.GetTaskLogsRequest)(nil), // 5: flyteidl.admin.GetTaskLogsRequest + (*admin.GetAgentRequest)(nil), // 6: flyteidl.admin.GetAgentRequest + (*admin.ListAgentsRequest)(nil), // 7: flyteidl.admin.ListAgentsRequest + (*admin.ExecuteTaskSyncResponse)(nil), // 8: flyteidl.admin.ExecuteTaskSyncResponse + (*admin.CreateTaskResponse)(nil), // 9: flyteidl.admin.CreateTaskResponse + (*admin.GetTaskResponse)(nil), // 10: flyteidl.admin.GetTaskResponse + (*admin.DeleteTaskResponse)(nil), // 11: flyteidl.admin.DeleteTaskResponse + (*admin.GetTaskMetricsResponse)(nil), // 12: flyteidl.admin.GetTaskMetricsResponse + (*admin.GetTaskLogsResponse)(nil), // 13: flyteidl.admin.GetTaskLogsResponse + (*admin.GetAgentResponse)(nil), // 14: flyteidl.admin.GetAgentResponse + (*admin.ListAgentsResponse)(nil), // 15: flyteidl.admin.ListAgentsResponse } var file_flyteidl_service_agent_proto_depIdxs = []int32{ - 0, // 0: flyteidl.service.AsyncAgentService.CreateTask:input_type -> flyteidl.admin.CreateTaskRequest - 1, // 1: flyteidl.service.AsyncAgentService.GetTask:input_type -> flyteidl.admin.GetTaskRequest - 2, // 2: flyteidl.service.AsyncAgentService.DeleteTask:input_type -> flyteidl.admin.DeleteTaskRequest - 3, // 3: flyteidl.service.AsyncAgentService.GetTaskMetrics:input_type -> flyteidl.admin.GetTaskMetricsRequest - 4, // 4: flyteidl.service.AsyncAgentService.GetTaskLogs:input_type -> flyteidl.admin.GetTaskLogsRequest - 5, // 5: flyteidl.service.AgentMetadataService.GetAgent:input_type -> flyteidl.admin.GetAgentRequest - 6, // 6: flyteidl.service.AgentMetadataService.ListAgents:input_type -> flyteidl.admin.ListAgentsRequest - 7, // 7: flyteidl.service.AsyncAgentService.CreateTask:output_type -> flyteidl.admin.CreateTaskResponse - 8, // 8: flyteidl.service.AsyncAgentService.GetTask:output_type -> flyteidl.admin.GetTaskResponse - 9, // 9: flyteidl.service.AsyncAgentService.DeleteTask:output_type -> flyteidl.admin.DeleteTaskResponse - 10, // 10: flyteidl.service.AsyncAgentService.GetTaskMetrics:output_type -> flyteidl.admin.GetTaskMetricsResponse - 11, // 11: flyteidl.service.AsyncAgentService.GetTaskLogs:output_type -> flyteidl.admin.GetTaskLogsResponse - 12, // 12: flyteidl.service.AgentMetadataService.GetAgent:output_type -> flyteidl.admin.GetAgentResponse - 13, // 13: flyteidl.service.AgentMetadataService.ListAgents:output_type -> flyteidl.admin.ListAgentsResponse - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] is the sub-list for method input_type + 0, // 0: flyteidl.service.AsyncAgentService.ExecuteTaskSync:input_type -> flyteidl.admin.ExecuteTaskSyncRequest + 1, // 1: flyteidl.service.AsyncAgentService.CreateTask:input_type -> flyteidl.admin.CreateTaskRequest + 2, // 2: flyteidl.service.AsyncAgentService.GetTask:input_type -> flyteidl.admin.GetTaskRequest + 3, // 3: flyteidl.service.AsyncAgentService.DeleteTask:input_type -> flyteidl.admin.DeleteTaskRequest + 4, // 4: flyteidl.service.AsyncAgentService.GetTaskMetrics:input_type -> flyteidl.admin.GetTaskMetricsRequest + 5, // 5: flyteidl.service.AsyncAgentService.GetTaskLogs:input_type -> flyteidl.admin.GetTaskLogsRequest + 6, // 6: flyteidl.service.AgentMetadataService.GetAgent:input_type -> flyteidl.admin.GetAgentRequest + 7, // 7: flyteidl.service.AgentMetadataService.ListAgents:input_type -> flyteidl.admin.ListAgentsRequest + 8, // 8: flyteidl.service.AsyncAgentService.ExecuteTaskSync:output_type -> flyteidl.admin.ExecuteTaskSyncResponse + 9, // 9: flyteidl.service.AsyncAgentService.CreateTask:output_type -> flyteidl.admin.CreateTaskResponse + 10, // 10: flyteidl.service.AsyncAgentService.GetTask:output_type -> flyteidl.admin.GetTaskResponse + 11, // 11: flyteidl.service.AsyncAgentService.DeleteTask:output_type -> flyteidl.admin.DeleteTaskResponse + 12, // 12: flyteidl.service.AsyncAgentService.GetTaskMetrics:output_type -> flyteidl.admin.GetTaskMetricsResponse + 13, // 13: flyteidl.service.AsyncAgentService.GetTaskLogs:output_type -> flyteidl.admin.GetTaskLogsResponse + 14, // 14: flyteidl.service.AgentMetadataService.GetAgent:output_type -> flyteidl.admin.GetAgentResponse + 15, // 15: flyteidl.service.AgentMetadataService.ListAgents:output_type -> flyteidl.admin.ListAgentsResponse + 8, // [8:16] is the sub-list for method output_type + 0, // [0:8] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go index 67ebe7b012..fa89f0a5e9 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go @@ -20,18 +20,21 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - AsyncAgentService_CreateTask_FullMethodName = "/flyteidl.service.AsyncAgentService/CreateTask" - AsyncAgentService_GetTask_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTask" - AsyncAgentService_DeleteTask_FullMethodName = "/flyteidl.service.AsyncAgentService/DeleteTask" - AsyncAgentService_GetTaskMetrics_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskMetrics" - AsyncAgentService_GetTaskLogs_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskLogs" + AsyncAgentService_ExecuteTaskSync_FullMethodName = "/flyteidl.service.AsyncAgentService/ExecuteTaskSync" + AsyncAgentService_CreateTask_FullMethodName = "/flyteidl.service.AsyncAgentService/CreateTask" + AsyncAgentService_GetTask_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTask" + AsyncAgentService_DeleteTask_FullMethodName = "/flyteidl.service.AsyncAgentService/DeleteTask" + AsyncAgentService_GetTaskMetrics_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskMetrics" + AsyncAgentService_GetTaskLogs_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskLogs" ) // AsyncAgentServiceClient is the client API for AsyncAgentService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AsyncAgentServiceClient interface { - // Send a task create request to the agent server. + // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (AsyncAgentService_ExecuteTaskSyncClient, error) + // CreateTask sends a task create request to the agent service. CreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) (*admin.CreateTaskResponse, error) // Get job status. GetTask(ctx context.Context, in *admin.GetTaskRequest, opts ...grpc.CallOption) (*admin.GetTaskResponse, error) @@ -44,7 +47,7 @@ type AsyncAgentServiceClient interface { // - various other errors GetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) (*admin.GetTaskMetricsResponse, error) // GetTaskLogs returns task execution logs, if available. - GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (*admin.GetTaskLogsResponse, error) + GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (AsyncAgentService_GetTaskLogsClient, error) } type asyncAgentServiceClient struct { @@ -55,6 +58,37 @@ func NewAsyncAgentServiceClient(cc grpc.ClientConnInterface) AsyncAgentServiceCl return &asyncAgentServiceClient{cc} } +func (c *asyncAgentServiceClient) ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (AsyncAgentService_ExecuteTaskSyncClient, error) { + stream, err := c.cc.NewStream(ctx, &AsyncAgentService_ServiceDesc.Streams[0], AsyncAgentService_ExecuteTaskSync_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &asyncAgentServiceExecuteTaskSyncClient{stream} + return x, nil +} + +type AsyncAgentService_ExecuteTaskSyncClient interface { + Send(*admin.ExecuteTaskSyncRequest) error + Recv() (*admin.ExecuteTaskSyncResponse, error) + grpc.ClientStream +} + +type asyncAgentServiceExecuteTaskSyncClient struct { + grpc.ClientStream +} + +func (x *asyncAgentServiceExecuteTaskSyncClient) Send(m *admin.ExecuteTaskSyncRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *asyncAgentServiceExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncResponse, error) { + m := new(admin.ExecuteTaskSyncResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *asyncAgentServiceClient) CreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) (*admin.CreateTaskResponse, error) { out := new(admin.CreateTaskResponse) err := c.cc.Invoke(ctx, AsyncAgentService_CreateTask_FullMethodName, in, out, opts...) @@ -91,20 +125,45 @@ func (c *asyncAgentServiceClient) GetTaskMetrics(ctx context.Context, in *admin. return out, nil } -func (c *asyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (*admin.GetTaskLogsResponse, error) { - out := new(admin.GetTaskLogsResponse) - err := c.cc.Invoke(ctx, AsyncAgentService_GetTaskLogs_FullMethodName, in, out, opts...) +func (c *asyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (AsyncAgentService_GetTaskLogsClient, error) { + stream, err := c.cc.NewStream(ctx, &AsyncAgentService_ServiceDesc.Streams[1], AsyncAgentService_GetTaskLogs_FullMethodName, opts...) if err != nil { return nil, err } - return out, nil + x := &asyncAgentServiceGetTaskLogsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type AsyncAgentService_GetTaskLogsClient interface { + Recv() (*admin.GetTaskLogsResponse, error) + grpc.ClientStream +} + +type asyncAgentServiceGetTaskLogsClient struct { + grpc.ClientStream +} + +func (x *asyncAgentServiceGetTaskLogsClient) Recv() (*admin.GetTaskLogsResponse, error) { + m := new(admin.GetTaskLogsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } // AsyncAgentServiceServer is the server API for AsyncAgentService service. // All implementations should embed UnimplementedAsyncAgentServiceServer // for forward compatibility type AsyncAgentServiceServer interface { - // Send a task create request to the agent server. + // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + ExecuteTaskSync(AsyncAgentService_ExecuteTaskSyncServer) error + // CreateTask sends a task create request to the agent service. CreateTask(context.Context, *admin.CreateTaskRequest) (*admin.CreateTaskResponse, error) // Get job status. GetTask(context.Context, *admin.GetTaskRequest) (*admin.GetTaskResponse, error) @@ -117,13 +176,16 @@ type AsyncAgentServiceServer interface { // - various other errors GetTaskMetrics(context.Context, *admin.GetTaskMetricsRequest) (*admin.GetTaskMetricsResponse, error) // GetTaskLogs returns task execution logs, if available. - GetTaskLogs(context.Context, *admin.GetTaskLogsRequest) (*admin.GetTaskLogsResponse, error) + GetTaskLogs(*admin.GetTaskLogsRequest, AsyncAgentService_GetTaskLogsServer) error } // UnimplementedAsyncAgentServiceServer should be embedded to have forward compatible implementations. type UnimplementedAsyncAgentServiceServer struct { } +func (UnimplementedAsyncAgentServiceServer) ExecuteTaskSync(AsyncAgentService_ExecuteTaskSyncServer) error { + return status.Errorf(codes.Unimplemented, "method ExecuteTaskSync not implemented") +} func (UnimplementedAsyncAgentServiceServer) CreateTask(context.Context, *admin.CreateTaskRequest) (*admin.CreateTaskResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") } @@ -136,8 +198,8 @@ func (UnimplementedAsyncAgentServiceServer) DeleteTask(context.Context, *admin.D func (UnimplementedAsyncAgentServiceServer) GetTaskMetrics(context.Context, *admin.GetTaskMetricsRequest) (*admin.GetTaskMetricsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTaskMetrics not implemented") } -func (UnimplementedAsyncAgentServiceServer) GetTaskLogs(context.Context, *admin.GetTaskLogsRequest) (*admin.GetTaskLogsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTaskLogs not implemented") +func (UnimplementedAsyncAgentServiceServer) GetTaskLogs(*admin.GetTaskLogsRequest, AsyncAgentService_GetTaskLogsServer) error { + return status.Errorf(codes.Unimplemented, "method GetTaskLogs not implemented") } // UnsafeAsyncAgentServiceServer may be embedded to opt out of forward compatibility for this service. @@ -151,6 +213,32 @@ func RegisterAsyncAgentServiceServer(s grpc.ServiceRegistrar, srv AsyncAgentServ s.RegisterService(&AsyncAgentService_ServiceDesc, srv) } +func _AsyncAgentService_ExecuteTaskSync_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(AsyncAgentServiceServer).ExecuteTaskSync(&asyncAgentServiceExecuteTaskSyncServer{stream}) +} + +type AsyncAgentService_ExecuteTaskSyncServer interface { + Send(*admin.ExecuteTaskSyncResponse) error + Recv() (*admin.ExecuteTaskSyncRequest, error) + grpc.ServerStream +} + +type asyncAgentServiceExecuteTaskSyncServer struct { + grpc.ServerStream +} + +func (x *asyncAgentServiceExecuteTaskSyncServer) Send(m *admin.ExecuteTaskSyncResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *asyncAgentServiceExecuteTaskSyncServer) Recv() (*admin.ExecuteTaskSyncRequest, error) { + m := new(admin.ExecuteTaskSyncRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _AsyncAgentService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(admin.CreateTaskRequest) if err := dec(in); err != nil { @@ -223,22 +311,25 @@ func _AsyncAgentService_GetTaskMetrics_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } -func _AsyncAgentService_GetTaskLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(admin.GetTaskLogsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AsyncAgentServiceServer).GetTaskLogs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AsyncAgentService_GetTaskLogs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AsyncAgentServiceServer).GetTaskLogs(ctx, req.(*admin.GetTaskLogsRequest)) +func _AsyncAgentService_GetTaskLogs_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(admin.GetTaskLogsRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - return interceptor(ctx, in, info, handler) + return srv.(AsyncAgentServiceServer).GetTaskLogs(m, &asyncAgentServiceGetTaskLogsServer{stream}) +} + +type AsyncAgentService_GetTaskLogsServer interface { + Send(*admin.GetTaskLogsResponse) error + grpc.ServerStream +} + +type asyncAgentServiceGetTaskLogsServer struct { + grpc.ServerStream +} + +func (x *asyncAgentServiceGetTaskLogsServer) Send(m *admin.GetTaskLogsResponse) error { + return x.ServerStream.SendMsg(m) } // AsyncAgentService_ServiceDesc is the grpc.ServiceDesc for AsyncAgentService service. @@ -264,12 +355,20 @@ var AsyncAgentService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetTaskMetrics", Handler: _AsyncAgentService_GetTaskMetrics_Handler, }, + }, + Streams: []grpc.StreamDesc{ { - MethodName: "GetTaskLogs", - Handler: _AsyncAgentService_GetTaskLogs_Handler, + StreamName: "ExecuteTaskSync", + Handler: _AsyncAgentService_ExecuteTaskSync_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "GetTaskLogs", + Handler: _AsyncAgentService_GetTaskLogs_Handler, + ServerStreams: true, }, }, - Streams: []grpc.StreamDesc{}, Metadata: "flyteidl/service/agent.proto", } diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go index a5fec7e0f7..9a1bbf3037 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go @@ -33,6 +33,478 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join +func request_AsyncAgentService_ExecuteTaskSync_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (extService.AsyncAgentService_ExecuteTaskSyncClient, runtime.ServerMetadata, error) { + var metadata runtime.ServerMetadata + stream, err := client.ExecuteTaskSync(ctx) + if err != nil { + grpclog.Infof("Failed to start streaming: %v", err) + return nil, metadata, err + } + dec := marshaler.NewDecoder(req.Body) + handleSend := func() error { + var protoReq extAdmin.ExecuteTaskSyncRequest + err := dec.Decode(&protoReq) + if err == io.EOF { + return err + } + if err != nil { + grpclog.Infof("Failed to decode request: %v", err) + return err + } + if err := stream.Send(&protoReq); err != nil { + grpclog.Infof("Failed to send request: %v", err) + return err + } + return nil + } + go func() { + for { + if err := handleSend(); err != nil { + break + } + } + if err := stream.CloseSend(); err != nil { + grpclog.Infof("Failed to terminate client stream: %v", err) + } + }() + header, err := stream.Header() + if err != nil { + grpclog.Infof("Failed to get header from client: %v", err) + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + +func request_AsyncAgentService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.CreateTaskRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateTask(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AsyncAgentService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AsyncAgentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.CreateTaskRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateTask(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AsyncAgentService_GetTask_0 = &utilities.DoubleArray{Encoding: map[string]int{"task_type": 0, "name": 1, "version": 2, "resource_meta": 3, "resourceMeta": 4}, Base: []int{1, 6, 5, 6, 7, 8, 2, 0, 4, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 1, 2, 7, 2, 9, 3, 4, 5, 6}} +) + +func request_AsyncAgentService_GetTask_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetTaskRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_GetTask_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTask(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AsyncAgentService_GetTask_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AsyncAgentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetTaskRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_GetTask_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTask(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AsyncAgentService_DeleteTask_0 = &utilities.DoubleArray{Encoding: map[string]int{"task_type": 0, "name": 1, "version": 2, "resource_meta": 3, "resourceMeta": 4}, Base: []int{1, 6, 5, 6, 7, 8, 2, 0, 4, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 1, 2, 7, 2, 9, 3, 4, 5, 6}} +) + +func request_AsyncAgentService_DeleteTask_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.DeleteTaskRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_DeleteTask_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteTask(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AsyncAgentService_DeleteTask_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AsyncAgentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.DeleteTaskRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_DeleteTask_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteTask(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AsyncAgentService_GetTaskMetrics_0 = &utilities.DoubleArray{Encoding: map[string]int{"task_type": 0, "name": 1, "version": 2, "resource_meta": 3, "resourceMeta": 4}, Base: []int{1, 6, 5, 6, 7, 8, 2, 0, 4, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 1, 2, 7, 2, 9, 3, 4, 5, 6}} +) + +func request_AsyncAgentService_GetTaskMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetTaskMetricsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_GetTaskMetrics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTaskMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AsyncAgentService_GetTaskMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AsyncAgentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetTaskMetricsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_GetTaskMetrics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTaskMetrics(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AsyncAgentService_GetTaskLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"task_type": 0, "name": 1, "version": 2, "resource_meta": 3, "resourceMeta": 4}, Base: []int{1, 6, 5, 6, 7, 8, 2, 0, 4, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 1, 2, 7, 2, 9, 3, 4, 5, 6}} +) + +func request_AsyncAgentService_GetTaskLogs_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (extService.AsyncAgentService_GetTaskLogsClient, runtime.ServerMetadata, error) { + var protoReq extAdmin.GetTaskLogsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_type.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.name", err) + } + + val, ok = pathParams["task_type.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_type.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_type.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_type.version", err) + } + + val, ok = pathParams["resource_meta"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource_meta") + } + + protoReq.ResourceMeta, err = runtime.Bytes(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource_meta", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AsyncAgentService_GetTaskLogs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.GetTaskLogs(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + func request_AgentMetadataService_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AgentMetadataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq extAdmin.GetAgentRequest var metadata runtime.ServerMetadata @@ -103,6 +575,129 @@ func local_request_AgentMetadataService_ListAgents_0(ctx context.Context, marsha } +// RegisterAsyncAgentServiceHandlerServer registers the http handlers for service AsyncAgentService to "mux". +// UnaryRPC :call AsyncAgentServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAsyncAgentServiceHandlerFromEndpoint instead. +func RegisterAsyncAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extService.AsyncAgentServiceServer) error { + + mux.Handle("POST", pattern_AsyncAgentService_ExecuteTaskSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("POST", pattern_AsyncAgentService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/CreateTask", runtime.WithHTTPPathPattern("/api/v1/agent/task")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AsyncAgentService_CreateTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_CreateTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AsyncAgentService_GetTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/GetTask", runtime.WithHTTPPathPattern("/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AsyncAgentService_GetTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_GetTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_AsyncAgentService_DeleteTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/DeleteTask", runtime.WithHTTPPathPattern("/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AsyncAgentService_DeleteTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_DeleteTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AsyncAgentService_GetTaskMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/GetTaskMetrics", runtime.WithHTTPPathPattern("/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AsyncAgentService_GetTaskMetrics_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_GetTaskMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AsyncAgentService_GetTaskLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + return nil +} + // RegisterAgentMetadataServiceHandlerServer registers the http handlers for service AgentMetadataService to "mux". // UnaryRPC :call AgentMetadataServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -162,6 +757,207 @@ func RegisterAgentMetadataServiceHandlerServer(ctx context.Context, mux *runtime return nil } +// RegisterAsyncAgentServiceHandlerFromEndpoint is same as RegisterAsyncAgentServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAsyncAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAsyncAgentServiceHandler(ctx, mux, conn) +} + +// RegisterAsyncAgentServiceHandler registers the http handlers for service AsyncAgentService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAsyncAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAsyncAgentServiceHandlerClient(ctx, mux, extService.NewAsyncAgentServiceClient(conn)) +} + +// RegisterAsyncAgentServiceHandlerClient registers the http handlers for service AsyncAgentService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extService.AsyncAgentServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extService.AsyncAgentServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "extService.AsyncAgentServiceClient" to call the correct interceptors. +func RegisterAsyncAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extService.AsyncAgentServiceClient) error { + + mux.Handle("POST", pattern_AsyncAgentService_ExecuteTaskSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/ExecuteTaskSync", runtime.WithHTTPPathPattern("/api/v1/agent/task/stream")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AsyncAgentService_ExecuteTaskSync_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_ExecuteTaskSync_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AsyncAgentService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/CreateTask", runtime.WithHTTPPathPattern("/api/v1/agent/task")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AsyncAgentService_CreateTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_CreateTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AsyncAgentService_GetTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/GetTask", runtime.WithHTTPPathPattern("/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AsyncAgentService_GetTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_GetTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_AsyncAgentService_DeleteTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/DeleteTask", runtime.WithHTTPPathPattern("/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AsyncAgentService_DeleteTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_DeleteTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AsyncAgentService_GetTaskMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/GetTaskMetrics", runtime.WithHTTPPathPattern("/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AsyncAgentService_GetTaskMetrics_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_GetTaskMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AsyncAgentService_GetTaskLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/GetTaskLogs", runtime.WithHTTPPathPattern("/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AsyncAgentService_GetTaskLogs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AsyncAgentService_GetTaskLogs_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AsyncAgentService_ExecuteTaskSync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "agent", "task", "stream"}, "")) + + pattern_AsyncAgentService_CreateTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "agent", "task"}, "")) + + pattern_AsyncAgentService_GetTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "agent", "task", "task_type.name", "task_type.version", "resource_meta"}, "")) + + pattern_AsyncAgentService_DeleteTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "agent", "task_executions", "task_type.name", "task_type.version", "resource_meta"}, "")) + + pattern_AsyncAgentService_GetTaskMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v1", "agent", "task", "metrics", "task_type.name", "task_type.version", "resource_meta"}, "")) + + pattern_AsyncAgentService_GetTaskLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v1", "agent", "task", "logs", "task_type.name", "task_type.version", "resource_meta"}, "")) +) + +var ( + forward_AsyncAgentService_ExecuteTaskSync_0 = runtime.ForwardResponseStream + + forward_AsyncAgentService_CreateTask_0 = runtime.ForwardResponseMessage + + forward_AsyncAgentService_GetTask_0 = runtime.ForwardResponseMessage + + forward_AsyncAgentService_DeleteTask_0 = runtime.ForwardResponseMessage + + forward_AsyncAgentService_GetTaskMetrics_0 = runtime.ForwardResponseMessage + + forward_AsyncAgentService_GetTaskLogs_0 = runtime.ForwardResponseStream +) + // RegisterAgentMetadataServiceHandlerFromEndpoint is same as RegisterAgentMetadataServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAgentMetadataServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json index 1a17685ff6..e5e8fe4277 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json @@ -19,6 +19,334 @@ "application/json" ], "paths": { + "/api/v1/agent/task": { + "post": { + "summary": "CreateTask sends a task create request to the agent service.", + "operationId": "AsyncAgentService_CreateTask", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminCreateTaskResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "Represents a request structure to create task.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/adminCreateTaskRequest" + } + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, + "/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}": { + "get": { + "summary": "GetTaskLogs returns task execution logs, if available.", + "operationId": "AsyncAgentService_GetTaskLogs", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/adminGetTaskLogsResponse" + }, + "error": { + "$ref": "#/definitions/googlerpcStatus" + } + }, + "title": "Stream result of adminGetTaskLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "task_type.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_type.version", + "description": "The version of the task type.", + "in": "path", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "resource_meta", + "description": "Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).", + "in": "path", + "required": true, + "type": "string", + "format": "byte" + }, + { + "name": "lines", + "description": "Number of lines to return.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "token", + "description": "In the case of multiple pages of results, the server-provided token can be used to fetch the next page\nin a query. If there are no more results, this value will be empty.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, + "/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}": { + "get": { + "summary": "GetTaskMetrics returns one or more task execution metrics, if available.", + "description": "Errors include\n * OutOfRange if metrics are not available for the specified task time range\n * various other errors", + "operationId": "AsyncAgentService_GetTaskMetrics", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminGetTaskMetricsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "task_type.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_type.version", + "description": "The version of the task type.", + "in": "path", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "resource_meta", + "description": "Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).", + "in": "path", + "required": true, + "type": "string", + "format": "byte" + }, + { + "name": "queries", + "description": "The metrics to query. If empty, will return a default set of metrics.\ne.g. EXECUTION_METRIC_USED_CPU_AVG or EXECUTION_METRIC_USED_MEMORY_BYTES_AVG", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "start_time", + "description": "Start timestamp, inclusive.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "end_time", + "description": "End timestamp, inclusive..", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "step", + "description": "Query resolution step width in duration format or float number of seconds.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, + "/api/v1/agent/task/stream": { + "post": { + "summary": "ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back.", + "operationId": "AsyncAgentService_ExecuteTaskSync", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/adminExecuteTaskSyncResponse" + }, + "error": { + "$ref": "#/definitions/googlerpcStatus" + } + }, + "title": "Stream result of adminExecuteTaskSyncResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": " (streaming inputs)", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/adminExecuteTaskSyncRequest" + } + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, + "/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}": { + "get": { + "summary": "Get job status.", + "operationId": "AsyncAgentService_GetTask", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminGetTaskResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "task_type.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_type.version", + "description": "The version of the task type.", + "in": "path", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "resource_meta", + "description": "Metadata about the resource to be pass to the agent.", + "in": "path", + "required": true, + "type": "string", + "format": "byte" + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, + "/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}": { + "delete": { + "summary": "Delete the task resource.", + "operationId": "AsyncAgentService_DeleteTask", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminDeleteTaskResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "task_type.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_type.version", + "description": "The version of the task type.", + "in": "path", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "resource_meta", + "description": "Metadata about the resource to be pass to the agent.", + "in": "path", + "required": true, + "type": "string", + "format": "byte" + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, "/api/v1/agent/{name}": { "get": { "summary": "Fetch a :ref:`ref_flyteidl.admin.Agent` definition.", @@ -242,22 +570,65 @@ "supported_task_types": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/adminTaskType" }, "description": "SupportedTaskTypes are the types of the tasks that the agent can handle." } }, "description": "A message containing the agent metadata." }, + "adminCreateRequestHeader": { + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/coreTaskTemplate", + "description": "Template of the task that encapsulates all the metadata of the task." + }, + "output_prefix": { + "type": "string", + "title": "Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring)" + }, + "task_execution_metadata": { + "$ref": "#/definitions/flyteidladminTaskExecutionMetadata", + "description": "subset of runtime task execution metadata." + }, + "max_dataset_size_bytes": { + "type": "string", + "format": "int64", + "description": "MaxDatasetSizeBytes is the maximum size of the dataset that can be generated by the task." + } + } + }, + "adminCreateTaskRequest": { + "type": "object", + "properties": { + "inputs": { + "$ref": "#/definitions/coreLiteralMap", + "title": "The inputs required to start the execution. All required inputs must be\nincluded in this map. If not required and not provided, defaults apply.\n+optional" + }, + "template": { + "$ref": "#/definitions/coreTaskTemplate", + "description": "Template of the task that encapsulates all the metadata of the task." + }, + "output_prefix": { + "type": "string", + "title": "Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring)" + }, + "task_execution_metadata": { + "$ref": "#/definitions/flyteidladminTaskExecutionMetadata", + "description": "subset of runtime task execution metadata." + } + }, + "description": "Represents a request structure to create task." + }, "adminCreateTaskResponse": { "type": "object", "properties": { "resource_meta": { "type": "string", - "format": "byte" - }, - "resource": { - "$ref": "#/definitions/adminResource" + "format": "byte", + "description": "ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata)." } }, "description": "Represents a create response structure." @@ -266,6 +637,36 @@ "type": "object", "description": "Response to delete a task." }, + "adminExecuteTaskSyncRequest": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/adminCreateRequestHeader" + }, + "inputs": { + "$ref": "#/definitions/coreLiteralMap" + } + } + }, + "adminExecuteTaskSyncResponse": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/adminExecuteTaskSyncResponseHeader" + }, + "outputs": { + "$ref": "#/definitions/coreLiteralMap" + } + } + }, + "adminExecuteTaskSyncResponseHeader": { + "type": "object", + "properties": { + "resource": { + "$ref": "#/definitions/adminResource" + } + } + }, "adminGetAgentResponse": { "type": "object", "properties": { @@ -276,6 +677,18 @@ "description": "A response containing an agent." }, "adminGetTaskLogsResponse": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/adminGetTaskLogsResponseHeader" + }, + "body": { + "$ref": "#/definitions/adminGetTaskLogsResponseBody" + } + }, + "description": "A response containing the logs for a task execution." + }, + "adminGetTaskLogsResponseBody": { "type": "object", "properties": { "results": { @@ -284,13 +697,17 @@ "type": "string" }, "description": "The execution log results." - }, + } + } + }, + "adminGetTaskLogsResponseHeader": { + "type": "object", + "properties": { "token": { "type": "string", "description": "In the case of multiple pages of results, the server-provided token can be used to fetch the next page\nin a query. If there are no more results, this value will be empty." } - }, - "description": "A response containing the logs for a task execution." + } }, "adminGetTaskMetricsResponse": { "type": "object", @@ -365,6 +782,20 @@ } } }, + "adminTaskType": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the task type." + }, + "version": { + "type": "integer", + "format": "int32", + "description": "The version of the task type." + } + } + }, "coreArtifactBindingData": { "type": "object", "properties": { @@ -1301,6 +1732,20 @@ }, "title": "Task Metadata" }, + "coreTaskNodeOverrides": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/definitions/coreResources", + "description": "A customizable interface to convey resources requested for a task container." + }, + "extended_resources": { + "$ref": "#/definitions/coreExtendedResources", + "description": "Overrides for all non-standard resources, not captured by\nv1.ResourceRequirements, to allocate to a task." + } + }, + "description": "Optional task node overrides that will be applied at task execution time." + }, "coreTaskTemplate": { "type": "object", "properties": { @@ -1536,6 +1981,20 @@ "type": "string" }, "title": "Environment variables attached to the task execution" + }, + "max_attempts": { + "type": "integer", + "format": "int32" + }, + "interruptible": { + "type": "boolean" + }, + "interruptible_failure_threshold": { + "type": "integer", + "format": "int32" + }, + "overrides": { + "$ref": "#/definitions/coreTaskNodeOverrides" } }, "description": "Represents a subset of runtime task execution metadata that are relevant to external plugins." diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 5fe0c697d8..ada9a7638f 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -8857,6 +8857,18 @@ export namespace flyteidl { /** TaskExecutionMetadata environmentVariables */ environmentVariables?: ({ [k: string]: string }|null); + + /** TaskExecutionMetadata maxAttempts */ + maxAttempts?: (number|null); + + /** TaskExecutionMetadata interruptible */ + interruptible?: (boolean|null); + + /** TaskExecutionMetadata interruptibleFailureThreshold */ + interruptibleFailureThreshold?: (number|null); + + /** TaskExecutionMetadata overrides */ + overrides?: (flyteidl.core.ITaskNodeOverrides|null); } /** Represents a TaskExecutionMetadata. */ @@ -8886,6 +8898,18 @@ export namespace flyteidl { /** TaskExecutionMetadata environmentVariables. */ public environmentVariables: { [k: string]: string }; + /** TaskExecutionMetadata maxAttempts. */ + public maxAttempts: number; + + /** TaskExecutionMetadata interruptible. */ + public interruptible: boolean; + + /** TaskExecutionMetadata interruptibleFailureThreshold. */ + public interruptibleFailureThreshold: number; + + /** TaskExecutionMetadata overrides. */ + public overrides?: (flyteidl.core.ITaskNodeOverrides|null); + /** * Creates a new TaskExecutionMetadata instance using the specified properties. * @param [properties] Properties to set @@ -8994,9 +9018,6 @@ export namespace flyteidl { /** CreateTaskResponse resourceMeta */ resourceMeta?: (Uint8Array|null); - - /** CreateTaskResponse resource */ - resource?: (flyteidl.admin.IResource|null); } /** Represents a CreateTaskResponse. */ @@ -9011,12 +9032,6 @@ export namespace flyteidl { /** CreateTaskResponse resourceMeta. */ public resourceMeta: Uint8Array; - /** CreateTaskResponse resource. */ - public resource?: (flyteidl.admin.IResource|null); - - /** CreateTaskResponse res. */ - public res?: ("resourceMeta"|"resource"); - /** * Creates a new CreateTaskResponse instance using the specified properties. * @param [properties] Properties to set @@ -9050,11 +9065,255 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a CreateRequestHeader. */ + interface ICreateRequestHeader { + + /** CreateRequestHeader template */ + template?: (flyteidl.core.ITaskTemplate|null); + + /** CreateRequestHeader outputPrefix */ + outputPrefix?: (string|null); + + /** CreateRequestHeader taskExecutionMetadata */ + taskExecutionMetadata?: (flyteidl.admin.ITaskExecutionMetadata|null); + + /** CreateRequestHeader maxDatasetSizeBytes */ + maxDatasetSizeBytes?: (Long|null); + } + + /** Represents a CreateRequestHeader. */ + class CreateRequestHeader implements ICreateRequestHeader { + + /** + * Constructs a new CreateRequestHeader. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.ICreateRequestHeader); + + /** CreateRequestHeader template. */ + public template?: (flyteidl.core.ITaskTemplate|null); + + /** CreateRequestHeader outputPrefix. */ + public outputPrefix: string; + + /** CreateRequestHeader taskExecutionMetadata. */ + public taskExecutionMetadata?: (flyteidl.admin.ITaskExecutionMetadata|null); + + /** CreateRequestHeader maxDatasetSizeBytes. */ + public maxDatasetSizeBytes: Long; + + /** + * Creates a new CreateRequestHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRequestHeader instance + */ + public static create(properties?: flyteidl.admin.ICreateRequestHeader): flyteidl.admin.CreateRequestHeader; + + /** + * Encodes the specified CreateRequestHeader message. Does not implicitly {@link flyteidl.admin.CreateRequestHeader.verify|verify} messages. + * @param message CreateRequestHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.ICreateRequestHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRequestHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRequestHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.CreateRequestHeader; + + /** + * Verifies a CreateRequestHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of an ExecuteTaskSyncRequest. */ + interface IExecuteTaskSyncRequest { + + /** ExecuteTaskSyncRequest header */ + header?: (flyteidl.admin.ICreateRequestHeader|null); + + /** ExecuteTaskSyncRequest inputs */ + inputs?: (flyteidl.core.ILiteralMap|null); + } + + /** Represents an ExecuteTaskSyncRequest. */ + class ExecuteTaskSyncRequest implements IExecuteTaskSyncRequest { + + /** + * Constructs a new ExecuteTaskSyncRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IExecuteTaskSyncRequest); + + /** ExecuteTaskSyncRequest header. */ + public header?: (flyteidl.admin.ICreateRequestHeader|null); + + /** ExecuteTaskSyncRequest inputs. */ + public inputs?: (flyteidl.core.ILiteralMap|null); + + /** ExecuteTaskSyncRequest part. */ + public part?: ("header"|"inputs"); + + /** + * Creates a new ExecuteTaskSyncRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteTaskSyncRequest instance + */ + public static create(properties?: flyteidl.admin.IExecuteTaskSyncRequest): flyteidl.admin.ExecuteTaskSyncRequest; + + /** + * Encodes the specified ExecuteTaskSyncRequest message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncRequest.verify|verify} messages. + * @param message ExecuteTaskSyncRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IExecuteTaskSyncRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteTaskSyncRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteTaskSyncRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.ExecuteTaskSyncRequest; + + /** + * Verifies an ExecuteTaskSyncRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of an ExecuteTaskSyncResponseHeader. */ + interface IExecuteTaskSyncResponseHeader { + + /** ExecuteTaskSyncResponseHeader resource */ + resource?: (flyteidl.admin.IResource|null); + } + + /** Represents an ExecuteTaskSyncResponseHeader. */ + class ExecuteTaskSyncResponseHeader implements IExecuteTaskSyncResponseHeader { + + /** + * Constructs a new ExecuteTaskSyncResponseHeader. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IExecuteTaskSyncResponseHeader); + + /** ExecuteTaskSyncResponseHeader resource. */ + public resource?: (flyteidl.admin.IResource|null); + + /** + * Creates a new ExecuteTaskSyncResponseHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteTaskSyncResponseHeader instance + */ + public static create(properties?: flyteidl.admin.IExecuteTaskSyncResponseHeader): flyteidl.admin.ExecuteTaskSyncResponseHeader; + + /** + * Encodes the specified ExecuteTaskSyncResponseHeader message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncResponseHeader.verify|verify} messages. + * @param message ExecuteTaskSyncResponseHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IExecuteTaskSyncResponseHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteTaskSyncResponseHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteTaskSyncResponseHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.ExecuteTaskSyncResponseHeader; + + /** + * Verifies an ExecuteTaskSyncResponseHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of an ExecuteTaskSyncResponse. */ + interface IExecuteTaskSyncResponse { + + /** ExecuteTaskSyncResponse header */ + header?: (flyteidl.admin.IExecuteTaskSyncResponseHeader|null); + + /** ExecuteTaskSyncResponse outputs */ + outputs?: (flyteidl.core.ILiteralMap|null); + } + + /** Represents an ExecuteTaskSyncResponse. */ + class ExecuteTaskSyncResponse implements IExecuteTaskSyncResponse { + + /** + * Constructs a new ExecuteTaskSyncResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IExecuteTaskSyncResponse); + + /** ExecuteTaskSyncResponse header. */ + public header?: (flyteidl.admin.IExecuteTaskSyncResponseHeader|null); + + /** ExecuteTaskSyncResponse outputs. */ + public outputs?: (flyteidl.core.ILiteralMap|null); + + /** ExecuteTaskSyncResponse res. */ + public res?: ("header"|"outputs"); + + /** + * Creates a new ExecuteTaskSyncResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteTaskSyncResponse instance + */ + public static create(properties?: flyteidl.admin.IExecuteTaskSyncResponse): flyteidl.admin.ExecuteTaskSyncResponse; + + /** + * Encodes the specified ExecuteTaskSyncResponse message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncResponse.verify|verify} messages. + * @param message ExecuteTaskSyncResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IExecuteTaskSyncResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteTaskSyncResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteTaskSyncResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.ExecuteTaskSyncResponse; + + /** + * Verifies an ExecuteTaskSyncResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a GetTaskRequest. */ interface IGetTaskRequest { /** GetTaskRequest taskType */ - taskType?: (string|null); + taskType?: (flyteidl.admin.ITaskType|null); /** GetTaskRequest resourceMeta */ resourceMeta?: (Uint8Array|null); @@ -9070,7 +9329,7 @@ export namespace flyteidl { constructor(properties?: flyteidl.admin.IGetTaskRequest); /** GetTaskRequest taskType. */ - public taskType: string; + public taskType?: (flyteidl.admin.ITaskType|null); /** GetTaskRequest resourceMeta. */ public resourceMeta: Uint8Array; @@ -9246,7 +9505,7 @@ export namespace flyteidl { interface IDeleteTaskRequest { /** DeleteTaskRequest taskType */ - taskType?: (string|null); + taskType?: (flyteidl.admin.ITaskType|null); /** DeleteTaskRequest resourceMeta */ resourceMeta?: (Uint8Array|null); @@ -9262,7 +9521,7 @@ export namespace flyteidl { constructor(properties?: flyteidl.admin.IDeleteTaskRequest); /** DeleteTaskRequest taskType. */ - public taskType: string; + public taskType?: (flyteidl.admin.ITaskType|null); /** DeleteTaskRequest resourceMeta. */ public resourceMeta: Uint8Array; @@ -9353,7 +9612,7 @@ export namespace flyteidl { name?: (string|null); /** Agent supportedTaskTypes */ - supportedTaskTypes?: (string[]|null); + supportedTaskTypes?: (flyteidl.admin.ITaskType[]|null); } /** Represents an Agent. */ @@ -9369,7 +9628,7 @@ export namespace flyteidl { public name: string; /** Agent supportedTaskTypes. */ - public supportedTaskTypes: string[]; + public supportedTaskTypes: flyteidl.admin.ITaskType[]; /** * Creates a new Agent instance using the specified properties. @@ -9404,6 +9663,64 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a TaskType. */ + interface ITaskType { + + /** TaskType name */ + name?: (string|null); + + /** TaskType version */ + version?: (number|null); + } + + /** Represents a TaskType. */ + class TaskType implements ITaskType { + + /** + * Constructs a new TaskType. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.ITaskType); + + /** TaskType name. */ + public name: string; + + /** TaskType version. */ + public version: number; + + /** + * Creates a new TaskType instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskType instance + */ + public static create(properties?: flyteidl.admin.ITaskType): flyteidl.admin.TaskType; + + /** + * Encodes the specified TaskType message. Does not implicitly {@link flyteidl.admin.TaskType.verify|verify} messages. + * @param message TaskType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.ITaskType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.TaskType; + + /** + * Verifies a TaskType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a GetAgentRequest. */ interface IGetAgentRequest { @@ -9610,7 +9927,7 @@ export namespace flyteidl { interface IGetTaskMetricsRequest { /** GetTaskMetricsRequest taskType */ - taskType?: (string|null); + taskType?: (flyteidl.admin.ITaskType|null); /** GetTaskMetricsRequest resourceMeta */ resourceMeta?: (Uint8Array|null); @@ -9638,7 +9955,7 @@ export namespace flyteidl { constructor(properties?: flyteidl.admin.IGetTaskMetricsRequest); /** GetTaskMetricsRequest taskType. */ - public taskType: string; + public taskType?: (flyteidl.admin.ITaskType|null); /** GetTaskMetricsRequest resourceMeta. */ public resourceMeta: Uint8Array; @@ -9744,7 +10061,7 @@ export namespace flyteidl { interface IGetTaskLogsRequest { /** GetTaskLogsRequest taskType */ - taskType?: (string|null); + taskType?: (flyteidl.admin.ITaskType|null); /** GetTaskLogsRequest resourceMeta */ resourceMeta?: (Uint8Array|null); @@ -9766,7 +10083,7 @@ export namespace flyteidl { constructor(properties?: flyteidl.admin.IGetTaskLogsRequest); /** GetTaskLogsRequest taskType. */ - public taskType: string; + public taskType?: (flyteidl.admin.ITaskType|null); /** GetTaskLogsRequest resourceMeta. */ public resourceMeta: Uint8Array; @@ -9810,14 +10127,118 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a GetTaskLogsResponseHeader. */ + interface IGetTaskLogsResponseHeader { + + /** GetTaskLogsResponseHeader token */ + token?: (string|null); + } + + /** Represents a GetTaskLogsResponseHeader. */ + class GetTaskLogsResponseHeader implements IGetTaskLogsResponseHeader { + + /** + * Constructs a new GetTaskLogsResponseHeader. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IGetTaskLogsResponseHeader); + + /** GetTaskLogsResponseHeader token. */ + public token: string; + + /** + * Creates a new GetTaskLogsResponseHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaskLogsResponseHeader instance + */ + public static create(properties?: flyteidl.admin.IGetTaskLogsResponseHeader): flyteidl.admin.GetTaskLogsResponseHeader; + + /** + * Encodes the specified GetTaskLogsResponseHeader message. Does not implicitly {@link flyteidl.admin.GetTaskLogsResponseHeader.verify|verify} messages. + * @param message GetTaskLogsResponseHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IGetTaskLogsResponseHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTaskLogsResponseHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaskLogsResponseHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.GetTaskLogsResponseHeader; + + /** + * Verifies a GetTaskLogsResponseHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of a GetTaskLogsResponseBody. */ + interface IGetTaskLogsResponseBody { + + /** GetTaskLogsResponseBody results */ + results?: (string[]|null); + } + + /** Represents a GetTaskLogsResponseBody. */ + class GetTaskLogsResponseBody implements IGetTaskLogsResponseBody { + + /** + * Constructs a new GetTaskLogsResponseBody. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IGetTaskLogsResponseBody); + + /** GetTaskLogsResponseBody results. */ + public results: string[]; + + /** + * Creates a new GetTaskLogsResponseBody instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaskLogsResponseBody instance + */ + public static create(properties?: flyteidl.admin.IGetTaskLogsResponseBody): flyteidl.admin.GetTaskLogsResponseBody; + + /** + * Encodes the specified GetTaskLogsResponseBody message. Does not implicitly {@link flyteidl.admin.GetTaskLogsResponseBody.verify|verify} messages. + * @param message GetTaskLogsResponseBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IGetTaskLogsResponseBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTaskLogsResponseBody message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaskLogsResponseBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.GetTaskLogsResponseBody; + + /** + * Verifies a GetTaskLogsResponseBody message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a GetTaskLogsResponse. */ interface IGetTaskLogsResponse { - /** GetTaskLogsResponse results */ - results?: (string[]|null); + /** GetTaskLogsResponse header */ + header?: (flyteidl.admin.IGetTaskLogsResponseHeader|null); - /** GetTaskLogsResponse token */ - token?: (string|null); + /** GetTaskLogsResponse body */ + body?: (flyteidl.admin.IGetTaskLogsResponseBody|null); } /** Represents a GetTaskLogsResponse. */ @@ -9829,11 +10250,14 @@ export namespace flyteidl { */ constructor(properties?: flyteidl.admin.IGetTaskLogsResponse); - /** GetTaskLogsResponse results. */ - public results: string[]; + /** GetTaskLogsResponse header. */ + public header?: (flyteidl.admin.IGetTaskLogsResponseHeader|null); - /** GetTaskLogsResponse token. */ - public token: string; + /** GetTaskLogsResponse body. */ + public body?: (flyteidl.admin.IGetTaskLogsResponseBody|null); + + /** GetTaskLogsResponse part. */ + public part?: ("header"|"body"); /** * Creates a new GetTaskLogsResponse instance using the specified properties. @@ -21423,6 +21847,20 @@ export namespace flyteidl { */ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AsyncAgentService; + /** + * Calls ExecuteTaskSync. + * @param request ExecuteTaskSyncRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteTaskSyncResponse + */ + public executeTaskSync(request: flyteidl.admin.IExecuteTaskSyncRequest, callback: flyteidl.service.AsyncAgentService.ExecuteTaskSyncCallback): void; + + /** + * Calls ExecuteTaskSync. + * @param request ExecuteTaskSyncRequest message or plain object + * @returns Promise + */ + public executeTaskSync(request: flyteidl.admin.IExecuteTaskSyncRequest): Promise; + /** * Calls CreateTask. * @param request CreateTaskRequest message or plain object @@ -21496,6 +21934,13 @@ export namespace flyteidl { namespace AsyncAgentService { + /** + * Callback as used by {@link flyteidl.service.AsyncAgentService#executeTaskSync}. + * @param error Error, if any + * @param [response] ExecuteTaskSyncResponse + */ + type ExecuteTaskSyncCallback = (error: (Error|null), response?: flyteidl.admin.ExecuteTaskSyncResponse) => void; + /** * Callback as used by {@link flyteidl.service.AsyncAgentService#createTask}. * @param error Error, if any diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 7a5c668347..96bfeee8be 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -21677,6 +21677,10 @@ * @property {Object.|null} [annotations] TaskExecutionMetadata annotations * @property {string|null} [k8sServiceAccount] TaskExecutionMetadata k8sServiceAccount * @property {Object.|null} [environmentVariables] TaskExecutionMetadata environmentVariables + * @property {number|null} [maxAttempts] TaskExecutionMetadata maxAttempts + * @property {boolean|null} [interruptible] TaskExecutionMetadata interruptible + * @property {number|null} [interruptibleFailureThreshold] TaskExecutionMetadata interruptibleFailureThreshold + * @property {flyteidl.core.ITaskNodeOverrides|null} [overrides] TaskExecutionMetadata overrides */ /** @@ -21745,6 +21749,38 @@ */ TaskExecutionMetadata.prototype.environmentVariables = $util.emptyObject; + /** + * TaskExecutionMetadata maxAttempts. + * @member {number} maxAttempts + * @memberof flyteidl.admin.TaskExecutionMetadata + * @instance + */ + TaskExecutionMetadata.prototype.maxAttempts = 0; + + /** + * TaskExecutionMetadata interruptible. + * @member {boolean} interruptible + * @memberof flyteidl.admin.TaskExecutionMetadata + * @instance + */ + TaskExecutionMetadata.prototype.interruptible = false; + + /** + * TaskExecutionMetadata interruptibleFailureThreshold. + * @member {number} interruptibleFailureThreshold + * @memberof flyteidl.admin.TaskExecutionMetadata + * @instance + */ + TaskExecutionMetadata.prototype.interruptibleFailureThreshold = 0; + + /** + * TaskExecutionMetadata overrides. + * @member {flyteidl.core.ITaskNodeOverrides|null|undefined} overrides + * @memberof flyteidl.admin.TaskExecutionMetadata + * @instance + */ + TaskExecutionMetadata.prototype.overrides = null; + /** * Creates a new TaskExecutionMetadata instance using the specified properties. * @function create @@ -21784,6 +21820,14 @@ if (message.environmentVariables != null && message.hasOwnProperty("environmentVariables")) for (var keys = Object.keys(message.environmentVariables), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.environmentVariables[keys[i]]).ldelim(); + if (message.maxAttempts != null && message.hasOwnProperty("maxAttempts")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxAttempts); + if (message.interruptible != null && message.hasOwnProperty("interruptible")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.interruptible); + if (message.interruptibleFailureThreshold != null && message.hasOwnProperty("interruptibleFailureThreshold")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.interruptibleFailureThreshold); + if (message.overrides != null && message.hasOwnProperty("overrides")) + $root.flyteidl.core.TaskNodeOverrides.encode(message.overrides, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -21838,6 +21882,18 @@ reader.pos++; message.environmentVariables[key] = reader.string(); break; + case 7: + message.maxAttempts = reader.int32(); + break; + case 8: + message.interruptible = reader.bool(); + break; + case 9: + message.interruptibleFailureThreshold = reader.int32(); + break; + case 10: + message.overrides = $root.flyteidl.core.TaskNodeOverrides.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -21892,6 +21948,20 @@ if (!$util.isString(message.environmentVariables[key[i]])) return "environmentVariables: string{k:string} expected"; } + if (message.maxAttempts != null && message.hasOwnProperty("maxAttempts")) + if (!$util.isInteger(message.maxAttempts)) + return "maxAttempts: integer expected"; + if (message.interruptible != null && message.hasOwnProperty("interruptible")) + if (typeof message.interruptible !== "boolean") + return "interruptible: boolean expected"; + if (message.interruptibleFailureThreshold != null && message.hasOwnProperty("interruptibleFailureThreshold")) + if (!$util.isInteger(message.interruptibleFailureThreshold)) + return "interruptibleFailureThreshold: integer expected"; + if (message.overrides != null && message.hasOwnProperty("overrides")) { + var error = $root.flyteidl.core.TaskNodeOverrides.verify(message.overrides); + if (error) + return "overrides." + error; + } return null; }; @@ -21934,93 +22004,647 @@ CreateTaskRequest.prototype.inputs = null; /** - * CreateTaskRequest template. - * @member {flyteidl.core.ITaskTemplate|null|undefined} template - * @memberof flyteidl.admin.CreateTaskRequest - * @instance + * CreateTaskRequest template. + * @member {flyteidl.core.ITaskTemplate|null|undefined} template + * @memberof flyteidl.admin.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.template = null; + + /** + * CreateTaskRequest outputPrefix. + * @member {string} outputPrefix + * @memberof flyteidl.admin.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.outputPrefix = ""; + + /** + * CreateTaskRequest taskExecutionMetadata. + * @member {flyteidl.admin.ITaskExecutionMetadata|null|undefined} taskExecutionMetadata + * @memberof flyteidl.admin.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.taskExecutionMetadata = null; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.CreateTaskRequest + * @static + * @param {flyteidl.admin.ICreateTaskRequest=} [properties] Properties to set + * @returns {flyteidl.admin.CreateTaskRequest} CreateTaskRequest instance + */ + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); + }; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link flyteidl.admin.CreateTaskRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.CreateTaskRequest + * @static + * @param {flyteidl.admin.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.hasOwnProperty("inputs")) + $root.flyteidl.core.LiteralMap.encode(message.inputs, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.template != null && message.hasOwnProperty("template")) + $root.flyteidl.core.TaskTemplate.encode(message.template, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputPrefix != null && message.hasOwnProperty("outputPrefix")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputPrefix); + if (message.taskExecutionMetadata != null && message.hasOwnProperty("taskExecutionMetadata")) + $root.flyteidl.admin.TaskExecutionMetadata.encode(message.taskExecutionMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.CreateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.inputs = $root.flyteidl.core.LiteralMap.decode(reader, reader.uint32()); + break; + case 2: + message.template = $root.flyteidl.core.TaskTemplate.decode(reader, reader.uint32()); + break; + case 3: + message.outputPrefix = reader.string(); + break; + case 4: + message.taskExecutionMetadata = $root.flyteidl.admin.TaskExecutionMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a CreateTaskRequest message. + * @function verify + * @memberof flyteidl.admin.CreateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + var error = $root.flyteidl.core.LiteralMap.verify(message.inputs); + if (error) + return "inputs." + error; + } + if (message.template != null && message.hasOwnProperty("template")) { + var error = $root.flyteidl.core.TaskTemplate.verify(message.template); + if (error) + return "template." + error; + } + if (message.outputPrefix != null && message.hasOwnProperty("outputPrefix")) + if (!$util.isString(message.outputPrefix)) + return "outputPrefix: string expected"; + if (message.taskExecutionMetadata != null && message.hasOwnProperty("taskExecutionMetadata")) { + var error = $root.flyteidl.admin.TaskExecutionMetadata.verify(message.taskExecutionMetadata); + if (error) + return "taskExecutionMetadata." + error; + } + return null; + }; + + return CreateTaskRequest; + })(); + + admin.CreateTaskResponse = (function() { + + /** + * Properties of a CreateTaskResponse. + * @memberof flyteidl.admin + * @interface ICreateTaskResponse + * @property {Uint8Array|null} [resourceMeta] CreateTaskResponse resourceMeta + */ + + /** + * Constructs a new CreateTaskResponse. + * @memberof flyteidl.admin + * @classdesc Represents a CreateTaskResponse. + * @implements ICreateTaskResponse + * @constructor + * @param {flyteidl.admin.ICreateTaskResponse=} [properties] Properties to set + */ + function CreateTaskResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTaskResponse resourceMeta. + * @member {Uint8Array} resourceMeta + * @memberof flyteidl.admin.CreateTaskResponse + * @instance + */ + CreateTaskResponse.prototype.resourceMeta = $util.newBuffer([]); + + /** + * Creates a new CreateTaskResponse instance using the specified properties. + * @function create + * @memberof flyteidl.admin.CreateTaskResponse + * @static + * @param {flyteidl.admin.ICreateTaskResponse=} [properties] Properties to set + * @returns {flyteidl.admin.CreateTaskResponse} CreateTaskResponse instance + */ + CreateTaskResponse.create = function create(properties) { + return new CreateTaskResponse(properties); + }; + + /** + * Encodes the specified CreateTaskResponse message. Does not implicitly {@link flyteidl.admin.CreateTaskResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.CreateTaskResponse + * @static + * @param {flyteidl.admin.ICreateTaskResponse} message CreateTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.resourceMeta); + return writer; + }; + + /** + * Decodes a CreateTaskResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.CreateTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.CreateTaskResponse} CreateTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.CreateTaskResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resourceMeta = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a CreateTaskResponse message. + * @function verify + * @memberof flyteidl.admin.CreateTaskResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTaskResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) + if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) + return "resourceMeta: buffer expected"; + return null; + }; + + return CreateTaskResponse; + })(); + + admin.CreateRequestHeader = (function() { + + /** + * Properties of a CreateRequestHeader. + * @memberof flyteidl.admin + * @interface ICreateRequestHeader + * @property {flyteidl.core.ITaskTemplate|null} [template] CreateRequestHeader template + * @property {string|null} [outputPrefix] CreateRequestHeader outputPrefix + * @property {flyteidl.admin.ITaskExecutionMetadata|null} [taskExecutionMetadata] CreateRequestHeader taskExecutionMetadata + * @property {Long|null} [maxDatasetSizeBytes] CreateRequestHeader maxDatasetSizeBytes + */ + + /** + * Constructs a new CreateRequestHeader. + * @memberof flyteidl.admin + * @classdesc Represents a CreateRequestHeader. + * @implements ICreateRequestHeader + * @constructor + * @param {flyteidl.admin.ICreateRequestHeader=} [properties] Properties to set + */ + function CreateRequestHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRequestHeader template. + * @member {flyteidl.core.ITaskTemplate|null|undefined} template + * @memberof flyteidl.admin.CreateRequestHeader + * @instance + */ + CreateRequestHeader.prototype.template = null; + + /** + * CreateRequestHeader outputPrefix. + * @member {string} outputPrefix + * @memberof flyteidl.admin.CreateRequestHeader + * @instance + */ + CreateRequestHeader.prototype.outputPrefix = ""; + + /** + * CreateRequestHeader taskExecutionMetadata. + * @member {flyteidl.admin.ITaskExecutionMetadata|null|undefined} taskExecutionMetadata + * @memberof flyteidl.admin.CreateRequestHeader + * @instance + */ + CreateRequestHeader.prototype.taskExecutionMetadata = null; + + /** + * CreateRequestHeader maxDatasetSizeBytes. + * @member {Long} maxDatasetSizeBytes + * @memberof flyteidl.admin.CreateRequestHeader + * @instance + */ + CreateRequestHeader.prototype.maxDatasetSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CreateRequestHeader instance using the specified properties. + * @function create + * @memberof flyteidl.admin.CreateRequestHeader + * @static + * @param {flyteidl.admin.ICreateRequestHeader=} [properties] Properties to set + * @returns {flyteidl.admin.CreateRequestHeader} CreateRequestHeader instance + */ + CreateRequestHeader.create = function create(properties) { + return new CreateRequestHeader(properties); + }; + + /** + * Encodes the specified CreateRequestHeader message. Does not implicitly {@link flyteidl.admin.CreateRequestHeader.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.CreateRequestHeader + * @static + * @param {flyteidl.admin.ICreateRequestHeader} message CreateRequestHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRequestHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.template != null && message.hasOwnProperty("template")) + $root.flyteidl.core.TaskTemplate.encode(message.template, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputPrefix != null && message.hasOwnProperty("outputPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputPrefix); + if (message.taskExecutionMetadata != null && message.hasOwnProperty("taskExecutionMetadata")) + $root.flyteidl.admin.TaskExecutionMetadata.encode(message.taskExecutionMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxDatasetSizeBytes != null && message.hasOwnProperty("maxDatasetSizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.maxDatasetSizeBytes); + return writer; + }; + + /** + * Decodes a CreateRequestHeader message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.CreateRequestHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.CreateRequestHeader} CreateRequestHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRequestHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.CreateRequestHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.template = $root.flyteidl.core.TaskTemplate.decode(reader, reader.uint32()); + break; + case 2: + message.outputPrefix = reader.string(); + break; + case 3: + message.taskExecutionMetadata = $root.flyteidl.admin.TaskExecutionMetadata.decode(reader, reader.uint32()); + break; + case 4: + message.maxDatasetSizeBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a CreateRequestHeader message. + * @function verify + * @memberof flyteidl.admin.CreateRequestHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRequestHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.template != null && message.hasOwnProperty("template")) { + var error = $root.flyteidl.core.TaskTemplate.verify(message.template); + if (error) + return "template." + error; + } + if (message.outputPrefix != null && message.hasOwnProperty("outputPrefix")) + if (!$util.isString(message.outputPrefix)) + return "outputPrefix: string expected"; + if (message.taskExecutionMetadata != null && message.hasOwnProperty("taskExecutionMetadata")) { + var error = $root.flyteidl.admin.TaskExecutionMetadata.verify(message.taskExecutionMetadata); + if (error) + return "taskExecutionMetadata." + error; + } + if (message.maxDatasetSizeBytes != null && message.hasOwnProperty("maxDatasetSizeBytes")) + if (!$util.isInteger(message.maxDatasetSizeBytes) && !(message.maxDatasetSizeBytes && $util.isInteger(message.maxDatasetSizeBytes.low) && $util.isInteger(message.maxDatasetSizeBytes.high))) + return "maxDatasetSizeBytes: integer|Long expected"; + return null; + }; + + return CreateRequestHeader; + })(); + + admin.ExecuteTaskSyncRequest = (function() { + + /** + * Properties of an ExecuteTaskSyncRequest. + * @memberof flyteidl.admin + * @interface IExecuteTaskSyncRequest + * @property {flyteidl.admin.ICreateRequestHeader|null} [header] ExecuteTaskSyncRequest header + * @property {flyteidl.core.ILiteralMap|null} [inputs] ExecuteTaskSyncRequest inputs + */ + + /** + * Constructs a new ExecuteTaskSyncRequest. + * @memberof flyteidl.admin + * @classdesc Represents an ExecuteTaskSyncRequest. + * @implements IExecuteTaskSyncRequest + * @constructor + * @param {flyteidl.admin.IExecuteTaskSyncRequest=} [properties] Properties to set + */ + function ExecuteTaskSyncRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteTaskSyncRequest header. + * @member {flyteidl.admin.ICreateRequestHeader|null|undefined} header + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @instance + */ + ExecuteTaskSyncRequest.prototype.header = null; + + /** + * ExecuteTaskSyncRequest inputs. + * @member {flyteidl.core.ILiteralMap|null|undefined} inputs + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @instance + */ + ExecuteTaskSyncRequest.prototype.inputs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecuteTaskSyncRequest part. + * @member {"header"|"inputs"|undefined} part + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @instance + */ + Object.defineProperty(ExecuteTaskSyncRequest.prototype, "part", { + get: $util.oneOfGetter($oneOfFields = ["header", "inputs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecuteTaskSyncRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @static + * @param {flyteidl.admin.IExecuteTaskSyncRequest=} [properties] Properties to set + * @returns {flyteidl.admin.ExecuteTaskSyncRequest} ExecuteTaskSyncRequest instance + */ + ExecuteTaskSyncRequest.create = function create(properties) { + return new ExecuteTaskSyncRequest(properties); + }; + + /** + * Encodes the specified ExecuteTaskSyncRequest message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @static + * @param {flyteidl.admin.IExecuteTaskSyncRequest} message ExecuteTaskSyncRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteTaskSyncRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && message.hasOwnProperty("header")) + $root.flyteidl.admin.CreateRequestHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.inputs != null && message.hasOwnProperty("inputs")) + $root.flyteidl.core.LiteralMap.encode(message.inputs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Decodes an ExecuteTaskSyncRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ExecuteTaskSyncRequest} ExecuteTaskSyncRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteTaskSyncRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.ExecuteTaskSyncRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.flyteidl.admin.CreateRequestHeader.decode(reader, reader.uint32()); + break; + case 2: + message.inputs = $root.flyteidl.core.LiteralMap.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an ExecuteTaskSyncRequest message. + * @function verify + * @memberof flyteidl.admin.ExecuteTaskSyncRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteTaskSyncRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.header != null && message.hasOwnProperty("header")) { + properties.part = 1; + { + var error = $root.flyteidl.admin.CreateRequestHeader.verify(message.header); + if (error) + return "header." + error; + } + } + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (properties.part === 1) + return "part: multiple values"; + properties.part = 1; + { + var error = $root.flyteidl.core.LiteralMap.verify(message.inputs); + if (error) + return "inputs." + error; + } + } + return null; + }; + + return ExecuteTaskSyncRequest; + })(); + + admin.ExecuteTaskSyncResponseHeader = (function() { + + /** + * Properties of an ExecuteTaskSyncResponseHeader. + * @memberof flyteidl.admin + * @interface IExecuteTaskSyncResponseHeader + * @property {flyteidl.admin.IResource|null} [resource] ExecuteTaskSyncResponseHeader resource */ - CreateTaskRequest.prototype.template = null; /** - * CreateTaskRequest outputPrefix. - * @member {string} outputPrefix - * @memberof flyteidl.admin.CreateTaskRequest - * @instance + * Constructs a new ExecuteTaskSyncResponseHeader. + * @memberof flyteidl.admin + * @classdesc Represents an ExecuteTaskSyncResponseHeader. + * @implements IExecuteTaskSyncResponseHeader + * @constructor + * @param {flyteidl.admin.IExecuteTaskSyncResponseHeader=} [properties] Properties to set */ - CreateTaskRequest.prototype.outputPrefix = ""; + function ExecuteTaskSyncResponseHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * CreateTaskRequest taskExecutionMetadata. - * @member {flyteidl.admin.ITaskExecutionMetadata|null|undefined} taskExecutionMetadata - * @memberof flyteidl.admin.CreateTaskRequest + * ExecuteTaskSyncResponseHeader resource. + * @member {flyteidl.admin.IResource|null|undefined} resource + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader * @instance */ - CreateTaskRequest.prototype.taskExecutionMetadata = null; + ExecuteTaskSyncResponseHeader.prototype.resource = null; /** - * Creates a new CreateTaskRequest instance using the specified properties. + * Creates a new ExecuteTaskSyncResponseHeader instance using the specified properties. * @function create - * @memberof flyteidl.admin.CreateTaskRequest + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader * @static - * @param {flyteidl.admin.ICreateTaskRequest=} [properties] Properties to set - * @returns {flyteidl.admin.CreateTaskRequest} CreateTaskRequest instance + * @param {flyteidl.admin.IExecuteTaskSyncResponseHeader=} [properties] Properties to set + * @returns {flyteidl.admin.ExecuteTaskSyncResponseHeader} ExecuteTaskSyncResponseHeader instance */ - CreateTaskRequest.create = function create(properties) { - return new CreateTaskRequest(properties); + ExecuteTaskSyncResponseHeader.create = function create(properties) { + return new ExecuteTaskSyncResponseHeader(properties); }; /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link flyteidl.admin.CreateTaskRequest.verify|verify} messages. + * Encodes the specified ExecuteTaskSyncResponseHeader message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncResponseHeader.verify|verify} messages. * @function encode - * @memberof flyteidl.admin.CreateTaskRequest + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader * @static - * @param {flyteidl.admin.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {flyteidl.admin.IExecuteTaskSyncResponseHeader} message ExecuteTaskSyncResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTaskRequest.encode = function encode(message, writer) { + ExecuteTaskSyncResponseHeader.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputs != null && message.hasOwnProperty("inputs")) - $root.flyteidl.core.LiteralMap.encode(message.inputs, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.template != null && message.hasOwnProperty("template")) - $root.flyteidl.core.TaskTemplate.encode(message.template, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputPrefix != null && message.hasOwnProperty("outputPrefix")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputPrefix); - if (message.taskExecutionMetadata != null && message.hasOwnProperty("taskExecutionMetadata")) - $root.flyteidl.admin.TaskExecutionMetadata.encode(message.taskExecutionMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.flyteidl.admin.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. + * Decodes an ExecuteTaskSyncResponseHeader message from the specified reader or buffer. * @function decode - * @memberof flyteidl.admin.CreateTaskRequest + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {flyteidl.admin.CreateTaskRequest} CreateTaskRequest + * @returns {flyteidl.admin.ExecuteTaskSyncResponseHeader} ExecuteTaskSyncResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTaskRequest.decode = function decode(reader, length) { + ExecuteTaskSyncResponseHeader.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.CreateTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.ExecuteTaskSyncResponseHeader(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.inputs = $root.flyteidl.core.LiteralMap.decode(reader, reader.uint32()); - break; - case 2: - message.template = $root.flyteidl.core.TaskTemplate.decode(reader, reader.uint32()); - break; - case 3: - message.outputPrefix = reader.string(); - break; - case 4: - message.taskExecutionMetadata = $root.flyteidl.admin.TaskExecutionMetadata.decode(reader, reader.uint32()); + message.resource = $root.flyteidl.admin.Resource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -22031,59 +22655,46 @@ }; /** - * Verifies a CreateTaskRequest message. + * Verifies an ExecuteTaskSyncResponseHeader message. * @function verify - * @memberof flyteidl.admin.CreateTaskRequest + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTaskRequest.verify = function verify(message) { + ExecuteTaskSyncResponseHeader.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - var error = $root.flyteidl.core.LiteralMap.verify(message.inputs); - if (error) - return "inputs." + error; - } - if (message.template != null && message.hasOwnProperty("template")) { - var error = $root.flyteidl.core.TaskTemplate.verify(message.template); - if (error) - return "template." + error; - } - if (message.outputPrefix != null && message.hasOwnProperty("outputPrefix")) - if (!$util.isString(message.outputPrefix)) - return "outputPrefix: string expected"; - if (message.taskExecutionMetadata != null && message.hasOwnProperty("taskExecutionMetadata")) { - var error = $root.flyteidl.admin.TaskExecutionMetadata.verify(message.taskExecutionMetadata); + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.flyteidl.admin.Resource.verify(message.resource); if (error) - return "taskExecutionMetadata." + error; + return "resource." + error; } return null; }; - return CreateTaskRequest; + return ExecuteTaskSyncResponseHeader; })(); - admin.CreateTaskResponse = (function() { + admin.ExecuteTaskSyncResponse = (function() { /** - * Properties of a CreateTaskResponse. + * Properties of an ExecuteTaskSyncResponse. * @memberof flyteidl.admin - * @interface ICreateTaskResponse - * @property {Uint8Array|null} [resourceMeta] CreateTaskResponse resourceMeta - * @property {flyteidl.admin.IResource|null} [resource] CreateTaskResponse resource + * @interface IExecuteTaskSyncResponse + * @property {flyteidl.admin.IExecuteTaskSyncResponseHeader|null} [header] ExecuteTaskSyncResponse header + * @property {flyteidl.core.ILiteralMap|null} [outputs] ExecuteTaskSyncResponse outputs */ /** - * Constructs a new CreateTaskResponse. + * Constructs a new ExecuteTaskSyncResponse. * @memberof flyteidl.admin - * @classdesc Represents a CreateTaskResponse. - * @implements ICreateTaskResponse + * @classdesc Represents an ExecuteTaskSyncResponse. + * @implements IExecuteTaskSyncResponse * @constructor - * @param {flyteidl.admin.ICreateTaskResponse=} [properties] Properties to set + * @param {flyteidl.admin.IExecuteTaskSyncResponse=} [properties] Properties to set */ - function CreateTaskResponse(properties) { + function ExecuteTaskSyncResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22091,89 +22702,89 @@ } /** - * CreateTaskResponse resourceMeta. - * @member {Uint8Array} resourceMeta - * @memberof flyteidl.admin.CreateTaskResponse + * ExecuteTaskSyncResponse header. + * @member {flyteidl.admin.IExecuteTaskSyncResponseHeader|null|undefined} header + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @instance */ - CreateTaskResponse.prototype.resourceMeta = $util.newBuffer([]); + ExecuteTaskSyncResponse.prototype.header = null; /** - * CreateTaskResponse resource. - * @member {flyteidl.admin.IResource|null|undefined} resource - * @memberof flyteidl.admin.CreateTaskResponse + * ExecuteTaskSyncResponse outputs. + * @member {flyteidl.core.ILiteralMap|null|undefined} outputs + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @instance */ - CreateTaskResponse.prototype.resource = null; + ExecuteTaskSyncResponse.prototype.outputs = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * CreateTaskResponse res. - * @member {"resourceMeta"|"resource"|undefined} res - * @memberof flyteidl.admin.CreateTaskResponse + * ExecuteTaskSyncResponse res. + * @member {"header"|"outputs"|undefined} res + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @instance */ - Object.defineProperty(CreateTaskResponse.prototype, "res", { - get: $util.oneOfGetter($oneOfFields = ["resourceMeta", "resource"]), + Object.defineProperty(ExecuteTaskSyncResponse.prototype, "res", { + get: $util.oneOfGetter($oneOfFields = ["header", "outputs"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CreateTaskResponse instance using the specified properties. + * Creates a new ExecuteTaskSyncResponse instance using the specified properties. * @function create - * @memberof flyteidl.admin.CreateTaskResponse + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @static - * @param {flyteidl.admin.ICreateTaskResponse=} [properties] Properties to set - * @returns {flyteidl.admin.CreateTaskResponse} CreateTaskResponse instance + * @param {flyteidl.admin.IExecuteTaskSyncResponse=} [properties] Properties to set + * @returns {flyteidl.admin.ExecuteTaskSyncResponse} ExecuteTaskSyncResponse instance */ - CreateTaskResponse.create = function create(properties) { - return new CreateTaskResponse(properties); + ExecuteTaskSyncResponse.create = function create(properties) { + return new ExecuteTaskSyncResponse(properties); }; /** - * Encodes the specified CreateTaskResponse message. Does not implicitly {@link flyteidl.admin.CreateTaskResponse.verify|verify} messages. + * Encodes the specified ExecuteTaskSyncResponse message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncResponse.verify|verify} messages. * @function encode - * @memberof flyteidl.admin.CreateTaskResponse + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @static - * @param {flyteidl.admin.ICreateTaskResponse} message CreateTaskResponse message or plain object to encode + * @param {flyteidl.admin.IExecuteTaskSyncResponse} message ExecuteTaskSyncResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTaskResponse.encode = function encode(message, writer) { + ExecuteTaskSyncResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.resourceMeta); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.flyteidl.admin.Resource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.header != null && message.hasOwnProperty("header")) + $root.flyteidl.admin.ExecuteTaskSyncResponseHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputs != null && message.hasOwnProperty("outputs")) + $root.flyteidl.core.LiteralMap.encode(message.outputs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Decodes a CreateTaskResponse message from the specified reader or buffer. + * Decodes an ExecuteTaskSyncResponse message from the specified reader or buffer. * @function decode - * @memberof flyteidl.admin.CreateTaskResponse + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {flyteidl.admin.CreateTaskResponse} CreateTaskResponse + * @returns {flyteidl.admin.ExecuteTaskSyncResponse} ExecuteTaskSyncResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTaskResponse.decode = function decode(reader, length) { + ExecuteTaskSyncResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.CreateTaskResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.ExecuteTaskSyncResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resourceMeta = reader.bytes(); + message.header = $root.flyteidl.admin.ExecuteTaskSyncResponseHeader.decode(reader, reader.uint32()); break; case 2: - message.resource = $root.flyteidl.admin.Resource.decode(reader, reader.uint32()); + message.outputs = $root.flyteidl.core.LiteralMap.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -22184,36 +22795,39 @@ }; /** - * Verifies a CreateTaskResponse message. + * Verifies an ExecuteTaskSyncResponse message. * @function verify - * @memberof flyteidl.admin.CreateTaskResponse + * @memberof flyteidl.admin.ExecuteTaskSyncResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTaskResponse.verify = function verify(message) { + ExecuteTaskSyncResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) { + if (message.header != null && message.hasOwnProperty("header")) { properties.res = 1; - if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) - return "resourceMeta: buffer expected"; + { + var error = $root.flyteidl.admin.ExecuteTaskSyncResponseHeader.verify(message.header); + if (error) + return "header." + error; + } } - if (message.resource != null && message.hasOwnProperty("resource")) { + if (message.outputs != null && message.hasOwnProperty("outputs")) { if (properties.res === 1) return "res: multiple values"; properties.res = 1; { - var error = $root.flyteidl.admin.Resource.verify(message.resource); + var error = $root.flyteidl.core.LiteralMap.verify(message.outputs); if (error) - return "resource." + error; + return "outputs." + error; } } return null; }; - return CreateTaskResponse; + return ExecuteTaskSyncResponse; })(); admin.GetTaskRequest = (function() { @@ -22222,7 +22836,7 @@ * Properties of a GetTaskRequest. * @memberof flyteidl.admin * @interface IGetTaskRequest - * @property {string|null} [taskType] GetTaskRequest taskType + * @property {flyteidl.admin.ITaskType|null} [taskType] GetTaskRequest taskType * @property {Uint8Array|null} [resourceMeta] GetTaskRequest resourceMeta */ @@ -22243,11 +22857,11 @@ /** * GetTaskRequest taskType. - * @member {string} taskType + * @member {flyteidl.admin.ITaskType|null|undefined} taskType * @memberof flyteidl.admin.GetTaskRequest * @instance */ - GetTaskRequest.prototype.taskType = ""; + GetTaskRequest.prototype.taskType = null; /** * GetTaskRequest resourceMeta. @@ -22282,7 +22896,7 @@ if (!writer) writer = $Writer.create(); if (message.taskType != null && message.hasOwnProperty("taskType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.taskType); + $root.flyteidl.admin.TaskType.encode(message.taskType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.resourceMeta); return writer; @@ -22307,7 +22921,7 @@ var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.taskType = reader.string(); + message.taskType = $root.flyteidl.admin.TaskType.decode(reader, reader.uint32()); break; case 2: message.resourceMeta = reader.bytes(); @@ -22331,9 +22945,11 @@ GetTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.taskType != null && message.hasOwnProperty("taskType")) - if (!$util.isString(message.taskType)) - return "taskType: string expected"; + if (message.taskType != null && message.hasOwnProperty("taskType")) { + var error = $root.flyteidl.admin.TaskType.verify(message.taskType); + if (error) + return "taskType." + error; + } if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; @@ -22697,7 +23313,7 @@ * Properties of a DeleteTaskRequest. * @memberof flyteidl.admin * @interface IDeleteTaskRequest - * @property {string|null} [taskType] DeleteTaskRequest taskType + * @property {flyteidl.admin.ITaskType|null} [taskType] DeleteTaskRequest taskType * @property {Uint8Array|null} [resourceMeta] DeleteTaskRequest resourceMeta */ @@ -22718,11 +23334,11 @@ /** * DeleteTaskRequest taskType. - * @member {string} taskType + * @member {flyteidl.admin.ITaskType|null|undefined} taskType * @memberof flyteidl.admin.DeleteTaskRequest * @instance */ - DeleteTaskRequest.prototype.taskType = ""; + DeleteTaskRequest.prototype.taskType = null; /** * DeleteTaskRequest resourceMeta. @@ -22757,7 +23373,7 @@ if (!writer) writer = $Writer.create(); if (message.taskType != null && message.hasOwnProperty("taskType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.taskType); + $root.flyteidl.admin.TaskType.encode(message.taskType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.resourceMeta); return writer; @@ -22782,7 +23398,7 @@ var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.taskType = reader.string(); + message.taskType = $root.flyteidl.admin.TaskType.decode(reader, reader.uint32()); break; case 2: message.resourceMeta = reader.bytes(); @@ -22806,9 +23422,11 @@ DeleteTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.taskType != null && message.hasOwnProperty("taskType")) - if (!$util.isString(message.taskType)) - return "taskType: string expected"; + if (message.taskType != null && message.hasOwnProperty("taskType")) { + var error = $root.flyteidl.admin.TaskType.verify(message.taskType); + if (error) + return "taskType." + error; + } if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; @@ -22918,7 +23536,7 @@ * @memberof flyteidl.admin * @interface IAgent * @property {string|null} [name] Agent name - * @property {Array.|null} [supportedTaskTypes] Agent supportedTaskTypes + * @property {Array.|null} [supportedTaskTypes] Agent supportedTaskTypes */ /** @@ -22947,7 +23565,7 @@ /** * Agent supportedTaskTypes. - * @member {Array.} supportedTaskTypes + * @member {Array.} supportedTaskTypes * @memberof flyteidl.admin.Agent * @instance */ @@ -22981,25 +23599,160 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.supportedTaskTypes != null && message.supportedTaskTypes.length) for (var i = 0; i < message.supportedTaskTypes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.supportedTaskTypes[i]); + $root.flyteidl.admin.TaskType.encode(message.supportedTaskTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Decodes an Agent message from the specified reader or buffer. * @function decode - * @memberof flyteidl.admin.Agent + * @memberof flyteidl.admin.Agent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.Agent} Agent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Agent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.Agent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.supportedTaskTypes && message.supportedTaskTypes.length)) + message.supportedTaskTypes = []; + message.supportedTaskTypes.push($root.flyteidl.admin.TaskType.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an Agent message. + * @function verify + * @memberof flyteidl.admin.Agent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Agent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.supportedTaskTypes != null && message.hasOwnProperty("supportedTaskTypes")) { + if (!Array.isArray(message.supportedTaskTypes)) + return "supportedTaskTypes: array expected"; + for (var i = 0; i < message.supportedTaskTypes.length; ++i) { + var error = $root.flyteidl.admin.TaskType.verify(message.supportedTaskTypes[i]); + if (error) + return "supportedTaskTypes." + error; + } + } + return null; + }; + + return Agent; + })(); + + admin.TaskType = (function() { + + /** + * Properties of a TaskType. + * @memberof flyteidl.admin + * @interface ITaskType + * @property {string|null} [name] TaskType name + * @property {number|null} [version] TaskType version + */ + + /** + * Constructs a new TaskType. + * @memberof flyteidl.admin + * @classdesc Represents a TaskType. + * @implements ITaskType + * @constructor + * @param {flyteidl.admin.ITaskType=} [properties] Properties to set + */ + function TaskType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaskType name. + * @member {string} name + * @memberof flyteidl.admin.TaskType + * @instance + */ + TaskType.prototype.name = ""; + + /** + * TaskType version. + * @member {number} version + * @memberof flyteidl.admin.TaskType + * @instance + */ + TaskType.prototype.version = 0; + + /** + * Creates a new TaskType instance using the specified properties. + * @function create + * @memberof flyteidl.admin.TaskType + * @static + * @param {flyteidl.admin.ITaskType=} [properties] Properties to set + * @returns {flyteidl.admin.TaskType} TaskType instance + */ + TaskType.create = function create(properties) { + return new TaskType(properties); + }; + + /** + * Encodes the specified TaskType message. Does not implicitly {@link flyteidl.admin.TaskType.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.TaskType + * @static + * @param {flyteidl.admin.ITaskType} message TaskType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Decodes a TaskType message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.TaskType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {flyteidl.admin.Agent} Agent + * @returns {flyteidl.admin.TaskType} TaskType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.decode = function decode(reader, length) { + TaskType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.Agent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.TaskType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -23007,9 +23760,7 @@ message.name = reader.string(); break; case 2: - if (!(message.supportedTaskTypes && message.supportedTaskTypes.length)) - message.supportedTaskTypes = []; - message.supportedTaskTypes.push(reader.string()); + message.version = reader.int32(); break; default: reader.skipType(tag & 7); @@ -23020,30 +23771,26 @@ }; /** - * Verifies an Agent message. + * Verifies a TaskType message. * @function verify - * @memberof flyteidl.admin.Agent + * @memberof flyteidl.admin.TaskType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Agent.verify = function verify(message) { + TaskType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.supportedTaskTypes != null && message.hasOwnProperty("supportedTaskTypes")) { - if (!Array.isArray(message.supportedTaskTypes)) - return "supportedTaskTypes: array expected"; - for (var i = 0; i < message.supportedTaskTypes.length; ++i) - if (!$util.isString(message.supportedTaskTypes[i])) - return "supportedTaskTypes: string[] expected"; - } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; return null; }; - return Agent; + return TaskType; })(); admin.GetAgentRequest = (function() { @@ -23487,7 +24234,7 @@ * Properties of a GetTaskMetricsRequest. * @memberof flyteidl.admin * @interface IGetTaskMetricsRequest - * @property {string|null} [taskType] GetTaskMetricsRequest taskType + * @property {flyteidl.admin.ITaskType|null} [taskType] GetTaskMetricsRequest taskType * @property {Uint8Array|null} [resourceMeta] GetTaskMetricsRequest resourceMeta * @property {Array.|null} [queries] GetTaskMetricsRequest queries * @property {google.protobuf.ITimestamp|null} [startTime] GetTaskMetricsRequest startTime @@ -23513,11 +24260,11 @@ /** * GetTaskMetricsRequest taskType. - * @member {string} taskType + * @member {flyteidl.admin.ITaskType|null|undefined} taskType * @memberof flyteidl.admin.GetTaskMetricsRequest * @instance */ - GetTaskMetricsRequest.prototype.taskType = ""; + GetTaskMetricsRequest.prototype.taskType = null; /** * GetTaskMetricsRequest resourceMeta. @@ -23584,7 +24331,7 @@ if (!writer) writer = $Writer.create(); if (message.taskType != null && message.hasOwnProperty("taskType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.taskType); + $root.flyteidl.admin.TaskType.encode(message.taskType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.resourceMeta); if (message.queries != null && message.queries.length) @@ -23618,7 +24365,7 @@ var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.taskType = reader.string(); + message.taskType = $root.flyteidl.admin.TaskType.decode(reader, reader.uint32()); break; case 2: message.resourceMeta = reader.bytes(); @@ -23656,9 +24403,11 @@ GetTaskMetricsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.taskType != null && message.hasOwnProperty("taskType")) - if (!$util.isString(message.taskType)) - return "taskType: string expected"; + if (message.taskType != null && message.hasOwnProperty("taskType")) { + var error = $root.flyteidl.admin.TaskType.verify(message.taskType); + if (error) + return "taskType." + error; + } if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; @@ -23816,7 +24565,7 @@ * Properties of a GetTaskLogsRequest. * @memberof flyteidl.admin * @interface IGetTaskLogsRequest - * @property {string|null} [taskType] GetTaskLogsRequest taskType + * @property {flyteidl.admin.ITaskType|null} [taskType] GetTaskLogsRequest taskType * @property {Uint8Array|null} [resourceMeta] GetTaskLogsRequest resourceMeta * @property {Long|null} [lines] GetTaskLogsRequest lines * @property {string|null} [token] GetTaskLogsRequest token @@ -23839,11 +24588,11 @@ /** * GetTaskLogsRequest taskType. - * @member {string} taskType + * @member {flyteidl.admin.ITaskType|null|undefined} taskType * @memberof flyteidl.admin.GetTaskLogsRequest * @instance */ - GetTaskLogsRequest.prototype.taskType = ""; + GetTaskLogsRequest.prototype.taskType = null; /** * GetTaskLogsRequest resourceMeta. @@ -23894,7 +24643,7 @@ if (!writer) writer = $Writer.create(); if (message.taskType != null && message.hasOwnProperty("taskType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.taskType); + $root.flyteidl.admin.TaskType.encode(message.taskType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.resourceMeta); if (message.lines != null && message.hasOwnProperty("lines")) @@ -23923,7 +24672,7 @@ var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.taskType = reader.string(); + message.taskType = $root.flyteidl.admin.TaskType.decode(reader, reader.uint32()); break; case 2: message.resourceMeta = reader.bytes(); @@ -23953,9 +24702,11 @@ GetTaskLogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.taskType != null && message.hasOwnProperty("taskType")) - if (!$util.isString(message.taskType)) - return "taskType: string expected"; + if (message.taskType != null && message.hasOwnProperty("taskType")) { + var error = $root.flyteidl.admin.TaskType.verify(message.taskType); + if (error) + return "taskType." + error; + } if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; @@ -23971,14 +24722,242 @@ return GetTaskLogsRequest; })(); + admin.GetTaskLogsResponseHeader = (function() { + + /** + * Properties of a GetTaskLogsResponseHeader. + * @memberof flyteidl.admin + * @interface IGetTaskLogsResponseHeader + * @property {string|null} [token] GetTaskLogsResponseHeader token + */ + + /** + * Constructs a new GetTaskLogsResponseHeader. + * @memberof flyteidl.admin + * @classdesc Represents a GetTaskLogsResponseHeader. + * @implements IGetTaskLogsResponseHeader + * @constructor + * @param {flyteidl.admin.IGetTaskLogsResponseHeader=} [properties] Properties to set + */ + function GetTaskLogsResponseHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTaskLogsResponseHeader token. + * @member {string} token + * @memberof flyteidl.admin.GetTaskLogsResponseHeader + * @instance + */ + GetTaskLogsResponseHeader.prototype.token = ""; + + /** + * Creates a new GetTaskLogsResponseHeader instance using the specified properties. + * @function create + * @memberof flyteidl.admin.GetTaskLogsResponseHeader + * @static + * @param {flyteidl.admin.IGetTaskLogsResponseHeader=} [properties] Properties to set + * @returns {flyteidl.admin.GetTaskLogsResponseHeader} GetTaskLogsResponseHeader instance + */ + GetTaskLogsResponseHeader.create = function create(properties) { + return new GetTaskLogsResponseHeader(properties); + }; + + /** + * Encodes the specified GetTaskLogsResponseHeader message. Does not implicitly {@link flyteidl.admin.GetTaskLogsResponseHeader.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.GetTaskLogsResponseHeader + * @static + * @param {flyteidl.admin.IGetTaskLogsResponseHeader} message GetTaskLogsResponseHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskLogsResponseHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.token != null && message.hasOwnProperty("token")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.token); + return writer; + }; + + /** + * Decodes a GetTaskLogsResponseHeader message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.GetTaskLogsResponseHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.GetTaskLogsResponseHeader} GetTaskLogsResponseHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskLogsResponseHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.GetTaskLogsResponseHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.token = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a GetTaskLogsResponseHeader message. + * @function verify + * @memberof flyteidl.admin.GetTaskLogsResponseHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTaskLogsResponseHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + return null; + }; + + return GetTaskLogsResponseHeader; + })(); + + admin.GetTaskLogsResponseBody = (function() { + + /** + * Properties of a GetTaskLogsResponseBody. + * @memberof flyteidl.admin + * @interface IGetTaskLogsResponseBody + * @property {Array.|null} [results] GetTaskLogsResponseBody results + */ + + /** + * Constructs a new GetTaskLogsResponseBody. + * @memberof flyteidl.admin + * @classdesc Represents a GetTaskLogsResponseBody. + * @implements IGetTaskLogsResponseBody + * @constructor + * @param {flyteidl.admin.IGetTaskLogsResponseBody=} [properties] Properties to set + */ + function GetTaskLogsResponseBody(properties) { + this.results = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTaskLogsResponseBody results. + * @member {Array.} results + * @memberof flyteidl.admin.GetTaskLogsResponseBody + * @instance + */ + GetTaskLogsResponseBody.prototype.results = $util.emptyArray; + + /** + * Creates a new GetTaskLogsResponseBody instance using the specified properties. + * @function create + * @memberof flyteidl.admin.GetTaskLogsResponseBody + * @static + * @param {flyteidl.admin.IGetTaskLogsResponseBody=} [properties] Properties to set + * @returns {flyteidl.admin.GetTaskLogsResponseBody} GetTaskLogsResponseBody instance + */ + GetTaskLogsResponseBody.create = function create(properties) { + return new GetTaskLogsResponseBody(properties); + }; + + /** + * Encodes the specified GetTaskLogsResponseBody message. Does not implicitly {@link flyteidl.admin.GetTaskLogsResponseBody.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.GetTaskLogsResponseBody + * @static + * @param {flyteidl.admin.IGetTaskLogsResponseBody} message GetTaskLogsResponseBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskLogsResponseBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + return writer; + }; + + /** + * Decodes a GetTaskLogsResponseBody message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.GetTaskLogsResponseBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.GetTaskLogsResponseBody} GetTaskLogsResponseBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskLogsResponseBody.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.GetTaskLogsResponseBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a GetTaskLogsResponseBody message. + * @function verify + * @memberof flyteidl.admin.GetTaskLogsResponseBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTaskLogsResponseBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; + } + return null; + }; + + return GetTaskLogsResponseBody; + })(); + admin.GetTaskLogsResponse = (function() { /** * Properties of a GetTaskLogsResponse. * @memberof flyteidl.admin * @interface IGetTaskLogsResponse - * @property {Array.|null} [results] GetTaskLogsResponse results - * @property {string|null} [token] GetTaskLogsResponse token + * @property {flyteidl.admin.IGetTaskLogsResponseHeader|null} [header] GetTaskLogsResponse header + * @property {flyteidl.admin.IGetTaskLogsResponseBody|null} [body] GetTaskLogsResponse body */ /** @@ -23990,7 +24969,6 @@ * @param {flyteidl.admin.IGetTaskLogsResponse=} [properties] Properties to set */ function GetTaskLogsResponse(properties) { - this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23998,20 +24976,34 @@ } /** - * GetTaskLogsResponse results. - * @member {Array.} results + * GetTaskLogsResponse header. + * @member {flyteidl.admin.IGetTaskLogsResponseHeader|null|undefined} header * @memberof flyteidl.admin.GetTaskLogsResponse * @instance */ - GetTaskLogsResponse.prototype.results = $util.emptyArray; + GetTaskLogsResponse.prototype.header = null; /** - * GetTaskLogsResponse token. - * @member {string} token + * GetTaskLogsResponse body. + * @member {flyteidl.admin.IGetTaskLogsResponseBody|null|undefined} body + * @memberof flyteidl.admin.GetTaskLogsResponse + * @instance + */ + GetTaskLogsResponse.prototype.body = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTaskLogsResponse part. + * @member {"header"|"body"|undefined} part * @memberof flyteidl.admin.GetTaskLogsResponse * @instance */ - GetTaskLogsResponse.prototype.token = ""; + Object.defineProperty(GetTaskLogsResponse.prototype, "part", { + get: $util.oneOfGetter($oneOfFields = ["header", "body"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new GetTaskLogsResponse instance using the specified properties. @@ -24037,11 +25029,10 @@ GetTaskLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); - if (message.token != null && message.hasOwnProperty("token")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); + if (message.header != null && message.hasOwnProperty("header")) + $root.flyteidl.admin.GetTaskLogsResponseHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.body != null && message.hasOwnProperty("body")) + $root.flyteidl.admin.GetTaskLogsResponseBody.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -24064,12 +25055,10 @@ var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); + message.header = $root.flyteidl.admin.GetTaskLogsResponseHeader.decode(reader, reader.uint32()); break; case 2: - message.token = reader.string(); + message.body = $root.flyteidl.admin.GetTaskLogsResponseBody.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24090,16 +25079,25 @@ GetTaskLogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; + var properties = {}; + if (message.header != null && message.hasOwnProperty("header")) { + properties.part = 1; + { + var error = $root.flyteidl.admin.GetTaskLogsResponseHeader.verify(message.header); + if (error) + return "header." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) { + if (properties.part === 1) + return "part: multiple values"; + properties.part = 1; + { + var error = $root.flyteidl.admin.GetTaskLogsResponseBody.verify(message.body); + if (error) + return "body." + error; + } } - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; return null; }; @@ -50382,6 +51380,39 @@ return new this(rpcImpl, requestDelimited, responseDelimited); }; + /** + * Callback as used by {@link flyteidl.service.AsyncAgentService#executeTaskSync}. + * @memberof flyteidl.service.AsyncAgentService + * @typedef ExecuteTaskSyncCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.ExecuteTaskSyncResponse} [response] ExecuteTaskSyncResponse + */ + + /** + * Calls ExecuteTaskSync. + * @function executeTaskSync + * @memberof flyteidl.service.AsyncAgentService + * @instance + * @param {flyteidl.admin.IExecuteTaskSyncRequest} request ExecuteTaskSyncRequest message or plain object + * @param {flyteidl.service.AsyncAgentService.ExecuteTaskSyncCallback} callback Node-style callback called with the error, if any, and ExecuteTaskSyncResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AsyncAgentService.prototype.executeTaskSync = function executeTaskSync(request, callback) { + return this.rpcCall(executeTaskSync, $root.flyteidl.admin.ExecuteTaskSyncRequest, $root.flyteidl.admin.ExecuteTaskSyncResponse, request, callback); + }, "name", { value: "ExecuteTaskSync" }); + + /** + * Calls ExecuteTaskSync. + * @function executeTaskSync + * @memberof flyteidl.service.AsyncAgentService + * @instance + * @param {flyteidl.admin.IExecuteTaskSyncRequest} request ExecuteTaskSyncRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link flyteidl.service.AsyncAgentService#createTask}. * @memberof flyteidl.service.AsyncAgentService diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py index f23ad50819..b6edf9069e 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py @@ -13,6 +13,7 @@ from flyteidl.core import literals_pb2 as flyteidl_dot_core_dot_literals__pb2 from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 +from flyteidl.core import workflow_pb2 as flyteidl_dot_core_dot_workflow__pb2 from flyteidl.core import identifier_pb2 as flyteidl_dot_core_dot_identifier__pb2 from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2 from flyteidl.core import metrics_pb2 as flyteidl_dot_core_dot_metrics__pb2 @@ -20,7 +21,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x98\x05\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"z\n\x12\x43reateTaskResponse\x12%\n\rresource_meta\x18\x01 \x01(\x0cH\x00R\x0cresourceMeta\x12\x36\n\x08resource\x18\x02 \x01(\x0b\x32\x18.flyteidl.admin.ResourceH\x00R\x08resourceB\x05\n\x03res\"R\n\x0eGetTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"|\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\x12\x33\n\tlog_links\x18\x02 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"\xf9\x01\n\x08Resource\x12/\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateB\x02\x18\x01R\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x33\n\tlog_links\x18\x04 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\x12\x38\n\x05phase\x18\x05 \x01(\x0e\x32\".flyteidl.core.TaskExecution.PhaseR\x05phase\"U\n\x11\x44\x65leteTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse\"M\n\x05\x41gent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x14supported_task_types\x18\x02 \x03(\tR\x12supportedTaskTypes\"%\n\x0fGetAgentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"?\n\x10GetAgentResponse\x12+\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x15.flyteidl.admin.AgentR\x05\x61gent\"\x13\n\x11ListAgentsRequest\"C\n\x12ListAgentsResponse\x12-\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x15.flyteidl.admin.AgentR\x06\x61gents\"\x94\x02\n\x15GetTaskMetricsRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x18\n\x07queries\x18\x03 \x03(\tR\x07queries\x12\x39\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12-\n\x04step\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x04step\"X\n\x16GetTaskMetricsResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32$.flyteidl.core.ExecutionMetricResultR\x07results\"\x82\x01\n\x12GetTaskLogsRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x14\n\x05lines\x18\x03 \x01(\x04R\x05lines\x12\x14\n\x05token\x18\x04 \x01(\tR\x05token\"E\n\x13GetTaskLogsResponse\x12\x18\n\x07results\x18\x01 \x03(\tR\x07results\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1c\x66lyteidl/core/workflow.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x12!\n\x0cmax_attempts\x18\x07 \x01(\x05R\x0bmaxAttempts\x12$\n\rinterruptible\x18\x08 \x01(\x08R\rinterruptible\x12\x46\n\x1finterruptible_failure_threshold\x18\t \x01(\x05R\x1dinterruptibleFailureThreshold\x12>\n\toverrides\x18\n \x01(\x0b\x32 .flyteidl.core.TaskNodeOverridesR\toverrides\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"9\n\x12\x43reateTaskResponse\x12#\n\rresource_meta\x18\x01 \x01(\x0cR\x0cresourceMeta\"\x87\x02\n\x13\x43reateRequestHeader\x12\x37\n\x08template\x18\x01 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x02 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x03 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\x12\x33\n\x16max_dataset_size_bytes\x18\x04 \x01(\x03R\x13maxDatasetSizeBytes\"\x94\x01\n\x16\x45xecuteTaskSyncRequest\x12=\n\x06header\x18\x01 \x01(\x0b\x32#.flyteidl.admin.CreateRequestHeaderH\x00R\x06header\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x06inputsB\x06\n\x04part\"U\n\x1d\x45xecuteTaskSyncResponseHeader\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\"\xa0\x01\n\x17\x45xecuteTaskSyncResponse\x12G\n\x06header\x18\x01 \x01(\x0b\x32-.flyteidl.admin.ExecuteTaskSyncResponseHeaderH\x00R\x06header\x12\x35\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x07outputsB\x05\n\x03res\"l\n\x0eGetTaskRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"|\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\x12\x33\n\tlog_links\x18\x02 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"\xf9\x01\n\x08Resource\x12/\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateB\x02\x18\x01R\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x33\n\tlog_links\x18\x04 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\x12\x38\n\x05phase\x18\x05 \x01(\x0e\x32\".flyteidl.core.TaskExecution.PhaseR\x05phase\"o\n\x11\x44\x65leteTaskRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse\"g\n\x05\x41gent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12J\n\x14supported_task_types\x18\x02 \x03(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x12supportedTaskTypes\"8\n\x08TaskType\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\x05R\x07version\"%\n\x0fGetAgentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"?\n\x10GetAgentResponse\x12+\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x15.flyteidl.admin.AgentR\x05\x61gent\"\x13\n\x11ListAgentsRequest\"C\n\x12ListAgentsResponse\x12-\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x15.flyteidl.admin.AgentR\x06\x61gents\"\xae\x02\n\x15GetTaskMetricsRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x18\n\x07queries\x18\x03 \x03(\tR\x07queries\x12\x39\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12-\n\x04step\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x04step\"X\n\x16GetTaskMetricsResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32$.flyteidl.core.ExecutionMetricResultR\x07results\"\x9c\x01\n\x12GetTaskLogsRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x14\n\x05lines\x18\x03 \x01(\x04R\x05lines\x12\x14\n\x05token\x18\x04 \x01(\tR\x05token\"1\n\x19GetTaskLogsResponseHeader\x12\x14\n\x05token\x18\x01 \x01(\tR\x05token\"3\n\x17GetTaskLogsResponseBody\x12\x18\n\x07results\x18\x01 \x03(\tR\x07results\"\xa1\x01\n\x13GetTaskLogsResponse\x12\x43\n\x06header\x18\x01 \x01(\x0b\x32).flyteidl.admin.GetTaskLogsResponseHeaderH\x00R\x06header\x12=\n\x04\x62ody\x18\x02 \x01(\x0b\x32\'.flyteidl.admin.GetTaskLogsResponseBodyH\x00R\x04\x62odyB\x06\n\x04part*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,46 +38,60 @@ _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._serialized_options = b'8\001' _RESOURCE.fields_by_name['state']._options = None _RESOURCE.fields_by_name['state']._serialized_options = b'\030\001' - _globals['_STATE']._serialized_start=2730 - _globals['_STATE']._serialized_end=2824 - _globals['_TASKEXECUTIONMETADATA']._serialized_start=261 - _globals['_TASKEXECUTIONMETADATA']._serialized_end=925 - _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_start=731 - _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_end=788 - _globals['_TASKEXECUTIONMETADATA_ANNOTATIONSENTRY']._serialized_start=790 - _globals['_TASKEXECUTIONMETADATA_ANNOTATIONSENTRY']._serialized_end=852 - _globals['_TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY']._serialized_start=854 - _globals['_TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY']._serialized_end=925 - _globals['_CREATETASKREQUEST']._serialized_start=928 - _globals['_CREATETASKREQUEST']._serialized_end=1187 - _globals['_CREATETASKRESPONSE']._serialized_start=1189 - _globals['_CREATETASKRESPONSE']._serialized_end=1311 - _globals['_GETTASKREQUEST']._serialized_start=1313 - _globals['_GETTASKREQUEST']._serialized_end=1395 - _globals['_GETTASKRESPONSE']._serialized_start=1397 - _globals['_GETTASKRESPONSE']._serialized_end=1521 - _globals['_RESOURCE']._serialized_start=1524 - _globals['_RESOURCE']._serialized_end=1773 - _globals['_DELETETASKREQUEST']._serialized_start=1775 - _globals['_DELETETASKREQUEST']._serialized_end=1860 - _globals['_DELETETASKRESPONSE']._serialized_start=1862 - _globals['_DELETETASKRESPONSE']._serialized_end=1882 - _globals['_AGENT']._serialized_start=1884 - _globals['_AGENT']._serialized_end=1961 - _globals['_GETAGENTREQUEST']._serialized_start=1963 - _globals['_GETAGENTREQUEST']._serialized_end=2000 - _globals['_GETAGENTRESPONSE']._serialized_start=2002 - _globals['_GETAGENTRESPONSE']._serialized_end=2065 - _globals['_LISTAGENTSREQUEST']._serialized_start=2067 - _globals['_LISTAGENTSREQUEST']._serialized_end=2086 - _globals['_LISTAGENTSRESPONSE']._serialized_start=2088 - _globals['_LISTAGENTSRESPONSE']._serialized_end=2155 - _globals['_GETTASKMETRICSREQUEST']._serialized_start=2158 - _globals['_GETTASKMETRICSREQUEST']._serialized_end=2434 - _globals['_GETTASKMETRICSRESPONSE']._serialized_start=2436 - _globals['_GETTASKMETRICSRESPONSE']._serialized_end=2524 - _globals['_GETTASKLOGSREQUEST']._serialized_start=2527 - _globals['_GETTASKLOGSREQUEST']._serialized_end=2657 - _globals['_GETTASKLOGSRESPONSE']._serialized_start=2659 - _globals['_GETTASKLOGSRESPONSE']._serialized_end=2728 + _globals['_STATE']._serialized_start=3956 + _globals['_STATE']._serialized_end=4050 + _globals['_TASKEXECUTIONMETADATA']._serialized_start=291 + _globals['_TASKEXECUTIONMETADATA']._serialized_end=1164 + _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_start=970 + _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_end=1027 + _globals['_TASKEXECUTIONMETADATA_ANNOTATIONSENTRY']._serialized_start=1029 + _globals['_TASKEXECUTIONMETADATA_ANNOTATIONSENTRY']._serialized_end=1091 + _globals['_TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY']._serialized_start=1093 + _globals['_TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY']._serialized_end=1164 + _globals['_CREATETASKREQUEST']._serialized_start=1167 + _globals['_CREATETASKREQUEST']._serialized_end=1426 + _globals['_CREATETASKRESPONSE']._serialized_start=1428 + _globals['_CREATETASKRESPONSE']._serialized_end=1485 + _globals['_CREATEREQUESTHEADER']._serialized_start=1488 + _globals['_CREATEREQUESTHEADER']._serialized_end=1751 + _globals['_EXECUTETASKSYNCREQUEST']._serialized_start=1754 + _globals['_EXECUTETASKSYNCREQUEST']._serialized_end=1902 + _globals['_EXECUTETASKSYNCRESPONSEHEADER']._serialized_start=1904 + _globals['_EXECUTETASKSYNCRESPONSEHEADER']._serialized_end=1989 + _globals['_EXECUTETASKSYNCRESPONSE']._serialized_start=1992 + _globals['_EXECUTETASKSYNCRESPONSE']._serialized_end=2152 + _globals['_GETTASKREQUEST']._serialized_start=2154 + _globals['_GETTASKREQUEST']._serialized_end=2262 + _globals['_GETTASKRESPONSE']._serialized_start=2264 + _globals['_GETTASKRESPONSE']._serialized_end=2388 + _globals['_RESOURCE']._serialized_start=2391 + _globals['_RESOURCE']._serialized_end=2640 + _globals['_DELETETASKREQUEST']._serialized_start=2642 + _globals['_DELETETASKREQUEST']._serialized_end=2753 + _globals['_DELETETASKRESPONSE']._serialized_start=2755 + _globals['_DELETETASKRESPONSE']._serialized_end=2775 + _globals['_AGENT']._serialized_start=2777 + _globals['_AGENT']._serialized_end=2880 + _globals['_TASKTYPE']._serialized_start=2882 + _globals['_TASKTYPE']._serialized_end=2938 + _globals['_GETAGENTREQUEST']._serialized_start=2940 + _globals['_GETAGENTREQUEST']._serialized_end=2977 + _globals['_GETAGENTRESPONSE']._serialized_start=2979 + _globals['_GETAGENTRESPONSE']._serialized_end=3042 + _globals['_LISTAGENTSREQUEST']._serialized_start=3044 + _globals['_LISTAGENTSREQUEST']._serialized_end=3063 + _globals['_LISTAGENTSRESPONSE']._serialized_start=3065 + _globals['_LISTAGENTSRESPONSE']._serialized_end=3132 + _globals['_GETTASKMETRICSREQUEST']._serialized_start=3135 + _globals['_GETTASKMETRICSREQUEST']._serialized_end=3437 + _globals['_GETTASKMETRICSRESPONSE']._serialized_start=3439 + _globals['_GETTASKMETRICSRESPONSE']._serialized_end=3527 + _globals['_GETTASKLOGSREQUEST']._serialized_start=3530 + _globals['_GETTASKLOGSREQUEST']._serialized_end=3686 + _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_start=3688 + _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_end=3737 + _globals['_GETTASKLOGSRESPONSEBODY']._serialized_start=3739 + _globals['_GETTASKLOGSRESPONSEBODY']._serialized_end=3790 + _globals['_GETTASKLOGSRESPONSE']._serialized_start=3793 + _globals['_GETTASKLOGSRESPONSE']._serialized_end=3954 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi index 7b7c6beb07..b6f5504e97 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi @@ -1,5 +1,6 @@ from flyteidl.core import literals_pb2 as _literals_pb2 from flyteidl.core import tasks_pb2 as _tasks_pb2 +from flyteidl.core import workflow_pb2 as _workflow_pb2 from flyteidl.core import identifier_pb2 as _identifier_pb2 from flyteidl.core import execution_pb2 as _execution_pb2 from flyteidl.core import metrics_pb2 as _metrics_pb2 @@ -27,7 +28,7 @@ RUNNING: State SUCCEEDED: State class TaskExecutionMetadata(_message.Message): - __slots__ = ["task_execution_id", "namespace", "labels", "annotations", "k8s_service_account", "environment_variables"] + __slots__ = ["task_execution_id", "namespace", "labels", "annotations", "k8s_service_account", "environment_variables", "max_attempts", "interruptible", "interruptible_failure_threshold", "overrides"] class LabelsEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -55,13 +56,21 @@ class TaskExecutionMetadata(_message.Message): ANNOTATIONS_FIELD_NUMBER: _ClassVar[int] K8S_SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int] ENVIRONMENT_VARIABLES_FIELD_NUMBER: _ClassVar[int] + MAX_ATTEMPTS_FIELD_NUMBER: _ClassVar[int] + INTERRUPTIBLE_FIELD_NUMBER: _ClassVar[int] + INTERRUPTIBLE_FAILURE_THRESHOLD_FIELD_NUMBER: _ClassVar[int] + OVERRIDES_FIELD_NUMBER: _ClassVar[int] task_execution_id: _identifier_pb2.TaskExecutionIdentifier namespace: str labels: _containers.ScalarMap[str, str] annotations: _containers.ScalarMap[str, str] k8s_service_account: str environment_variables: _containers.ScalarMap[str, str] - def __init__(self, task_execution_id: _Optional[_Union[_identifier_pb2.TaskExecutionIdentifier, _Mapping]] = ..., namespace: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ..., annotations: _Optional[_Mapping[str, str]] = ..., k8s_service_account: _Optional[str] = ..., environment_variables: _Optional[_Mapping[str, str]] = ...) -> None: ... + max_attempts: int + interruptible: bool + interruptible_failure_threshold: int + overrides: _workflow_pb2.TaskNodeOverrides + def __init__(self, task_execution_id: _Optional[_Union[_identifier_pb2.TaskExecutionIdentifier, _Mapping]] = ..., namespace: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ..., annotations: _Optional[_Mapping[str, str]] = ..., k8s_service_account: _Optional[str] = ..., environment_variables: _Optional[_Mapping[str, str]] = ..., max_attempts: _Optional[int] = ..., interruptible: bool = ..., interruptible_failure_threshold: _Optional[int] = ..., overrides: _Optional[_Union[_workflow_pb2.TaskNodeOverrides, _Mapping]] = ...) -> None: ... class CreateTaskRequest(_message.Message): __slots__ = ["inputs", "template", "output_prefix", "task_execution_metadata"] @@ -76,20 +85,52 @@ class CreateTaskRequest(_message.Message): def __init__(self, inputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., template: _Optional[_Union[_tasks_pb2.TaskTemplate, _Mapping]] = ..., output_prefix: _Optional[str] = ..., task_execution_metadata: _Optional[_Union[TaskExecutionMetadata, _Mapping]] = ...) -> None: ... class CreateTaskResponse(_message.Message): - __slots__ = ["resource_meta", "resource"] + __slots__ = ["resource_meta"] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] - RESOURCE_FIELD_NUMBER: _ClassVar[int] resource_meta: bytes + def __init__(self, resource_meta: _Optional[bytes] = ...) -> None: ... + +class CreateRequestHeader(_message.Message): + __slots__ = ["template", "output_prefix", "task_execution_metadata", "max_dataset_size_bytes"] + TEMPLATE_FIELD_NUMBER: _ClassVar[int] + OUTPUT_PREFIX_FIELD_NUMBER: _ClassVar[int] + TASK_EXECUTION_METADATA_FIELD_NUMBER: _ClassVar[int] + MAX_DATASET_SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] + template: _tasks_pb2.TaskTemplate + output_prefix: str + task_execution_metadata: TaskExecutionMetadata + max_dataset_size_bytes: int + def __init__(self, template: _Optional[_Union[_tasks_pb2.TaskTemplate, _Mapping]] = ..., output_prefix: _Optional[str] = ..., task_execution_metadata: _Optional[_Union[TaskExecutionMetadata, _Mapping]] = ..., max_dataset_size_bytes: _Optional[int] = ...) -> None: ... + +class ExecuteTaskSyncRequest(_message.Message): + __slots__ = ["header", "inputs"] + HEADER_FIELD_NUMBER: _ClassVar[int] + INPUTS_FIELD_NUMBER: _ClassVar[int] + header: CreateRequestHeader + inputs: _literals_pb2.LiteralMap + def __init__(self, header: _Optional[_Union[CreateRequestHeader, _Mapping]] = ..., inputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ...) -> None: ... + +class ExecuteTaskSyncResponseHeader(_message.Message): + __slots__ = ["resource"] + RESOURCE_FIELD_NUMBER: _ClassVar[int] resource: Resource - def __init__(self, resource_meta: _Optional[bytes] = ..., resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... + def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... + +class ExecuteTaskSyncResponse(_message.Message): + __slots__ = ["header", "outputs"] + HEADER_FIELD_NUMBER: _ClassVar[int] + OUTPUTS_FIELD_NUMBER: _ClassVar[int] + header: ExecuteTaskSyncResponseHeader + outputs: _literals_pb2.LiteralMap + def __init__(self, header: _Optional[_Union[ExecuteTaskSyncResponseHeader, _Mapping]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ...) -> None: ... class GetTaskRequest(_message.Message): __slots__ = ["task_type", "resource_meta"] TASK_TYPE_FIELD_NUMBER: _ClassVar[int] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] - task_type: str + task_type: TaskType resource_meta: bytes - def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ...) -> None: ... + def __init__(self, task_type: _Optional[_Union[TaskType, _Mapping]] = ..., resource_meta: _Optional[bytes] = ...) -> None: ... class GetTaskResponse(_message.Message): __slots__ = ["resource", "log_links"] @@ -117,9 +158,9 @@ class DeleteTaskRequest(_message.Message): __slots__ = ["task_type", "resource_meta"] TASK_TYPE_FIELD_NUMBER: _ClassVar[int] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] - task_type: str + task_type: TaskType resource_meta: bytes - def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ...) -> None: ... + def __init__(self, task_type: _Optional[_Union[TaskType, _Mapping]] = ..., resource_meta: _Optional[bytes] = ...) -> None: ... class DeleteTaskResponse(_message.Message): __slots__ = [] @@ -130,8 +171,16 @@ class Agent(_message.Message): NAME_FIELD_NUMBER: _ClassVar[int] SUPPORTED_TASK_TYPES_FIELD_NUMBER: _ClassVar[int] name: str - supported_task_types: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, name: _Optional[str] = ..., supported_task_types: _Optional[_Iterable[str]] = ...) -> None: ... + supported_task_types: _containers.RepeatedCompositeFieldContainer[TaskType] + def __init__(self, name: _Optional[str] = ..., supported_task_types: _Optional[_Iterable[_Union[TaskType, _Mapping]]] = ...) -> None: ... + +class TaskType(_message.Message): + __slots__ = ["name", "version"] + NAME_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + name: str + version: int + def __init__(self, name: _Optional[str] = ..., version: _Optional[int] = ...) -> None: ... class GetAgentRequest(_message.Message): __slots__ = ["name"] @@ -163,13 +212,13 @@ class GetTaskMetricsRequest(_message.Message): START_TIME_FIELD_NUMBER: _ClassVar[int] END_TIME_FIELD_NUMBER: _ClassVar[int] STEP_FIELD_NUMBER: _ClassVar[int] - task_type: str + task_type: TaskType resource_meta: bytes queries: _containers.RepeatedScalarFieldContainer[str] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp step: _duration_pb2.Duration - def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ..., queries: _Optional[_Iterable[str]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., step: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + def __init__(self, task_type: _Optional[_Union[TaskType, _Mapping]] = ..., resource_meta: _Optional[bytes] = ..., queries: _Optional[_Iterable[str]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., step: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... class GetTaskMetricsResponse(_message.Message): __slots__ = ["results"] @@ -183,16 +232,28 @@ class GetTaskLogsRequest(_message.Message): RESOURCE_META_FIELD_NUMBER: _ClassVar[int] LINES_FIELD_NUMBER: _ClassVar[int] TOKEN_FIELD_NUMBER: _ClassVar[int] - task_type: str + task_type: TaskType resource_meta: bytes lines: int token: str - def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ..., lines: _Optional[int] = ..., token: _Optional[str] = ...) -> None: ... + def __init__(self, task_type: _Optional[_Union[TaskType, _Mapping]] = ..., resource_meta: _Optional[bytes] = ..., lines: _Optional[int] = ..., token: _Optional[str] = ...) -> None: ... -class GetTaskLogsResponse(_message.Message): - __slots__ = ["results", "token"] - RESULTS_FIELD_NUMBER: _ClassVar[int] +class GetTaskLogsResponseHeader(_message.Message): + __slots__ = ["token"] TOKEN_FIELD_NUMBER: _ClassVar[int] - results: _containers.RepeatedScalarFieldContainer[str] token: str - def __init__(self, results: _Optional[_Iterable[str]] = ..., token: _Optional[str] = ...) -> None: ... + def __init__(self, token: _Optional[str] = ...) -> None: ... + +class GetTaskLogsResponseBody(_message.Message): + __slots__ = ["results"] + RESULTS_FIELD_NUMBER: _ClassVar[int] + results: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, results: _Optional[_Iterable[str]] = ...) -> None: ... + +class GetTaskLogsResponse(_message.Message): + __slots__ = ["header", "body"] + HEADER_FIELD_NUMBER: _ClassVar[int] + BODY_FIELD_NUMBER: _ClassVar[int] + header: GetTaskLogsResponseHeader + body: GetTaskLogsResponseBody + def __init__(self, header: _Optional[_Union[GetTaskLogsResponseHeader, _Mapping]] = ..., body: _Optional[_Union[GetTaskLogsResponseBody, _Mapping]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py index 4a1a3d8f70..6c1f0000d4 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py @@ -15,7 +15,7 @@ from flyteidl.admin import agent_pb2 as flyteidl_dot_admin_dot_agent__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/agent.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1a\x66lyteidl/admin/agent.proto2\xcc\x03\n\x11\x41syncAgentService\x12U\n\nCreateTask\x12!.flyteidl.admin.CreateTaskRequest\x1a\".flyteidl.admin.CreateTaskResponse\"\x00\x12L\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"\x00\x12U\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"\x00\x12\x61\n\x0eGetTaskMetrics\x12%.flyteidl.admin.GetTaskMetricsRequest\x1a&.flyteidl.admin.GetTaskMetricsResponse\"\x00\x12X\n\x0bGetTaskLogs\x12\".flyteidl.admin.GetTaskLogsRequest\x1a#.flyteidl.admin.GetTaskLogsResponse\"\x00\x32\xf0\x01\n\x14\x41gentMetadataService\x12k\n\x08GetAgent\x12\x1f.flyteidl.admin.GetAgentRequest\x1a .flyteidl.admin.GetAgentResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/api/v1/agent/{name}\x12k\n\nListAgents\x12!.flyteidl.admin.ListAgentsRequest\x1a\".flyteidl.admin.ListAgentsResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/api/v1/agentsB\xc2\x01\n\x14\x63om.flyteidl.serviceB\nAgentProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/agent.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1a\x66lyteidl/admin/agent.proto2\xd2\x07\n\x11\x41syncAgentService\x12\x8c\x01\n\x0f\x45xecuteTaskSync\x12&.flyteidl.admin.ExecuteTaskSyncRequest\x1a\'.flyteidl.admin.ExecuteTaskSyncResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/api/v1/agent/task/stream(\x01\x30\x01\x12r\n\nCreateTask\x12!.flyteidl.admin.CreateTaskRequest\x1a\".flyteidl.admin.CreateTaskResponse\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v1/agent/task\x12\x9b\x01\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"O\x82\xd3\xe4\x93\x02I\x12G/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}\x12\xaf\x01\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"Z\x82\xd3\xe4\x93\x02T*R/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}\x12\xb8\x01\n\x0eGetTaskMetrics\x12%.flyteidl.admin.GetTaskMetricsRequest\x1a&.flyteidl.admin.GetTaskMetricsResponse\"W\x82\xd3\xe4\x93\x02Q\x12O/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}\x12\xae\x01\n\x0bGetTaskLogs\x12\".flyteidl.admin.GetTaskLogsRequest\x1a#.flyteidl.admin.GetTaskLogsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}0\x01\x32\xf0\x01\n\x14\x41gentMetadataService\x12k\n\x08GetAgent\x12\x1f.flyteidl.admin.GetAgentRequest\x1a .flyteidl.admin.GetAgentResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/api/v1/agent/{name}\x12k\n\nListAgents\x12!.flyteidl.admin.ListAgentsRequest\x1a\".flyteidl.admin.ListAgentsResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/api/v1/agentsB\xc2\x01\n\x14\x63om.flyteidl.serviceB\nAgentProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,12 +24,24 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.serviceB\nAgentProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\242\002\003FSX\252\002\020Flyteidl.Service\312\002\020Flyteidl\\Service\342\002\034Flyteidl\\Service\\GPBMetadata\352\002\021Flyteidl::Service' + _ASYNCAGENTSERVICE.methods_by_name['ExecuteTaskSync']._options = None + _ASYNCAGENTSERVICE.methods_by_name['ExecuteTaskSync']._serialized_options = b'\202\323\344\223\002\036:\001*\"\031/api/v1/agent/task/stream' + _ASYNCAGENTSERVICE.methods_by_name['CreateTask']._options = None + _ASYNCAGENTSERVICE.methods_by_name['CreateTask']._serialized_options = b'\202\323\344\223\002\027:\001*\"\022/api/v1/agent/task' + _ASYNCAGENTSERVICE.methods_by_name['GetTask']._options = None + _ASYNCAGENTSERVICE.methods_by_name['GetTask']._serialized_options = b'\202\323\344\223\002I\022G/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}' + _ASYNCAGENTSERVICE.methods_by_name['DeleteTask']._options = None + _ASYNCAGENTSERVICE.methods_by_name['DeleteTask']._serialized_options = b'\202\323\344\223\002T*R/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}' + _ASYNCAGENTSERVICE.methods_by_name['GetTaskMetrics']._options = None + _ASYNCAGENTSERVICE.methods_by_name['GetTaskMetrics']._serialized_options = b'\202\323\344\223\002Q\022O/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}' + _ASYNCAGENTSERVICE.methods_by_name['GetTaskLogs']._options = None + _ASYNCAGENTSERVICE.methods_by_name['GetTaskLogs']._serialized_options = b'\202\323\344\223\002N\022L/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}' _AGENTMETADATASERVICE.methods_by_name['GetAgent']._options = None _AGENTMETADATASERVICE.methods_by_name['GetAgent']._serialized_options = b'\202\323\344\223\002\026\022\024/api/v1/agent/{name}' _AGENTMETADATASERVICE.methods_by_name['ListAgents']._options = None _AGENTMETADATASERVICE.methods_by_name['ListAgents']._serialized_options = b'\202\323\344\223\002\020\022\016/api/v1/agents' _globals['_ASYNCAGENTSERVICE']._serialized_start=109 - _globals['_ASYNCAGENTSERVICE']._serialized_end=569 - _globals['_AGENTMETADATASERVICE']._serialized_start=572 - _globals['_AGENTMETADATASERVICE']._serialized_end=812 + _globals['_ASYNCAGENTSERVICE']._serialized_end=1087 + _globals['_AGENTMETADATASERVICE']._serialized_start=1090 + _globals['_AGENTMETADATASERVICE']._serialized_end=1330 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py index 7d04b0cd33..8257a90ff8 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py @@ -15,6 +15,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.ExecuteTaskSync = channel.stream_stream( + '/flyteidl.service.AsyncAgentService/ExecuteTaskSync', + request_serializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.SerializeToString, + response_deserializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.FromString, + ) self.CreateTask = channel.unary_unary( '/flyteidl.service.AsyncAgentService/CreateTask', request_serializer=flyteidl_dot_admin_dot_agent__pb2.CreateTaskRequest.SerializeToString, @@ -35,7 +40,7 @@ def __init__(self, channel): request_serializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskMetricsRequest.SerializeToString, response_deserializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskMetricsResponse.FromString, ) - self.GetTaskLogs = channel.unary_unary( + self.GetTaskLogs = channel.unary_stream( '/flyteidl.service.AsyncAgentService/GetTaskLogs', request_serializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskLogsRequest.SerializeToString, response_deserializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskLogsResponse.FromString, @@ -46,8 +51,15 @@ class AsyncAgentServiceServicer(object): """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. """ + def ExecuteTaskSync(self, request_iterator, context): + """ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def CreateTask(self, request, context): - """Send a task create request to the agent server. + """CreateTask sends a task create request to the agent service. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -88,6 +100,11 @@ def GetTaskLogs(self, request, context): def add_AsyncAgentServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'ExecuteTaskSync': grpc.stream_stream_rpc_method_handler( + servicer.ExecuteTaskSync, + request_deserializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.FromString, + response_serializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.SerializeToString, + ), 'CreateTask': grpc.unary_unary_rpc_method_handler( servicer.CreateTask, request_deserializer=flyteidl_dot_admin_dot_agent__pb2.CreateTaskRequest.FromString, @@ -108,7 +125,7 @@ def add_AsyncAgentServiceServicer_to_server(servicer, server): request_deserializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskMetricsRequest.FromString, response_serializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskMetricsResponse.SerializeToString, ), - 'GetTaskLogs': grpc.unary_unary_rpc_method_handler( + 'GetTaskLogs': grpc.unary_stream_rpc_method_handler( servicer.GetTaskLogs, request_deserializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskLogsRequest.FromString, response_serializer=flyteidl_dot_admin_dot_agent__pb2.GetTaskLogsResponse.SerializeToString, @@ -124,6 +141,23 @@ class AsyncAgentService(object): """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. """ + @staticmethod + def ExecuteTaskSync(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/flyteidl.service.AsyncAgentService/ExecuteTaskSync', + flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.SerializeToString, + flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def CreateTask(request, target, @@ -203,7 +237,7 @@ def GetTaskLogs(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/flyteidl.service.AsyncAgentService/GetTaskLogs', + return grpc.experimental.unary_stream(request, target, '/flyteidl.service.AsyncAgentService/GetTaskLogs', flyteidl_dot_admin_dot_agent__pb2.GetTaskLogsRequest.SerializeToString, flyteidl_dot_admin_dot_agent__pb2.GetTaskLogsResponse.FromString, options, channel_credentials, diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index 4f61389a42..90725a5339 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -21,6 +21,14 @@ pub struct TaskExecutionMetadata { /// Environment variables attached to the task execution #[prost(map="string, string", tag="6")] pub environment_variables: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(int32, tag="7")] + pub max_attempts: i32, + #[prost(bool, tag="8")] + pub interruptible: bool, + #[prost(int32, tag="9")] + pub interruptible_failure_threshold: i32, + #[prost(message, optional, tag="10")] + pub overrides: ::core::option::Option, } /// Represents a request structure to create task. #[allow(clippy::derive_partial_eq_without_eq)] @@ -45,22 +53,68 @@ pub struct CreateTaskRequest { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateTaskResponse { + /// ResourceMeta is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + #[prost(bytes="vec", tag="1")] + pub resource_meta: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateRequestHeader { + /// Template of the task that encapsulates all the metadata of the task. + #[prost(message, optional, tag="1")] + pub template: ::core::option::Option, + /// Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring) + #[prost(string, tag="2")] + pub output_prefix: ::prost::alloc::string::String, + /// subset of runtime task execution metadata. + #[prost(message, optional, tag="3")] + pub task_execution_metadata: ::core::option::Option, + /// MaxDatasetSizeBytes is the maximum size of the dataset that can be generated by the task. + #[prost(int64, tag="4")] + pub max_dataset_size_bytes: i64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecuteTaskSyncRequest { + #[prost(oneof="execute_task_sync_request::Part", tags="1, 2")] + pub part: ::core::option::Option, +} +/// Nested message and enum types in `ExecuteTaskSyncRequest`. +pub mod execute_task_sync_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Part { + #[prost(message, tag="1")] + Header(super::CreateRequestHeader), + #[prost(message, tag="2")] + Inputs(super::super::core::LiteralMap), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecuteTaskSyncResponseHeader { + #[prost(message, optional, tag="1")] + pub resource: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecuteTaskSyncResponse { /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). /// Resource is for synchronous task execution. - #[prost(oneof="create_task_response::Res", tags="1, 2")] - pub res: ::core::option::Option, + #[prost(oneof="execute_task_sync_response::Res", tags="1, 2")] + pub res: ::core::option::Option, } -/// Nested message and enum types in `CreateTaskResponse`. -pub mod create_task_response { +/// Nested message and enum types in `ExecuteTaskSyncResponse`. +pub mod execute_task_sync_response { /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). /// Resource is for synchronous task execution. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Res { - #[prost(bytes, tag="1")] - ResourceMeta(::prost::alloc::vec::Vec), + #[prost(message, tag="1")] + Header(super::ExecuteTaskSyncResponseHeader), #[prost(message, tag="2")] - Resource(super::Resource), + Outputs(super::super::core::LiteralMap), } } /// A message used to fetch a job resource from flyte agent server. @@ -68,8 +122,8 @@ pub mod create_task_response { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTaskRequest { /// A predefined yet extensible Task type identifier. - #[prost(string, tag="1")] - pub task_type: ::prost::alloc::string::String, + #[prost(message, optional, tag="1")] + pub task_type: ::core::option::Option, /// Metadata about the resource to be pass to the agent. #[prost(bytes="vec", tag="2")] pub resource_meta: ::prost::alloc::vec::Vec, @@ -111,8 +165,8 @@ pub struct Resource { #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTaskRequest { /// A predefined yet extensible Task type identifier. - #[prost(string, tag="1")] - pub task_type: ::prost::alloc::string::String, + #[prost(message, optional, tag="1")] + pub task_type: ::core::option::Option, /// Metadata about the resource to be pass to the agent. #[prost(bytes="vec", tag="2")] pub resource_meta: ::prost::alloc::vec::Vec, @@ -130,8 +184,18 @@ pub struct Agent { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, /// SupportedTaskTypes are the types of the tasks that the agent can handle. - #[prost(string, repeated, tag="2")] - pub supported_task_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag="2")] + pub supported_task_types: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TaskType { + /// The name of the task type. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The version of the task type. + #[prost(int32, tag="2")] + pub version: i32, } /// A request to get an agent. #[allow(clippy::derive_partial_eq_without_eq)] @@ -165,8 +229,8 @@ pub struct ListAgentsResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTaskMetricsRequest { /// A predefined yet extensible Task type identifier. - #[prost(string, tag="1")] - pub task_type: ::prost::alloc::string::String, + #[prost(message, optional, tag="1")] + pub task_type: ::core::option::Option, /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). #[prost(bytes="vec", tag="2")] pub resource_meta: ::prost::alloc::vec::Vec, @@ -197,8 +261,8 @@ pub struct GetTaskMetricsResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTaskLogsRequest { /// A predefined yet extensible Task type identifier. - #[prost(string, tag="1")] - pub task_type: ::prost::alloc::string::String, + #[prost(message, optional, tag="1")] + pub task_type: ::core::option::Option, /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). #[prost(bytes="vec", tag="2")] pub resource_meta: ::prost::alloc::vec::Vec, @@ -210,18 +274,39 @@ pub struct GetTaskLogsRequest { #[prost(string, tag="4")] pub token: ::prost::alloc::string::String, } -/// A response containing the logs for a task execution. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTaskLogsResponse { - /// The execution log results. - #[prost(string, repeated, tag="1")] - pub results: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +pub struct GetTaskLogsResponseHeader { /// In the case of multiple pages of results, the server-provided token can be used to fetch the next page /// in a query. If there are no more results, this value will be empty. - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub token: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTaskLogsResponseBody { + /// The execution log results. + #[prost(string, repeated, tag="1")] + pub results: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// A response containing the logs for a task execution. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTaskLogsResponse { + #[prost(oneof="get_task_logs_response::Part", tags="1, 2")] + pub part: ::core::option::Option, +} +/// Nested message and enum types in `GetTaskLogsResponse`. +pub mod get_task_logs_response { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Part { + #[prost(message, tag="1")] + Header(super::GetTaskLogsResponseHeader), + #[prost(message, tag="2")] + Body(super::GetTaskLogsResponseBody), + } +} /// The state of the execution is used to control its visibility in the UI/CLI. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] diff --git a/flyteidl/gen/pb_rust/flyteidl.core.rs b/flyteidl/gen/pb_rust/flyteidl.core.rs index 64fb26d7d7..ac82aaeceb 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -1701,6 +1701,147 @@ pub mod sql { } } } +/// Defines a 2-level tree where the root is a comparison operator and Operands are primitives or known variables. +/// Each expression results in a boolean result. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ComparisonExpression { + #[prost(enumeration="comparison_expression::Operator", tag="1")] + pub operator: i32, + #[prost(message, optional, tag="2")] + pub left_value: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub right_value: ::core::option::Option, +} +/// Nested message and enum types in `ComparisonExpression`. +pub mod comparison_expression { + /// Binary Operator for each expression + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Operator { + Eq = 0, + Neq = 1, + /// Greater Than + Gt = 2, + Gte = 3, + /// Less Than + Lt = 4, + Lte = 5, + } + impl Operator { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Operator::Eq => "EQ", + Operator::Neq => "NEQ", + Operator::Gt => "GT", + Operator::Gte => "GTE", + Operator::Lt => "LT", + Operator::Lte => "LTE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EQ" => Some(Self::Eq), + "NEQ" => Some(Self::Neq), + "GT" => Some(Self::Gt), + "GTE" => Some(Self::Gte), + "LT" => Some(Self::Lt), + "LTE" => Some(Self::Lte), + _ => None, + } + } + } +} +/// Defines an operand to a comparison expression. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Operand { + #[prost(oneof="operand::Val", tags="1, 2, 3")] + pub val: ::core::option::Option, +} +/// Nested message and enum types in `Operand`. +pub mod operand { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Val { + /// Can be a constant + #[prost(message, tag="1")] + Primitive(super::Primitive), + /// Or one of this node's input variables + #[prost(string, tag="2")] + Var(::prost::alloc::string::String), + /// Replace the primitive field + #[prost(message, tag="3")] + Scalar(super::Scalar), + } +} +/// Defines a boolean expression tree. It can be a simple or a conjunction expression. +/// Multiple expressions can be combined using a conjunction or a disjunction to result in a final boolean result. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BooleanExpression { + #[prost(oneof="boolean_expression::Expr", tags="1, 2")] + pub expr: ::core::option::Option, +} +/// Nested message and enum types in `BooleanExpression`. +pub mod boolean_expression { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Expr { + #[prost(message, tag="1")] + Conjunction(::prost::alloc::boxed::Box), + #[prost(message, tag="2")] + Comparison(super::ComparisonExpression), + } +} +/// Defines a conjunction expression of two boolean expressions. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConjunctionExpression { + #[prost(enumeration="conjunction_expression::LogicalOperator", tag="1")] + pub operator: i32, + #[prost(message, optional, boxed, tag="2")] + pub left_expression: ::core::option::Option<::prost::alloc::boxed::Box>, + #[prost(message, optional, boxed, tag="3")] + pub right_expression: ::core::option::Option<::prost::alloc::boxed::Box>, +} +/// Nested message and enum types in `ConjunctionExpression`. +pub mod conjunction_expression { + /// Nested conditions. They can be conjoined using AND / OR + /// Order of evaluation is not important as the operators are Commutative + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum LogicalOperator { + /// Conjunction + And = 0, + Or = 1, + } + impl LogicalOperator { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + LogicalOperator::And => "AND", + LogicalOperator::Or => "OR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AND" => Some(Self::And), + "OR" => Some(Self::Or), + _ => None, + } + } + } +} /// Indicates various phases of Workflow Execution #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2030,199 +2171,6 @@ pub mod quality_of_service { Spec(super::QualityOfServiceSpec), } } -/// Span represents a duration trace of Flyte execution. The id field denotes a Flyte execution entity or an operation -/// which uniquely identifies the Span. The spans attribute allows this Span to be further broken down into more -/// precise definitions. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Span { - /// start_time defines the instance this span began. - #[prost(message, optional, tag="1")] - pub start_time: ::core::option::Option<::prost_types::Timestamp>, - /// end_time defines the instance this span completed. - #[prost(message, optional, tag="2")] - pub end_time: ::core::option::Option<::prost_types::Timestamp>, - /// spans defines a collection of Spans that breakdown this execution. - #[prost(message, repeated, tag="7")] - pub spans: ::prost::alloc::vec::Vec, - #[prost(oneof="span::Id", tags="3, 4, 5, 6")] - pub id: ::core::option::Option, -} -/// Nested message and enum types in `Span`. -pub mod span { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Id { - /// workflow_id is the id of the workflow execution this Span represents. - #[prost(message, tag="3")] - WorkflowId(super::WorkflowExecutionIdentifier), - /// node_id is the id of the node execution this Span represents. - #[prost(message, tag="4")] - NodeId(super::NodeExecutionIdentifier), - /// task_id is the id of the task execution this Span represents. - #[prost(message, tag="5")] - TaskId(super::TaskExecutionIdentifier), - /// operation_id is the id of a unique operation that this Span represents. - #[prost(string, tag="6")] - OperationId(::prost::alloc::string::String), - } -} -/// ExecutionMetrics is a collection of metrics that are collected during the execution of a Flyte task. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExecutionMetricResult { - /// The metric this data represents. e.g. EXECUTION_METRIC_USED_CPU_AVG or EXECUTION_METRIC_USED_MEMORY_BYTES_AVG. - #[prost(string, tag="1")] - pub metric: ::prost::alloc::string::String, - /// The result data in prometheus range query result format - /// - /// This may include multiple time series, differentiated by their metric labels. - /// Start time is greater of (execution attempt start, 48h ago) - /// End time is lesser of (execution attempt end, now) - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option<::prost_types::Struct>, -} -/// Defines a 2-level tree where the root is a comparison operator and Operands are primitives or known variables. -/// Each expression results in a boolean result. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ComparisonExpression { - #[prost(enumeration="comparison_expression::Operator", tag="1")] - pub operator: i32, - #[prost(message, optional, tag="2")] - pub left_value: ::core::option::Option, - #[prost(message, optional, tag="3")] - pub right_value: ::core::option::Option, -} -/// Nested message and enum types in `ComparisonExpression`. -pub mod comparison_expression { - /// Binary Operator for each expression - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Operator { - Eq = 0, - Neq = 1, - /// Greater Than - Gt = 2, - Gte = 3, - /// Less Than - Lt = 4, - Lte = 5, - } - impl Operator { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Operator::Eq => "EQ", - Operator::Neq => "NEQ", - Operator::Gt => "GT", - Operator::Gte => "GTE", - Operator::Lt => "LT", - Operator::Lte => "LTE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "EQ" => Some(Self::Eq), - "NEQ" => Some(Self::Neq), - "GT" => Some(Self::Gt), - "GTE" => Some(Self::Gte), - "LT" => Some(Self::Lt), - "LTE" => Some(Self::Lte), - _ => None, - } - } - } -} -/// Defines an operand to a comparison expression. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Operand { - #[prost(oneof="operand::Val", tags="1, 2, 3")] - pub val: ::core::option::Option, -} -/// Nested message and enum types in `Operand`. -pub mod operand { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Val { - /// Can be a constant - #[prost(message, tag="1")] - Primitive(super::Primitive), - /// Or one of this node's input variables - #[prost(string, tag="2")] - Var(::prost::alloc::string::String), - /// Replace the primitive field - #[prost(message, tag="3")] - Scalar(super::Scalar), - } -} -/// Defines a boolean expression tree. It can be a simple or a conjunction expression. -/// Multiple expressions can be combined using a conjunction or a disjunction to result in a final boolean result. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BooleanExpression { - #[prost(oneof="boolean_expression::Expr", tags="1, 2")] - pub expr: ::core::option::Option, -} -/// Nested message and enum types in `BooleanExpression`. -pub mod boolean_expression { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Expr { - #[prost(message, tag="1")] - Conjunction(::prost::alloc::boxed::Box), - #[prost(message, tag="2")] - Comparison(super::ComparisonExpression), - } -} -/// Defines a conjunction expression of two boolean expressions. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConjunctionExpression { - #[prost(enumeration="conjunction_expression::LogicalOperator", tag="1")] - pub operator: i32, - #[prost(message, optional, boxed, tag="2")] - pub left_expression: ::core::option::Option<::prost::alloc::boxed::Box>, - #[prost(message, optional, boxed, tag="3")] - pub right_expression: ::core::option::Option<::prost::alloc::boxed::Box>, -} -/// Nested message and enum types in `ConjunctionExpression`. -pub mod conjunction_expression { - /// Nested conditions. They can be conjoined using AND / OR - /// Order of evaluation is not important as the operators are Commutative - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum LogicalOperator { - /// Conjunction - And = 0, - Or = 1, - } - impl LogicalOperator { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - LogicalOperator::And => "AND", - LogicalOperator::Or => "OR", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AND" => Some(Self::And), - "OR" => Some(Self::Or), - _ => None, - } - } - } -} /// Defines a condition and the execution unit that should be executed if the condition is satisfied. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2603,6 +2551,58 @@ pub struct TaskNodeOverrides { #[prost(message, optional, tag="2")] pub extended_resources: ::core::option::Option, } +/// Span represents a duration trace of Flyte execution. The id field denotes a Flyte execution entity or an operation +/// which uniquely identifies the Span. The spans attribute allows this Span to be further broken down into more +/// precise definitions. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Span { + /// start_time defines the instance this span began. + #[prost(message, optional, tag="1")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// end_time defines the instance this span completed. + #[prost(message, optional, tag="2")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, + /// spans defines a collection of Spans that breakdown this execution. + #[prost(message, repeated, tag="7")] + pub spans: ::prost::alloc::vec::Vec, + #[prost(oneof="span::Id", tags="3, 4, 5, 6")] + pub id: ::core::option::Option, +} +/// Nested message and enum types in `Span`. +pub mod span { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Id { + /// workflow_id is the id of the workflow execution this Span represents. + #[prost(message, tag="3")] + WorkflowId(super::WorkflowExecutionIdentifier), + /// node_id is the id of the node execution this Span represents. + #[prost(message, tag="4")] + NodeId(super::NodeExecutionIdentifier), + /// task_id is the id of the task execution this Span represents. + #[prost(message, tag="5")] + TaskId(super::TaskExecutionIdentifier), + /// operation_id is the id of a unique operation that this Span represents. + #[prost(string, tag="6")] + OperationId(::prost::alloc::string::String), + } +} +/// ExecutionMetrics is a collection of metrics that are collected during the execution of a Flyte task. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionMetricResult { + /// The metric this data represents. e.g. EXECUTION_METRIC_USED_CPU_AVG or EXECUTION_METRIC_USED_MEMORY_BYTES_AVG. + #[prost(string, tag="1")] + pub metric: ::prost::alloc::string::String, + /// The result data in prometheus range query result format + /// + /// This may include multiple time series, differentiated by their metric labels. + /// Start time is greater of (execution attempt start, 48h ago) + /// End time is lesser of (execution attempt end, now) + #[prost(message, optional, tag="2")] + pub data: ::core::option::Option<::prost_types::Struct>, +} /// Adjacency list for the workflow. This is created as part of the compilation process. Every process after the compilation /// step uses this created ConnectionSet #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/flyteidl/protos/flyteidl/service/agent.proto b/flyteidl/protos/flyteidl/service/agent.proto index 2a9db3b11e..0545fae932 100644 --- a/flyteidl/protos/flyteidl/service/agent.proto +++ b/flyteidl/protos/flyteidl/service/agent.proto @@ -17,7 +17,7 @@ service AsyncAgentService { }; // CreateTask sends a task create request to the agent service. - rpc CreateTask (stream flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){ + rpc CreateTask (flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){ option (google.api.http) = { post: "/api/v1/agent/task" body: "*" @@ -25,7 +25,7 @@ service AsyncAgentService { }; // Get job status. - rpc GetTask (flyteidl.admin.GetTaskRequest) returns (stream flyteidl.admin.GetTaskResponse){ + rpc GetTask (flyteidl.admin.GetTaskRequest) returns (flyteidl.admin.GetTaskResponse){ option (google.api.http) = { get: "/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}" }; From a45de3b083556c066fca6a6d06d65c8de8cf700d Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 7 Feb 2024 22:20:49 -0800 Subject: [PATCH 6/7] wip Signed-off-by: Kevin Su --- flyteidl/protos/flyteidl/admin/agent.proto | 7 +++ .../go/tasks/plugins/webapi/agent/plugin.go | 45 +++++++++---------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index 07360af1ab..2ace924118 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -142,6 +142,13 @@ message Agent { // SupportedTaskTypes are the types of the tasks that the agent can handle. repeated TaskType supported_task_types = 2; + + // IsSync indicates whether this agent is a sync agent. Sync agents are expected to return their + // results synchronously when called by propeller. Given that sync agents can affect the performance + // of the system, it's important to enforce strict timeout policies. + // An Async agent, on the other hand, is required to be able to identify jobs by an + // identifier and query for job statuses as jobs progress. + bool is_sync = 3; } message TaskType { diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index 13115f89b4..00f9a47633 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -29,8 +29,9 @@ type Plugin struct { } type ResourceWrapper struct { - Phase flyteIdl.TaskExecution_Phase - State admin.State // This is deprecated. + Phase flyteIdl.TaskExecution_Phase + // Deprecated: Please Use Phase instead. + State admin.State Outputs *flyteIdl.LiteralMap Message string LogLinks []*flyteIdl.TaskLog @@ -84,9 +85,9 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR agent := getFinalAgent(taskTemplate.Type, p.cfg, p.agentRegistry) - client := p.cs.agentClients[agent.Endpoint] - if client == nil { - return nil, nil, fmt.Errorf("default agent is not connected, please check if endpoint:[%v] is up and running", agent.Endpoint) + client, ok := p.cs.agentClients[agent.Endpoint] + if !ok { + return nil, nil, fmt.Errorf("endpoint [%s] not found in the client set", agent.Endpoint) } finalCtx, cancel := getFinalContext(ctx, "CreateTask", agent) @@ -103,21 +104,6 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR taskTemplate.GetContainer().Args = argTemplate } - // If the agent returned a resource, we assume this is a synchronous task. - // The state should be a terminal state, for example, SUCCEEDED, PERMANENT_FAILURE, or RETRYABLE_FAILURE. - if res.GetResource() != nil { - logger.Infof(ctx, "Agent is executing a synchronous task.") - return nil, - ResourceWrapper{ - Phase: res.GetResource().Phase, - State: res.GetResource().State, - Outputs: res.GetResource().Outputs, - Message: res.GetResource().Message, - LogLinks: res.GetResource().LogLinks, - }, nil - } - - logger.Infof(ctx, "Agent is executing an asynchronous task.") return ResourceMetaWrapper{ OutputPrefix: outputPrefix, AgentResourceMeta: res.GetResourceMeta(), @@ -131,10 +117,15 @@ func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest weba agent := getFinalAgent(metadata.TaskType, p.cfg, p.agentRegistry) client := p.cs.agentClients[agent.Endpoint] + client, ok := p.cs.agentClients[agent.Endpoint] + if !ok { + return nil, fmt.Errorf("endpoint [%s] not found in the client set", agent.Endpoint) + } finalCtx, cancel := getFinalContext(ctx, "GetTask", agent) defer cancel() - res, err := client.GetTask(finalCtx, &admin.GetTaskRequest{TaskType: metadata.TaskType, ResourceMeta: metadata.AgentResourceMeta}) + taskType := &admin.TaskType{Name: metadata.TaskType} + res, err := client.GetTask(finalCtx, &admin.GetTaskRequest{TaskType: taskType, ResourceMeta: metadata.AgentResourceMeta}) if err != nil { return nil, err } @@ -155,11 +146,15 @@ func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) agent := getFinalAgent(metadata.TaskType, p.cfg, p.agentRegistry) - client := p.cs.agentClients[agent.Endpoint] + client, ok := p.cs.agentClients[agent.Endpoint] + if !ok { + return fmt.Errorf("endpoint [%s] not found in the client set", agent.Endpoint) + } finalCtx, cancel := getFinalContext(ctx, "DeleteTask", agent) defer cancel() - _, err := client.DeleteTask(finalCtx, &admin.DeleteTaskRequest{TaskType: metadata.TaskType, ResourceMeta: metadata.AgentResourceMeta}) + taskType := &admin.TaskType{Name: metadata.TaskType} + _, err := client.DeleteTask(finalCtx, &admin.DeleteTaskRequest{TaskType: taskType, ResourceMeta: metadata.AgentResourceMeta}) return err } @@ -215,6 +210,10 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase return core.PhaseInfoUndefined, pluginErrors.Errorf(core.SystemErrorCode, "unknown execution state [%v].", resource.State) } +func (p Plugin) Do(ctx context.Context, tCtx webapi.TaskExecutionContext) (phase core.PhaseInfo, err error) { + return core.PhaseInfo{}, nil +} + func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource ResourceWrapper) error { taskTemplate, err := taskCtx.TaskReader().Read(ctx) if err != nil { From 7803f8ba06f8e4b37a5576137084314cd5103d85 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Thu, 8 Feb 2024 17:00:09 -0800 Subject: [PATCH 7/7] Update task type Signed-off-by: Kevin Su --- .../go/admin/mocks/AsyncAgentServiceClient.go | 48 --- .../go/admin/mocks/AsyncAgentServiceServer.go | 32 -- .../go/admin/mocks/SyncAgentServiceClient.go | 66 ++++ .../go/admin/mocks/SyncAgentServiceServer.go | 45 +++ .../SyncAgentService_ExecuteTaskSyncClient.go | 296 ++++++++++++++++++ .../SyncAgentService_ExecuteTaskSyncServer.go | 258 +++++++++++++++ .../mocks/UnsafeSyncAgentServiceServer.go | 15 + flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts | 12 + .../pb-es/flyteidl/service/agent_connect.ts | 21 +- flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go | 198 ++++++------ .../gen/pb-go/flyteidl/service/agent.pb.go | 182 +++++------ .../pb-go/flyteidl/service/agent_grpc.pb.go | 193 +++++++----- .../gateway/flyteidl/service/agent.pb.gw.go | 104 ++++-- .../flyteidl/service/agent.swagger.json | 11 +- flyteidl/gen/pb-js/flyteidl.d.ts | 56 +++- flyteidl/gen/pb-js/flyteidl.js | 82 ++++- .../gen/pb_python/flyteidl/admin/agent_pb2.py | 54 ++-- .../pb_python/flyteidl/admin/agent_pb2.pyi | 6 +- .../pb_python/flyteidl/service/agent_pb2.py | 16 +- .../flyteidl/service/agent_pb2_grpc.py | 99 ++++-- flyteidl/gen/pb_rust/flyteidl.admin.rs | 7 + flyteidl/protos/flyteidl/service/agent.proto | 7 +- .../go/tasks/plugins/webapi/agent/client.go | 14 +- .../go/tasks/plugins/webapi/agent/config.go | 7 + .../plugins/webapi/agent/integration_test.go | 22 +- .../agent/mocks/AgentMetadataServiceClient.go | 114 ------- .../agent/mocks/AsyncAgentServiceClient.go | 258 --------------- .../go/tasks/plugins/webapi/agent/plugin.go | 80 +++-- .../tasks/plugins/webapi/agent/plugin_test.go | 21 +- 29 files changed, 1430 insertions(+), 894 deletions(-) create mode 100644 flyteidl/clients/go/admin/mocks/SyncAgentServiceClient.go create mode 100644 flyteidl/clients/go/admin/mocks/SyncAgentServiceServer.go create mode 100644 flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncClient.go create mode 100644 flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncServer.go create mode 100644 flyteidl/clients/go/admin/mocks/UnsafeSyncAgentServiceServer.go delete mode 100644 flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go delete mode 100644 flyteplugins/go/tasks/plugins/webapi/agent/mocks/AsyncAgentServiceClient.go diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go index 2eb8c79639..0103e3f293 100644 --- a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceClient.go @@ -115,54 +115,6 @@ func (_m *AsyncAgentServiceClient) DeleteTask(ctx context.Context, in *admin.Del return r0, r1 } -type AsyncAgentServiceClient_ExecuteTaskSync struct { - *mock.Call -} - -func (_m AsyncAgentServiceClient_ExecuteTaskSync) Return(_a0 service.AsyncAgentService_ExecuteTaskSyncClient, _a1 error) *AsyncAgentServiceClient_ExecuteTaskSync { - return &AsyncAgentServiceClient_ExecuteTaskSync{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AsyncAgentServiceClient) OnExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) *AsyncAgentServiceClient_ExecuteTaskSync { - c_call := _m.On("ExecuteTaskSync", ctx, opts) - return &AsyncAgentServiceClient_ExecuteTaskSync{Call: c_call} -} - -func (_m *AsyncAgentServiceClient) OnExecuteTaskSyncMatch(matchers ...interface{}) *AsyncAgentServiceClient_ExecuteTaskSync { - c_call := _m.On("ExecuteTaskSync", matchers...) - return &AsyncAgentServiceClient_ExecuteTaskSync{Call: c_call} -} - -// ExecuteTaskSync provides a mock function with given fields: ctx, opts -func (_m *AsyncAgentServiceClient) ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (service.AsyncAgentService_ExecuteTaskSyncClient, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 service.AsyncAgentService_ExecuteTaskSyncClient - if rf, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) service.AsyncAgentService_ExecuteTaskSyncClient); ok { - r0 = rf(ctx, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(service.AsyncAgentService_ExecuteTaskSyncClient) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, ...grpc.CallOption) error); ok { - r1 = rf(ctx, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - type AsyncAgentServiceClient_GetTask struct { *mock.Call } diff --git a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go index 7f3397fa5e..76b618f791 100644 --- a/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go +++ b/flyteidl/clients/go/admin/mocks/AsyncAgentServiceServer.go @@ -99,38 +99,6 @@ func (_m *AsyncAgentServiceServer) DeleteTask(_a0 context.Context, _a1 *admin.De return r0, r1 } -type AsyncAgentServiceServer_ExecuteTaskSync struct { - *mock.Call -} - -func (_m AsyncAgentServiceServer_ExecuteTaskSync) Return(_a0 error) *AsyncAgentServiceServer_ExecuteTaskSync { - return &AsyncAgentServiceServer_ExecuteTaskSync{Call: _m.Call.Return(_a0)} -} - -func (_m *AsyncAgentServiceServer) OnExecuteTaskSync(_a0 service.AsyncAgentService_ExecuteTaskSyncServer) *AsyncAgentServiceServer_ExecuteTaskSync { - c_call := _m.On("ExecuteTaskSync", _a0) - return &AsyncAgentServiceServer_ExecuteTaskSync{Call: c_call} -} - -func (_m *AsyncAgentServiceServer) OnExecuteTaskSyncMatch(matchers ...interface{}) *AsyncAgentServiceServer_ExecuteTaskSync { - c_call := _m.On("ExecuteTaskSync", matchers...) - return &AsyncAgentServiceServer_ExecuteTaskSync{Call: c_call} -} - -// ExecuteTaskSync provides a mock function with given fields: _a0 -func (_m *AsyncAgentServiceServer) ExecuteTaskSync(_a0 service.AsyncAgentService_ExecuteTaskSyncServer) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(service.AsyncAgentService_ExecuteTaskSyncServer) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - type AsyncAgentServiceServer_GetTask struct { *mock.Call } diff --git a/flyteidl/clients/go/admin/mocks/SyncAgentServiceClient.go b/flyteidl/clients/go/admin/mocks/SyncAgentServiceClient.go new file mode 100644 index 0000000000..6faf4c2ad9 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/SyncAgentServiceClient.go @@ -0,0 +1,66 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" +) + +// SyncAgentServiceClient is an autogenerated mock type for the SyncAgentServiceClient type +type SyncAgentServiceClient struct { + mock.Mock +} + +type SyncAgentServiceClient_ExecuteTaskSync struct { + *mock.Call +} + +func (_m SyncAgentServiceClient_ExecuteTaskSync) Return(_a0 service.SyncAgentService_ExecuteTaskSyncClient, _a1 error) *SyncAgentServiceClient_ExecuteTaskSync { + return &SyncAgentServiceClient_ExecuteTaskSync{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *SyncAgentServiceClient) OnExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) *SyncAgentServiceClient_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", ctx, opts) + return &SyncAgentServiceClient_ExecuteTaskSync{Call: c_call} +} + +func (_m *SyncAgentServiceClient) OnExecuteTaskSyncMatch(matchers ...interface{}) *SyncAgentServiceClient_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", matchers...) + return &SyncAgentServiceClient_ExecuteTaskSync{Call: c_call} +} + +// ExecuteTaskSync provides a mock function with given fields: ctx, opts +func (_m *SyncAgentServiceClient) ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (service.SyncAgentService_ExecuteTaskSyncClient, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 service.SyncAgentService_ExecuteTaskSyncClient + if rf, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) service.SyncAgentService_ExecuteTaskSyncClient); ok { + r0 = rf(ctx, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(service.SyncAgentService_ExecuteTaskSyncClient) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, ...grpc.CallOption) error); ok { + r1 = rf(ctx, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteidl/clients/go/admin/mocks/SyncAgentServiceServer.go b/flyteidl/clients/go/admin/mocks/SyncAgentServiceServer.go new file mode 100644 index 0000000000..ee7b4a78e6 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/SyncAgentServiceServer.go @@ -0,0 +1,45 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + mock "github.com/stretchr/testify/mock" +) + +// SyncAgentServiceServer is an autogenerated mock type for the SyncAgentServiceServer type +type SyncAgentServiceServer struct { + mock.Mock +} + +type SyncAgentServiceServer_ExecuteTaskSync struct { + *mock.Call +} + +func (_m SyncAgentServiceServer_ExecuteTaskSync) Return(_a0 error) *SyncAgentServiceServer_ExecuteTaskSync { + return &SyncAgentServiceServer_ExecuteTaskSync{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentServiceServer) OnExecuteTaskSync(_a0 service.SyncAgentService_ExecuteTaskSyncServer) *SyncAgentServiceServer_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", _a0) + return &SyncAgentServiceServer_ExecuteTaskSync{Call: c_call} +} + +func (_m *SyncAgentServiceServer) OnExecuteTaskSyncMatch(matchers ...interface{}) *SyncAgentServiceServer_ExecuteTaskSync { + c_call := _m.On("ExecuteTaskSync", matchers...) + return &SyncAgentServiceServer_ExecuteTaskSync{Call: c_call} +} + +// ExecuteTaskSync provides a mock function with given fields: _a0 +func (_m *SyncAgentServiceServer) ExecuteTaskSync(_a0 service.SyncAgentService_ExecuteTaskSyncServer) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(service.SyncAgentService_ExecuteTaskSyncServer) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncClient.go b/flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncClient.go new file mode 100644 index 0000000000..c88068293f --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncClient.go @@ -0,0 +1,296 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// SyncAgentService_ExecuteTaskSyncClient is an autogenerated mock type for the SyncAgentService_ExecuteTaskSyncClient type +type SyncAgentService_ExecuteTaskSyncClient struct { + mock.Mock +} + +type SyncAgentService_ExecuteTaskSyncClient_CloseSend struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_CloseSend) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncClient_CloseSend { + return &SyncAgentService_ExecuteTaskSyncClient_CloseSend{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnCloseSend() *SyncAgentService_ExecuteTaskSyncClient_CloseSend { + c_call := _m.On("CloseSend") + return &SyncAgentService_ExecuteTaskSyncClient_CloseSend{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnCloseSendMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_CloseSend { + c_call := _m.On("CloseSend", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_CloseSend{Call: c_call} +} + +// CloseSend provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncClient) CloseSend() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncClient_Context struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_Context) Return(_a0 context.Context) *SyncAgentService_ExecuteTaskSyncClient_Context { + return &SyncAgentService_ExecuteTaskSyncClient_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnContext() *SyncAgentService_ExecuteTaskSyncClient_Context { + c_call := _m.On("Context") + return &SyncAgentService_ExecuteTaskSyncClient_Context{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnContextMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_Context { + c_call := _m.On("Context", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncClient) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncClient_Header struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_Header) Return(_a0 metadata.MD, _a1 error) *SyncAgentService_ExecuteTaskSyncClient_Header { + return &SyncAgentService_ExecuteTaskSyncClient_Header{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnHeader() *SyncAgentService_ExecuteTaskSyncClient_Header { + c_call := _m.On("Header") + return &SyncAgentService_ExecuteTaskSyncClient_Header{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnHeaderMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_Header { + c_call := _m.On("Header", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_Header{Call: c_call} +} + +// Header provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncClient) Header() (metadata.MD, error) { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type SyncAgentService_ExecuteTaskSyncClient_Recv struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_Recv) Return(_a0 *admin.ExecuteTaskSyncResponse, _a1 error) *SyncAgentService_ExecuteTaskSyncClient_Recv { + return &SyncAgentService_ExecuteTaskSyncClient_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnRecv() *SyncAgentService_ExecuteTaskSyncClient_Recv { + c_call := _m.On("Recv") + return &SyncAgentService_ExecuteTaskSyncClient_Recv{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnRecvMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_Recv { + c_call := _m.On("Recv", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncResponse, error) { + ret := _m.Called() + + var r0 *admin.ExecuteTaskSyncResponse + if rf, ok := ret.Get(0).(func() *admin.ExecuteTaskSyncResponse); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecuteTaskSyncResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type SyncAgentService_ExecuteTaskSyncClient_RecvMsg struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_RecvMsg) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncClient_RecvMsg { + return &SyncAgentService_ExecuteTaskSyncClient_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnRecvMsg(m interface{}) *SyncAgentService_ExecuteTaskSyncClient_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &SyncAgentService_ExecuteTaskSyncClient_RecvMsg{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnRecvMsgMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *SyncAgentService_ExecuteTaskSyncClient) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncClient_Send struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_Send) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncClient_Send { + return &SyncAgentService_ExecuteTaskSyncClient_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnSend(_a0 *admin.ExecuteTaskSyncRequest) *SyncAgentService_ExecuteTaskSyncClient_Send { + c_call := _m.On("Send", _a0) + return &SyncAgentService_ExecuteTaskSyncClient_Send{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnSendMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_Send { + c_call := _m.On("Send", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *SyncAgentService_ExecuteTaskSyncClient) Send(_a0 *admin.ExecuteTaskSyncRequest) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.ExecuteTaskSyncRequest) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncClient_SendMsg struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_SendMsg) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncClient_SendMsg { + return &SyncAgentService_ExecuteTaskSyncClient_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnSendMsg(m interface{}) *SyncAgentService_ExecuteTaskSyncClient_SendMsg { + c_call := _m.On("SendMsg", m) + return &SyncAgentService_ExecuteTaskSyncClient_SendMsg{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnSendMsgMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *SyncAgentService_ExecuteTaskSyncClient) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncClient_Trailer struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncClient_Trailer) Return(_a0 metadata.MD) *SyncAgentService_ExecuteTaskSyncClient_Trailer { + return &SyncAgentService_ExecuteTaskSyncClient_Trailer{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnTrailer() *SyncAgentService_ExecuteTaskSyncClient_Trailer { + c_call := _m.On("Trailer") + return &SyncAgentService_ExecuteTaskSyncClient_Trailer{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncClient) OnTrailerMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncClient_Trailer { + c_call := _m.On("Trailer", matchers...) + return &SyncAgentService_ExecuteTaskSyncClient_Trailer{Call: c_call} +} + +// Trailer provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncClient) Trailer() metadata.MD { + ret := _m.Called() + + var r0 metadata.MD + if rf, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + + return r0 +} diff --git a/flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncServer.go b/flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncServer.go new file mode 100644 index 0000000000..de1579d7a8 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/SyncAgentService_ExecuteTaskSyncServer.go @@ -0,0 +1,258 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + metadata "google.golang.org/grpc/metadata" + + mock "github.com/stretchr/testify/mock" +) + +// SyncAgentService_ExecuteTaskSyncServer is an autogenerated mock type for the SyncAgentService_ExecuteTaskSyncServer type +type SyncAgentService_ExecuteTaskSyncServer struct { + mock.Mock +} + +type SyncAgentService_ExecuteTaskSyncServer_Context struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_Context) Return(_a0 context.Context) *SyncAgentService_ExecuteTaskSyncServer_Context { + return &SyncAgentService_ExecuteTaskSyncServer_Context{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnContext() *SyncAgentService_ExecuteTaskSyncServer_Context { + c_call := _m.On("Context") + return &SyncAgentService_ExecuteTaskSyncServer_Context{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnContextMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_Context { + c_call := _m.On("Context", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_Context{Call: c_call} +} + +// Context provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncServer) Context() context.Context { + ret := _m.Called() + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncServer_Recv struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_Recv) Return(_a0 *admin.ExecuteTaskSyncRequest, _a1 error) *SyncAgentService_ExecuteTaskSyncServer_Recv { + return &SyncAgentService_ExecuteTaskSyncServer_Recv{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnRecv() *SyncAgentService_ExecuteTaskSyncServer_Recv { + c_call := _m.On("Recv") + return &SyncAgentService_ExecuteTaskSyncServer_Recv{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnRecvMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_Recv { + c_call := _m.On("Recv", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_Recv{Call: c_call} +} + +// Recv provides a mock function with given fields: +func (_m *SyncAgentService_ExecuteTaskSyncServer) Recv() (*admin.ExecuteTaskSyncRequest, error) { + ret := _m.Called() + + var r0 *admin.ExecuteTaskSyncRequest + if rf, ok := ret.Get(0).(func() *admin.ExecuteTaskSyncRequest); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecuteTaskSyncRequest) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type SyncAgentService_ExecuteTaskSyncServer_RecvMsg struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_RecvMsg) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncServer_RecvMsg { + return &SyncAgentService_ExecuteTaskSyncServer_RecvMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnRecvMsg(m interface{}) *SyncAgentService_ExecuteTaskSyncServer_RecvMsg { + c_call := _m.On("RecvMsg", m) + return &SyncAgentService_ExecuteTaskSyncServer_RecvMsg{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnRecvMsgMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_RecvMsg { + c_call := _m.On("RecvMsg", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_RecvMsg{Call: c_call} +} + +// RecvMsg provides a mock function with given fields: m +func (_m *SyncAgentService_ExecuteTaskSyncServer) RecvMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncServer_Send struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_Send) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncServer_Send { + return &SyncAgentService_ExecuteTaskSyncServer_Send{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSend(_a0 *admin.ExecuteTaskSyncResponse) *SyncAgentService_ExecuteTaskSyncServer_Send { + c_call := _m.On("Send", _a0) + return &SyncAgentService_ExecuteTaskSyncServer_Send{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSendMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_Send { + c_call := _m.On("Send", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_Send{Call: c_call} +} + +// Send provides a mock function with given fields: _a0 +func (_m *SyncAgentService_ExecuteTaskSyncServer) Send(_a0 *admin.ExecuteTaskSyncResponse) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(*admin.ExecuteTaskSyncResponse) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncServer_SendHeader struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_SendHeader) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncServer_SendHeader { + return &SyncAgentService_ExecuteTaskSyncServer_SendHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSendHeader(_a0 metadata.MD) *SyncAgentService_ExecuteTaskSyncServer_SendHeader { + c_call := _m.On("SendHeader", _a0) + return &SyncAgentService_ExecuteTaskSyncServer_SendHeader{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSendHeaderMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_SendHeader { + c_call := _m.On("SendHeader", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_SendHeader{Call: c_call} +} + +// SendHeader provides a mock function with given fields: _a0 +func (_m *SyncAgentService_ExecuteTaskSyncServer) SendHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncServer_SendMsg struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_SendMsg) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncServer_SendMsg { + return &SyncAgentService_ExecuteTaskSyncServer_SendMsg{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSendMsg(m interface{}) *SyncAgentService_ExecuteTaskSyncServer_SendMsg { + c_call := _m.On("SendMsg", m) + return &SyncAgentService_ExecuteTaskSyncServer_SendMsg{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSendMsgMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_SendMsg { + c_call := _m.On("SendMsg", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_SendMsg{Call: c_call} +} + +// SendMsg provides a mock function with given fields: m +func (_m *SyncAgentService_ExecuteTaskSyncServer) SendMsg(m interface{}) error { + ret := _m.Called(m) + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(m) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type SyncAgentService_ExecuteTaskSyncServer_SetHeader struct { + *mock.Call +} + +func (_m SyncAgentService_ExecuteTaskSyncServer_SetHeader) Return(_a0 error) *SyncAgentService_ExecuteTaskSyncServer_SetHeader { + return &SyncAgentService_ExecuteTaskSyncServer_SetHeader{Call: _m.Call.Return(_a0)} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSetHeader(_a0 metadata.MD) *SyncAgentService_ExecuteTaskSyncServer_SetHeader { + c_call := _m.On("SetHeader", _a0) + return &SyncAgentService_ExecuteTaskSyncServer_SetHeader{Call: c_call} +} + +func (_m *SyncAgentService_ExecuteTaskSyncServer) OnSetHeaderMatch(matchers ...interface{}) *SyncAgentService_ExecuteTaskSyncServer_SetHeader { + c_call := _m.On("SetHeader", matchers...) + return &SyncAgentService_ExecuteTaskSyncServer_SetHeader{Call: c_call} +} + +// SetHeader provides a mock function with given fields: _a0 +func (_m *SyncAgentService_ExecuteTaskSyncServer) SetHeader(_a0 metadata.MD) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SetTrailer provides a mock function with given fields: _a0 +func (_m *SyncAgentService_ExecuteTaskSyncServer) SetTrailer(_a0 metadata.MD) { + _m.Called(_a0) +} diff --git a/flyteidl/clients/go/admin/mocks/UnsafeSyncAgentServiceServer.go b/flyteidl/clients/go/admin/mocks/UnsafeSyncAgentServiceServer.go new file mode 100644 index 0000000000..c4f4b4099c --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/UnsafeSyncAgentServiceServer.go @@ -0,0 +1,15 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// UnsafeSyncAgentServiceServer is an autogenerated mock type for the UnsafeSyncAgentServiceServer type +type UnsafeSyncAgentServiceServer struct { + mock.Mock +} + +// mustEmbedUnimplementedSyncAgentServiceServer provides a mock function with given fields: +func (_m *UnsafeSyncAgentServiceServer) mustEmbedUnimplementedSyncAgentServiceServer() { + _m.Called() +} diff --git a/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts b/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts index e0e06096fb..729b13e4ae 100644 --- a/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts @@ -740,6 +740,17 @@ export class Agent extends Message { */ supportedTaskTypes: TaskType[] = []; + /** + * IsSync indicates whether this agent is a sync agent. Sync agents are expected to return their + * results synchronously when called by propeller. Given that sync agents can affect the performance + * of the system, it's important to enforce strict timeout policies. + * An Async agent, on the other hand, is required to be able to identify jobs by an + * identifier and query for job statuses as jobs progress. + * + * @generated from field: bool is_sync = 3; + */ + isSync = false; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -750,6 +761,7 @@ export class Agent extends Message { static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "supported_task_types", kind: "message", T: TaskType, repeated: true }, + { no: 3, name: "is_sync", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Agent { diff --git a/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts b/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts index 37b536b8f5..33eb50a044 100644 --- a/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts +++ b/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts @@ -7,17 +7,17 @@ import { CreateTaskRequest, CreateTaskResponse, DeleteTaskRequest, DeleteTaskRes import { MethodKind } from "@bufbuild/protobuf"; /** - * AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. + * AgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. * - * @generated from service flyteidl.service.AsyncAgentService + * @generated from service flyteidl.service.SyncAgentService */ -export const AsyncAgentService = { - typeName: "flyteidl.service.AsyncAgentService", +export const SyncAgentService = { + typeName: "flyteidl.service.SyncAgentService", methods: { /** * ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. * - * @generated from rpc flyteidl.service.AsyncAgentService.ExecuteTaskSync + * @generated from rpc flyteidl.service.SyncAgentService.ExecuteTaskSync */ executeTaskSync: { name: "ExecuteTaskSync", @@ -25,6 +25,17 @@ export const AsyncAgentService = { O: ExecuteTaskSyncResponse, kind: MethodKind.BiDiStreaming, }, + } +} as const; + +/** + * AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. + * + * @generated from service flyteidl.service.AsyncAgentService + */ +export const AsyncAgentService = { + typeName: "flyteidl.service.AsyncAgentService", + methods: { /** * CreateTask sends a task create request to the agent service. * diff --git a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go index 0badb46537..ad440d373c 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go @@ -930,6 +930,12 @@ type Agent struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // SupportedTaskTypes are the types of the tasks that the agent can handle. SupportedTaskTypes []*TaskType `protobuf:"bytes,2,rep,name=supported_task_types,json=supportedTaskTypes,proto3" json:"supported_task_types,omitempty"` + // IsSync indicates whether this agent is a sync agent. Sync agents are expected to return their + // results synchronously when called by propeller. Given that sync agents can affect the performance + // of the system, it's important to enforce strict timeout policies. + // An Async agent, on the other hand, is required to be able to identify jobs by an + // identifier and query for job statuses as jobs progress. + IsSync bool `protobuf:"varint,3,opt,name=is_sync,json=isSync,proto3" json:"is_sync,omitempty"` } func (x *Agent) Reset() { @@ -978,6 +984,13 @@ func (x *Agent) GetSupportedTaskTypes() []*TaskType { return nil } +func (x *Agent) GetIsSync() bool { + if x != nil { + return x.IsSync + } + return false +} + type TaskType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1795,99 +1808,100 @@ var file_flyteidl_admin_agent_proto_rawDesc = []byte{ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x22, 0x38, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x3f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, - 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xae, 0x02, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x58, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, - 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x31, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x38, 0x0a, 0x08, 0x54, 0x61, + 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2b, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x13, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x43, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xae, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x35, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, + 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x31, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x6f, 0x64, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xa1, - 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, - 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, - 0x64, 0x79, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, - 0x72, 0x74, 0x2a, 0x5e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x52, - 0x45, 0x54, 0x52, 0x59, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, - 0x10, 0x04, 0x42, 0xb6, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x46, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xca, 0x02, 0x0e, 0x46, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xe2, 0x02, 0x1a, 0x46, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x46, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, 0x72, 0x74, 0x2a, 0x5e, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x52, 0x59, 0x41, 0x42, + 0x4c, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, + 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x42, 0xb6, 0x01, 0x0a, + 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0xa2, 0x02, + 0x03, 0x46, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xca, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0xe2, 0x02, 0x1a, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go index 257c8254a9..a95e0f58e1 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go @@ -30,96 +30,98 @@ var file_flyteidl_service_agent_proto_rawDesc = []byte{ 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd2, 0x07, 0x0a, 0x11, 0x41, - 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x8c, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x79, 0x6e, 0x63, 0x12, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, - 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, - 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x72, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, - 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, - 0x61, 0x73, 0x6b, 0x12, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x12, 0x47, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x7b, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x2a, - 0x52, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa1, 0x01, 0x0a, 0x10, 0x53, + 0x79, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x8c, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, + 0x79, 0x6e, 0x63, 0x12, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, + 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x28, 0x01, 0x30, 0x01, 0x32, 0xc3, + 0x06, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x12, 0x47, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x54, 0x2a, 0x52, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x25, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, - 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x7d, 0x12, 0xae, - 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x22, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, - 0x4c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x74, - 0x61, 0x73, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x7d, 0x30, 0x01, 0x32, - 0xf0, 0x01, 0x0a, 0x14, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, - 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6b, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0a, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, - 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, + 0x6f, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x7d, 0x30, 0x01, 0x32, 0xf0, 0x01, 0x0a, 0x14, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6b, 0x0a, 0x0a, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, + 0x46, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var file_flyteidl_service_agent_proto_goTypes = []interface{}{ @@ -141,7 +143,7 @@ var file_flyteidl_service_agent_proto_goTypes = []interface{}{ (*admin.ListAgentsResponse)(nil), // 15: flyteidl.admin.ListAgentsResponse } var file_flyteidl_service_agent_proto_depIdxs = []int32{ - 0, // 0: flyteidl.service.AsyncAgentService.ExecuteTaskSync:input_type -> flyteidl.admin.ExecuteTaskSyncRequest + 0, // 0: flyteidl.service.SyncAgentService.ExecuteTaskSync:input_type -> flyteidl.admin.ExecuteTaskSyncRequest 1, // 1: flyteidl.service.AsyncAgentService.CreateTask:input_type -> flyteidl.admin.CreateTaskRequest 2, // 2: flyteidl.service.AsyncAgentService.GetTask:input_type -> flyteidl.admin.GetTaskRequest 3, // 3: flyteidl.service.AsyncAgentService.DeleteTask:input_type -> flyteidl.admin.DeleteTaskRequest @@ -149,7 +151,7 @@ var file_flyteidl_service_agent_proto_depIdxs = []int32{ 5, // 5: flyteidl.service.AsyncAgentService.GetTaskLogs:input_type -> flyteidl.admin.GetTaskLogsRequest 6, // 6: flyteidl.service.AgentMetadataService.GetAgent:input_type -> flyteidl.admin.GetAgentRequest 7, // 7: flyteidl.service.AgentMetadataService.ListAgents:input_type -> flyteidl.admin.ListAgentsRequest - 8, // 8: flyteidl.service.AsyncAgentService.ExecuteTaskSync:output_type -> flyteidl.admin.ExecuteTaskSyncResponse + 8, // 8: flyteidl.service.SyncAgentService.ExecuteTaskSync:output_type -> flyteidl.admin.ExecuteTaskSyncResponse 9, // 9: flyteidl.service.AsyncAgentService.CreateTask:output_type -> flyteidl.admin.CreateTaskResponse 10, // 10: flyteidl.service.AsyncAgentService.GetTask:output_type -> flyteidl.admin.GetTaskResponse 11, // 11: flyteidl.service.AsyncAgentService.DeleteTask:output_type -> flyteidl.admin.DeleteTaskResponse @@ -177,7 +179,7 @@ func file_flyteidl_service_agent_proto_init() { NumEnums: 0, NumMessages: 0, NumExtensions: 0, - NumServices: 2, + NumServices: 3, }, GoTypes: file_flyteidl_service_agent_proto_goTypes, DependencyIndexes: file_flyteidl_service_agent_proto_depIdxs, diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go index fa89f0a5e9..98f057da12 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go @@ -20,68 +20,49 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - AsyncAgentService_ExecuteTaskSync_FullMethodName = "/flyteidl.service.AsyncAgentService/ExecuteTaskSync" - AsyncAgentService_CreateTask_FullMethodName = "/flyteidl.service.AsyncAgentService/CreateTask" - AsyncAgentService_GetTask_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTask" - AsyncAgentService_DeleteTask_FullMethodName = "/flyteidl.service.AsyncAgentService/DeleteTask" - AsyncAgentService_GetTaskMetrics_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskMetrics" - AsyncAgentService_GetTaskLogs_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskLogs" + SyncAgentService_ExecuteTaskSync_FullMethodName = "/flyteidl.service.SyncAgentService/ExecuteTaskSync" ) -// AsyncAgentServiceClient is the client API for AsyncAgentService service. +// SyncAgentServiceClient is the client API for SyncAgentService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AsyncAgentServiceClient interface { +type SyncAgentServiceClient interface { // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. - ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (AsyncAgentService_ExecuteTaskSyncClient, error) - // CreateTask sends a task create request to the agent service. - CreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) (*admin.CreateTaskResponse, error) - // Get job status. - GetTask(ctx context.Context, in *admin.GetTaskRequest, opts ...grpc.CallOption) (*admin.GetTaskResponse, error) - // Delete the task resource. - DeleteTask(ctx context.Context, in *admin.DeleteTaskRequest, opts ...grpc.CallOption) (*admin.DeleteTaskResponse, error) - // GetTaskMetrics returns one or more task execution metrics, if available. - // - // Errors include - // - OutOfRange if metrics are not available for the specified task time range - // - various other errors - GetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) (*admin.GetTaskMetricsResponse, error) - // GetTaskLogs returns task execution logs, if available. - GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (AsyncAgentService_GetTaskLogsClient, error) + ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (SyncAgentService_ExecuteTaskSyncClient, error) } -type asyncAgentServiceClient struct { +type syncAgentServiceClient struct { cc grpc.ClientConnInterface } -func NewAsyncAgentServiceClient(cc grpc.ClientConnInterface) AsyncAgentServiceClient { - return &asyncAgentServiceClient{cc} +func NewSyncAgentServiceClient(cc grpc.ClientConnInterface) SyncAgentServiceClient { + return &syncAgentServiceClient{cc} } -func (c *asyncAgentServiceClient) ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (AsyncAgentService_ExecuteTaskSyncClient, error) { - stream, err := c.cc.NewStream(ctx, &AsyncAgentService_ServiceDesc.Streams[0], AsyncAgentService_ExecuteTaskSync_FullMethodName, opts...) +func (c *syncAgentServiceClient) ExecuteTaskSync(ctx context.Context, opts ...grpc.CallOption) (SyncAgentService_ExecuteTaskSyncClient, error) { + stream, err := c.cc.NewStream(ctx, &SyncAgentService_ServiceDesc.Streams[0], SyncAgentService_ExecuteTaskSync_FullMethodName, opts...) if err != nil { return nil, err } - x := &asyncAgentServiceExecuteTaskSyncClient{stream} + x := &syncAgentServiceExecuteTaskSyncClient{stream} return x, nil } -type AsyncAgentService_ExecuteTaskSyncClient interface { +type SyncAgentService_ExecuteTaskSyncClient interface { Send(*admin.ExecuteTaskSyncRequest) error Recv() (*admin.ExecuteTaskSyncResponse, error) grpc.ClientStream } -type asyncAgentServiceExecuteTaskSyncClient struct { +type syncAgentServiceExecuteTaskSyncClient struct { grpc.ClientStream } -func (x *asyncAgentServiceExecuteTaskSyncClient) Send(m *admin.ExecuteTaskSyncRequest) error { +func (x *syncAgentServiceExecuteTaskSyncClient) Send(m *admin.ExecuteTaskSyncRequest) error { return x.ClientStream.SendMsg(m) } -func (x *asyncAgentServiceExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncResponse, error) { +func (x *syncAgentServiceExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncResponse, error) { m := new(admin.ExecuteTaskSyncResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -89,6 +70,113 @@ func (x *asyncAgentServiceExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncR return m, nil } +// SyncAgentServiceServer is the server API for SyncAgentService service. +// All implementations should embed UnimplementedSyncAgentServiceServer +// for forward compatibility +type SyncAgentServiceServer interface { + // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + ExecuteTaskSync(SyncAgentService_ExecuteTaskSyncServer) error +} + +// UnimplementedSyncAgentServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSyncAgentServiceServer struct { +} + +func (UnimplementedSyncAgentServiceServer) ExecuteTaskSync(SyncAgentService_ExecuteTaskSyncServer) error { + return status.Errorf(codes.Unimplemented, "method ExecuteTaskSync not implemented") +} + +// UnsafeSyncAgentServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SyncAgentServiceServer will +// result in compilation errors. +type UnsafeSyncAgentServiceServer interface { + mustEmbedUnimplementedSyncAgentServiceServer() +} + +func RegisterSyncAgentServiceServer(s grpc.ServiceRegistrar, srv SyncAgentServiceServer) { + s.RegisterService(&SyncAgentService_ServiceDesc, srv) +} + +func _SyncAgentService_ExecuteTaskSync_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(SyncAgentServiceServer).ExecuteTaskSync(&syncAgentServiceExecuteTaskSyncServer{stream}) +} + +type SyncAgentService_ExecuteTaskSyncServer interface { + Send(*admin.ExecuteTaskSyncResponse) error + Recv() (*admin.ExecuteTaskSyncRequest, error) + grpc.ServerStream +} + +type syncAgentServiceExecuteTaskSyncServer struct { + grpc.ServerStream +} + +func (x *syncAgentServiceExecuteTaskSyncServer) Send(m *admin.ExecuteTaskSyncResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *syncAgentServiceExecuteTaskSyncServer) Recv() (*admin.ExecuteTaskSyncRequest, error) { + m := new(admin.ExecuteTaskSyncRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// SyncAgentService_ServiceDesc is the grpc.ServiceDesc for SyncAgentService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SyncAgentService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "flyteidl.service.SyncAgentService", + HandlerType: (*SyncAgentServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "ExecuteTaskSync", + Handler: _SyncAgentService_ExecuteTaskSync_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "flyteidl/service/agent.proto", +} + +const ( + AsyncAgentService_CreateTask_FullMethodName = "/flyteidl.service.AsyncAgentService/CreateTask" + AsyncAgentService_GetTask_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTask" + AsyncAgentService_DeleteTask_FullMethodName = "/flyteidl.service.AsyncAgentService/DeleteTask" + AsyncAgentService_GetTaskMetrics_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskMetrics" + AsyncAgentService_GetTaskLogs_FullMethodName = "/flyteidl.service.AsyncAgentService/GetTaskLogs" +) + +// AsyncAgentServiceClient is the client API for AsyncAgentService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AsyncAgentServiceClient interface { + // CreateTask sends a task create request to the agent service. + CreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) (*admin.CreateTaskResponse, error) + // Get job status. + GetTask(ctx context.Context, in *admin.GetTaskRequest, opts ...grpc.CallOption) (*admin.GetTaskResponse, error) + // Delete the task resource. + DeleteTask(ctx context.Context, in *admin.DeleteTaskRequest, opts ...grpc.CallOption) (*admin.DeleteTaskResponse, error) + // GetTaskMetrics returns one or more task execution metrics, if available. + // + // Errors include + // - OutOfRange if metrics are not available for the specified task time range + // - various other errors + GetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) (*admin.GetTaskMetricsResponse, error) + // GetTaskLogs returns task execution logs, if available. + GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (AsyncAgentService_GetTaskLogsClient, error) +} + +type asyncAgentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAsyncAgentServiceClient(cc grpc.ClientConnInterface) AsyncAgentServiceClient { + return &asyncAgentServiceClient{cc} +} + func (c *asyncAgentServiceClient) CreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) (*admin.CreateTaskResponse, error) { out := new(admin.CreateTaskResponse) err := c.cc.Invoke(ctx, AsyncAgentService_CreateTask_FullMethodName, in, out, opts...) @@ -126,7 +214,7 @@ func (c *asyncAgentServiceClient) GetTaskMetrics(ctx context.Context, in *admin. } func (c *asyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (AsyncAgentService_GetTaskLogsClient, error) { - stream, err := c.cc.NewStream(ctx, &AsyncAgentService_ServiceDesc.Streams[1], AsyncAgentService_GetTaskLogs_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &AsyncAgentService_ServiceDesc.Streams[0], AsyncAgentService_GetTaskLogs_FullMethodName, opts...) if err != nil { return nil, err } @@ -161,8 +249,6 @@ func (x *asyncAgentServiceGetTaskLogsClient) Recv() (*admin.GetTaskLogsResponse, // All implementations should embed UnimplementedAsyncAgentServiceServer // for forward compatibility type AsyncAgentServiceServer interface { - // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. - ExecuteTaskSync(AsyncAgentService_ExecuteTaskSyncServer) error // CreateTask sends a task create request to the agent service. CreateTask(context.Context, *admin.CreateTaskRequest) (*admin.CreateTaskResponse, error) // Get job status. @@ -183,9 +269,6 @@ type AsyncAgentServiceServer interface { type UnimplementedAsyncAgentServiceServer struct { } -func (UnimplementedAsyncAgentServiceServer) ExecuteTaskSync(AsyncAgentService_ExecuteTaskSyncServer) error { - return status.Errorf(codes.Unimplemented, "method ExecuteTaskSync not implemented") -} func (UnimplementedAsyncAgentServiceServer) CreateTask(context.Context, *admin.CreateTaskRequest) (*admin.CreateTaskResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") } @@ -213,32 +296,6 @@ func RegisterAsyncAgentServiceServer(s grpc.ServiceRegistrar, srv AsyncAgentServ s.RegisterService(&AsyncAgentService_ServiceDesc, srv) } -func _AsyncAgentService_ExecuteTaskSync_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AsyncAgentServiceServer).ExecuteTaskSync(&asyncAgentServiceExecuteTaskSyncServer{stream}) -} - -type AsyncAgentService_ExecuteTaskSyncServer interface { - Send(*admin.ExecuteTaskSyncResponse) error - Recv() (*admin.ExecuteTaskSyncRequest, error) - grpc.ServerStream -} - -type asyncAgentServiceExecuteTaskSyncServer struct { - grpc.ServerStream -} - -func (x *asyncAgentServiceExecuteTaskSyncServer) Send(m *admin.ExecuteTaskSyncResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *asyncAgentServiceExecuteTaskSyncServer) Recv() (*admin.ExecuteTaskSyncRequest, error) { - m := new(admin.ExecuteTaskSyncRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - func _AsyncAgentService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(admin.CreateTaskRequest) if err := dec(in); err != nil { @@ -357,12 +414,6 @@ var AsyncAgentService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{ - { - StreamName: "ExecuteTaskSync", - Handler: _AsyncAgentService_ExecuteTaskSync_Handler, - ServerStreams: true, - ClientStreams: true, - }, { StreamName: "GetTaskLogs", Handler: _AsyncAgentService_GetTaskLogs_Handler, diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go index 9a1bbf3037..2256d6f411 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.pb.gw.go @@ -33,7 +33,7 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_AsyncAgentService_ExecuteTaskSync_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AsyncAgentServiceClient, req *http.Request, pathParams map[string]string) (extService.AsyncAgentService_ExecuteTaskSyncClient, runtime.ServerMetadata, error) { +func request_SyncAgentService_ExecuteTaskSync_0(ctx context.Context, marshaler runtime.Marshaler, client extService.SyncAgentServiceClient, req *http.Request, pathParams map[string]string) (extService.SyncAgentService_ExecuteTaskSyncClient, runtime.ServerMetadata, error) { var metadata runtime.ServerMetadata stream, err := client.ExecuteTaskSync(ctx) if err != nil { @@ -575,19 +575,28 @@ func local_request_AgentMetadataService_ListAgents_0(ctx context.Context, marsha } -// RegisterAsyncAgentServiceHandlerServer registers the http handlers for service AsyncAgentService to "mux". -// UnaryRPC :call AsyncAgentServiceServer directly. +// RegisterSyncAgentServiceHandlerServer registers the http handlers for service SyncAgentService to "mux". +// UnaryRPC :call SyncAgentServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAsyncAgentServiceHandlerFromEndpoint instead. -func RegisterAsyncAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extService.AsyncAgentServiceServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSyncAgentServiceHandlerFromEndpoint instead. +func RegisterSyncAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extService.SyncAgentServiceServer) error { - mux.Handle("POST", pattern_AsyncAgentService_ExecuteTaskSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncAgentService_ExecuteTaskSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) + return nil +} + +// RegisterAsyncAgentServiceHandlerServer registers the http handlers for service AsyncAgentService to "mux". +// UnaryRPC :call AsyncAgentServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAsyncAgentServiceHandlerFromEndpoint instead. +func RegisterAsyncAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extService.AsyncAgentServiceServer) error { + mux.Handle("POST", pattern_AsyncAgentService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -757,9 +766,9 @@ func RegisterAgentMetadataServiceHandlerServer(ctx context.Context, mux *runtime return nil } -// RegisterAsyncAgentServiceHandlerFromEndpoint is same as RegisterAsyncAgentServiceHandler but +// RegisterSyncAgentServiceHandlerFromEndpoint is same as RegisterSyncAgentServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAsyncAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterSyncAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -779,44 +788,93 @@ func RegisterAsyncAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runt }() }() - return RegisterAsyncAgentServiceHandler(ctx, mux, conn) + return RegisterSyncAgentServiceHandler(ctx, mux, conn) } -// RegisterAsyncAgentServiceHandler registers the http handlers for service AsyncAgentService to "mux". +// RegisterSyncAgentServiceHandler registers the http handlers for service SyncAgentService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterAsyncAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAsyncAgentServiceHandlerClient(ctx, mux, extService.NewAsyncAgentServiceClient(conn)) +func RegisterSyncAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSyncAgentServiceHandlerClient(ctx, mux, extService.NewSyncAgentServiceClient(conn)) } -// RegisterAsyncAgentServiceHandlerClient registers the http handlers for service AsyncAgentService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extService.AsyncAgentServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extService.AsyncAgentServiceClient" +// RegisterSyncAgentServiceHandlerClient registers the http handlers for service SyncAgentService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extService.SyncAgentServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extService.SyncAgentServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "extService.AsyncAgentServiceClient" to call the correct interceptors. -func RegisterAsyncAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extService.AsyncAgentServiceClient) error { +// "extService.SyncAgentServiceClient" to call the correct interceptors. +func RegisterSyncAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extService.SyncAgentServiceClient) error { - mux.Handle("POST", pattern_AsyncAgentService_ExecuteTaskSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncAgentService_ExecuteTaskSync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.AsyncAgentService/ExecuteTaskSync", runtime.WithHTTPPathPattern("/api/v1/agent/task/stream")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.SyncAgentService/ExecuteTaskSync", runtime.WithHTTPPathPattern("/api/v1/agent/task/stream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AsyncAgentService_ExecuteTaskSync_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncAgentService_ExecuteTaskSync_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AsyncAgentService_ExecuteTaskSync_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_SyncAgentService_ExecuteTaskSync_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) + return nil +} + +var ( + pattern_SyncAgentService_ExecuteTaskSync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "agent", "task", "stream"}, "")) +) + +var ( + forward_SyncAgentService_ExecuteTaskSync_0 = runtime.ForwardResponseStream +) + +// RegisterAsyncAgentServiceHandlerFromEndpoint is same as RegisterAsyncAgentServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAsyncAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAsyncAgentServiceHandler(ctx, mux, conn) +} + +// RegisterAsyncAgentServiceHandler registers the http handlers for service AsyncAgentService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAsyncAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAsyncAgentServiceHandlerClient(ctx, mux, extService.NewAsyncAgentServiceClient(conn)) +} + +// RegisterAsyncAgentServiceHandlerClient registers the http handlers for service AsyncAgentService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extService.AsyncAgentServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extService.AsyncAgentServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "extService.AsyncAgentServiceClient" to call the correct interceptors. +func RegisterAsyncAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extService.AsyncAgentServiceClient) error { + mux.Handle("POST", pattern_AsyncAgentService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -931,8 +989,6 @@ func RegisterAsyncAgentServiceHandlerClient(ctx context.Context, mux *runtime.Se } var ( - pattern_AsyncAgentService_ExecuteTaskSync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "agent", "task", "stream"}, "")) - pattern_AsyncAgentService_CreateTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "agent", "task"}, "")) pattern_AsyncAgentService_GetTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "agent", "task", "task_type.name", "task_type.version", "resource_meta"}, "")) @@ -945,8 +1001,6 @@ var ( ) var ( - forward_AsyncAgentService_ExecuteTaskSync_0 = runtime.ForwardResponseStream - forward_AsyncAgentService_CreateTask_0 = runtime.ForwardResponseMessage forward_AsyncAgentService_GetTask_0 = runtime.ForwardResponseMessage diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json index e5e8fe4277..2499181e7c 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json @@ -5,6 +5,9 @@ "version": "version not set" }, "tags": [ + { + "name": "SyncAgentService" + }, { "name": "AsyncAgentService" }, @@ -211,7 +214,7 @@ "/api/v1/agent/task/stream": { "post": { "summary": "ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back.", - "operationId": "AsyncAgentService_ExecuteTaskSync", + "operationId": "SyncAgentService_ExecuteTaskSync", "responses": { "200": { "description": "A successful response.(streaming responses)", @@ -247,7 +250,7 @@ } ], "tags": [ - "AsyncAgentService" + "SyncAgentService" ] } }, @@ -574,6 +577,10 @@ "$ref": "#/definitions/adminTaskType" }, "description": "SupportedTaskTypes are the types of the tasks that the agent can handle." + }, + "is_sync": { + "type": "boolean", + "description": "IsSync indicates whether this agent is a sync agent. Sync agents are expected to return their\nresults synchronously when called by propeller. Given that sync agents can affect the performance\nof the system, it's important to enforce strict timeout policies.\nAn Async agent, on the other hand, is required to be able to identify jobs by an\nidentifier and query for job statuses as jobs progress." } }, "description": "A message containing the agent metadata." diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index ada9a7638f..8166820ec3 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -9613,6 +9613,9 @@ export namespace flyteidl { /** Agent supportedTaskTypes */ supportedTaskTypes?: (flyteidl.admin.ITaskType[]|null); + + /** Agent isSync */ + isSync?: (boolean|null); } /** Represents an Agent. */ @@ -9630,6 +9633,9 @@ export namespace flyteidl { /** Agent supportedTaskTypes. */ public supportedTaskTypes: flyteidl.admin.ITaskType[]; + /** Agent isSync. */ + public isSync: boolean; + /** * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set @@ -21827,11 +21833,11 @@ export namespace flyteidl { type GetExecutionMetricsCallback = (error: (Error|null), response?: flyteidl.admin.WorkflowExecutionGetMetricsResponse) => void; } - /** Represents an AsyncAgentService */ - class AsyncAgentService extends $protobuf.rpc.Service { + /** Represents a SyncAgentService */ + class SyncAgentService extends $protobuf.rpc.Service { /** - * Constructs a new AsyncAgentService service. + * Constructs a new SyncAgentService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -21839,20 +21845,20 @@ export namespace flyteidl { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new AsyncAgentService service using the specified rpc implementation. + * Creates new SyncAgentService service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AsyncAgentService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SyncAgentService; /** * Calls ExecuteTaskSync. * @param request ExecuteTaskSyncRequest message or plain object * @param callback Node-style callback called with the error, if any, and ExecuteTaskSyncResponse */ - public executeTaskSync(request: flyteidl.admin.IExecuteTaskSyncRequest, callback: flyteidl.service.AsyncAgentService.ExecuteTaskSyncCallback): void; + public executeTaskSync(request: flyteidl.admin.IExecuteTaskSyncRequest, callback: flyteidl.service.SyncAgentService.ExecuteTaskSyncCallback): void; /** * Calls ExecuteTaskSync. @@ -21860,6 +21866,37 @@ export namespace flyteidl { * @returns Promise */ public executeTaskSync(request: flyteidl.admin.IExecuteTaskSyncRequest): Promise; + } + + namespace SyncAgentService { + + /** + * Callback as used by {@link flyteidl.service.SyncAgentService#executeTaskSync}. + * @param error Error, if any + * @param [response] ExecuteTaskSyncResponse + */ + type ExecuteTaskSyncCallback = (error: (Error|null), response?: flyteidl.admin.ExecuteTaskSyncResponse) => void; + } + + /** Represents an AsyncAgentService */ + class AsyncAgentService extends $protobuf.rpc.Service { + + /** + * Constructs a new AsyncAgentService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AsyncAgentService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AsyncAgentService; /** * Calls CreateTask. @@ -21934,13 +21971,6 @@ export namespace flyteidl { namespace AsyncAgentService { - /** - * Callback as used by {@link flyteidl.service.AsyncAgentService#executeTaskSync}. - * @param error Error, if any - * @param [response] ExecuteTaskSyncResponse - */ - type ExecuteTaskSyncCallback = (error: (Error|null), response?: flyteidl.admin.ExecuteTaskSyncResponse) => void; - /** * Callback as used by {@link flyteidl.service.AsyncAgentService#createTask}. * @param error Error, if any diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 96bfeee8be..4ef642bbd6 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -23537,6 +23537,7 @@ * @interface IAgent * @property {string|null} [name] Agent name * @property {Array.|null} [supportedTaskTypes] Agent supportedTaskTypes + * @property {boolean|null} [isSync] Agent isSync */ /** @@ -23571,6 +23572,14 @@ */ Agent.prototype.supportedTaskTypes = $util.emptyArray; + /** + * Agent isSync. + * @member {boolean} isSync + * @memberof flyteidl.admin.Agent + * @instance + */ + Agent.prototype.isSync = false; + /** * Creates a new Agent instance using the specified properties. * @function create @@ -23600,6 +23609,8 @@ if (message.supportedTaskTypes != null && message.supportedTaskTypes.length) for (var i = 0; i < message.supportedTaskTypes.length; ++i) $root.flyteidl.admin.TaskType.encode(message.supportedTaskTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.isSync != null && message.hasOwnProperty("isSync")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isSync); return writer; }; @@ -23629,6 +23640,9 @@ message.supportedTaskTypes = []; message.supportedTaskTypes.push($root.flyteidl.admin.TaskType.decode(reader, reader.uint32())); break; + case 3: + message.isSync = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -23660,6 +23674,9 @@ return "supportedTaskTypes." + error; } } + if (message.isSync != null && message.hasOwnProperty("isSync")) + if (typeof message.isSync !== "boolean") + return "isSync: boolean expected"; return null; }; @@ -51348,41 +51365,41 @@ return AdminService; })(); - service.AsyncAgentService = (function() { + service.SyncAgentService = (function() { /** - * Constructs a new AsyncAgentService service. + * Constructs a new SyncAgentService service. * @memberof flyteidl.service - * @classdesc Represents an AsyncAgentService + * @classdesc Represents a SyncAgentService * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function AsyncAgentService(rpcImpl, requestDelimited, responseDelimited) { + function SyncAgentService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (AsyncAgentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AsyncAgentService; + (SyncAgentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SyncAgentService; /** - * Creates new AsyncAgentService service using the specified rpc implementation. + * Creates new SyncAgentService service using the specified rpc implementation. * @function create - * @memberof flyteidl.service.AsyncAgentService + * @memberof flyteidl.service.SyncAgentService * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AsyncAgentService} RPC service. Useful where requests and/or responses are streamed. + * @returns {SyncAgentService} RPC service. Useful where requests and/or responses are streamed. */ - AsyncAgentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + SyncAgentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link flyteidl.service.AsyncAgentService#executeTaskSync}. - * @memberof flyteidl.service.AsyncAgentService + * Callback as used by {@link flyteidl.service.SyncAgentService#executeTaskSync}. + * @memberof flyteidl.service.SyncAgentService * @typedef ExecuteTaskSyncCallback * @type {function} * @param {Error|null} error Error, if any @@ -51392,27 +51409,62 @@ /** * Calls ExecuteTaskSync. * @function executeTaskSync - * @memberof flyteidl.service.AsyncAgentService + * @memberof flyteidl.service.SyncAgentService * @instance * @param {flyteidl.admin.IExecuteTaskSyncRequest} request ExecuteTaskSyncRequest message or plain object - * @param {flyteidl.service.AsyncAgentService.ExecuteTaskSyncCallback} callback Node-style callback called with the error, if any, and ExecuteTaskSyncResponse + * @param {flyteidl.service.SyncAgentService.ExecuteTaskSyncCallback} callback Node-style callback called with the error, if any, and ExecuteTaskSyncResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(AsyncAgentService.prototype.executeTaskSync = function executeTaskSync(request, callback) { + Object.defineProperty(SyncAgentService.prototype.executeTaskSync = function executeTaskSync(request, callback) { return this.rpcCall(executeTaskSync, $root.flyteidl.admin.ExecuteTaskSyncRequest, $root.flyteidl.admin.ExecuteTaskSyncResponse, request, callback); }, "name", { value: "ExecuteTaskSync" }); /** * Calls ExecuteTaskSync. * @function executeTaskSync - * @memberof flyteidl.service.AsyncAgentService + * @memberof flyteidl.service.SyncAgentService * @instance * @param {flyteidl.admin.IExecuteTaskSyncRequest} request ExecuteTaskSyncRequest message or plain object * @returns {Promise} Promise * @variation 2 */ + return SyncAgentService; + })(); + + service.AsyncAgentService = (function() { + + /** + * Constructs a new AsyncAgentService service. + * @memberof flyteidl.service + * @classdesc Represents an AsyncAgentService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function AsyncAgentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AsyncAgentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AsyncAgentService; + + /** + * Creates new AsyncAgentService service using the specified rpc implementation. + * @function create + * @memberof flyteidl.service.AsyncAgentService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AsyncAgentService} RPC service. Useful where requests and/or responses are streamed. + */ + AsyncAgentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** * Callback as used by {@link flyteidl.service.AsyncAgentService#createTask}. * @memberof flyteidl.service.AsyncAgentService diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py index b6edf9069e..0946b6af93 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py @@ -21,7 +21,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1c\x66lyteidl/core/workflow.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x12!\n\x0cmax_attempts\x18\x07 \x01(\x05R\x0bmaxAttempts\x12$\n\rinterruptible\x18\x08 \x01(\x08R\rinterruptible\x12\x46\n\x1finterruptible_failure_threshold\x18\t \x01(\x05R\x1dinterruptibleFailureThreshold\x12>\n\toverrides\x18\n \x01(\x0b\x32 .flyteidl.core.TaskNodeOverridesR\toverrides\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"9\n\x12\x43reateTaskResponse\x12#\n\rresource_meta\x18\x01 \x01(\x0cR\x0cresourceMeta\"\x87\x02\n\x13\x43reateRequestHeader\x12\x37\n\x08template\x18\x01 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x02 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x03 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\x12\x33\n\x16max_dataset_size_bytes\x18\x04 \x01(\x03R\x13maxDatasetSizeBytes\"\x94\x01\n\x16\x45xecuteTaskSyncRequest\x12=\n\x06header\x18\x01 \x01(\x0b\x32#.flyteidl.admin.CreateRequestHeaderH\x00R\x06header\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x06inputsB\x06\n\x04part\"U\n\x1d\x45xecuteTaskSyncResponseHeader\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\"\xa0\x01\n\x17\x45xecuteTaskSyncResponse\x12G\n\x06header\x18\x01 \x01(\x0b\x32-.flyteidl.admin.ExecuteTaskSyncResponseHeaderH\x00R\x06header\x12\x35\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x07outputsB\x05\n\x03res\"l\n\x0eGetTaskRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"|\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\x12\x33\n\tlog_links\x18\x02 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"\xf9\x01\n\x08Resource\x12/\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateB\x02\x18\x01R\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x33\n\tlog_links\x18\x04 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\x12\x38\n\x05phase\x18\x05 \x01(\x0e\x32\".flyteidl.core.TaskExecution.PhaseR\x05phase\"o\n\x11\x44\x65leteTaskRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse\"g\n\x05\x41gent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12J\n\x14supported_task_types\x18\x02 \x03(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x12supportedTaskTypes\"8\n\x08TaskType\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\x05R\x07version\"%\n\x0fGetAgentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"?\n\x10GetAgentResponse\x12+\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x15.flyteidl.admin.AgentR\x05\x61gent\"\x13\n\x11ListAgentsRequest\"C\n\x12ListAgentsResponse\x12-\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x15.flyteidl.admin.AgentR\x06\x61gents\"\xae\x02\n\x15GetTaskMetricsRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x18\n\x07queries\x18\x03 \x03(\tR\x07queries\x12\x39\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12-\n\x04step\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x04step\"X\n\x16GetTaskMetricsResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32$.flyteidl.core.ExecutionMetricResultR\x07results\"\x9c\x01\n\x12GetTaskLogsRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x14\n\x05lines\x18\x03 \x01(\x04R\x05lines\x12\x14\n\x05token\x18\x04 \x01(\tR\x05token\"1\n\x19GetTaskLogsResponseHeader\x12\x14\n\x05token\x18\x01 \x01(\tR\x05token\"3\n\x17GetTaskLogsResponseBody\x12\x18\n\x07results\x18\x01 \x03(\tR\x07results\"\xa1\x01\n\x13GetTaskLogsResponse\x12\x43\n\x06header\x18\x01 \x01(\x0b\x32).flyteidl.admin.GetTaskLogsResponseHeaderH\x00R\x06header\x12=\n\x04\x62ody\x18\x02 \x01(\x0b\x32\'.flyteidl.admin.GetTaskLogsResponseBodyH\x00R\x04\x62odyB\x06\n\x04part*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1c\x66lyteidl/core/workflow.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x12!\n\x0cmax_attempts\x18\x07 \x01(\x05R\x0bmaxAttempts\x12$\n\rinterruptible\x18\x08 \x01(\x08R\rinterruptible\x12\x46\n\x1finterruptible_failure_threshold\x18\t \x01(\x05R\x1dinterruptibleFailureThreshold\x12>\n\toverrides\x18\n \x01(\x0b\x32 .flyteidl.core.TaskNodeOverridesR\toverrides\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"9\n\x12\x43reateTaskResponse\x12#\n\rresource_meta\x18\x01 \x01(\x0cR\x0cresourceMeta\"\x87\x02\n\x13\x43reateRequestHeader\x12\x37\n\x08template\x18\x01 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x02 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x03 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\x12\x33\n\x16max_dataset_size_bytes\x18\x04 \x01(\x03R\x13maxDatasetSizeBytes\"\x94\x01\n\x16\x45xecuteTaskSyncRequest\x12=\n\x06header\x18\x01 \x01(\x0b\x32#.flyteidl.admin.CreateRequestHeaderH\x00R\x06header\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x06inputsB\x06\n\x04part\"U\n\x1d\x45xecuteTaskSyncResponseHeader\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\"\xa0\x01\n\x17\x45xecuteTaskSyncResponse\x12G\n\x06header\x18\x01 \x01(\x0b\x32-.flyteidl.admin.ExecuteTaskSyncResponseHeaderH\x00R\x06header\x12\x35\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x07outputsB\x05\n\x03res\"l\n\x0eGetTaskRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"|\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\x12\x33\n\tlog_links\x18\x02 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"\xf9\x01\n\x08Resource\x12/\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateB\x02\x18\x01R\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x33\n\tlog_links\x18\x04 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\x12\x38\n\x05phase\x18\x05 \x01(\x0e\x32\".flyteidl.core.TaskExecution.PhaseR\x05phase\"o\n\x11\x44\x65leteTaskRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse\"\x80\x01\n\x05\x41gent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12J\n\x14supported_task_types\x18\x02 \x03(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x12supportedTaskTypes\x12\x17\n\x07is_sync\x18\x03 \x01(\x08R\x06isSync\"8\n\x08TaskType\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\x05R\x07version\"%\n\x0fGetAgentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"?\n\x10GetAgentResponse\x12+\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x15.flyteidl.admin.AgentR\x05\x61gent\"\x13\n\x11ListAgentsRequest\"C\n\x12ListAgentsResponse\x12-\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x15.flyteidl.admin.AgentR\x06\x61gents\"\xae\x02\n\x15GetTaskMetricsRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x18\n\x07queries\x18\x03 \x03(\tR\x07queries\x12\x39\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12-\n\x04step\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x04step\"X\n\x16GetTaskMetricsResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32$.flyteidl.core.ExecutionMetricResultR\x07results\"\x9c\x01\n\x12GetTaskLogsRequest\x12\x35\n\ttask_type\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.TaskTypeR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x14\n\x05lines\x18\x03 \x01(\x04R\x05lines\x12\x14\n\x05token\x18\x04 \x01(\tR\x05token\"1\n\x19GetTaskLogsResponseHeader\x12\x14\n\x05token\x18\x01 \x01(\tR\x05token\"3\n\x17GetTaskLogsResponseBody\x12\x18\n\x07results\x18\x01 \x03(\tR\x07results\"\xa1\x01\n\x13GetTaskLogsResponse\x12\x43\n\x06header\x18\x01 \x01(\x0b\x32).flyteidl.admin.GetTaskLogsResponseHeaderH\x00R\x06header\x12=\n\x04\x62ody\x18\x02 \x01(\x0b\x32\'.flyteidl.admin.GetTaskLogsResponseBodyH\x00R\x04\x62odyB\x06\n\x04part*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -38,8 +38,8 @@ _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._serialized_options = b'8\001' _RESOURCE.fields_by_name['state']._options = None _RESOURCE.fields_by_name['state']._serialized_options = b'\030\001' - _globals['_STATE']._serialized_start=3956 - _globals['_STATE']._serialized_end=4050 + _globals['_STATE']._serialized_start=3982 + _globals['_STATE']._serialized_end=4076 _globals['_TASKEXECUTIONMETADATA']._serialized_start=291 _globals['_TASKEXECUTIONMETADATA']._serialized_end=1164 _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_start=970 @@ -70,28 +70,28 @@ _globals['_DELETETASKREQUEST']._serialized_end=2753 _globals['_DELETETASKRESPONSE']._serialized_start=2755 _globals['_DELETETASKRESPONSE']._serialized_end=2775 - _globals['_AGENT']._serialized_start=2777 - _globals['_AGENT']._serialized_end=2880 - _globals['_TASKTYPE']._serialized_start=2882 - _globals['_TASKTYPE']._serialized_end=2938 - _globals['_GETAGENTREQUEST']._serialized_start=2940 - _globals['_GETAGENTREQUEST']._serialized_end=2977 - _globals['_GETAGENTRESPONSE']._serialized_start=2979 - _globals['_GETAGENTRESPONSE']._serialized_end=3042 - _globals['_LISTAGENTSREQUEST']._serialized_start=3044 - _globals['_LISTAGENTSREQUEST']._serialized_end=3063 - _globals['_LISTAGENTSRESPONSE']._serialized_start=3065 - _globals['_LISTAGENTSRESPONSE']._serialized_end=3132 - _globals['_GETTASKMETRICSREQUEST']._serialized_start=3135 - _globals['_GETTASKMETRICSREQUEST']._serialized_end=3437 - _globals['_GETTASKMETRICSRESPONSE']._serialized_start=3439 - _globals['_GETTASKMETRICSRESPONSE']._serialized_end=3527 - _globals['_GETTASKLOGSREQUEST']._serialized_start=3530 - _globals['_GETTASKLOGSREQUEST']._serialized_end=3686 - _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_start=3688 - _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_end=3737 - _globals['_GETTASKLOGSRESPONSEBODY']._serialized_start=3739 - _globals['_GETTASKLOGSRESPONSEBODY']._serialized_end=3790 - _globals['_GETTASKLOGSRESPONSE']._serialized_start=3793 - _globals['_GETTASKLOGSRESPONSE']._serialized_end=3954 + _globals['_AGENT']._serialized_start=2778 + _globals['_AGENT']._serialized_end=2906 + _globals['_TASKTYPE']._serialized_start=2908 + _globals['_TASKTYPE']._serialized_end=2964 + _globals['_GETAGENTREQUEST']._serialized_start=2966 + _globals['_GETAGENTREQUEST']._serialized_end=3003 + _globals['_GETAGENTRESPONSE']._serialized_start=3005 + _globals['_GETAGENTRESPONSE']._serialized_end=3068 + _globals['_LISTAGENTSREQUEST']._serialized_start=3070 + _globals['_LISTAGENTSREQUEST']._serialized_end=3089 + _globals['_LISTAGENTSRESPONSE']._serialized_start=3091 + _globals['_LISTAGENTSRESPONSE']._serialized_end=3158 + _globals['_GETTASKMETRICSREQUEST']._serialized_start=3161 + _globals['_GETTASKMETRICSREQUEST']._serialized_end=3463 + _globals['_GETTASKMETRICSRESPONSE']._serialized_start=3465 + _globals['_GETTASKMETRICSRESPONSE']._serialized_end=3553 + _globals['_GETTASKLOGSREQUEST']._serialized_start=3556 + _globals['_GETTASKLOGSREQUEST']._serialized_end=3712 + _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_start=3714 + _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_end=3763 + _globals['_GETTASKLOGSRESPONSEBODY']._serialized_start=3765 + _globals['_GETTASKLOGSRESPONSEBODY']._serialized_end=3816 + _globals['_GETTASKLOGSRESPONSE']._serialized_start=3819 + _globals['_GETTASKLOGSRESPONSE']._serialized_end=3980 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi index b6f5504e97..230de87c79 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi @@ -167,12 +167,14 @@ class DeleteTaskResponse(_message.Message): def __init__(self) -> None: ... class Agent(_message.Message): - __slots__ = ["name", "supported_task_types"] + __slots__ = ["name", "supported_task_types", "is_sync"] NAME_FIELD_NUMBER: _ClassVar[int] SUPPORTED_TASK_TYPES_FIELD_NUMBER: _ClassVar[int] + IS_SYNC_FIELD_NUMBER: _ClassVar[int] name: str supported_task_types: _containers.RepeatedCompositeFieldContainer[TaskType] - def __init__(self, name: _Optional[str] = ..., supported_task_types: _Optional[_Iterable[_Union[TaskType, _Mapping]]] = ...) -> None: ... + is_sync: bool + def __init__(self, name: _Optional[str] = ..., supported_task_types: _Optional[_Iterable[_Union[TaskType, _Mapping]]] = ..., is_sync: bool = ...) -> None: ... class TaskType(_message.Message): __slots__ = ["name", "version"] diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py index 6c1f0000d4..eca6cb8da8 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py @@ -15,7 +15,7 @@ from flyteidl.admin import agent_pb2 as flyteidl_dot_admin_dot_agent__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/agent.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1a\x66lyteidl/admin/agent.proto2\xd2\x07\n\x11\x41syncAgentService\x12\x8c\x01\n\x0f\x45xecuteTaskSync\x12&.flyteidl.admin.ExecuteTaskSyncRequest\x1a\'.flyteidl.admin.ExecuteTaskSyncResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/api/v1/agent/task/stream(\x01\x30\x01\x12r\n\nCreateTask\x12!.flyteidl.admin.CreateTaskRequest\x1a\".flyteidl.admin.CreateTaskResponse\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v1/agent/task\x12\x9b\x01\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"O\x82\xd3\xe4\x93\x02I\x12G/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}\x12\xaf\x01\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"Z\x82\xd3\xe4\x93\x02T*R/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}\x12\xb8\x01\n\x0eGetTaskMetrics\x12%.flyteidl.admin.GetTaskMetricsRequest\x1a&.flyteidl.admin.GetTaskMetricsResponse\"W\x82\xd3\xe4\x93\x02Q\x12O/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}\x12\xae\x01\n\x0bGetTaskLogs\x12\".flyteidl.admin.GetTaskLogsRequest\x1a#.flyteidl.admin.GetTaskLogsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}0\x01\x32\xf0\x01\n\x14\x41gentMetadataService\x12k\n\x08GetAgent\x12\x1f.flyteidl.admin.GetAgentRequest\x1a .flyteidl.admin.GetAgentResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/api/v1/agent/{name}\x12k\n\nListAgents\x12!.flyteidl.admin.ListAgentsRequest\x1a\".flyteidl.admin.ListAgentsResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/api/v1/agentsB\xc2\x01\n\x14\x63om.flyteidl.serviceB\nAgentProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/agent.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1a\x66lyteidl/admin/agent.proto2\xa1\x01\n\x10SyncAgentService\x12\x8c\x01\n\x0f\x45xecuteTaskSync\x12&.flyteidl.admin.ExecuteTaskSyncRequest\x1a\'.flyteidl.admin.ExecuteTaskSyncResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/api/v1/agent/task/stream(\x01\x30\x01\x32\xc3\x06\n\x11\x41syncAgentService\x12r\n\nCreateTask\x12!.flyteidl.admin.CreateTaskRequest\x1a\".flyteidl.admin.CreateTaskResponse\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v1/agent/task\x12\x9b\x01\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"O\x82\xd3\xe4\x93\x02I\x12G/api/v1/agent/task/{task_type.name}/{task_type.version}/{resource_meta}\x12\xaf\x01\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"Z\x82\xd3\xe4\x93\x02T*R/api/v1/agent/task_executions/{task_type.name}/{task_type.version}/{resource_meta}\x12\xb8\x01\n\x0eGetTaskMetrics\x12%.flyteidl.admin.GetTaskMetricsRequest\x1a&.flyteidl.admin.GetTaskMetricsResponse\"W\x82\xd3\xe4\x93\x02Q\x12O/api/v1/agent/task/metrics/{task_type.name}/{task_type.version}/{resource_meta}\x12\xae\x01\n\x0bGetTaskLogs\x12\".flyteidl.admin.GetTaskLogsRequest\x1a#.flyteidl.admin.GetTaskLogsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/api/v1/agent/task/logs/{task_type.name}/{task_type.version}/{resource_meta}0\x01\x32\xf0\x01\n\x14\x41gentMetadataService\x12k\n\x08GetAgent\x12\x1f.flyteidl.admin.GetAgentRequest\x1a .flyteidl.admin.GetAgentResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/api/v1/agent/{name}\x12k\n\nListAgents\x12!.flyteidl.admin.ListAgentsRequest\x1a\".flyteidl.admin.ListAgentsResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/api/v1/agentsB\xc2\x01\n\x14\x63om.flyteidl.serviceB\nAgentProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,8 +24,8 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.serviceB\nAgentProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\242\002\003FSX\252\002\020Flyteidl.Service\312\002\020Flyteidl\\Service\342\002\034Flyteidl\\Service\\GPBMetadata\352\002\021Flyteidl::Service' - _ASYNCAGENTSERVICE.methods_by_name['ExecuteTaskSync']._options = None - _ASYNCAGENTSERVICE.methods_by_name['ExecuteTaskSync']._serialized_options = b'\202\323\344\223\002\036:\001*\"\031/api/v1/agent/task/stream' + _SYNCAGENTSERVICE.methods_by_name['ExecuteTaskSync']._options = None + _SYNCAGENTSERVICE.methods_by_name['ExecuteTaskSync']._serialized_options = b'\202\323\344\223\002\036:\001*\"\031/api/v1/agent/task/stream' _ASYNCAGENTSERVICE.methods_by_name['CreateTask']._options = None _ASYNCAGENTSERVICE.methods_by_name['CreateTask']._serialized_options = b'\202\323\344\223\002\027:\001*\"\022/api/v1/agent/task' _ASYNCAGENTSERVICE.methods_by_name['GetTask']._options = None @@ -40,8 +40,10 @@ _AGENTMETADATASERVICE.methods_by_name['GetAgent']._serialized_options = b'\202\323\344\223\002\026\022\024/api/v1/agent/{name}' _AGENTMETADATASERVICE.methods_by_name['ListAgents']._options = None _AGENTMETADATASERVICE.methods_by_name['ListAgents']._serialized_options = b'\202\323\344\223\002\020\022\016/api/v1/agents' - _globals['_ASYNCAGENTSERVICE']._serialized_start=109 - _globals['_ASYNCAGENTSERVICE']._serialized_end=1087 - _globals['_AGENTMETADATASERVICE']._serialized_start=1090 - _globals['_AGENTMETADATASERVICE']._serialized_end=1330 + _globals['_SYNCAGENTSERVICE']._serialized_start=109 + _globals['_SYNCAGENTSERVICE']._serialized_end=270 + _globals['_ASYNCAGENTSERVICE']._serialized_start=273 + _globals['_ASYNCAGENTSERVICE']._serialized_end=1108 + _globals['_AGENTMETADATASERVICE']._serialized_start=1111 + _globals['_AGENTMETADATASERVICE']._serialized_end=1351 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py index 8257a90ff8..6c3d46998f 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py @@ -5,8 +5,8 @@ from flyteidl.admin import agent_pb2 as flyteidl_dot_admin_dot_agent__pb2 -class AsyncAgentServiceStub(object): - """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. +class SyncAgentServiceStub(object): + """AgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. """ def __init__(self, channel): @@ -16,10 +16,70 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.ExecuteTaskSync = channel.stream_stream( - '/flyteidl.service.AsyncAgentService/ExecuteTaskSync', + '/flyteidl.service.SyncAgentService/ExecuteTaskSync', request_serializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.SerializeToString, response_deserializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.FromString, ) + + +class SyncAgentServiceServicer(object): + """AgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. + """ + + def ExecuteTaskSync(self, request_iterator, context): + """ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SyncAgentServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ExecuteTaskSync': grpc.stream_stream_rpc_method_handler( + servicer.ExecuteTaskSync, + request_deserializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.FromString, + response_serializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'flyteidl.service.SyncAgentService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class SyncAgentService(object): + """AgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. + """ + + @staticmethod + def ExecuteTaskSync(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/flyteidl.service.SyncAgentService/ExecuteTaskSync', + flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.SerializeToString, + flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class AsyncAgentServiceStub(object): + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ self.CreateTask = channel.unary_unary( '/flyteidl.service.AsyncAgentService/CreateTask', request_serializer=flyteidl_dot_admin_dot_agent__pb2.CreateTaskRequest.SerializeToString, @@ -48,16 +108,9 @@ def __init__(self, channel): class AsyncAgentServiceServicer(object): - """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. """ - def ExecuteTaskSync(self, request_iterator, context): - """ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def CreateTask(self, request, context): """CreateTask sends a task create request to the agent service. """ @@ -100,11 +153,6 @@ def GetTaskLogs(self, request, context): def add_AsyncAgentServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'ExecuteTaskSync': grpc.stream_stream_rpc_method_handler( - servicer.ExecuteTaskSync, - request_deserializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.FromString, - response_serializer=flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.SerializeToString, - ), 'CreateTask': grpc.unary_unary_rpc_method_handler( servicer.CreateTask, request_deserializer=flyteidl_dot_admin_dot_agent__pb2.CreateTaskRequest.FromString, @@ -138,26 +186,9 @@ def add_AsyncAgentServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. class AsyncAgentService(object): - """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. """ - @staticmethod - def ExecuteTaskSync(request_iterator, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/flyteidl.service.AsyncAgentService/ExecuteTaskSync', - flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncRequest.SerializeToString, - flyteidl_dot_admin_dot_agent__pb2.ExecuteTaskSyncResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod def CreateTask(request, target, diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index 90725a5339..7be2118618 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -186,6 +186,13 @@ pub struct Agent { /// SupportedTaskTypes are the types of the tasks that the agent can handle. #[prost(message, repeated, tag="2")] pub supported_task_types: ::prost::alloc::vec::Vec, + /// IsSync indicates whether this agent is a sync agent. Sync agents are expected to return their + /// results synchronously when called by propeller. Given that sync agents can affect the performance + /// of the system, it's important to enforce strict timeout policies. + /// An Async agent, on the other hand, is required to be able to identify jobs by an + /// identifier and query for job statuses as jobs progress. + #[prost(bool, tag="3")] + pub is_sync: bool, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/flyteidl/protos/flyteidl/service/agent.proto b/flyteidl/protos/flyteidl/service/agent.proto index 0545fae932..e1300bd08a 100644 --- a/flyteidl/protos/flyteidl/service/agent.proto +++ b/flyteidl/protos/flyteidl/service/agent.proto @@ -6,8 +6,8 @@ option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/servi import "google/api/annotations.proto"; import "flyteidl/admin/agent.proto"; -// AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. -service AsyncAgentService { +// AgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. +service SyncAgentService { // ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. rpc ExecuteTaskSync (stream flyteidl.admin.ExecuteTaskSyncRequest) returns (stream flyteidl.admin.ExecuteTaskSyncResponse){ option (google.api.http) = { @@ -15,7 +15,10 @@ service AsyncAgentService { body: "*" }; }; +} +// AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. +service AsyncAgentService { // CreateTask sends a task create request to the agent service. rpc CreateTask (flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){ option (google.api.http) = { diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/client.go b/flyteplugins/go/tasks/plugins/webapi/agent/client.go index b118f64596..283686e71f 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/client.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/client.go @@ -19,9 +19,11 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) +const defaultTaskTypeVersion = 0 + // ClientSet contains the clients exposed to communicate with various agent services. type ClientSet struct { - agentClients map[string]service.AsyncAgentServiceClient // map[endpoint] => client + asyncAgentClients map[string]service.AsyncAgentServiceClient // map[endpoint] => client agentMetadataClients map[string]service.AgentMetadataServiceClient // map[endpoint] => client } @@ -84,14 +86,14 @@ func getFinalContext(ctx context.Context, operation string, agent *Agent) (conte return context.WithTimeout(ctx, timeout) } -func initializeAgentRegistry(cs *ClientSet) (map[string]*Agent, error) { - agentRegistry := make(map[string]*Agent) +func initializeAgentRegistry(cs *ClientSet) (map[string]map[int32]*Agent, error) { + agentRegistry := make(map[string]map[int32]*Agent) cfg := GetConfig() var agentDeployments []*Agent // Ensure that the old configuration is backward compatible for taskType, agentID := range cfg.AgentForTaskTypes { - agentRegistry[taskType] = cfg.Agents[agentID] + agentRegistry[taskType] = map[int32]*Agent{0: cfg.Agents[agentID]} } if len(cfg.DefaultAgent.Endpoint) != 0 { @@ -124,7 +126,7 @@ func initializeAgentRegistry(cs *ClientSet) (map[string]*Agent, error) { for _, agent := range agents { supportedTaskTypes := agent.SupportedTaskTypes for _, supportedTaskType := range supportedTaskTypes { - agentRegistry[supportedTaskType] = agentDeployment + agentRegistry[supportedTaskType.GetName()] = map[int32]*Agent{supportedTaskType.Version: agentDeployment} } } } @@ -153,7 +155,7 @@ func initializeClients(ctx context.Context) (*ClientSet, error) { } return &ClientSet{ - agentClients: agentClients, + asyncAgentClients: agentClients, agentMetadataClients: agentMetadataClients, }, nil } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/config.go b/flyteplugins/go/tasks/plugins/webapi/agent/config.go index cb0bd3089f..252ad77de9 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/config.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/config.go @@ -88,6 +88,13 @@ type Agent struct { // DefaultTimeout gives the default RPC timeout if a more specific one is not defined in Timeouts; if neither DefaultTimeout nor Timeouts is defined for an operation, RPC timeout will not be enforced DefaultTimeout config.Duration `json:"defaultTimeout"` + + // IsSync indicates whether this agent is a sync agent. Sync agents are expected to return their + // results synchronously when called by propeller. Given that sync agents can affect the performance + // of the system, it's important to enforce strict timeout policies. + // An Async agent, on the other hand, is required to be able to identify jobs by an + // identifier and query for job statuses as jobs progress. + IsSync bool `json:"isSync"` } func GetConfig() *Config { diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go index fe3b45b881..8876a79554 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go @@ -13,6 +13,7 @@ import ( "k8s.io/apimachinery/pkg/util/rand" "k8s.io/utils/strings/slices" + agentMocks "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" flyteIdlCore "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -24,7 +25,6 @@ import ( pluginCoreMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core/mocks" ioMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io/mocks" "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi" - agentMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/webapi/agent/mocks" "github.com/flyteorg/flyte/flyteplugins/tests" "github.com/flyteorg/flyte/flytestdlib/contextutils" "github.com/flyteorg/flyte/flytestdlib/promutils" @@ -92,7 +92,7 @@ func TestEndToEnd(t *testing.T) { metricScope: iCtx.MetricsScope(), cfg: GetConfig(), cs: &ClientSet{ - agentClients: map[string]service.AsyncAgentServiceClient{}, + asyncAgentClients: map[string]service.AsyncAgentServiceClient{}, agentMetadataClients: map[string]service.AgentMetadataServiceClient{}, }, }, nil @@ -226,24 +226,22 @@ func getTaskContext(t *testing.T) *pluginCoreMocks.TaskExecutionContext { func newMockAgentPlugin() webapi.PluginEntry { - agentClient := new(agentMocks.AsyncAgentServiceClient) + asyncAgentClient := new(agentMocks.AsyncAgentServiceClient) mockCreateRequestMatcher := mock.MatchedBy(func(request *admin.CreateTaskRequest) bool { expectedArgs := []string{"pyflyte-fast-execute", "--output-prefix", "/tmp/123"} return slices.Equal(request.Template.GetContainer().Args, expectedArgs) }) - agentClient.On("CreateTask", mock.Anything, mockCreateRequestMatcher).Return(&admin.CreateTaskResponse{ - Res: &admin.CreateTaskResponse_ResourceMeta{ - ResourceMeta: []byte{1, 2, 3, 4}, - }}, nil) + asyncAgentClient.On("CreateTask", mock.Anything, mockCreateRequestMatcher).Return(&admin.CreateTaskResponse{ + ResourceMeta: []byte{1, 2, 3, 4}}, nil) mockGetRequestMatcher := mock.MatchedBy(func(request *admin.GetTaskRequest) bool { - return request.GetTaskType() == "spark" + return request.GetTaskType().GetName() == "spark" }) - agentClient.On("GetTask", mock.Anything, mockGetRequestMatcher).Return( + asyncAgentClient.On("GetTask", mock.Anything, mockGetRequestMatcher).Return( &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED}}, nil) - agentClient.On("DeleteTask", mock.Anything, mock.Anything).Return( + asyncAgentClient.On("DeleteTask", mock.Anything, mock.Anything).Return( &admin.DeleteTaskResponse{}, nil) cfg := defaultConfig @@ -257,8 +255,8 @@ func newMockAgentPlugin() webapi.PluginEntry { metricScope: iCtx.MetricsScope(), cfg: &cfg, cs: &ClientSet{ - agentClients: map[string]service.AsyncAgentServiceClient{ - "localhost:8000": agentClient, + asyncAgentClients: map[string]service.AsyncAgentServiceClient{ + defaultAgentEndpoint: asyncAgentClient, }, }, }, nil diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go b/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go deleted file mode 100644 index d7f40932b7..0000000000 --- a/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by mockery v1.0.1. DO NOT EDIT. - -package mocks - -import ( - context "context" - - admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - - grpc "google.golang.org/grpc" - - mock "github.com/stretchr/testify/mock" -) - -// AgentMetadataServiceClient is an autogenerated mock type for the AgentMetadataServiceClient type -type AgentMetadataServiceClient struct { - mock.Mock -} - -type AgentMetadataServiceClient_GetAgent struct { - *mock.Call -} - -func (_m AgentMetadataServiceClient_GetAgent) Return(_a0 *admin.GetAgentResponse, _a1 error) *AgentMetadataServiceClient_GetAgent { - return &AgentMetadataServiceClient_GetAgent{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AgentMetadataServiceClient) OnGetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) *AgentMetadataServiceClient_GetAgent { - c_call := _m.On("GetAgent", ctx, in, opts) - return &AgentMetadataServiceClient_GetAgent{Call: c_call} -} - -func (_m *AgentMetadataServiceClient) OnGetAgentMatch(matchers ...interface{}) *AgentMetadataServiceClient_GetAgent { - c_call := _m.On("GetAgent", matchers...) - return &AgentMetadataServiceClient_GetAgent{Call: c_call} -} - -// GetAgent provides a mock function with given fields: ctx, in, opts -func (_m *AgentMetadataServiceClient) GetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) (*admin.GetAgentResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.GetAgentResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetAgentRequest, ...grpc.CallOption) *admin.GetAgentResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.GetAgentResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.GetAgentRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type AgentMetadataServiceClient_ListAgents struct { - *mock.Call -} - -func (_m AgentMetadataServiceClient_ListAgents) Return(_a0 *admin.ListAgentsResponse, _a1 error) *AgentMetadataServiceClient_ListAgents { - return &AgentMetadataServiceClient_ListAgents{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AgentMetadataServiceClient) OnListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) *AgentMetadataServiceClient_ListAgents { - c_call := _m.On("ListAgents", ctx, in, opts) - return &AgentMetadataServiceClient_ListAgents{Call: c_call} -} - -func (_m *AgentMetadataServiceClient) OnListAgentsMatch(matchers ...interface{}) *AgentMetadataServiceClient_ListAgents { - c_call := _m.On("ListAgents", matchers...) - return &AgentMetadataServiceClient_ListAgents{Call: c_call} -} - -// ListAgents provides a mock function with given fields: ctx, in, opts -func (_m *AgentMetadataServiceClient) ListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) (*admin.ListAgentsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.ListAgentsResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.ListAgentsRequest, ...grpc.CallOption) *admin.ListAgentsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.ListAgentsResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.ListAgentsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AsyncAgentServiceClient.go b/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AsyncAgentServiceClient.go deleted file mode 100644 index f11ef1adfe..0000000000 --- a/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AsyncAgentServiceClient.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by mockery v1.0.1. DO NOT EDIT. - -package mocks - -import ( - context "context" - - admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - - grpc "google.golang.org/grpc" - - mock "github.com/stretchr/testify/mock" -) - -// AsyncAgentServiceClient is an autogenerated mock type for the AsyncAgentServiceClient type -type AsyncAgentServiceClient struct { - mock.Mock -} - -type AsyncAgentServiceClient_CreateTask struct { - *mock.Call -} - -func (_m AsyncAgentServiceClient_CreateTask) Return(_a0 *admin.CreateTaskResponse, _a1 error) *AsyncAgentServiceClient_CreateTask { - return &AsyncAgentServiceClient_CreateTask{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AsyncAgentServiceClient) OnCreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) *AsyncAgentServiceClient_CreateTask { - c_call := _m.On("CreateTask", ctx, in, opts) - return &AsyncAgentServiceClient_CreateTask{Call: c_call} -} - -func (_m *AsyncAgentServiceClient) OnCreateTaskMatch(matchers ...interface{}) *AsyncAgentServiceClient_CreateTask { - c_call := _m.On("CreateTask", matchers...) - return &AsyncAgentServiceClient_CreateTask{Call: c_call} -} - -// CreateTask provides a mock function with given fields: ctx, in, opts -func (_m *AsyncAgentServiceClient) CreateTask(ctx context.Context, in *admin.CreateTaskRequest, opts ...grpc.CallOption) (*admin.CreateTaskResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.CreateTaskResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.CreateTaskRequest, ...grpc.CallOption) *admin.CreateTaskResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.CreateTaskResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.CreateTaskRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type AsyncAgentServiceClient_DeleteTask struct { - *mock.Call -} - -func (_m AsyncAgentServiceClient_DeleteTask) Return(_a0 *admin.DeleteTaskResponse, _a1 error) *AsyncAgentServiceClient_DeleteTask { - return &AsyncAgentServiceClient_DeleteTask{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AsyncAgentServiceClient) OnDeleteTask(ctx context.Context, in *admin.DeleteTaskRequest, opts ...grpc.CallOption) *AsyncAgentServiceClient_DeleteTask { - c_call := _m.On("DeleteTask", ctx, in, opts) - return &AsyncAgentServiceClient_DeleteTask{Call: c_call} -} - -func (_m *AsyncAgentServiceClient) OnDeleteTaskMatch(matchers ...interface{}) *AsyncAgentServiceClient_DeleteTask { - c_call := _m.On("DeleteTask", matchers...) - return &AsyncAgentServiceClient_DeleteTask{Call: c_call} -} - -// DeleteTask provides a mock function with given fields: ctx, in, opts -func (_m *AsyncAgentServiceClient) DeleteTask(ctx context.Context, in *admin.DeleteTaskRequest, opts ...grpc.CallOption) (*admin.DeleteTaskResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.DeleteTaskResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.DeleteTaskRequest, ...grpc.CallOption) *admin.DeleteTaskResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.DeleteTaskResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.DeleteTaskRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type AsyncAgentServiceClient_GetTask struct { - *mock.Call -} - -func (_m AsyncAgentServiceClient_GetTask) Return(_a0 *admin.GetTaskResponse, _a1 error) *AsyncAgentServiceClient_GetTask { - return &AsyncAgentServiceClient_GetTask{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AsyncAgentServiceClient) OnGetTask(ctx context.Context, in *admin.GetTaskRequest, opts ...grpc.CallOption) *AsyncAgentServiceClient_GetTask { - c_call := _m.On("GetTask", ctx, in, opts) - return &AsyncAgentServiceClient_GetTask{Call: c_call} -} - -func (_m *AsyncAgentServiceClient) OnGetTaskMatch(matchers ...interface{}) *AsyncAgentServiceClient_GetTask { - c_call := _m.On("GetTask", matchers...) - return &AsyncAgentServiceClient_GetTask{Call: c_call} -} - -// GetTask provides a mock function with given fields: ctx, in, opts -func (_m *AsyncAgentServiceClient) GetTask(ctx context.Context, in *admin.GetTaskRequest, opts ...grpc.CallOption) (*admin.GetTaskResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.GetTaskResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetTaskRequest, ...grpc.CallOption) *admin.GetTaskResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.GetTaskResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.GetTaskRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type AsyncAgentServiceClient_GetTaskLogs struct { - *mock.Call -} - -func (_m AsyncAgentServiceClient_GetTaskLogs) Return(_a0 *admin.GetTaskLogsResponse, _a1 error) *AsyncAgentServiceClient_GetTaskLogs { - return &AsyncAgentServiceClient_GetTaskLogs{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AsyncAgentServiceClient) OnGetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) *AsyncAgentServiceClient_GetTaskLogs { - c_call := _m.On("GetTaskLogs", ctx, in, opts) - return &AsyncAgentServiceClient_GetTaskLogs{Call: c_call} -} - -func (_m *AsyncAgentServiceClient) OnGetTaskLogsMatch(matchers ...interface{}) *AsyncAgentServiceClient_GetTaskLogs { - c_call := _m.On("GetTaskLogs", matchers...) - return &AsyncAgentServiceClient_GetTaskLogs{Call: c_call} -} - -// GetTaskLogs provides a mock function with given fields: ctx, in, opts -func (_m *AsyncAgentServiceClient) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (*admin.GetTaskLogsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.GetTaskLogsResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetTaskLogsRequest, ...grpc.CallOption) *admin.GetTaskLogsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.GetTaskLogsResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.GetTaskLogsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type AsyncAgentServiceClient_GetTaskMetrics struct { - *mock.Call -} - -func (_m AsyncAgentServiceClient_GetTaskMetrics) Return(_a0 *admin.GetTaskMetricsResponse, _a1 error) *AsyncAgentServiceClient_GetTaskMetrics { - return &AsyncAgentServiceClient_GetTaskMetrics{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *AsyncAgentServiceClient) OnGetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) *AsyncAgentServiceClient_GetTaskMetrics { - c_call := _m.On("GetTaskMetrics", ctx, in, opts) - return &AsyncAgentServiceClient_GetTaskMetrics{Call: c_call} -} - -func (_m *AsyncAgentServiceClient) OnGetTaskMetricsMatch(matchers ...interface{}) *AsyncAgentServiceClient_GetTaskMetrics { - c_call := _m.On("GetTaskMetrics", matchers...) - return &AsyncAgentServiceClient_GetTaskMetrics{Call: c_call} -} - -// GetTaskMetrics provides a mock function with given fields: ctx, in, opts -func (_m *AsyncAgentServiceClient) GetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) (*admin.GetTaskMetricsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *admin.GetTaskMetricsResponse - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetTaskMetricsRequest, ...grpc.CallOption) *admin.GetTaskMetricsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.GetTaskMetricsResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *admin.GetTaskMetricsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index 00f9a47633..0c5f197c82 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -4,6 +4,7 @@ import ( "context" "encoding/gob" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" "time" "golang.org/x/exp/maps" @@ -25,7 +26,7 @@ type Plugin struct { metricScope promutils.Scope cfg *Config cs *ClientSet - agentRegistry map[string]*Agent // map[taskType] => Agent + agentRegistry map[string]map[int32]*Agent // map[taskTypeName][taskTypeVersion] => Agent } type ResourceWrapper struct { @@ -39,9 +40,8 @@ type ResourceWrapper struct { type ResourceMetaWrapper struct { OutputPrefix string - Token string AgentResourceMeta []byte - TaskType string + TaskType admin.TaskType } func (p Plugin) GetConfig() webapi.PluginConfig { @@ -80,52 +80,60 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR return nil, nil, err } taskTemplate.GetContainer().Args = modifiedArgs + defer func() { + // Restore unrendered template for subsequent renders. + taskTemplate.GetContainer().Args = argTemplate + }() } outputPrefix := taskCtx.OutputWriter().GetOutputPrefixPath().String() - agent := getFinalAgent(taskTemplate.Type, p.cfg, p.agentRegistry) - - client, ok := p.cs.agentClients[agent.Endpoint] - if !ok { - return nil, nil, fmt.Errorf("endpoint [%s] not found in the client set", agent.Endpoint) + taskType := admin.TaskType{Name: taskTemplate.Type, Version: taskTemplate.TaskTypeVersion} + agent := getFinalAgent(&taskType, p.cfg, p.agentRegistry) + client, err := p.getAsyncAgentClient(ctx, agent) + if err != nil { + return nil, nil, err } finalCtx, cancel := getFinalContext(ctx, "CreateTask", agent) defer cancel() + //if agent.IsSync { + // stream, err := client.ExecuteTaskSync(ctx) + // if err != nil { + // return nil, nil, err + // } + // stream + //} + taskExecutionMetadata := buildTaskExecutionMetadata(taskCtx.TaskExecutionMetadata()) res, err := client.CreateTask(finalCtx, &admin.CreateTaskRequest{Inputs: inputs, Template: taskTemplate, OutputPrefix: outputPrefix, TaskExecutionMetadata: &taskExecutionMetadata}) if err != nil { return nil, nil, err } - // Restore unrendered template for subsequent renders. - if taskTemplate.GetContainer() != nil { - taskTemplate.GetContainer().Args = argTemplate - } - return ResourceMetaWrapper{ OutputPrefix: outputPrefix, AgentResourceMeta: res.GetResourceMeta(), - Token: "", - TaskType: taskTemplate.Type, + TaskType: taskType, }, nil, nil } +func (p Plugin) ExecuteTaskSync(ctx context.Context, taskCtx webapi.TaskExecutionContextReader) (webapi.ResourceMeta, webapi.Resource, error) { + return nil, nil, nil +} + func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest webapi.Resource, err error) { metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) - agent := getFinalAgent(metadata.TaskType, p.cfg, p.agentRegistry) + agent := getFinalAgent(&metadata.TaskType, p.cfg, p.agentRegistry) - client := p.cs.agentClients[agent.Endpoint] - client, ok := p.cs.agentClients[agent.Endpoint] - if !ok { - return nil, fmt.Errorf("endpoint [%s] not found in the client set", agent.Endpoint) + client, err := p.getAsyncAgentClient(ctx, agent) + if err != nil { + return nil, err } finalCtx, cancel := getFinalContext(ctx, "GetTask", agent) defer cancel() - taskType := &admin.TaskType{Name: metadata.TaskType} - res, err := client.GetTask(finalCtx, &admin.GetTaskRequest{TaskType: taskType, ResourceMeta: metadata.AgentResourceMeta}) + res, err := client.GetTask(finalCtx, &admin.GetTaskRequest{TaskType: &metadata.TaskType, ResourceMeta: metadata.AgentResourceMeta}) if err != nil { return nil, err } @@ -144,17 +152,16 @@ func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error return nil } metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) - agent := getFinalAgent(metadata.TaskType, p.cfg, p.agentRegistry) + agent := getFinalAgent(&metadata.TaskType, p.cfg, p.agentRegistry) - client, ok := p.cs.agentClients[agent.Endpoint] - if !ok { - return fmt.Errorf("endpoint [%s] not found in the client set", agent.Endpoint) + client, err := p.getAsyncAgentClient(ctx, agent) + if err != nil { + return err } finalCtx, cancel := getFinalContext(ctx, "DeleteTask", agent) defer cancel() - taskType := &admin.TaskType{Name: metadata.TaskType} - _, err := client.DeleteTask(finalCtx, &admin.DeleteTaskRequest{TaskType: taskType, ResourceMeta: metadata.AgentResourceMeta}) + _, err = client.DeleteTask(finalCtx, &admin.DeleteTaskRequest{TaskType: &metadata.TaskType, ResourceMeta: metadata.AgentResourceMeta}) return err } @@ -210,8 +217,17 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase return core.PhaseInfoUndefined, pluginErrors.Errorf(core.SystemErrorCode, "unknown execution state [%v].", resource.State) } -func (p Plugin) Do(ctx context.Context, tCtx webapi.TaskExecutionContext) (phase core.PhaseInfo, err error) { - return core.PhaseInfo{}, nil +func (p Plugin) getAsyncAgentClient(ctx context.Context, agent *Agent) (service.AsyncAgentServiceClient, error) { + client, ok := p.cs.asyncAgentClients[agent.Endpoint] + if !ok { + conn, err := getGrpcConnection(ctx, agent) + if err != nil { + return nil, fmt.Errorf("failed to get grpc connection with error: %v", err) + } + client = service.NewAsyncAgentServiceClient(conn) + p.cs.asyncAgentClients[agent.Endpoint] = client + } + return client, nil } func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource ResourceWrapper) error { @@ -236,8 +252,8 @@ func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource Res return taskCtx.OutputWriter().Put(ctx, opReader) } -func getFinalAgent(taskType string, cfg *Config, agentRegistry map[string]*Agent) *Agent { - if agent, exists := agentRegistry[taskType]; exists { +func getFinalAgent(taskType *admin.TaskType, cfg *Config, agentRegistry map[string]map[int32]*Agent) *Agent { + if agent, exists := agentRegistry[taskType.Name][taskType.Version]; exists { return agent } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go index bddea6869e..68c326c99d 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/mock" "golang.org/x/exp/maps" + agentMocks "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" flyteIdl "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" flyteIdlCore "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -17,7 +18,6 @@ import ( pluginsCore "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core" pluginCoreMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core/mocks" webapiPlugin "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi/mocks" - agentMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/webapi/agent/mocks" "github.com/flyteorg/flyte/flytestdlib/config" "github.com/flyteorg/flyte/flytestdlib/promutils" ) @@ -59,12 +59,15 @@ func TestPlugin(t *testing.T) { }) t.Run("test getFinalAgent", func(t *testing.T) { - agentRegistry := map[string]*Agent{"spark": {Endpoint: "localhost:80"}} - agent := getFinalAgent("spark", &cfg, agentRegistry) + agentRegistry := map[string]map[int32]*Agent{"spark": {defaultTaskTypeVersion: &Agent{Endpoint: "localhost:80"}}} + spark := &admin.TaskType{Name: "spark", Version: defaultTaskTypeVersion} + foo := &admin.TaskType{Name: "foo", Version: defaultTaskTypeVersion} + bar := &admin.TaskType{Name: "bar", Version: defaultTaskTypeVersion} + agent := getFinalAgent(spark, &cfg, agentRegistry) assert.Equal(t, agent.Endpoint, "localhost:80") - agent = getFinalAgent("foo", &cfg, agentRegistry) + agent = getFinalAgent(foo, &cfg, agentRegistry) assert.Equal(t, agent.Endpoint, cfg.DefaultAgent.Endpoint) - agent = getFinalAgent("bar", &cfg, agentRegistry) + agent = getFinalAgent(bar, &cfg, agentRegistry) assert.Equal(t, agent.Endpoint, cfg.DefaultAgent.Endpoint) }) @@ -270,11 +273,15 @@ func TestPlugin(t *testing.T) { func getMockMetadataServiceClient() *agentMocks.AgentMetadataServiceClient { mockMetadataServiceClient := new(agentMocks.AgentMetadataServiceClient) mockRequest := &admin.ListAgentsRequest{} + suppoertedTaskTypes := make([]*admin.TaskType, 3) + suppoertedTaskTypes[0] = &admin.TaskType{Name: "task1", Version: defaultTaskTypeVersion} + suppoertedTaskTypes[1] = &admin.TaskType{Name: "task2", Version: defaultTaskTypeVersion} + suppoertedTaskTypes[2] = &admin.TaskType{Name: "task3", Version: defaultTaskTypeVersion} mockResponse := &admin.ListAgentsResponse{ Agents: []*admin.Agent{ { Name: "test-agent", - SupportedTaskTypes: []string{"task1", "task2", "task3"}, + SupportedTaskTypes: suppoertedTaskTypes, }, }, } @@ -290,7 +297,7 @@ func TestInitializeAgentRegistry(t *testing.T) { agentMetadataClients[defaultAgentEndpoint] = getMockMetadataServiceClient() cs := &ClientSet{ - agentClients: agentClients, + asyncAgentClients: agentClients, agentMetadataClients: agentMetadataClients, }