From 94e433be816bcca7d4dc603596e970db268c6e0d Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 23 Feb 2024 15:03:22 -0800 Subject: [PATCH] Agents protocol refactor (#4874) Signed-off-by: Haytham Abuelfutuh Signed-off-by: Kevin Su Co-authored-by: Haytham Abuelfutuh --- .../go/admin/mocks/AsyncAgentServiceClient.go | 12 +- .../go/admin/mocks/AsyncAgentServiceServer.go | 27 +- .../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 +++ .../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 | 499 +++++- .../pb-es/flyteidl/service/agent_connect.ts | 30 +- flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go | 1441 ++++++++++++---- .../gen/pb-go/flyteidl/service/agent.pb.go | 216 ++- .../pb-go/flyteidl/service/agent_grpc.pb.go | 206 ++- .../gateway/flyteidl/service/agent.pb.gw.go | 894 +++++++++- .../flyteidl/service/agent.swagger.json | 535 +++++- flyteidl/gen/pb-js/flyteidl.d.ts | 551 ++++++- flyteidl/gen/pb-js/flyteidl.js | 1446 +++++++++++++++-- .../gen/pb_python/flyteidl/admin/agent_pb2.py | 114 +- .../pb_python/flyteidl/admin/agent_pb2.pyi | 126 +- .../pb_python/flyteidl/service/agent_pb2.py | 24 +- .../flyteidl/service/agent_pb2_grpc.py | 79 +- flyteidl/gen/pb_rust/flyteidl.admin.rs | 153 +- flyteidl/gen/pb_rust/flyteidl.core.rs | 386 ++--- flyteidl/protos/flyteidl/admin/agent.proto | 111 +- flyteidl/protos/flyteidl/service/agent.proto | 50 +- .../go/tasks/plugins/webapi/agent/client.go | 74 +- .../tasks/plugins/webapi/agent/client_test.go | 12 + .../go/tasks/plugins/webapi/agent/config.go | 12 +- .../tasks/plugins/webapi/agent/config_test.go | 2 +- .../plugins/webapi/agent/integration_test.go | 107 +- .../agent/mocks/AgentMetadataServiceClient.go | 114 -- .../agent/mocks/AsyncAgentServiceClient.go | 258 --- .../go/tasks/plugins/webapi/agent/plugin.go | 208 ++- .../tasks/plugins/webapi/agent/plugin_test.go | 46 +- 41 files changed, 8944 insertions(+), 1539 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 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 f11ef1adfe..0103e3f293 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 @@ -165,7 +167,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 +182,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 +192,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..76b618f791 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 @@ -142,11 +144,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 +159,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/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 834197a299..deb3601202 100644 --- a/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/admin/agent_pb.ts @@ -4,8 +4,9 @@ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; +import { Duration, Message, proto3, protoInt64, Struct, 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"; @@ -15,6 +16,7 @@ import { ExecutionMetricResult } from "../core/metrics_pb.js"; * The state of the execution is used to control its visibility in the UI/CLI. * * @generated from enum flyteidl.admin.State + * @deprecated */ export enum State { /** @@ -99,6 +101,39 @@ export class TaskExecutionMetadata extends Message { */ environmentVariables: { [key: string]: string } = {}; + /** + * Represents the maximum number of attempts allowed for a task. + * If a task fails, it can be retried up to this maximum number of attempts. + * + * @generated from field: int32 max_attempts = 7; + */ + maxAttempts = 0; + + /** + * Indicates whether the task execution can be interrupted. + * If set to true, the task can be stopped before completion. + * + * @generated from field: bool interruptible = 8; + */ + interruptible = false; + + /** + * Specifies the threshold for failure count at which the interruptible property + * will take effect. If the number of consecutive task failures exceeds this threshold, + * interruptible behavior will be activated. + * + * @generated from field: int32 interruptible_failure_threshold = 9; + */ + interruptibleFailureThreshold = 0; + + /** + * Overrides for specific properties of the task node. + * These overrides can be used to customize the behavior of the task node. + * + * @generated from field: flyteidl.core.TaskNodeOverrides overrides = 10; + */ + overrides?: TaskNodeOverrides; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -113,6 +148,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 +245,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 +259,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 +279,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,7 +491,8 @@ export class GetTaskRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: string task_type = 1 [deprecated = true]; + * @deprecated */ taskType = ""; @@ -274,6 +503,13 @@ export class GetTaskRequest extends Message { */ resourceMeta = new Uint8Array(0); + /** + * A predefined yet extensible Task type identifier. + * + * @generated from field: flyteidl.admin.TaskCategory task_category = 3; + */ + taskCategory?: TaskCategory; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -284,6 +520,7 @@ export class GetTaskRequest extends Message { static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "task_category", kind: "message", T: TaskCategory }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskRequest { @@ -314,13 +551,6 @@ export class GetTaskResponse extends Message { */ resource?: Resource; - /** - * log information for the task execution - * - * @generated from field: repeated flyteidl.core.TaskLog log_links = 2; - */ - logLinks: TaskLog[] = []; - constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -330,7 +560,6 @@ export class GetTaskResponse extends Message { static readonly typeName = "flyteidl.admin.GetTaskResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "resource", kind: "message", T: Resource }, - { no: 2, name: "log_links", kind: "message", T: TaskLog, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskResponse { @@ -392,6 +621,13 @@ export class Resource extends Message { */ phase = TaskExecution_Phase.UNDEFINED; + /** + * Custom data specific to the agent. + * + * @generated from field: google.protobuf.Struct custom_info = 6; + */ + customInfo?: Struct; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -405,6 +641,7 @@ export class Resource extends Message { { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "log_links", kind: "message", T: TaskLog, repeated: true }, { no: 5, name: "phase", kind: "enum", T: proto3.getEnumType(TaskExecution_Phase) }, + { no: 6, name: "custom_info", kind: "message", T: Struct }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Resource { @@ -433,7 +670,8 @@ export class DeleteTaskRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: string task_type = 1 [deprecated = true]; + * @deprecated */ taskType = ""; @@ -444,6 +682,13 @@ export class DeleteTaskRequest extends Message { */ resourceMeta = new Uint8Array(0); + /** + * A predefined yet extensible Task type identifier. + * + * @generated from field: flyteidl.admin.TaskCategory task_category = 3; + */ + taskCategory?: TaskCategory; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -454,6 +699,7 @@ export class DeleteTaskRequest extends Message { static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "resource_meta", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "task_category", kind: "message", T: TaskCategory }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): DeleteTaskRequest { @@ -522,10 +768,29 @@ 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 string supported_task_types = 2 [deprecated = true]; + * @deprecated */ supportedTaskTypes: string[] = []; + /** + * 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; + + /** + * Supported_task_categories are the categories of the tasks that the agent can handle. + * + * @generated from field: repeated flyteidl.admin.TaskCategory supported_task_categories = 4; + */ + supportedTaskCategories: TaskCategory[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -536,6 +801,8 @@ 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: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "is_sync", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "supported_task_categories", kind: "message", T: TaskCategory, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Agent { @@ -555,6 +822,53 @@ export class Agent extends Message { } } +/** + * @generated from message flyteidl.admin.TaskCategory + */ +export class TaskCategory 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.TaskCategory"; + 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): TaskCategory { + return new TaskCategory().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TaskCategory { + return new TaskCategory().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TaskCategory { + return new TaskCategory().fromJsonString(jsonString, options); + } + + static equals(a: TaskCategory | PlainMessage | undefined, b: TaskCategory | PlainMessage | undefined): boolean { + return proto3.util.equals(TaskCategory, a, b); + } +} + /** * A request to get an agent. * @@ -716,7 +1030,8 @@ export class GetTaskMetricsRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: string task_type = 1 [deprecated = true]; + * @deprecated */ taskType = ""; @@ -756,6 +1071,13 @@ export class GetTaskMetricsRequest extends Message { */ step?: Duration; + /** + * A predefined yet extensible Task type identifier. + * + * @generated from field: flyteidl.admin.TaskCategory task_category = 7; + */ + taskCategory?: TaskCategory; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -770,6 +1092,7 @@ export class GetTaskMetricsRequest extends Message { { no: 4, name: "start_time", kind: "message", T: Timestamp }, { no: 5, name: "end_time", kind: "message", T: Timestamp }, { no: 6, name: "step", kind: "message", T: Duration }, + { no: 7, name: "task_category", kind: "message", T: TaskCategory }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskMetricsRequest { @@ -839,7 +1162,8 @@ export class GetTaskLogsRequest extends Message { /** * A predefined yet extensible Task type identifier. * - * @generated from field: string task_type = 1; + * @generated from field: string task_type = 1 [deprecated = true]; + * @deprecated */ taskType = ""; @@ -865,6 +1189,13 @@ export class GetTaskLogsRequest extends Message { */ token = ""; + /** + * A predefined yet extensible Task type identifier. + * + * @generated from field: flyteidl.admin.TaskCategory task_category = 5; + */ + taskCategory?: TaskCategory; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -877,6 +1208,7 @@ export class GetTaskLogsRequest extends Message { { 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 */ }, + { no: 5, name: "task_category", kind: "message", T: TaskCategory }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetTaskLogsRequest { @@ -897,11 +1229,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 +1279,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 +1338,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..cec0c0aabc 100644 --- a/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts +++ b/flyteidl/gen/pb-es/flyteidl/service/agent_connect.ts @@ -3,11 +3,33 @@ /* 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"; /** - * AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. + * SyncAgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. + * + * @generated from service flyteidl.service.SyncAgentService + */ +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.SyncAgentService.ExecuteTaskSync + */ + executeTaskSync: { + name: "ExecuteTaskSync", + I: ExecuteTaskSyncRequest, + 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 */ @@ -15,7 +37,7 @@ export const AsyncAgentService = { typeName: "flyteidl.service.AsyncAgentService", methods: { /** - * Send a task create request to the agent server. + * CreateTask sends a task create request to the agent service. * * @generated from rpc flyteidl.service.AsyncAgentService.CreateTask */ @@ -71,7 +93,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..01aee40e95 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go @@ -11,6 +11,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" + structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" @@ -24,6 +25,8 @@ const ( ) // The state of the execution is used to control its visibility in the UI/CLI. +// +// Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. type State int32 const ( @@ -97,6 +100,19 @@ type TaskExecutionMetadata struct { 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"` + // Represents the maximum number of attempts allowed for a task. + // If a task fails, it can be retried up to this maximum number of attempts. + MaxAttempts int32 `protobuf:"varint,7,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"` + // Indicates whether the task execution can be interrupted. + // If set to true, the task can be stopped before completion. + Interruptible bool `protobuf:"varint,8,opt,name=interruptible,proto3" json:"interruptible,omitempty"` + // Specifies the threshold for failure count at which the interruptible property + // will take effect. If the number of consecutive task failures exceeds this threshold, + // interruptible behavior will be activated. + InterruptibleFailureThreshold int32 `protobuf:"varint,9,opt,name=interruptible_failure_threshold,json=interruptibleFailureThreshold,proto3" json:"interruptible_failure_threshold,omitempty"` + // Overrides for specific properties of the task node. + // These overrides can be used to customize the behavior of the task node. + Overrides *core.TaskNodeOverrides `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` } func (x *TaskExecutionMetadata) Reset() { @@ -173,6 +189,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 +301,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 +337,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 *ExecuteTaskSyncRequest) GetInputs() *core.LiteralMap { + if x, ok := x.GetPart().(*ExecuteTaskSyncRequest_Inputs); ok { + return x.Inputs } return nil } -func (x *CreateTaskResponse) GetResource() *Resource { - if x, ok := x.GetRes().(*CreateTaskResponse_Resource); ok { +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"` +} + +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) + } +} + +func (x *ExecuteTaskSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteTaskSyncResponse) ProtoMessage() {} + +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 CreateTaskResponse_ResourceMeta struct { - ResourceMeta []byte `protobuf:"bytes,1,opt,name=resource_meta,json=resourceMeta,proto3,oneof"` +type ExecuteTaskSyncResponse_Header struct { + Header *ExecuteTaskSyncResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` } -type CreateTaskResponse_Resource struct { - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3,oneof"` +type ExecuteTaskSyncResponse_Outputs struct { + Outputs *core.LiteralMap `protobuf:"bytes,2,opt,name=outputs,proto3,oneof"` } -func (*CreateTaskResponse_ResourceMeta) isCreateTaskResponse_Res() {} +func (*ExecuteTaskSyncResponse_Header) isExecuteTaskSyncResponse_Res() {} -func (*CreateTaskResponse_Resource) isCreateTaskResponse_Res() {} +func (*ExecuteTaskSyncResponse_Outputs) isExecuteTaskSyncResponse_Res() {} // A message used to fetch a job resource from flyte agent server. type GetTaskRequest struct { @@ -343,15 +638,19 @@ type GetTaskRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. + // + // Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. TaskType string `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"` + // A predefined yet extensible Task type identifier. + TaskCategory *TaskCategory `protobuf:"bytes,3,opt,name=task_category,json=taskCategory,proto3" json:"task_category,omitempty"` } 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 +663,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,9 +676,10 @@ 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} } +// Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. func (x *GetTaskRequest) GetTaskType() string { if x != nil { return x.TaskType @@ -394,6 +694,13 @@ func (x *GetTaskRequest) GetResourceMeta() []byte { return nil } +func (x *GetTaskRequest) GetTaskCategory() *TaskCategory { + if x != nil { + return x.TaskCategory + } + return nil +} + // Response to get an individual task resource. type GetTaskResponse struct { state protoimpl.MessageState @@ -401,14 +708,12 @@ type GetTaskResponse struct { unknownFields protoimpl.UnknownFields Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // log information for the task execution - LogLinks []*core.TaskLog `protobuf:"bytes,2,rep,name=log_links,json=logLinks,proto3" json:"log_links,omitempty"` } 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 +726,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 +739,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 { @@ -444,13 +749,6 @@ func (x *GetTaskResponse) GetResource() *Resource { return nil } -func (x *GetTaskResponse) GetLogLinks() []*core.TaskLog { - if x != nil { - return x.LogLinks - } - return nil -} - type Resource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -470,12 +768,14 @@ type Resource struct { LogLinks []*core.TaskLog `protobuf:"bytes,4,rep,name=log_links,json=logLinks,proto3" json:"log_links,omitempty"` // The phase of the execution is used to determine the phase of the plugin's execution. Phase core.TaskExecution_Phase `protobuf:"varint,5,opt,name=phase,proto3,enum=flyteidl.core.TaskExecution_Phase" json:"phase,omitempty"` + // Custom data specific to the agent. + CustomInfo *structpb.Struct `protobuf:"bytes,6,opt,name=custom_info,json=customInfo,proto3" json:"custom_info,omitempty"` } 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 +788,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 +801,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. @@ -540,6 +840,13 @@ func (x *Resource) GetPhase() core.TaskExecution_Phase { return core.TaskExecution_Phase(0) } +func (x *Resource) GetCustomInfo() *structpb.Struct { + if x != nil { + return x.CustomInfo + } + return nil +} + // A message used to delete a task. type DeleteTaskRequest struct { state protoimpl.MessageState @@ -547,15 +854,19 @@ type DeleteTaskRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. + // + // Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. TaskType string `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"` + // A predefined yet extensible Task type identifier. + TaskCategory *TaskCategory `protobuf:"bytes,3,opt,name=task_category,json=taskCategory,proto3" json:"task_category,omitempty"` } 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 +879,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,9 +892,10 @@ 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} } +// Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. func (x *DeleteTaskRequest) GetTaskType() string { if x != nil { return x.TaskType @@ -598,6 +910,13 @@ func (x *DeleteTaskRequest) GetResourceMeta() []byte { return nil } +func (x *DeleteTaskRequest) GetTaskCategory() *TaskCategory { + if x != nil { + return x.TaskCategory + } + return nil +} + // Response to delete a task. type DeleteTaskResponse struct { state protoimpl.MessageState @@ -608,7 +927,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 +940,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,7 +953,7 @@ 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. @@ -646,13 +965,23 @@ type Agent struct { // 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. + // + // Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. SupportedTaskTypes []string `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"` + // Supported_task_categories are the categories of the tasks that the agent can handle. + SupportedTaskCategories []*TaskCategory `protobuf:"bytes,4,rep,name=supported_task_categories,json=supportedTaskCategories,proto3" json:"supported_task_categories,omitempty"` } func (x *Agent) Reset() { *x = Agent{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_admin_agent_proto_msgTypes[8] + mi := &file_flyteidl_admin_agent_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -665,7 +994,7 @@ func (x *Agent) String() string { func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_admin_agent_proto_msgTypes[8] + mi := &file_flyteidl_admin_agent_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -678,21 +1007,93 @@ func (x *Agent) ProtoReflect() protoreflect.Message { // Deprecated: Use Agent.ProtoReflect.Descriptor instead. func (*Agent) Descriptor() ([]byte, []int) { - return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{8} + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{12} +} + +func (x *Agent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. +func (x *Agent) GetSupportedTaskTypes() []string { + if x != nil { + return x.SupportedTaskTypes + } + return nil +} + +func (x *Agent) GetIsSync() bool { + if x != nil { + return x.IsSync + } + return false +} + +func (x *Agent) GetSupportedTaskCategories() []*TaskCategory { + if x != nil { + return x.SupportedTaskCategories + } + return nil +} + +type TaskCategory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the task type. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The version of the task type. + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *TaskCategory) Reset() { + *x = TaskCategory{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_agent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskCategory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskCategory) ProtoMessage() {} + +func (x *TaskCategory) 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskCategory.ProtoReflect.Descriptor instead. +func (*TaskCategory) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_agent_proto_rawDescGZIP(), []int{13} } -func (x *Agent) GetName() string { +func (x *TaskCategory) GetName() string { if x != nil { return x.Name } return "" } -func (x *Agent) GetSupportedTaskTypes() []string { +func (x *TaskCategory) GetVersion() int32 { if x != nil { - return x.SupportedTaskTypes + return x.Version } - return nil + return 0 } // A request to get an agent. @@ -708,7 +1109,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 +1122,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 +1135,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 +1157,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 +1170,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 +1183,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 +1203,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 +1216,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 +1229,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 +1244,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 +1257,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 +1270,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,6 +1287,8 @@ type GetTaskMetricsRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. + // + // Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. TaskType string `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"` @@ -898,12 +1301,14 @@ type GetTaskMetricsRequest struct { EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Query resolution step width in duration format or float number of seconds. Step *durationpb.Duration `protobuf:"bytes,6,opt,name=step,proto3" json:"step,omitempty"` + // A predefined yet extensible Task type identifier. + TaskCategory *TaskCategory `protobuf:"bytes,7,opt,name=task_category,json=taskCategory,proto3" json:"task_category,omitempty"` } 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 +1321,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,9 +1334,10 @@ 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} } +// Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. func (x *GetTaskMetricsRequest) GetTaskType() string { if x != nil { return x.TaskType @@ -974,6 +1380,13 @@ func (x *GetTaskMetricsRequest) GetStep() *durationpb.Duration { return nil } +func (x *GetTaskMetricsRequest) GetTaskCategory() *TaskCategory { + if x != nil { + return x.TaskCategory + } + return nil +} + // A response containing a list of metrics for a task execution. type GetTaskMetricsResponse struct { state protoimpl.MessageState @@ -987,7 +1400,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 +1413,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 +1426,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,6 +1443,8 @@ type GetTaskLogsRequest struct { unknownFields protoimpl.UnknownFields // A predefined yet extensible Task type identifier. + // + // Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. TaskType string `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"` @@ -1038,12 +1453,14 @@ type GetTaskLogsRequest struct { // 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,4,opt,name=token,proto3" json:"token,omitempty"` + // A predefined yet extensible Task type identifier. + TaskCategory *TaskCategory `protobuf:"bytes,5,opt,name=task_category,json=taskCategory,proto3" json:"task_category,omitempty"` } 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 +1473,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,9 +1486,10 @@ 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} } +// Deprecated: Marked as deprecated in flyteidl/admin/agent.proto. func (x *GetTaskLogsRequest) GetTaskType() string { if x != nil { return x.TaskType @@ -1100,23 +1518,127 @@ func (x *GetTaskLogsRequest) GetToken() string { return "" } -// A response containing the logs for a task execution. -type GetTaskLogsResponse struct { +func (x *GetTaskLogsRequest) GetTaskCategory() *TaskCategory { + if x != nil { + return x.TaskCategory + } + return nil +} + +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 +1651,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 +1664,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 +1713,286 @@ 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, + 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, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 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, 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, - 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, 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, - 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, + 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, 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, 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, - 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, + 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, 0x99, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x09, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, + 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, + 0x41, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x22, 0x47, 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, 0x22, 0xb3, 0x02, 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, 0x12, 0x38, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 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, 0x41, 0x0a, + 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc4, 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, 0x34, 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, 0x42, 0x02, 0x18, 0x01, 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, 0x12, 0x58, 0x0a, 0x19, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x52, 0x17, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, + 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x3c, 0x0a, + 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 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, 0xdb, 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, 0x1f, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 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, 0x12, 0x41, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x74, + 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 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, 0xc9, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x09, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x02, 0x18, 0x01, 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, 0x12, 0x41, + 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 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, 0x62, 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, 0x1a, 0x02, 0x18, + 0x01, 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 +2008,87 @@ 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 + (*TaskCategory)(nil), // 14: flyteidl.admin.TaskCategory + (*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 + (*structpb.Struct)(nil), // 34: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 36: google.protobuf.Duration + (*core.ExecutionMetricResult)(nil), // 37: 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_category:type_name -> flyteidl.admin.TaskCategory + 10, // 16: flyteidl.admin.GetTaskResponse.resource:type_name -> flyteidl.admin.Resource + 0, // 17: flyteidl.admin.Resource.state:type_name -> flyteidl.admin.State + 30, // 18: flyteidl.admin.Resource.outputs:type_name -> flyteidl.core.LiteralMap + 32, // 19: flyteidl.admin.Resource.log_links:type_name -> flyteidl.core.TaskLog + 33, // 20: flyteidl.admin.Resource.phase:type_name -> flyteidl.core.TaskExecution.Phase + 34, // 21: flyteidl.admin.Resource.custom_info:type_name -> google.protobuf.Struct + 14, // 22: flyteidl.admin.DeleteTaskRequest.task_category:type_name -> flyteidl.admin.TaskCategory + 14, // 23: flyteidl.admin.Agent.supported_task_categories:type_name -> flyteidl.admin.TaskCategory + 13, // 24: flyteidl.admin.GetAgentResponse.agent:type_name -> flyteidl.admin.Agent + 13, // 25: flyteidl.admin.ListAgentsResponse.agents:type_name -> flyteidl.admin.Agent + 35, // 26: flyteidl.admin.GetTaskMetricsRequest.start_time:type_name -> google.protobuf.Timestamp + 35, // 27: flyteidl.admin.GetTaskMetricsRequest.end_time:type_name -> google.protobuf.Timestamp + 36, // 28: flyteidl.admin.GetTaskMetricsRequest.step:type_name -> google.protobuf.Duration + 14, // 29: flyteidl.admin.GetTaskMetricsRequest.task_category:type_name -> flyteidl.admin.TaskCategory + 37, // 30: flyteidl.admin.GetTaskMetricsResponse.results:type_name -> flyteidl.core.ExecutionMetricResult + 14, // 31: flyteidl.admin.GetTaskLogsRequest.task_category:type_name -> flyteidl.admin.TaskCategory + 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 +2134,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 +2146,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 +2158,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 +2170,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 +2182,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 +2194,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 +2206,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 +2218,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 +2230,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 +2242,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 +2254,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.(*TaskCategory); i { case 0: return &v.state case 1: @@ -1601,7 +2266,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 +2278,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 +2290,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 +2386,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 +2404,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..078dc9dd8a 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go @@ -30,99 +30,139 @@ 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, - 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, - 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, - 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, + 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, 0xe3, + 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, 0xa3, 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, 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, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x79, 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, 0xb7, + 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, 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, + 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5c, 0x2a, 0x5a, 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, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 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, 0xc0, 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, 0x5f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x59, 0x12, 0x57, 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, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 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, 0xb6, 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, 0x5c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x56, 0x12, 0x54, 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, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 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.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 + 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.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 + 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 @@ -141,7 +181,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 67ebe7b012..98f057da12 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent_grpc.pb.go @@ -19,6 +19,128 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + SyncAgentService_ExecuteTaskSync_FullMethodName = "/flyteidl.service.SyncAgentService/ExecuteTaskSync" +) + +// 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 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) (SyncAgentService_ExecuteTaskSyncClient, error) +} + +type syncAgentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSyncAgentServiceClient(cc grpc.ClientConnInterface) SyncAgentServiceClient { + return &syncAgentServiceClient{cc} +} + +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 := &syncAgentServiceExecuteTaskSyncClient{stream} + return x, nil +} + +type SyncAgentService_ExecuteTaskSyncClient interface { + Send(*admin.ExecuteTaskSyncRequest) error + Recv() (*admin.ExecuteTaskSyncResponse, error) + grpc.ClientStream +} + +type syncAgentServiceExecuteTaskSyncClient struct { + grpc.ClientStream +} + +func (x *syncAgentServiceExecuteTaskSyncClient) Send(m *admin.ExecuteTaskSyncRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *syncAgentServiceExecuteTaskSyncClient) Recv() (*admin.ExecuteTaskSyncResponse, error) { + m := new(admin.ExecuteTaskSyncResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + 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" @@ -31,7 +153,7 @@ const ( // // 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. + // 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 +166,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 { @@ -91,20 +213,43 @@ 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[0], 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. + // 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,7 +262,7 @@ 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. @@ -136,8 +281,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. @@ -223,22 +368,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, +func _AsyncAgentService_GetTaskLogs_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(admin.GetTaskLogsRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AsyncAgentServiceServer).GetTaskLogs(ctx, req.(*admin.GetTaskLogsRequest)) - } - 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 +412,14 @@ var AsyncAgentService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetTaskMetrics", Handler: _AsyncAgentService_GetTaskMetrics_Handler, }, + }, + Streams: []grpc.StreamDesc{ { - MethodName: "GetTaskLogs", - Handler: _AsyncAgentService_GetTaskLogs_Handler, + 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..06ae8800ab 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_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 { + 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_category": 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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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_category": 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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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_category": 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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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_category": 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_category.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.name", err) + } + + val, ok = pathParams["task_category.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_category.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_category.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_category.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 @@ -70,37 +542,169 @@ func local_request_AgentMetadataService_GetAgent_0(ctx context.Context, marshale _ = err ) - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetAgent(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AgentMetadataService_ListAgents_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.ListAgentsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AgentMetadataService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AgentMetadataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.ListAgentsRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListAgents(ctx, &protoReq) + return msg, metadata, err + +} + +// 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 RegisterSyncAgentServiceHandlerFromEndpoint instead. +func RegisterSyncAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extService.SyncAgentServiceServer) error { + + 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() + 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_category.name}/{task_category.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()...) - protoReq.Name, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } + }) - msg, err := server.GetAgent(ctx, &protoReq) - return msg, metadata, err + 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_category.name}/{task_category.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()...) -func request_AgentMetadataService_ListAgents_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.ListAgentsRequest - var metadata runtime.ServerMetadata + }) - msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err + 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_category.name}/{task_category.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()...) -func local_request_AgentMetadataService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AgentMetadataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq extAdmin.ListAgentsRequest - var metadata runtime.ServerMetadata + }) - msg, err := server.ListAgents(ctx, &protoReq) - return msg, metadata, err + 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". @@ -162,6 +766,252 @@ func RegisterAgentMetadataServiceHandlerServer(ctx context.Context, mux *runtime return nil } +// RegisterSyncAgentServiceHandlerFromEndpoint is same as RegisterSyncAgentServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +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 + } + 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 RegisterSyncAgentServiceHandler(ctx, mux, conn) +} + +// RegisterSyncAgentServiceHandler registers the http handlers for service SyncAgentService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterSyncAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSyncAgentServiceHandlerClient(ctx, mux, extService.NewSyncAgentServiceClient(conn)) +} + +// 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.SyncAgentServiceClient" to call the correct interceptors. +func RegisterSyncAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extService.SyncAgentServiceClient) error { + + 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.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_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_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() + 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_category.name}/{task_category.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_category.name}/{task_category.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_category.name}/{task_category.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_category.name}/{task_category.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_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_category.name", "task_category.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_category.name", "task_category.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_category.name", "task_category.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_category.name", "task_category.version", "resource_meta"}, "")) +) + +var ( + 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 5ce68f3e61..985b8acb99 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" }, @@ -19,6 +22,362 @@ "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_category.name}/{task_category.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_category.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_category.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": "task_type", + "description": "A predefined yet extensible Task type identifier.", + "in": "query", + "required": false, + "type": "string" + }, + { + "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_category.name}/{task_category.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_category.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_category.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": "task_type", + "description": "A predefined yet extensible Task type identifier.", + "in": "query", + "required": false, + "type": "string" + }, + { + "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": "SyncAgentService_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": [ + "SyncAgentService" + ] + } + }, + "/api/v1/agent/task/{task_category.name}/{task_category.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_category.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_category.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" + }, + { + "name": "task_type", + "description": "A predefined yet extensible Task type identifier.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, + "/api/v1/agent/task_executions/{task_category.name}/{task_category.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_category.name", + "description": "The name of the task type.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_category.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" + }, + { + "name": "task_type", + "description": "A predefined yet extensible Task type identifier.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AsyncAgentService" + ] + } + }, "/api/v1/agent/{name}": { "get": { "summary": "Fetch a :ref:`ref_flyteidl.admin.Agent` definition.", @@ -245,19 +604,73 @@ "type": "string" }, "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." + }, + "supported_task_categories": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/adminTaskCategory" + }, + "description": "Supported_task_categories are the categories 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 +679,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 +719,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 +739,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", @@ -311,14 +770,6 @@ "properties": { "resource": { "$ref": "#/definitions/adminResource" - }, - "log_links": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/coreTaskLog" - }, - "title": "log information for the task execution" } }, "description": "Response to get an individual task resource." @@ -362,6 +813,24 @@ "phase": { "$ref": "#/definitions/coreTaskExecutionPhase", "description": "The phase of the execution is used to determine the phase of the plugin's execution." + }, + "custom_info": { + "type": "object", + "description": "Custom data specific to the agent." + } + } + }, + "adminTaskCategory": { + "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." } } }, @@ -1304,6 +1773,24 @@ }, "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." + }, + "container_image": { + "type": "string", + "description": "Override for the image used by task pods." + } + }, + "description": "Optional task node overrides that will be applied at task execution time." + }, "coreTaskTemplate": { "type": "object", "properties": { @@ -1539,6 +2026,24 @@ "type": "string" }, "title": "Environment variables attached to the task execution" + }, + "max_attempts": { + "type": "integer", + "format": "int32", + "description": "Represents the maximum number of attempts allowed for a task.\nIf a task fails, it can be retried up to this maximum number of attempts." + }, + "interruptible": { + "type": "boolean", + "description": "Indicates whether the task execution can be interrupted.\nIf set to true, the task can be stopped before completion." + }, + "interruptible_failure_threshold": { + "type": "integer", + "format": "int32", + "description": "Specifies the threshold for failure count at which the interruptible property\nwill take effect. If the number of consecutive task failures exceeds this threshold,\ninterruptible behavior will be activated." + }, + "overrides": { + "$ref": "#/definitions/coreTaskNodeOverrides", + "description": "Overrides for specific properties of the task node.\nThese overrides can be used to customize the behavior of the task node." } }, "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 d8a2711961..03d2ac7c2f 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -9018,6 +9018,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. */ @@ -9047,6 +9059,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 @@ -9155,9 +9179,6 @@ export namespace flyteidl { /** CreateTaskResponse resourceMeta */ resourceMeta?: (Uint8Array|null); - - /** CreateTaskResponse resource */ - resource?: (flyteidl.admin.IResource|null); } /** Represents a CreateTaskResponse. */ @@ -9172,12 +9193,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 @@ -9211,6 +9226,250 @@ 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 { @@ -9219,6 +9478,9 @@ export namespace flyteidl { /** GetTaskRequest resourceMeta */ resourceMeta?: (Uint8Array|null); + + /** GetTaskRequest taskCategory */ + taskCategory?: (flyteidl.admin.ITaskCategory|null); } /** Represents a GetTaskRequest. */ @@ -9236,6 +9498,9 @@ export namespace flyteidl { /** GetTaskRequest resourceMeta. */ public resourceMeta: Uint8Array; + /** GetTaskRequest taskCategory. */ + public taskCategory?: (flyteidl.admin.ITaskCategory|null); + /** * Creates a new GetTaskRequest instance using the specified properties. * @param [properties] Properties to set @@ -9274,9 +9539,6 @@ export namespace flyteidl { /** GetTaskResponse resource */ resource?: (flyteidl.admin.IResource|null); - - /** GetTaskResponse logLinks */ - logLinks?: (flyteidl.core.ITaskLog[]|null); } /** Represents a GetTaskResponse. */ @@ -9291,9 +9553,6 @@ export namespace flyteidl { /** GetTaskResponse resource. */ public resource?: (flyteidl.admin.IResource|null); - /** GetTaskResponse logLinks. */ - public logLinks: flyteidl.core.ITaskLog[]; - /** * Creates a new GetTaskResponse instance using the specified properties. * @param [properties] Properties to set @@ -9344,6 +9603,9 @@ export namespace flyteidl { /** Resource phase */ phase?: (flyteidl.core.TaskExecution.Phase|null); + + /** Resource customInfo */ + customInfo?: (google.protobuf.IStruct|null); } /** Represents a Resource. */ @@ -9370,6 +9632,9 @@ export namespace flyteidl { /** Resource phase. */ public phase: flyteidl.core.TaskExecution.Phase; + /** Resource customInfo. */ + public customInfo?: (google.protobuf.IStruct|null); + /** * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set @@ -9411,6 +9676,9 @@ export namespace flyteidl { /** DeleteTaskRequest resourceMeta */ resourceMeta?: (Uint8Array|null); + + /** DeleteTaskRequest taskCategory */ + taskCategory?: (flyteidl.admin.ITaskCategory|null); } /** Represents a DeleteTaskRequest. */ @@ -9428,6 +9696,9 @@ export namespace flyteidl { /** DeleteTaskRequest resourceMeta. */ public resourceMeta: Uint8Array; + /** DeleteTaskRequest taskCategory. */ + public taskCategory?: (flyteidl.admin.ITaskCategory|null); + /** * Creates a new DeleteTaskRequest instance using the specified properties. * @param [properties] Properties to set @@ -9515,6 +9786,12 @@ export namespace flyteidl { /** Agent supportedTaskTypes */ supportedTaskTypes?: (string[]|null); + + /** Agent isSync */ + isSync?: (boolean|null); + + /** Agent supportedTaskCategories */ + supportedTaskCategories?: (flyteidl.admin.ITaskCategory[]|null); } /** Represents an Agent. */ @@ -9532,6 +9809,12 @@ export namespace flyteidl { /** Agent supportedTaskTypes. */ public supportedTaskTypes: string[]; + /** Agent isSync. */ + public isSync: boolean; + + /** Agent supportedTaskCategories. */ + public supportedTaskCategories: flyteidl.admin.ITaskCategory[]; + /** * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set @@ -9565,6 +9848,64 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a TaskCategory. */ + interface ITaskCategory { + + /** TaskCategory name */ + name?: (string|null); + + /** TaskCategory version */ + version?: (number|null); + } + + /** Represents a TaskCategory. */ + class TaskCategory implements ITaskCategory { + + /** + * Constructs a new TaskCategory. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.ITaskCategory); + + /** TaskCategory name. */ + public name: string; + + /** TaskCategory version. */ + public version: number; + + /** + * Creates a new TaskCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskCategory instance + */ + public static create(properties?: flyteidl.admin.ITaskCategory): flyteidl.admin.TaskCategory; + + /** + * Encodes the specified TaskCategory message. Does not implicitly {@link flyteidl.admin.TaskCategory.verify|verify} messages. + * @param message TaskCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.ITaskCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskCategory + * @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.TaskCategory; + + /** + * Verifies a TaskCategory 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 { @@ -9787,6 +10128,9 @@ export namespace flyteidl { /** GetTaskMetricsRequest step */ step?: (google.protobuf.IDuration|null); + + /** GetTaskMetricsRequest taskCategory */ + taskCategory?: (flyteidl.admin.ITaskCategory|null); } /** Represents a GetTaskMetricsRequest. */ @@ -9816,6 +10160,9 @@ export namespace flyteidl { /** GetTaskMetricsRequest step. */ public step?: (google.protobuf.IDuration|null); + /** GetTaskMetricsRequest taskCategory. */ + public taskCategory?: (flyteidl.admin.ITaskCategory|null); + /** * Creates a new GetTaskMetricsRequest instance using the specified properties. * @param [properties] Properties to set @@ -9915,6 +10262,9 @@ export namespace flyteidl { /** GetTaskLogsRequest token */ token?: (string|null); + + /** GetTaskLogsRequest taskCategory */ + taskCategory?: (flyteidl.admin.ITaskCategory|null); } /** Represents a GetTaskLogsRequest. */ @@ -9938,6 +10288,9 @@ export namespace flyteidl { /** GetTaskLogsRequest token. */ public token: string; + /** GetTaskLogsRequest taskCategory. */ + public taskCategory?: (flyteidl.admin.ITaskCategory|null); + /** * Creates a new GetTaskLogsRequest instance using the specified properties. * @param [properties] Properties to set @@ -9971,14 +10324,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. */ @@ -9990,11 +10447,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. @@ -21564,6 +22024,51 @@ export namespace flyteidl { type GetExecutionMetricsCallback = (error: (Error|null), response?: flyteidl.admin.WorkflowExecutionGetMetricsResponse) => void; } + /** Represents a SyncAgentService */ + class SyncAgentService extends $protobuf.rpc.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 + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * 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): 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.SyncAgentService.ExecuteTaskSyncCallback): void; + + /** + * Calls ExecuteTaskSync. + * @param request ExecuteTaskSyncRequest message or plain object + * @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 { diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 791f0c9eb6..a97bd6951f 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -22090,6 +22090,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 */ /** @@ -22158,6 +22162,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 @@ -22197,6 +22233,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; }; @@ -22251,6 +22295,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; @@ -22305,6 +22361,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; }; @@ -22424,16 +22494,570 @@ 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.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 + */ + + /** + * Constructs a new ExecuteTaskSyncResponseHeader. + * @memberof flyteidl.admin + * @classdesc Represents an ExecuteTaskSyncResponseHeader. + * @implements IExecuteTaskSyncResponseHeader + * @constructor + * @param {flyteidl.admin.IExecuteTaskSyncResponseHeader=} [properties] Properties to set + */ + 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]]; + } + + /** + * ExecuteTaskSyncResponseHeader resource. + * @member {flyteidl.admin.IResource|null|undefined} resource + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader + * @instance + */ + ExecuteTaskSyncResponseHeader.prototype.resource = null; + + /** + * Creates a new ExecuteTaskSyncResponseHeader instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader + * @static + * @param {flyteidl.admin.IExecuteTaskSyncResponseHeader=} [properties] Properties to set + * @returns {flyteidl.admin.ExecuteTaskSyncResponseHeader} ExecuteTaskSyncResponseHeader instance + */ + ExecuteTaskSyncResponseHeader.create = function create(properties) { + return new ExecuteTaskSyncResponseHeader(properties); + }; + + /** + * Encodes the specified ExecuteTaskSyncResponseHeader message. Does not implicitly {@link flyteidl.admin.ExecuteTaskSyncResponseHeader.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ExecuteTaskSyncResponseHeader + * @static + * @param {flyteidl.admin.IExecuteTaskSyncResponseHeader} message ExecuteTaskSyncResponseHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteTaskSyncResponseHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 an ExecuteTaskSyncResponseHeader message from the specified reader or buffer. + * @function decode + * @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.ExecuteTaskSyncResponseHeader} ExecuteTaskSyncResponseHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.ExecuteTaskSyncResponseHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resource = $root.flyteidl.admin.Resource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -22444,59 +23068,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) @@ -22504,89 +23115,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); @@ -22597,36 +23208,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() { @@ -22637,6 +23251,7 @@ * @interface IGetTaskRequest * @property {string|null} [taskType] GetTaskRequest taskType * @property {Uint8Array|null} [resourceMeta] GetTaskRequest resourceMeta + * @property {flyteidl.admin.ITaskCategory|null} [taskCategory] GetTaskRequest taskCategory */ /** @@ -22670,6 +23285,14 @@ */ GetTaskRequest.prototype.resourceMeta = $util.newBuffer([]); + /** + * GetTaskRequest taskCategory. + * @member {flyteidl.admin.ITaskCategory|null|undefined} taskCategory + * @memberof flyteidl.admin.GetTaskRequest + * @instance + */ + GetTaskRequest.prototype.taskCategory = null; + /** * Creates a new GetTaskRequest instance using the specified properties. * @function create @@ -22698,6 +23321,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.taskType); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.resourceMeta); + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) + $root.flyteidl.admin.TaskCategory.encode(message.taskCategory, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -22725,6 +23350,9 @@ case 2: message.resourceMeta = reader.bytes(); break; + case 3: + message.taskCategory = $root.flyteidl.admin.TaskCategory.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -22750,6 +23378,11 @@ if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) { + var error = $root.flyteidl.admin.TaskCategory.verify(message.taskCategory); + if (error) + return "taskCategory." + error; + } return null; }; @@ -22763,7 +23396,6 @@ * @memberof flyteidl.admin * @interface IGetTaskResponse * @property {flyteidl.admin.IResource|null} [resource] GetTaskResponse resource - * @property {Array.|null} [logLinks] GetTaskResponse logLinks */ /** @@ -22775,7 +23407,6 @@ * @param {flyteidl.admin.IGetTaskResponse=} [properties] Properties to set */ function GetTaskResponse(properties) { - this.logLinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22790,14 +23421,6 @@ */ GetTaskResponse.prototype.resource = null; - /** - * GetTaskResponse logLinks. - * @member {Array.} logLinks - * @memberof flyteidl.admin.GetTaskResponse - * @instance - */ - GetTaskResponse.prototype.logLinks = $util.emptyArray; - /** * Creates a new GetTaskResponse instance using the specified properties. * @function create @@ -22824,9 +23447,6 @@ writer = $Writer.create(); if (message.resource != null && message.hasOwnProperty("resource")) $root.flyteidl.admin.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.logLinks != null && message.logLinks.length) - for (var i = 0; i < message.logLinks.length; ++i) - $root.flyteidl.core.TaskLog.encode(message.logLinks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -22851,11 +23471,6 @@ case 1: message.resource = $root.flyteidl.admin.Resource.decode(reader, reader.uint32()); break; - case 2: - if (!(message.logLinks && message.logLinks.length)) - message.logLinks = []; - message.logLinks.push($root.flyteidl.core.TaskLog.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -22880,15 +23495,6 @@ if (error) return "resource." + error; } - if (message.logLinks != null && message.hasOwnProperty("logLinks")) { - if (!Array.isArray(message.logLinks)) - return "logLinks: array expected"; - for (var i = 0; i < message.logLinks.length; ++i) { - var error = $root.flyteidl.core.TaskLog.verify(message.logLinks[i]); - if (error) - return "logLinks." + error; - } - } return null; }; @@ -22906,6 +23512,7 @@ * @property {string|null} [message] Resource message * @property {Array.|null} [logLinks] Resource logLinks * @property {flyteidl.core.TaskExecution.Phase|null} [phase] Resource phase + * @property {google.protobuf.IStruct|null} [customInfo] Resource customInfo */ /** @@ -22964,6 +23571,14 @@ */ Resource.prototype.phase = 0; + /** + * Resource customInfo. + * @member {google.protobuf.IStruct|null|undefined} customInfo + * @memberof flyteidl.admin.Resource + * @instance + */ + Resource.prototype.customInfo = null; + /** * Creates a new Resource instance using the specified properties. * @function create @@ -22999,6 +23614,8 @@ $root.flyteidl.core.TaskLog.encode(message.logLinks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.phase != null && message.hasOwnProperty("phase")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.phase); + if (message.customInfo != null && message.hasOwnProperty("customInfo")) + $root.google.protobuf.Struct.encode(message.customInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -23037,6 +23654,9 @@ case 5: message.phase = reader.int32(); break; + case 6: + message.customInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -23098,6 +23718,11 @@ case 7: break; } + if (message.customInfo != null && message.hasOwnProperty("customInfo")) { + var error = $root.google.protobuf.Struct.verify(message.customInfo); + if (error) + return "customInfo." + error; + } return null; }; @@ -23112,6 +23737,7 @@ * @interface IDeleteTaskRequest * @property {string|null} [taskType] DeleteTaskRequest taskType * @property {Uint8Array|null} [resourceMeta] DeleteTaskRequest resourceMeta + * @property {flyteidl.admin.ITaskCategory|null} [taskCategory] DeleteTaskRequest taskCategory */ /** @@ -23145,6 +23771,14 @@ */ DeleteTaskRequest.prototype.resourceMeta = $util.newBuffer([]); + /** + * DeleteTaskRequest taskCategory. + * @member {flyteidl.admin.ITaskCategory|null|undefined} taskCategory + * @memberof flyteidl.admin.DeleteTaskRequest + * @instance + */ + DeleteTaskRequest.prototype.taskCategory = null; + /** * Creates a new DeleteTaskRequest instance using the specified properties. * @function create @@ -23173,6 +23807,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.taskType); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.resourceMeta); + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) + $root.flyteidl.admin.TaskCategory.encode(message.taskCategory, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23200,6 +23836,9 @@ case 2: message.resourceMeta = reader.bytes(); break; + case 3: + message.taskCategory = $root.flyteidl.admin.TaskCategory.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -23225,6 +23864,11 @@ if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) { + var error = $root.flyteidl.admin.TaskCategory.verify(message.taskCategory); + if (error) + return "taskCategory." + error; + } return null; }; @@ -23332,6 +23976,8 @@ * @interface IAgent * @property {string|null} [name] Agent name * @property {Array.|null} [supportedTaskTypes] Agent supportedTaskTypes + * @property {boolean|null} [isSync] Agent isSync + * @property {Array.|null} [supportedTaskCategories] Agent supportedTaskCategories */ /** @@ -23344,6 +23990,7 @@ */ function Agent(properties) { this.supportedTaskTypes = []; + this.supportedTaskCategories = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23366,6 +24013,22 @@ */ Agent.prototype.supportedTaskTypes = $util.emptyArray; + /** + * Agent isSync. + * @member {boolean} isSync + * @memberof flyteidl.admin.Agent + * @instance + */ + Agent.prototype.isSync = false; + + /** + * Agent supportedTaskCategories. + * @member {Array.} supportedTaskCategories + * @memberof flyteidl.admin.Agent + * @instance + */ + Agent.prototype.supportedTaskCategories = $util.emptyArray; + /** * Creates a new Agent instance using the specified properties. * @function create @@ -23395,6 +24058,11 @@ 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]); + if (message.isSync != null && message.hasOwnProperty("isSync")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isSync); + if (message.supportedTaskCategories != null && message.supportedTaskCategories.length) + for (var i = 0; i < message.supportedTaskCategories.length; ++i) + $root.flyteidl.admin.TaskCategory.encode(message.supportedTaskCategories[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -23424,6 +24092,14 @@ message.supportedTaskTypes = []; message.supportedTaskTypes.push(reader.string()); break; + case 3: + message.isSync = reader.bool(); + break; + case 4: + if (!(message.supportedTaskCategories && message.supportedTaskCategories.length)) + message.supportedTaskCategories = []; + message.supportedTaskCategories.push($root.flyteidl.admin.TaskCategory.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -23453,12 +24129,151 @@ if (!$util.isString(message.supportedTaskTypes[i])) return "supportedTaskTypes: string[] expected"; } + if (message.isSync != null && message.hasOwnProperty("isSync")) + if (typeof message.isSync !== "boolean") + return "isSync: boolean expected"; + if (message.supportedTaskCategories != null && message.hasOwnProperty("supportedTaskCategories")) { + if (!Array.isArray(message.supportedTaskCategories)) + return "supportedTaskCategories: array expected"; + for (var i = 0; i < message.supportedTaskCategories.length; ++i) { + var error = $root.flyteidl.admin.TaskCategory.verify(message.supportedTaskCategories[i]); + if (error) + return "supportedTaskCategories." + error; + } + } return null; }; return Agent; })(); + admin.TaskCategory = (function() { + + /** + * Properties of a TaskCategory. + * @memberof flyteidl.admin + * @interface ITaskCategory + * @property {string|null} [name] TaskCategory name + * @property {number|null} [version] TaskCategory version + */ + + /** + * Constructs a new TaskCategory. + * @memberof flyteidl.admin + * @classdesc Represents a TaskCategory. + * @implements ITaskCategory + * @constructor + * @param {flyteidl.admin.ITaskCategory=} [properties] Properties to set + */ + function TaskCategory(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]]; + } + + /** + * TaskCategory name. + * @member {string} name + * @memberof flyteidl.admin.TaskCategory + * @instance + */ + TaskCategory.prototype.name = ""; + + /** + * TaskCategory version. + * @member {number} version + * @memberof flyteidl.admin.TaskCategory + * @instance + */ + TaskCategory.prototype.version = 0; + + /** + * Creates a new TaskCategory instance using the specified properties. + * @function create + * @memberof flyteidl.admin.TaskCategory + * @static + * @param {flyteidl.admin.ITaskCategory=} [properties] Properties to set + * @returns {flyteidl.admin.TaskCategory} TaskCategory instance + */ + TaskCategory.create = function create(properties) { + return new TaskCategory(properties); + }; + + /** + * Encodes the specified TaskCategory message. Does not implicitly {@link flyteidl.admin.TaskCategory.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.TaskCategory + * @static + * @param {flyteidl.admin.ITaskCategory} message TaskCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskCategory.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 TaskCategory message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.TaskCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.TaskCategory} TaskCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskCategory.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.TaskCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.version = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a TaskCategory message. + * @function verify + * @memberof flyteidl.admin.TaskCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaskCategory.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.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + return TaskCategory; + })(); + admin.GetAgentRequest = (function() { /** @@ -23906,6 +24721,7 @@ * @property {google.protobuf.ITimestamp|null} [startTime] GetTaskMetricsRequest startTime * @property {google.protobuf.ITimestamp|null} [endTime] GetTaskMetricsRequest endTime * @property {google.protobuf.IDuration|null} [step] GetTaskMetricsRequest step + * @property {flyteidl.admin.ITaskCategory|null} [taskCategory] GetTaskMetricsRequest taskCategory */ /** @@ -23972,6 +24788,14 @@ */ GetTaskMetricsRequest.prototype.step = null; + /** + * GetTaskMetricsRequest taskCategory. + * @member {flyteidl.admin.ITaskCategory|null|undefined} taskCategory + * @memberof flyteidl.admin.GetTaskMetricsRequest + * @instance + */ + GetTaskMetricsRequest.prototype.taskCategory = null; + /** * Creates a new GetTaskMetricsRequest instance using the specified properties. * @function create @@ -24009,6 +24833,8 @@ $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.step != null && message.hasOwnProperty("step")) $root.google.protobuf.Duration.encode(message.step, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) + $root.flyteidl.admin.TaskCategory.encode(message.taskCategory, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -24050,6 +24876,9 @@ case 6: message.step = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; + case 7: + message.taskCategory = $root.flyteidl.admin.TaskCategory.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -24095,7 +24924,12 @@ if (message.step != null && message.hasOwnProperty("step")) { var error = $root.google.protobuf.Duration.verify(message.step); if (error) - return "step." + error; + return "step." + error; + } + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) { + var error = $root.flyteidl.admin.TaskCategory.verify(message.taskCategory); + if (error) + return "taskCategory." + error; } return null; }; @@ -24233,6 +25067,7 @@ * @property {Uint8Array|null} [resourceMeta] GetTaskLogsRequest resourceMeta * @property {Long|null} [lines] GetTaskLogsRequest lines * @property {string|null} [token] GetTaskLogsRequest token + * @property {flyteidl.admin.ITaskCategory|null} [taskCategory] GetTaskLogsRequest taskCategory */ /** @@ -24282,6 +25117,14 @@ */ GetTaskLogsRequest.prototype.token = ""; + /** + * GetTaskLogsRequest taskCategory. + * @member {flyteidl.admin.ITaskCategory|null|undefined} taskCategory + * @memberof flyteidl.admin.GetTaskLogsRequest + * @instance + */ + GetTaskLogsRequest.prototype.taskCategory = null; + /** * Creates a new GetTaskLogsRequest instance using the specified properties. * @function create @@ -24314,6 +25157,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.lines); if (message.token != null && message.hasOwnProperty("token")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.token); + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) + $root.flyteidl.admin.TaskCategory.encode(message.taskCategory, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -24347,6 +25192,9 @@ case 4: message.token = reader.string(); break; + case 5: + message.taskCategory = $root.flyteidl.admin.TaskCategory.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -24378,20 +25226,253 @@ if (message.token != null && message.hasOwnProperty("token")) if (!$util.isString(message.token)) return "token: string expected"; + if (message.taskCategory != null && message.hasOwnProperty("taskCategory")) { + var error = $root.flyteidl.admin.TaskCategory.verify(message.taskCategory); + if (error) + return "taskCategory." + error; + } return null; }; 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 */ /** @@ -24403,7 +25484,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) @@ -24411,20 +25491,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. @@ -24450,11 +25544,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; }; @@ -24477,12 +25570,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); @@ -24503,16 +25594,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; }; @@ -50763,6 +51863,74 @@ return AdminService; })(); + service.SyncAgentService = (function() { + + /** + * Constructs a new SyncAgentService service. + * @memberof flyteidl.service + * @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 SyncAgentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SyncAgentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SyncAgentService; + + /** + * Creates new SyncAgentService service using the specified rpc implementation. + * @function create + * @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 {SyncAgentService} RPC service. Useful where requests and/or responses are streamed. + */ + SyncAgentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link flyteidl.service.SyncAgentService#executeTaskSync}. + * @memberof flyteidl.service.SyncAgentService + * @typedef ExecuteTaskSyncCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.ExecuteTaskSyncResponse} [response] ExecuteTaskSyncResponse + */ + + /** + * Calls ExecuteTaskSync. + * @function executeTaskSync + * @memberof flyteidl.service.SyncAgentService + * @instance + * @param {flyteidl.admin.IExecuteTaskSyncRequest} request ExecuteTaskSyncRequest message or plain object + * @param {flyteidl.service.SyncAgentService.ExecuteTaskSyncCallback} callback Node-style callback called with the error, if any, and ExecuteTaskSyncResponse + * @returns {undefined} + * @variation 1 + */ + 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.SyncAgentService + * @instance + * @param {flyteidl.admin.IExecuteTaskSyncRequest} request ExecuteTaskSyncRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SyncAgentService; + })(); + service.AsyncAgentService = (function() { /** diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py index f23ad50819..950a916662 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py @@ -13,14 +13,16 @@ 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 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__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\x1a\x1cgoogle/protobuf/struct.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\"\x99\x01\n\x0eGetTaskRequest\x12\x1f\n\ttask_type\x18\x01 \x01(\tB\x02\x18\x01R\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x41\n\rtask_category\x18\x03 \x01(\x0b\x32\x1c.flyteidl.admin.TaskCategoryR\x0ctaskCategory\"G\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\"\xb3\x02\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\x12\x38\n\x0b\x63ustom_info\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\ncustomInfo\"\x9c\x01\n\x11\x44\x65leteTaskRequest\x12\x1f\n\ttask_type\x18\x01 \x01(\tB\x02\x18\x01R\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\x12\x41\n\rtask_category\x18\x03 \x01(\x0b\x32\x1c.flyteidl.admin.TaskCategoryR\x0ctaskCategory\"\x14\n\x12\x44\x65leteTaskResponse\"\xc4\x01\n\x05\x41gent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x34\n\x14supported_task_types\x18\x02 \x03(\tB\x02\x18\x01R\x12supportedTaskTypes\x12\x17\n\x07is_sync\x18\x03 \x01(\x08R\x06isSync\x12X\n\x19supported_task_categories\x18\x04 \x03(\x0b\x32\x1c.flyteidl.admin.TaskCategoryR\x17supportedTaskCategories\"<\n\x0cTaskCategory\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\"\xdb\x02\n\x15GetTaskMetricsRequest\x12\x1f\n\ttask_type\x18\x01 \x01(\tB\x02\x18\x01R\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\x12\x41\n\rtask_category\x18\x07 \x01(\x0b\x32\x1c.flyteidl.admin.TaskCategoryR\x0ctaskCategory\"X\n\x16GetTaskMetricsResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32$.flyteidl.core.ExecutionMetricResultR\x07results\"\xc9\x01\n\x12GetTaskLogsRequest\x12\x1f\n\ttask_type\x18\x01 \x01(\tB\x02\x18\x01R\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\x12\x41\n\rtask_category\x18\x05 \x01(\x0b\x32\x1c.flyteidl.admin.TaskCategoryR\x0ctaskCategory\"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*b\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\x1a\x02\x18\x01\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) @@ -29,54 +31,80 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.flyteidl.adminB\nAgentProtoP\001Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\242\002\003FAX\252\002\016Flyteidl.Admin\312\002\016Flyteidl\\Admin\342\002\032Flyteidl\\Admin\\GPBMetadata\352\002\017Flyteidl::Admin' + _STATE._options = None + _STATE._serialized_options = b'\030\001' _TASKEXECUTIONMETADATA_LABELSENTRY._options = None _TASKEXECUTIONMETADATA_LABELSENTRY._serialized_options = b'8\001' _TASKEXECUTIONMETADATA_ANNOTATIONSENTRY._options = None _TASKEXECUTIONMETADATA_ANNOTATIONSENTRY._serialized_options = b'8\001' _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._options = None _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._serialized_options = b'8\001' + _GETTASKREQUEST.fields_by_name['task_type']._options = None + _GETTASKREQUEST.fields_by_name['task_type']._serialized_options = b'\030\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 + _DELETETASKREQUEST.fields_by_name['task_type']._options = None + _DELETETASKREQUEST.fields_by_name['task_type']._serialized_options = b'\030\001' + _AGENT.fields_by_name['supported_task_types']._options = None + _AGENT.fields_by_name['supported_task_types']._serialized_options = b'\030\001' + _GETTASKMETRICSREQUEST.fields_by_name['task_type']._options = None + _GETTASKMETRICSREQUEST.fields_by_name['task_type']._serialized_options = b'\030\001' + _GETTASKLOGSREQUEST.fields_by_name['task_type']._options = None + _GETTASKLOGSREQUEST.fields_by_name['task_type']._serialized_options = b'\030\001' + _globals['_STATE']._serialized_start=4271 + _globals['_STATE']._serialized_end=4369 + _globals['_TASKEXECUTIONMETADATA']._serialized_start=321 + _globals['_TASKEXECUTIONMETADATA']._serialized_end=1194 + _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_start=1000 + _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_end=1057 + _globals['_TASKEXECUTIONMETADATA_ANNOTATIONSENTRY']._serialized_start=1059 + _globals['_TASKEXECUTIONMETADATA_ANNOTATIONSENTRY']._serialized_end=1121 + _globals['_TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY']._serialized_start=1123 + _globals['_TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY']._serialized_end=1194 + _globals['_CREATETASKREQUEST']._serialized_start=1197 + _globals['_CREATETASKREQUEST']._serialized_end=1456 + _globals['_CREATETASKRESPONSE']._serialized_start=1458 + _globals['_CREATETASKRESPONSE']._serialized_end=1515 + _globals['_CREATEREQUESTHEADER']._serialized_start=1518 + _globals['_CREATEREQUESTHEADER']._serialized_end=1781 + _globals['_EXECUTETASKSYNCREQUEST']._serialized_start=1784 + _globals['_EXECUTETASKSYNCREQUEST']._serialized_end=1932 + _globals['_EXECUTETASKSYNCRESPONSEHEADER']._serialized_start=1934 + _globals['_EXECUTETASKSYNCRESPONSEHEADER']._serialized_end=2019 + _globals['_EXECUTETASKSYNCRESPONSE']._serialized_start=2022 + _globals['_EXECUTETASKSYNCRESPONSE']._serialized_end=2182 + _globals['_GETTASKREQUEST']._serialized_start=2185 + _globals['_GETTASKREQUEST']._serialized_end=2338 + _globals['_GETTASKRESPONSE']._serialized_start=2340 + _globals['_GETTASKRESPONSE']._serialized_end=2411 + _globals['_RESOURCE']._serialized_start=2414 + _globals['_RESOURCE']._serialized_end=2721 + _globals['_DELETETASKREQUEST']._serialized_start=2724 + _globals['_DELETETASKREQUEST']._serialized_end=2880 + _globals['_DELETETASKRESPONSE']._serialized_start=2882 + _globals['_DELETETASKRESPONSE']._serialized_end=2902 + _globals['_AGENT']._serialized_start=2905 + _globals['_AGENT']._serialized_end=3101 + _globals['_TASKCATEGORY']._serialized_start=3103 + _globals['_TASKCATEGORY']._serialized_end=3163 + _globals['_GETAGENTREQUEST']._serialized_start=3165 + _globals['_GETAGENTREQUEST']._serialized_end=3202 + _globals['_GETAGENTRESPONSE']._serialized_start=3204 + _globals['_GETAGENTRESPONSE']._serialized_end=3267 + _globals['_LISTAGENTSREQUEST']._serialized_start=3269 + _globals['_LISTAGENTSREQUEST']._serialized_end=3288 + _globals['_LISTAGENTSRESPONSE']._serialized_start=3290 + _globals['_LISTAGENTSRESPONSE']._serialized_end=3357 + _globals['_GETTASKMETRICSREQUEST']._serialized_start=3360 + _globals['_GETTASKMETRICSREQUEST']._serialized_end=3707 + _globals['_GETTASKMETRICSRESPONSE']._serialized_start=3709 + _globals['_GETTASKMETRICSRESPONSE']._serialized_end=3797 + _globals['_GETTASKLOGSREQUEST']._serialized_start=3800 + _globals['_GETTASKLOGSREQUEST']._serialized_end=4001 + _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_start=4003 + _globals['_GETTASKLOGSRESPONSEHEADER']._serialized_end=4052 + _globals['_GETTASKLOGSRESPONSEBODY']._serialized_start=4054 + _globals['_GETTASKLOGSRESPONSEBODY']._serialized_end=4105 + _globals['_GETTASKLOGSRESPONSE']._serialized_start=4108 + _globals['_GETTASKLOGSRESPONSE']._serialized_end=4269 # @@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..988985e5ae 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi @@ -1,10 +1,12 @@ 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 from google.protobuf import duration_pb2 as _duration_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import struct_pb2 as _struct_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -27,7 +29,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 +57,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,62 +86,110 @@ 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"] + __slots__ = ["task_type", "resource_meta", "task_category"] TASK_TYPE_FIELD_NUMBER: _ClassVar[int] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] + TASK_CATEGORY_FIELD_NUMBER: _ClassVar[int] task_type: str resource_meta: bytes - def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ...) -> None: ... + task_category: TaskCategory + def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ..., task_category: _Optional[_Union[TaskCategory, _Mapping]] = ...) -> None: ... class GetTaskResponse(_message.Message): - __slots__ = ["resource", "log_links"] + __slots__ = ["resource"] RESOURCE_FIELD_NUMBER: _ClassVar[int] - LOG_LINKS_FIELD_NUMBER: _ClassVar[int] resource: Resource - log_links: _containers.RepeatedCompositeFieldContainer[_execution_pb2.TaskLog] - def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ..., log_links: _Optional[_Iterable[_Union[_execution_pb2.TaskLog, _Mapping]]] = ...) -> None: ... + def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... class Resource(_message.Message): - __slots__ = ["state", "outputs", "message", "log_links", "phase"] + __slots__ = ["state", "outputs", "message", "log_links", "phase", "custom_info"] STATE_FIELD_NUMBER: _ClassVar[int] OUTPUTS_FIELD_NUMBER: _ClassVar[int] MESSAGE_FIELD_NUMBER: _ClassVar[int] LOG_LINKS_FIELD_NUMBER: _ClassVar[int] PHASE_FIELD_NUMBER: _ClassVar[int] + CUSTOM_INFO_FIELD_NUMBER: _ClassVar[int] state: State outputs: _literals_pb2.LiteralMap message: str log_links: _containers.RepeatedCompositeFieldContainer[_execution_pb2.TaskLog] phase: _execution_pb2.TaskExecution.Phase - def __init__(self, state: _Optional[_Union[State, str]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., message: _Optional[str] = ..., log_links: _Optional[_Iterable[_Union[_execution_pb2.TaskLog, _Mapping]]] = ..., phase: _Optional[_Union[_execution_pb2.TaskExecution.Phase, str]] = ...) -> None: ... + custom_info: _struct_pb2.Struct + def __init__(self, state: _Optional[_Union[State, str]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., message: _Optional[str] = ..., log_links: _Optional[_Iterable[_Union[_execution_pb2.TaskLog, _Mapping]]] = ..., phase: _Optional[_Union[_execution_pb2.TaskExecution.Phase, str]] = ..., custom_info: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... class DeleteTaskRequest(_message.Message): - __slots__ = ["task_type", "resource_meta"] + __slots__ = ["task_type", "resource_meta", "task_category"] TASK_TYPE_FIELD_NUMBER: _ClassVar[int] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] + TASK_CATEGORY_FIELD_NUMBER: _ClassVar[int] task_type: str resource_meta: bytes - def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ...) -> None: ... + task_category: TaskCategory + def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ..., task_category: _Optional[_Union[TaskCategory, _Mapping]] = ...) -> None: ... class DeleteTaskResponse(_message.Message): __slots__ = [] def __init__(self) -> None: ... class Agent(_message.Message): - __slots__ = ["name", "supported_task_types"] + __slots__ = ["name", "supported_task_types", "is_sync", "supported_task_categories"] NAME_FIELD_NUMBER: _ClassVar[int] SUPPORTED_TASK_TYPES_FIELD_NUMBER: _ClassVar[int] + IS_SYNC_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_TASK_CATEGORIES_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: ... + is_sync: bool + supported_task_categories: _containers.RepeatedCompositeFieldContainer[TaskCategory] + def __init__(self, name: _Optional[str] = ..., supported_task_types: _Optional[_Iterable[str]] = ..., is_sync: bool = ..., supported_task_categories: _Optional[_Iterable[_Union[TaskCategory, _Mapping]]] = ...) -> None: ... + +class TaskCategory(_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"] @@ -156,20 +214,22 @@ class ListAgentsResponse(_message.Message): def __init__(self, agents: _Optional[_Iterable[_Union[Agent, _Mapping]]] = ...) -> None: ... class GetTaskMetricsRequest(_message.Message): - __slots__ = ["task_type", "resource_meta", "queries", "start_time", "end_time", "step"] + __slots__ = ["task_type", "resource_meta", "queries", "start_time", "end_time", "step", "task_category"] TASK_TYPE_FIELD_NUMBER: _ClassVar[int] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] QUERIES_FIELD_NUMBER: _ClassVar[int] START_TIME_FIELD_NUMBER: _ClassVar[int] END_TIME_FIELD_NUMBER: _ClassVar[int] STEP_FIELD_NUMBER: _ClassVar[int] + TASK_CATEGORY_FIELD_NUMBER: _ClassVar[int] task_type: str 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: ... + task_category: TaskCategory + 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]] = ..., task_category: _Optional[_Union[TaskCategory, _Mapping]] = ...) -> None: ... class GetTaskMetricsResponse(_message.Message): __slots__ = ["results"] @@ -178,21 +238,35 @@ class GetTaskMetricsResponse(_message.Message): def __init__(self, results: _Optional[_Iterable[_Union[_metrics_pb2.ExecutionMetricResult, _Mapping]]] = ...) -> None: ... class GetTaskLogsRequest(_message.Message): - __slots__ = ["task_type", "resource_meta", "lines", "token"] + __slots__ = ["task_type", "resource_meta", "lines", "token", "task_category"] TASK_TYPE_FIELD_NUMBER: _ClassVar[int] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] LINES_FIELD_NUMBER: _ClassVar[int] TOKEN_FIELD_NUMBER: _ClassVar[int] + TASK_CATEGORY_FIELD_NUMBER: _ClassVar[int] task_type: str 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: ... + task_category: TaskCategory + def __init__(self, task_type: _Optional[str] = ..., resource_meta: _Optional[bytes] = ..., lines: _Optional[int] = ..., token: _Optional[str] = ..., task_category: _Optional[_Union[TaskCategory, _Mapping]] = ...) -> 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..2c4f728fba 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\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\xe3\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\xa3\x01\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"W\x82\xd3\xe4\x93\x02Q\x12O/api/v1/agent/task/{task_category.name}/{task_category.version}/{resource_meta}\x12\xb7\x01\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"b\x82\xd3\xe4\x93\x02\\*Z/api/v1/agent/task_executions/{task_category.name}/{task_category.version}/{resource_meta}\x12\xc0\x01\n\x0eGetTaskMetrics\x12%.flyteidl.admin.GetTaskMetricsRequest\x1a&.flyteidl.admin.GetTaskMetricsResponse\"_\x82\xd3\xe4\x93\x02Y\x12W/api/v1/agent/task/metrics/{task_category.name}/{task_category.version}/{resource_meta}\x12\xb6\x01\n\x0bGetTaskLogs\x12\".flyteidl.admin.GetTaskLogsRequest\x1a#.flyteidl.admin.GetTaskLogsResponse\"\\\x82\xd3\xe4\x93\x02V\x12T/api/v1/agent/task/logs/{task_category.name}/{task_category.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,26 @@ 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' + _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 + _ASYNCAGENTSERVICE.methods_by_name['GetTask']._serialized_options = b'\202\323\344\223\002Q\022O/api/v1/agent/task/{task_category.name}/{task_category.version}/{resource_meta}' + _ASYNCAGENTSERVICE.methods_by_name['DeleteTask']._options = None + _ASYNCAGENTSERVICE.methods_by_name['DeleteTask']._serialized_options = b'\202\323\344\223\002\\*Z/api/v1/agent/task_executions/{task_category.name}/{task_category.version}/{resource_meta}' + _ASYNCAGENTSERVICE.methods_by_name['GetTaskMetrics']._options = None + _ASYNCAGENTSERVICE.methods_by_name['GetTaskMetrics']._serialized_options = b'\202\323\344\223\002Y\022W/api/v1/agent/task/metrics/{task_category.name}/{task_category.version}/{resource_meta}' + _ASYNCAGENTSERVICE.methods_by_name['GetTaskLogs']._options = None + _ASYNCAGENTSERVICE.methods_by_name['GetTaskLogs']._serialized_options = b'\202\323\344\223\002V\022T/api/v1/agent/task/logs/{task_category.name}/{task_category.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['_SYNCAGENTSERVICE']._serialized_start=109 + _globals['_SYNCAGENTSERVICE']._serialized_end=270 + _globals['_ASYNCAGENTSERVICE']._serialized_start=273 + _globals['_ASYNCAGENTSERVICE']._serialized_end=1140 + _globals['_AGENTMETADATASERVICE']._serialized_start=1143 + _globals['_AGENTMETADATASERVICE']._serialized_end=1383 # @@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..8436a9d17f 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,73 @@ from flyteidl.admin import agent_pb2 as flyteidl_dot_admin_dot_agent__pb2 +class SyncAgentServiceStub(object): + """SyncAgentService defines an RPC Service that allows propeller to send the request to the agent server synchronously. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ExecuteTaskSync = channel.stream_stream( + '/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): + """SyncAgentService 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): + """SyncAgentService 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. + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. """ def __init__(self, channel): @@ -35,7 +100,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, @@ -43,11 +108,11 @@ 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 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!') @@ -108,7 +173,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, @@ -121,7 +186,7 @@ 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 @@ -203,7 +268,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..c8caad6d24 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -21,6 +21,23 @@ 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>, + /// Represents the maximum number of attempts allowed for a task. + /// If a task fails, it can be retried up to this maximum number of attempts. + #[prost(int32, tag="7")] + pub max_attempts: i32, + /// Indicates whether the task execution can be interrupted. + /// If set to true, the task can be stopped before completion. + #[prost(bool, tag="8")] + pub interruptible: bool, + /// Specifies the threshold for failure count at which the interruptible property + /// will take effect. If the number of consecutive task failures exceeds this threshold, + /// interruptible behavior will be activated. + #[prost(int32, tag="9")] + pub interruptible_failure_threshold: i32, + /// Overrides for specific properties of the task node. + /// These overrides can be used to customize the behavior of the task node. + #[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 +62,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,11 +131,15 @@ pub mod create_task_response { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTaskRequest { /// A predefined yet extensible Task type identifier. + #[deprecated] #[prost(string, tag="1")] pub task_type: ::prost::alloc::string::String, /// Metadata about the resource to be pass to the agent. #[prost(bytes="vec", tag="2")] pub resource_meta: ::prost::alloc::vec::Vec, + /// A predefined yet extensible Task type identifier. + #[prost(message, optional, tag="3")] + pub task_category: ::core::option::Option, } /// Response to get an individual task resource. #[allow(clippy::derive_partial_eq_without_eq)] @@ -80,9 +147,6 @@ pub struct GetTaskRequest { pub struct GetTaskResponse { #[prost(message, optional, tag="1")] pub resource: ::core::option::Option, - /// log information for the task execution - #[prost(message, repeated, tag="2")] - pub log_links: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -105,17 +169,24 @@ pub struct Resource { /// The phase of the execution is used to determine the phase of the plugin's execution. #[prost(enumeration="super::core::task_execution::Phase", tag="5")] pub phase: i32, + /// Custom data specific to the agent. + #[prost(message, optional, tag="6")] + pub custom_info: ::core::option::Option<::prost_types::Struct>, } /// A message used to delete a task. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTaskRequest { /// A predefined yet extensible Task type identifier. + #[deprecated] #[prost(string, tag="1")] pub task_type: ::prost::alloc::string::String, /// Metadata about the resource to be pass to the agent. #[prost(bytes="vec", tag="2")] pub resource_meta: ::prost::alloc::vec::Vec, + /// A predefined yet extensible Task type identifier. + #[prost(message, optional, tag="3")] + pub task_category: ::core::option::Option, } /// Response to delete a task. #[allow(clippy::derive_partial_eq_without_eq)] @@ -130,8 +201,29 @@ 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. + #[deprecated] #[prost(string, repeated, tag="2")] pub supported_task_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// 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, + /// Supported_task_categories are the categories of the tasks that the agent can handle. + #[prost(message, repeated, tag="4")] + pub supported_task_categories: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TaskCategory { + /// 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,6 +257,7 @@ pub struct ListAgentsResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTaskMetricsRequest { /// A predefined yet extensible Task type identifier. + #[deprecated] #[prost(string, tag="1")] pub task_type: ::prost::alloc::string::String, /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). @@ -183,6 +276,9 @@ pub struct GetTaskMetricsRequest { /// Query resolution step width in duration format or float number of seconds. #[prost(message, optional, tag="6")] pub step: ::core::option::Option<::prost_types::Duration>, + /// A predefined yet extensible Task type identifier. + #[prost(message, optional, tag="7")] + pub task_category: ::core::option::Option, } /// A response containing a list of metrics for a task execution. #[allow(clippy::derive_partial_eq_without_eq)] @@ -197,6 +293,7 @@ pub struct GetTaskMetricsResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTaskLogsRequest { /// A predefined yet extensible Task type identifier. + #[deprecated] #[prost(string, tag="1")] pub task_type: ::prost::alloc::string::String, /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). @@ -209,19 +306,43 @@ pub struct GetTaskLogsRequest { /// in a query. If there are no more results, this value will be empty. #[prost(string, tag="4")] pub token: ::prost::alloc::string::String, + /// A predefined yet extensible Task type identifier. + #[prost(message, optional, tag="5")] + pub task_category: ::core::option::Option, } -/// 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 bbb3c11067..63a1d3f726 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -1703,6 +1703,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)] @@ -2032,199 +2173,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)] @@ -2652,6 +2600,58 @@ pub struct LaunchPlanTemplate { #[prost(message, optional, tag="3")] pub fixed_inputs: ::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/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index 5b7043e86f..0256483d8f 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -5,15 +5,17 @@ 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"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; - +import "google/protobuf/struct.proto"; // The state of the execution is used to control its visibility in the UI/CLI. enum State { + option deprecated = true; RETRYABLE_FAILURE = 0; PERMANENT_FAILURE = 1; PENDING = 2; @@ -35,6 +37,19 @@ message TaskExecutionMetadata { string k8s_service_account = 5; // Environment variables attached to the task execution map environment_variables = 6; + // Represents the maximum number of attempts allowed for a task. + // If a task fails, it can be retried up to this maximum number of attempts. + int32 max_attempts = 7; + // Indicates whether the task execution can be interrupted. + // If set to true, the task can be stopped before completion. + bool interruptible = 8; + // Specifies the threshold for failure count at which the interruptible property + // will take effect. If the number of consecutive task failures exceeds this threshold, + // interruptible behavior will be activated. + int32 interruptible_failure_threshold = 9; + // Overrides for specific properties of the task node. + // These overrides can be used to customize the behavior of the task node. + core.TaskNodeOverrides overrides = 10; } // Represents a request structure to create task. @@ -53,28 +68,55 @@ message CreateTaskRequest { // 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 { + // Template of the task that encapsulates all the metadata of the task. + core.TaskTemplate template = 1; + // Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring) + string output_prefix = 2; + // subset of runtime task execution metadata. + 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; +} + + +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; + string task_type = 1 [deprecated = true]; // Metadata about the resource to be pass to the agent. bytes resource_meta = 2; + // A predefined yet extensible Task type identifier. + TaskCategory task_category = 3; } // Response to get an individual task resource. message GetTaskResponse { Resource resource = 1; - - // log information for the task execution - repeated core.TaskLog log_links = 2; } message Resource { @@ -90,14 +132,18 @@ message Resource { repeated core.TaskLog log_links = 4; // The phase of the execution is used to determine the phase of the plugin's execution. core.TaskExecution.Phase phase = 5; + // Custom data specific to the agent. + google.protobuf.Struct custom_info = 6; } // A message used to delete a task. message DeleteTaskRequest { // A predefined yet extensible Task type identifier. - string task_type = 1; + string task_type = 1 [deprecated = true]; // Metadata about the resource to be pass to the agent. bytes resource_meta = 2; + // A predefined yet extensible Task type identifier. + TaskCategory task_category = 3; } // Response to delete a task. @@ -109,7 +155,24 @@ message Agent { string name = 1; // SupportedTaskTypes are the types of the tasks that the agent can handle. - repeated string supported_task_types = 2; + repeated string supported_task_types = 2 [deprecated = true]; + + // 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; + + // Supported_task_categories are the categories of the tasks that the agent can handle. + repeated TaskCategory supported_task_categories = 4; +} + +message TaskCategory { + // The name of the task type. + string name = 1; + // The version of the task type. + int32 version = 2; } // A request to get an agent. @@ -134,7 +197,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; + string task_type = 1 [deprecated = true]; // 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. @@ -146,6 +209,8 @@ message GetTaskMetricsRequest { google.protobuf.Timestamp end_time = 5; // Query resolution step width in duration format or float number of seconds. google.protobuf.Duration step = 6; + // A predefined yet extensible Task type identifier. + TaskCategory task_category = 7; } // A response containing a list of metrics for a task execution. @@ -157,7 +222,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; + string task_type = 1 [deprecated = true]; // 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. @@ -165,13 +230,25 @@ message GetTaskLogsRequest { // 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 = 4; + // A predefined yet extensible Task type identifier. + TaskCategory task_category = 5; } -// 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; -} \ No newline at end of file + 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; + } +} diff --git a/flyteidl/protos/flyteidl/service/agent.proto b/flyteidl/protos/flyteidl/service/agent.proto index 7538c0b819..cd6b93a972 100644 --- a/flyteidl/protos/flyteidl/service/agent.proto +++ b/flyteidl/protos/flyteidl/service/agent.proto @@ -6,24 +6,58 @@ 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. +// SyncAgentService 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) = { + post: "/api/v1/agent/task/stream" + body: "*" + }; + }; +} + +// AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. service AsyncAgentService { - // Send a task create request to the agent server. - rpc CreateTask (flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){}; + // CreateTask sends a task create request to the agent service. + rpc CreateTask (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 (flyteidl.admin.GetTaskResponse){ + option (google.api.http) = { + get: "/api/v1/agent/task/{task_category.name}/{task_category.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_category.name}/{task_category.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_category.name}/{task_category.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_category.name}/{task_category.version}/{resource_meta}" + }; + }; } // AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. @@ -32,7 +66,7 @@ service AgentMetadataService { // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. rpc GetAgent (flyteidl.admin.GetAgentRequest) returns (flyteidl.admin.GetAgentResponse){ option (google.api.http) = { - get: "/api/v1/agent/{name}" + get: "/api/v1/agent/{name}" }; }; diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/client.go b/flyteplugins/go/tasks/plugins/webapi/agent/client.go index b118f64596..b525acc5c3 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/client.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/client.go @@ -19,13 +19,27 @@ import ( "github.com/flyteorg/flyte/flytestdlib/logger" ) +const defaultTaskTypeVersion = 0 + +type Agent struct { + // 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 + // AgentDeployment is the agent deployment where this agent is running. + AgentDeployment *Deployment +} + // ClientSet contains the clients exposed to communicate with various agent services. type ClientSet struct { - agentClients map[string]service.AsyncAgentServiceClient // map[endpoint] => client - agentMetadataClients map[string]service.AgentMetadataServiceClient // map[endpoint] => client + asyncAgentClients map[string]service.AsyncAgentServiceClient // map[endpoint] => AsyncAgentServiceClient + syncAgentClients map[string]service.SyncAgentServiceClient // map[endpoint] => SyncAgentServiceClient + agentMetadataClients map[string]service.AgentMetadataServiceClient // map[endpoint] => AgentMetadataServiceClient } -func getGrpcConnection(ctx context.Context, agent *Agent) (*grpc.ClientConn, error) { +func getGrpcConnection(ctx context.Context, agent *Deployment) (*grpc.ClientConn, error) { var opts []grpc.DialOption if agent.Insecure { @@ -67,7 +81,7 @@ func getGrpcConnection(ctx context.Context, agent *Agent) (*grpc.ClientConn, err return conn, nil } -func getFinalTimeout(operation string, agent *Agent) config.Duration { +func getFinalTimeout(operation string, agent *Deployment) config.Duration { if t, exists := agent.Timeouts[operation]; exists { return t } @@ -75,7 +89,7 @@ func getFinalTimeout(operation string, agent *Agent) config.Duration { return agent.DefaultTimeout } -func getFinalContext(ctx context.Context, operation string, agent *Agent) (context.Context, context.CancelFunc) { +func getFinalContext(ctx context.Context, operation string, agent *Deployment) (context.Context, context.CancelFunc) { timeout := getFinalTimeout(operation, agent).Duration if timeout == 0 { return ctx, func() {} @@ -84,20 +98,21 @@ 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) (Registry, error) { + agentRegistry := make(Registry) cfg := GetConfig() - var agentDeployments []*Agent + var agentDeployments []*Deployment // Ensure that the old configuration is backward compatible - for taskType, agentID := range cfg.AgentForTaskTypes { - agentRegistry[taskType] = cfg.Agents[agentID] + for taskType, agentDeploymentID := range cfg.AgentForTaskTypes { + agent := Agent{AgentDeployment: cfg.AgentDeployments[agentDeploymentID], IsSync: false} + agentRegistry[taskType] = map[int32]*Agent{defaultTaskTypeVersion: &agent} } if len(cfg.DefaultAgent.Endpoint) != 0 { agentDeployments = append(agentDeployments, &cfg.DefaultAgent) } - agentDeployments = append(agentDeployments, maps.Values(cfg.Agents)...) + agentDeployments = append(agentDeployments, maps.Values(cfg.AgentDeployments)...) for _, agentDeployment := range agentDeployments { client := cs.agentMetadataClients[agentDeployment.Endpoint] @@ -120,12 +135,20 @@ func initializeAgentRegistry(cs *ClientSet) (map[string]*Agent, error) { return nil, fmt.Errorf("failed to list agent: [%v] with error: [%v]", agentDeployment, err) } - agents := res.GetAgents() - for _, agent := range agents { - supportedTaskTypes := agent.SupportedTaskTypes - for _, supportedTaskType := range supportedTaskTypes { - agentRegistry[supportedTaskType] = agentDeployment + for _, agent := range res.GetAgents() { + deprecatedSupportedTaskTypes := agent.SupportedTaskTypes + for _, supportedTaskType := range deprecatedSupportedTaskTypes { + agent := &Agent{AgentDeployment: agentDeployment, IsSync: agent.IsSync} + agentRegistry[supportedTaskType] = map[int32]*Agent{defaultTaskTypeVersion: agent} } + + supportedTaskCategories := agent.SupportedTaskCategories + for _, supportedCategory := range supportedTaskCategories { + agent := &Agent{AgentDeployment: agentDeployment, IsSync: agent.IsSync} + agentRegistry[supportedCategory.GetName()] = map[int32]*Agent{supportedCategory.GetVersion(): agent} + } + logger.Infof(context.Background(), "[%v] is a sync agent: [%v]", agent.Name, agent.IsSync) + logger.Infof(context.Background(), "[%v] supports task category: [%v]", agent.Name, supportedTaskCategories) } } @@ -133,27 +156,30 @@ func initializeAgentRegistry(cs *ClientSet) (map[string]*Agent, error) { } func initializeClients(ctx context.Context) (*ClientSet, error) { - agentClients := make(map[string]service.AsyncAgentServiceClient) + asyncAgentClients := make(map[string]service.AsyncAgentServiceClient) + syncAgentClients := make(map[string]service.SyncAgentServiceClient) agentMetadataClients := make(map[string]service.AgentMetadataServiceClient) - var agentDeployments []*Agent + var agentDeployments []*Deployment cfg := GetConfig() if len(cfg.DefaultAgent.Endpoint) != 0 { agentDeployments = append(agentDeployments, &cfg.DefaultAgent) } - agentDeployments = append(agentDeployments, maps.Values(cfg.Agents)...) - for _, agentDeployment := range agentDeployments { - conn, err := getGrpcConnection(ctx, agentDeployment) + agentDeployments = append(agentDeployments, maps.Values(cfg.AgentDeployments)...) + for _, agentService := range agentDeployments { + conn, err := getGrpcConnection(ctx, agentService) if err != nil { return nil, err } - agentClients[agentDeployment.Endpoint] = service.NewAsyncAgentServiceClient(conn) - agentMetadataClients[agentDeployment.Endpoint] = service.NewAgentMetadataServiceClient(conn) + syncAgentClients[agentService.Endpoint] = service.NewSyncAgentServiceClient(conn) + asyncAgentClients[agentService.Endpoint] = service.NewAsyncAgentServiceClient(conn) + agentMetadataClients[agentService.Endpoint] = service.NewAgentMetadataServiceClient(conn) } return &ClientSet{ - agentClients: agentClients, + syncAgentClients: syncAgentClients, + asyncAgentClients: asyncAgentClients, agentMetadataClients: agentMetadataClients, }, nil } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go index d68811d037..4ad7f8cbaa 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/client_test.go @@ -9,10 +9,22 @@ import ( func TestInitializeClients(t *testing.T) { cfg := defaultConfig + cfg.AgentDeployments = map[string]*Deployment{ + "x": { + Endpoint: "x", + }, + "y": { + Endpoint: "y", + }, + } ctx := context.Background() err := SetConfig(&cfg) assert.NoError(t, err) cs, err := initializeClients(ctx) assert.NoError(t, err) assert.NotNil(t, cs) + _, ok := cs.syncAgentClients["y"] + assert.True(t, ok) + _, ok = cs.asyncAgentClients["x"] + assert.True(t, ok) } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/config.go b/flyteplugins/go/tasks/plugins/webapi/agent/config.go index cb0bd3089f..3f9fd354b6 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/config.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/config.go @@ -39,7 +39,7 @@ var ( Value: 50, }, }, - DefaultAgent: Agent{ + DefaultAgent: Deployment{ Endpoint: "", Insecure: true, DefaultTimeout: config.Duration{Duration: 10 * time.Second}, @@ -61,19 +61,19 @@ type Config struct { ResourceConstraints core.ResourceConstraintsSpec `json:"resourceConstraints" pflag:"-,Defines resource constraints on how many executions to be created per project/overall at any given time."` // The default agent if there does not exist a more specific matching against task types - DefaultAgent Agent `json:"defaultAgent" pflag:",The default agent."` + DefaultAgent Deployment `json:"defaultAgent" pflag:",The default agent."` - // The agents used to match against specific task types. {AgentId: Agent} - Agents map[string]*Agent `json:"agents" pflag:",The agents."` + // The agents used to match against specific task types. {agentDeploymentID: AgentDeployment} + AgentDeployments map[string]*Deployment `json:"agents" pflag:",The agents."` - // Maps task types to their agents. {TaskType: AgentId} + // Maps task types to their agents. {TaskType: agentDeploymentID} AgentForTaskTypes map[string]string `json:"agentForTaskTypes" pflag:"-,"` // SupportedTaskTypes is a list of task types that are supported by this plugin. SupportedTaskTypes []string `json:"supportedTaskTypes" pflag:"-,Defines a list of task types that are supported by this plugin."` } -type Agent struct { +type Deployment struct { // Endpoint points to an agent gRPC endpoint Endpoint string `json:"endpoint"` diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/config_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/config_test.go index a3e6d69d66..09abffb83c 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/config_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/config_test.go @@ -27,7 +27,7 @@ func TestGetAndSetConfig(t *testing.T) { }, } cfg.DefaultAgent.DefaultTimeout = config.Duration{Duration: 10 * time.Second} - cfg.Agents = map[string]*Agent{ + cfg.AgentDeployments = map[string]*Deployment{ "agent_1": { Insecure: cfg.DefaultAgent.Insecure, DefaultServiceConfig: cfg.DefaultAgent.DefaultServiceConfig, diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go index fe3b45b881..a4ddc5e303 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "io" "sync/atomic" "testing" "time" @@ -13,6 +14,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 +26,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" @@ -72,9 +73,9 @@ func TestEndToEnd(t *testing.T) { } basePrefix := storage.DataReference("fake://bucket/prefix/") - t.Run("run a job", func(t *testing.T) { - pluginEntry := pluginmachinery.CreateRemotePlugin(newMockAgentPlugin()) - plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("test1")) + t.Run("run an async task", func(t *testing.T) { + pluginEntry := pluginmachinery.CreateRemotePlugin(newMockAsyncAgentPlugin()) + plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("async task")) assert.NoError(t, err) phase := tests.RunPluginEndToEndTest(t, plugin, &template, inputs, nil, nil, iter) @@ -85,14 +86,38 @@ func TestEndToEnd(t *testing.T) { assert.Equal(t, true, phase.Phase().IsSuccess()) }) + t.Run("run a sync task", func(t *testing.T) { + pluginEntry := pluginmachinery.CreateRemotePlugin(newMockSyncAgentPlugin()) + plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("sync task")) + assert.NoError(t, err) + + template.Type = "openai" + template.Interface = &flyteIdlCore.TypedInterface{ + Outputs: &flyteIdlCore.VariableMap{ + Variables: map[string]*flyteIdlCore.Variable{ + "x": {Type: &flyteIdlCore.LiteralType{ + Type: &flyteIdlCore.LiteralType_Simple{ + Simple: flyteIdlCore.SimpleType_INTEGER, + }, + }, + }, + }, + }, + } + expectedOutputs, err := coreutils.MakeLiteralMap(map[string]interface{}{"x": 1}) + assert.NoError(t, err) + phase := tests.RunPluginEndToEndTest(t, plugin, &template, inputs, expectedOutputs, nil, iter) + assert.Equal(t, true, phase.Phase().IsSuccess()) + }) + t.Run("failed to create a job", func(t *testing.T) { - agentPlugin := newMockAgentPlugin() + agentPlugin := newMockAsyncAgentPlugin() agentPlugin.PluginLoader = func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { return Plugin{ metricScope: iCtx.MetricsScope(), cfg: GetConfig(), cs: &ClientSet{ - agentClients: map[string]service.AsyncAgentServiceClient{}, + asyncAgentClients: map[string]service.AsyncAgentServiceClient{}, agentMetadataClients: map[string]service.AgentMetadataServiceClient{}, }, }, nil @@ -124,7 +149,7 @@ func TestEndToEnd(t *testing.T) { tr.OnRead(context.Background()).Return(nil, fmt.Errorf("read fail")) tCtx.OnTaskReader().Return(tr) - agentPlugin := newMockAgentPlugin() + agentPlugin := newMockAsyncAgentPlugin() pluginEntry := pluginmachinery.CreateRemotePlugin(agentPlugin) plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("test3")) assert.NoError(t, err) @@ -145,7 +170,7 @@ func TestEndToEnd(t *testing.T) { inputReader.OnGetMatch(mock.Anything).Return(nil, fmt.Errorf("read fail")) tCtx.OnInputReader().Return(inputReader) - agentPlugin := newMockAgentPlugin() + agentPlugin := newMockAsyncAgentPlugin() pluginEntry := pluginmachinery.CreateRemotePlugin(agentPlugin) plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("test4")) assert.NoError(t, err) @@ -224,26 +249,23 @@ func getTaskContext(t *testing.T) *pluginCoreMocks.TaskExecutionContext { return tCtx } -func newMockAgentPlugin() webapi.PluginEntry { - - agentClient := new(agentMocks.AsyncAgentServiceClient) +func newMockAsyncAgentPlugin() webapi.PluginEntry { + 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.GetTaskCategory().GetName() == "spark" }) - agentClient.On("GetTask", mock.Anything, mockGetRequestMatcher).Return( - &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED}}, nil) + asyncAgentClient.On("GetTask", mock.Anything, mockGetRequestMatcher).Return( + &admin.GetTaskResponse{Resource: &admin.Resource{Phase: flyteIdlCore.TaskExecution_SUCCEEDED}}, nil) - agentClient.On("DeleteTask", mock.Anything, mock.Anything).Return( + asyncAgentClient.On("DeleteTask", mock.Anything, mock.Anything).Return( &admin.DeleteTaskResponse{}, nil) cfg := defaultConfig @@ -251,16 +273,57 @@ func newMockAgentPlugin() webapi.PluginEntry { return webapi.PluginEntry{ ID: "agent-service", - SupportedTaskTypes: []core.TaskType{"bigquery_query_job_task", "spark", "api_task"}, + SupportedTaskTypes: []core.TaskType{"bigquery_query_job_task", "spark"}, + PluginLoader: func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { + return Plugin{ + metricScope: iCtx.MetricsScope(), + cfg: &cfg, + cs: &ClientSet{ + asyncAgentClients: map[string]service.AsyncAgentServiceClient{ + defaultAgentEndpoint: asyncAgentClient, + }, + }, + }, nil + }, + } +} + +func newMockSyncAgentPlugin() webapi.PluginEntry { + syncAgentClient := new(agentMocks.SyncAgentServiceClient) + output, _ := coreutils.MakeLiteralMap(map[string]interface{}{"x": 1}) + resource := &admin.Resource{Phase: flyteIdlCore.TaskExecution_SUCCEEDED, Outputs: output} + + stream := new(agentMocks.SyncAgentService_ExecuteTaskSyncClient) + stream.OnRecv().Return(&admin.ExecuteTaskSyncResponse{ + Res: &admin.ExecuteTaskSyncResponse_Header{ + Header: &admin.ExecuteTaskSyncResponseHeader{ + Resource: resource, + }, + }, + }, nil).Once() + + stream.OnRecv().Return(nil, io.EOF).Once() + stream.OnSendMatch(mock.Anything).Return(nil) + stream.OnCloseSendMatch(mock.Anything).Return(nil) + + syncAgentClient.OnExecuteTaskSyncMatch(mock.Anything).Return(stream, nil) + + cfg := defaultConfig + cfg.DefaultAgent.Endpoint = defaultAgentEndpoint + + return webapi.PluginEntry{ + ID: "agent-service", + SupportedTaskTypes: []core.TaskType{"openai"}, PluginLoader: func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { return Plugin{ metricScope: iCtx.MetricsScope(), cfg: &cfg, cs: &ClientSet{ - agentClients: map[string]service.AsyncAgentServiceClient{ - "localhost:8000": agentClient, + syncAgentClients: map[string]service.SyncAgentServiceClient{ + defaultAgentEndpoint: syncAgentClient, }, }, + agentRegistry: Registry{"openai": {defaultTaskTypeVersion: {AgentDeployment: &Deployment{Endpoint: defaultAgentEndpoint}, IsSync: true}}}, }, 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 b7d33f0b26..11ef7871b3 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" @@ -14,23 +15,26 @@ import ( "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery" "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core" "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core/template" - "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io" + flyteIO "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io" "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/ioutils" "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flyte/flytestdlib/promutils" ) +type Registry map[string]map[int32]*Agent // map[taskTypeName][taskTypeVersion] => Agent + type Plugin struct { metricScope promutils.Scope cfg *Config cs *ClientSet - agentRegistry map[string]*Agent // map[taskType] => Agent + agentRegistry Registry } 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 @@ -38,9 +42,8 @@ type ResourceWrapper struct { type ResourceMetaWrapper struct { OutputPrefix string - Token string AgentResourceMeta []byte - TaskType string + TaskCategory admin.TaskCategory } func (p Plugin) GetConfig() webapi.PluginConfig { @@ -79,62 +82,125 @@ 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 := 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) - } + taskCategory := admin.TaskCategory{Name: taskTemplate.Type, Version: taskTemplate.TaskTypeVersion} + agent, isSync := getFinalAgent(&taskCategory, p.cfg, p.agentRegistry) finalCtx, cancel := getFinalContext(ctx, "CreateTask", agent) defer cancel() taskExecutionMetadata := buildTaskExecutionMetadata(taskCtx.TaskExecutionMetadata()) - res, err := client.CreateTask(finalCtx, &admin.CreateTaskRequest{Inputs: inputs, Template: taskTemplate, OutputPrefix: outputPrefix, TaskExecutionMetadata: &taskExecutionMetadata}) + + if isSync { + client, err := p.getSyncAgentClient(ctx, agent) + if err != nil { + return nil, nil, err + } + header := &admin.CreateRequestHeader{Template: taskTemplate, OutputPrefix: outputPrefix, TaskExecutionMetadata: &taskExecutionMetadata} + return p.ExecuteTaskSync(finalCtx, client, header, inputs) + } + + // Use async agent client + client, err := p.getAsyncAgentClient(ctx, agent) if err != nil { return nil, nil, err } - - // Restore unrendered template for subsequent renders. - if taskTemplate.GetContainer() != nil { - 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 + request := &admin.CreateTaskRequest{Inputs: inputs, Template: taskTemplate, OutputPrefix: outputPrefix, TaskExecutionMetadata: &taskExecutionMetadata} + res, err := client.CreateTask(finalCtx, request) + if err != nil { + return nil, nil, err } - logger.Infof(ctx, "Agent is executing an asynchronous task.") return ResourceMetaWrapper{ OutputPrefix: outputPrefix, AgentResourceMeta: res.GetResourceMeta(), - Token: "", - TaskType: taskTemplate.Type, + TaskCategory: taskCategory, }, nil, nil } +func (p Plugin) ExecuteTaskSync( + ctx context.Context, + client service.SyncAgentServiceClient, + header *admin.CreateRequestHeader, + inputs *flyteIdl.LiteralMap, +) (webapi.ResourceMeta, webapi.Resource, error) { + stream, err := client.ExecuteTaskSync(ctx) + if err != nil { + return nil, nil, err + } + + headerProto := &admin.ExecuteTaskSyncRequest{ + Part: &admin.ExecuteTaskSyncRequest_Header{ + Header: header, + }, + } + + err = stream.Send(headerProto) + if err != nil { + return nil, nil, fmt.Errorf("failed to send headerProto with error: %w", err) + } + inputsProto := &admin.ExecuteTaskSyncRequest{ + Part: &admin.ExecuteTaskSyncRequest_Inputs{ + Inputs: inputs, + }, + } + err = stream.Send(inputsProto) + + if err != nil { + return nil, nil, fmt.Errorf("failed to send inputsProto with error: %w", err) + } + + in, err := stream.Recv() + if err != nil { + return nil, nil, err + } + if in.GetHeader() == nil { + return nil, nil, fmt.Errorf("expected header in the response, but got none") + } + // TODO: Read the streaming output from the agent, and merge it into the final output. + // For now, Propeller assumes that the output is always in the header. + resource := in.GetHeader().GetResource() + + if err := stream.CloseSend(); err != nil { + return nil, nil, err + } + + if err != nil { + logger.Errorf(ctx, "Failed to write output with err %s", err.Error()) + return nil, nil, err + } + + return nil, ResourceWrapper{ + Phase: resource.Phase, + Outputs: resource.Outputs, + Message: resource.Message, + LogLinks: resource.LogLinks, + }, err +} + 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.TaskCategory, p.cfg, p.agentRegistry) - client := p.cs.agentClients[agent.Endpoint] + client, err := p.getAsyncAgentClient(ctx, agent) + if err != nil { + return nil, err + } finalCtx, cancel := getFinalContext(ctx, "GetTask", agent) defer cancel() - res, err := client.GetTask(finalCtx, &admin.GetTaskRequest{TaskType: metadata.TaskType, ResourceMeta: metadata.AgentResourceMeta}) + request := &admin.GetTaskRequest{ + TaskType: metadata.TaskCategory.Name, + TaskCategory: &metadata.TaskCategory, + ResourceMeta: metadata.AgentResourceMeta, + } + res, err := client.GetTask(finalCtx, request) if err != nil { return nil, err } @@ -144,7 +210,7 @@ func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest weba State: res.Resource.State, Outputs: res.Resource.Outputs, Message: res.Resource.Message, - LogLinks: res.LogLinks, + LogLinks: res.Resource.LogLinks, }, nil } @@ -153,13 +219,21 @@ 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.TaskCategory, p.cfg, p.agentRegistry) - client := p.cs.agentClients[agent.Endpoint] + client, err := p.getAsyncAgentClient(ctx, agent) + if err != nil { + return err + } finalCtx, cancel := getFinalContext(ctx, "DeleteTask", agent) defer cancel() - _, err := client.DeleteTask(finalCtx, &admin.DeleteTaskRequest{TaskType: metadata.TaskType, ResourceMeta: metadata.AgentResourceMeta}) + request := &admin.DeleteTaskRequest{ + TaskType: metadata.TaskCategory.Name, + TaskCategory: &metadata.TaskCategory, + ResourceMeta: metadata.AgentResourceMeta, + } + _, err = client.DeleteTask(finalCtx, request) return err } @@ -177,7 +251,7 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase case flyteIdl.TaskExecution_RUNNING: return core.PhaseInfoRunning(core.DefaultPhaseVersion, taskInfo), nil case flyteIdl.TaskExecution_SUCCEEDED: - err = writeOutput(ctx, taskCtx, resource) + err = writeOutput(ctx, taskCtx, resource.Outputs) if err != nil { logger.Errorf(ctx, "Failed to write output with err %s", err.Error()) return core.PhaseInfoUndefined, err @@ -205,7 +279,7 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase case admin.State_RETRYABLE_FAILURE: return core.PhaseInfoRetryableFailure(pluginErrors.TaskFailedWithError, "failed to run the job.\n"+resource.Message, taskInfo), nil case admin.State_SUCCEEDED: - err = writeOutput(ctx, taskCtx, resource) + err = writeOutput(ctx, taskCtx, resource.Outputs) if err != nil { logger.Errorf(ctx, "Failed to write output with err %s", err.Error()) return core.PhaseInfoUndefined, err @@ -215,7 +289,33 @@ 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 writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource ResourceWrapper) error { +func (p Plugin) getSyncAgentClient(ctx context.Context, agent *Deployment) (service.SyncAgentServiceClient, error) { + client, ok := p.cs.syncAgentClients[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.NewSyncAgentServiceClient(conn) + p.cs.syncAgentClients[agent.Endpoint] = client + } + return client, nil +} + +func (p Plugin) getAsyncAgentClient(ctx context.Context, agent *Deployment) (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, outputs *flyteIdl.LiteralMap) error { taskTemplate, err := taskCtx.TaskReader().Read(ctx) if err != nil { return err @@ -226,23 +326,23 @@ func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource Res return nil } - var opReader io.OutputReader - if resource.Outputs != nil { - logger.Debugf(ctx, "Agent returned an output.") - opReader = ioutils.NewInMemoryOutputReader(resource.Outputs, nil, nil) + var opReader flyteIO.OutputReader + if outputs != nil { + logger.Debugf(ctx, "AgentDeployment returned an output.") + opReader = ioutils.NewInMemoryOutputReader(outputs, nil, nil) } else { - logger.Debugf(ctx, "Agent didn't return any output, assuming file based outputs.") + logger.Debugf(ctx, "AgentDeployment didn't return any output, assuming file based outputs.") opReader = ioutils.NewRemoteFileOutputReader(ctx, taskCtx.DataStore(), taskCtx.OutputWriter(), taskCtx.MaxDatasetSizeBytes()) } return taskCtx.OutputWriter().Put(ctx, opReader) } -func getFinalAgent(taskType string, cfg *Config, agentRegistry map[string]*Agent) *Agent { - if agent, exists := agentRegistry[taskType]; exists { - return agent +func getFinalAgent(taskCategory *admin.TaskCategory, cfg *Config, agentRegistry Registry) (*Deployment, bool) { + if agent, exists := agentRegistry[taskCategory.Name][taskCategory.Version]; exists { + return agent.AgentDeployment, agent.IsSync } - return &cfg.DefaultAgent + return &cfg.DefaultAgent, false } func buildTaskExecutionMetadata(taskExecutionMetadata core.TaskExecutionMetadata) admin.TaskExecutionMetadata { @@ -271,7 +371,7 @@ func newAgentPlugin() webapi.PluginEntry { cfg := GetConfig() supportedTaskTypes := append(maps.Keys(agentRegistry), cfg.SupportedTaskTypes...) - logger.Infof(context.Background(), "Agent supports task types: %v", supportedTaskTypes) + logger.Infof(context.Background(), "AgentDeployment service supports task types: %v", supportedTaskTypes) return webapi.PluginEntry{ ID: "agent-service", diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go index bddea6869e..9fa36c5c42 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" ) @@ -31,8 +31,8 @@ func TestPlugin(t *testing.T) { cfg := defaultConfig cfg.WebAPI.Caching.Workers = 1 cfg.WebAPI.Caching.ResyncInterval.Duration = 5 * time.Second - cfg.DefaultAgent = Agent{Endpoint: "test-agent.flyte.svc.cluster.local:80"} - cfg.Agents = map[string]*Agent{"spark_agent": {Endpoint: "localhost:80"}} + cfg.DefaultAgent = Deployment{Endpoint: "test-agent.flyte.svc.cluster.local:80"} + cfg.AgentDeployments = map[string]*Deployment{"spark_agent": {Endpoint: "localhost:80"}} cfg.AgentForTaskTypes = map[string]string{"spark": "spark_agent", "bar": "bar_agent"} plugin := Plugin{ @@ -52,34 +52,38 @@ func TestPlugin(t *testing.T) { }) t.Run("test newAgentPlugin", func(t *testing.T) { - p := newMockAgentPlugin() + p := newMockAsyncAgentPlugin() assert.NotNil(t, p) assert.Equal(t, "agent-service", p.ID) assert.NotNil(t, p.PluginLoader) }) t.Run("test getFinalAgent", func(t *testing.T) { - agentRegistry := map[string]*Agent{"spark": {Endpoint: "localhost:80"}} - agent := getFinalAgent("spark", &cfg, agentRegistry) - assert.Equal(t, agent.Endpoint, "localhost:80") - agent = getFinalAgent("foo", &cfg, agentRegistry) - assert.Equal(t, agent.Endpoint, cfg.DefaultAgent.Endpoint) - agent = getFinalAgent("bar", &cfg, agentRegistry) - assert.Equal(t, agent.Endpoint, cfg.DefaultAgent.Endpoint) + agent := &Agent{AgentDeployment: &Deployment{Endpoint: "localhost:80"}} + agentRegistry := Registry{"spark": {defaultTaskTypeVersion: agent}} + spark := &admin.TaskCategory{Name: "spark", Version: defaultTaskTypeVersion} + foo := &admin.TaskCategory{Name: "foo", Version: defaultTaskTypeVersion} + bar := &admin.TaskCategory{Name: "bar", Version: defaultTaskTypeVersion} + agentDeployment, _ := getFinalAgent(spark, &cfg, agentRegistry) + assert.Equal(t, agentDeployment.Endpoint, "localhost:80") + agentDeployment, _ = getFinalAgent(foo, &cfg, agentRegistry) + assert.Equal(t, agentDeployment.Endpoint, cfg.DefaultAgent.Endpoint) + agentDeployment, _ = getFinalAgent(bar, &cfg, agentRegistry) + assert.Equal(t, agentDeployment.Endpoint, cfg.DefaultAgent.Endpoint) }) t.Run("test getFinalTimeout", func(t *testing.T) { - timeout := getFinalTimeout("CreateTask", &Agent{Endpoint: "localhost:8080", Timeouts: map[string]config.Duration{"CreateTask": {Duration: 1 * time.Millisecond}}}) + timeout := getFinalTimeout("CreateTask", &Deployment{Endpoint: "localhost:8080", Timeouts: map[string]config.Duration{"CreateTask": {Duration: 1 * time.Millisecond}}}) assert.Equal(t, 1*time.Millisecond, timeout.Duration) - timeout = getFinalTimeout("DeleteTask", &Agent{Endpoint: "localhost:8080", DefaultTimeout: config.Duration{Duration: 10 * time.Second}}) + timeout = getFinalTimeout("DeleteTask", &Deployment{Endpoint: "localhost:8080", DefaultTimeout: config.Duration{Duration: 10 * time.Second}}) assert.Equal(t, 10*time.Second, timeout.Duration) }) t.Run("test getFinalContext", func(t *testing.T) { - ctx, _ := getFinalContext(context.TODO(), "DeleteTask", &Agent{}) + ctx, _ := getFinalContext(context.TODO(), "DeleteTask", &Deployment{}) assert.Equal(t, context.TODO(), ctx) - ctx, _ = getFinalContext(context.TODO(), "CreateTask", &Agent{Endpoint: "localhost:8080", Timeouts: map[string]config.Duration{"CreateTask": {Duration: 1 * time.Millisecond}}}) + ctx, _ = getFinalContext(context.TODO(), "CreateTask", &Deployment{Endpoint: "localhost:8080", Timeouts: map[string]config.Duration{"CreateTask": {Duration: 1 * time.Millisecond}}}) assert.NotEqual(t, context.TODO(), ctx) }) @@ -270,11 +274,15 @@ func TestPlugin(t *testing.T) { func getMockMetadataServiceClient() *agentMocks.AgentMetadataServiceClient { mockMetadataServiceClient := new(agentMocks.AgentMetadataServiceClient) mockRequest := &admin.ListAgentsRequest{} + supportedTaskCategories := make([]*admin.TaskCategory, 3) + supportedTaskCategories[0] = &admin.TaskCategory{Name: "task1", Version: defaultTaskTypeVersion} + supportedTaskCategories[1] = &admin.TaskCategory{Name: "task2", Version: defaultTaskTypeVersion} + supportedTaskCategories[2] = &admin.TaskCategory{Name: "task3", Version: defaultTaskTypeVersion} mockResponse := &admin.ListAgentsResponse{ Agents: []*admin.Agent{ { - Name: "test-agent", - SupportedTaskTypes: []string{"task1", "task2", "task3"}, + Name: "test-agent", + SupportedTaskCategories: supportedTaskCategories, }, }, } @@ -290,12 +298,12 @@ func TestInitializeAgentRegistry(t *testing.T) { agentMetadataClients[defaultAgentEndpoint] = getMockMetadataServiceClient() cs := &ClientSet{ - agentClients: agentClients, + asyncAgentClients: agentClients, agentMetadataClients: agentMetadataClients, } cfg := defaultConfig - cfg.Agents = map[string]*Agent{"custom_agent": {Endpoint: defaultAgentEndpoint}} + cfg.AgentDeployments = map[string]*Deployment{"custom_agent": {Endpoint: defaultAgentEndpoint}} cfg.AgentForTaskTypes = map[string]string{"task1": "agent-deployment-1", "task2": "agent-deployment-2"} err := SetConfig(&cfg) assert.NoError(t, err)