From e06144a9c1353f3e07770c21dccd0294216c5a44 Mon Sep 17 00:00:00 2001 From: Troy Chiu <114708546+troychiu@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:04:25 -0700 Subject: [PATCH] SVR-396: Implement GetExecutionCount endpoint (#155) * get execution count proto Signed-off-by: troychiu * update prot Signed-off-by: troychiu * end to end work Signed-off-by: troychiu * unit test Signed-off-by: troychiu * execution manager unit test Signed-off-by: troychiu * integration test Signed-off-by: troychiu * remove redundant struct Signed-off-by: troychiu * lint Signed-off-by: troychiu * fix typo Signed-off-by: troychiu * modify interface Signed-off-by: troychiu * fix suggestions Signed-off-by: troychiu * fix suggestions Signed-off-by: troychiu * fix suggestion Signed-off-by: troychiu * fix suggestion Signed-off-by: troychiu * fix suggestions Signed-off-by: troychiu * log level Signed-off-by: troychiu * running executions count Signed-off-by: troychiu * Add test for getting running executions count Signed-off-by: troychiu * Add validation for updated_at filter in GetExecutionCounts Signed-off-by: troychiu * Update time filter & add index on execution table for execution counts Signed-off-by: troychiu * revert change Signed-off-by: troychiu * Update execution index in migrations and models Signed-off-by: troychiu * update comment Signed-off-by: troychiu * Update time filter validation to include correct execution timestamps Signed-off-by: troychiu * fix tests Signed-off-by: troychiu * update migration name Signed-off-by: troychiu * resolve suggestions Signed-off-by: troychiu * Update variable name in addPhaseFilter function.- Rename 'runningFilter' to 'phaseFilter' Signed-off-by: troychiu --------- Signed-off-by: troychiu --- .../pkg/manager/impl/execution_manager.go | 84 ++ .../manager/impl/execution_manager_test.go | 235 +++++- .../pkg/manager/impl/shared/constants.go | 8 +- .../pkg/manager/impl/task_manager_test.go | 2 +- .../pkg/manager/impl/validation/validation.go | 15 + .../pkg/manager/impl/workflow_manager_test.go | 4 + .../pkg/manager/interfaces/execution.go | 2 + flyteadmin/pkg/manager/mocks/execution.go | 46 +- .../pkg/repositories/config/migrations.go | 61 ++ .../repositories/gormimpl/execution_repo.go | 86 +- .../gormimpl/execution_repo_test.go | 67 ++ .../repositories/interfaces/execution_repo.go | 9 + .../pkg/repositories/mocks/execution_repo.go | 23 +- .../pkg/repositories/models/execution.go | 10 +- .../repositories/transformers/execution.go | 27 + flyteadmin/pkg/rpc/adminservice/execution.go | 36 + flyteadmin/pkg/rpc/adminservice/metrics.go | 46 +- flyteadmin/tests/bootstrap.go | 6 +- flyteadmin/tests/execution_test.go | 107 ++- .../go/admin/mocks/AdminServiceClient.go | 96 +++ .../go/admin/mocks/AdminServiceServer.go | 82 ++ flyteidl/clients/go/assets/admin.swagger.json | 236 ++++++ .../gen/pb-es/flyteidl/admin/execution_pb.ts | 264 ++++++- .../pb-es/flyteidl/service/admin_connect.ts | 22 +- .../gen/pb-go/flyteidl/admin/execution.pb.go | 584 +++++++++++--- .../gen/pb-go/flyteidl/service/admin.pb.go | 274 ++++--- .../pb-go/flyteidl/service/admin_grpc.pb.go | 76 ++ .../gateway/flyteidl/service/admin.pb.gw.go | 586 ++++++++++++++ .../flyteidl/service/admin.swagger.json | 236 ++++++ flyteidl/gen/pb-js/flyteidl.d.ts | 338 ++++++++ flyteidl/gen/pb-js/flyteidl.js | 741 ++++++++++++++++++ .../pb_python/flyteidl/admin/execution_pb2.py | 16 +- .../flyteidl/admin/execution_pb2.pyi | 42 + .../pb_python/flyteidl/service/admin_pb2.py | 8 +- .../flyteidl/service/admin_pb2_grpc.py | 67 ++ flyteidl/gen/pb_rust/flyteidl.admin.rs | 67 ++ flyteidl/go.mod | 5 +- flyteidl/go.sum | 3 - .../protos/flyteidl/admin/execution.proto | 57 ++ flyteidl/protos/flyteidl/service/admin.proto | 19 + go.mod | 2 - 41 files changed, 4381 insertions(+), 314 deletions(-) diff --git a/flyteadmin/pkg/manager/impl/execution_manager.go b/flyteadmin/pkg/manager/impl/execution_manager.go index d7ff666088..fac2b02523 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager.go +++ b/flyteadmin/pkg/manager/impl/execution_manager.go @@ -1885,6 +1885,80 @@ func (m *ExecutionManager) ListExecutions( }, nil } +func (m *ExecutionManager) GetExecutionCounts( + ctx context.Context, request admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) { + // Check required fields + if err := validation.ValidateExecutionCountsGetRequest(request); err != nil { + logger.Debugf(ctx, "ExecutionCounts request [%+v] failed validation with err: %v", request, err) + return nil, err + } + ctx = contextutils.WithProjectDomain(ctx, request.Project, request.Domain) + filters, err := util.GetDbFilters(util.FilterSpec{ + Org: request.Org, + Project: request.Project, + Domain: request.Domain, + RequestFilters: request.Filters, + }, common.Execution) + if err != nil { + return nil, err + } + + countExecutionByPhaseInput := repositoryInterfaces.CountResourceInput{ + InlineFilters: filters, + } + countExecutionByPhaseOutput, err := m.db.ExecutionRepo().CountByPhase(ctx, countExecutionByPhaseInput) + if err != nil { + logger.Debugf(ctx, "Failed to get execution counts using input [%+v] with err %v", countExecutionByPhaseInput, err) + return nil, err + } + + executionCounts, err := transformers.FromExecutionCountsByPhase(ctx, countExecutionByPhaseOutput) + if err != nil { + logger.Errorf(ctx, "Failed to transform execution by phase output [%+v] with err %v", countExecutionByPhaseOutput, err) + return nil, err + } + + return &admin.ExecutionCountsGetResponse{ + ExecutionCounts: executionCounts, + }, nil +} + +func (m *ExecutionManager) GetRunningExecutionsCount( + ctx context.Context, request admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) { + // Check required fields + if err := validation.ValidateRunningExecutionsGetRequest(request); err != nil { + logger.Debugf(ctx, "RunningExecutionsCount request [%+v] failed validation with err: %v", request, err) + return nil, err + } + ctx = contextutils.WithProjectDomain(ctx, request.Project, request.Domain) + filters, err := util.GetDbFilters(util.FilterSpec{ + Org: request.Org, + Project: request.Project, + Domain: request.Domain, + }, common.Execution) + if err != nil { + return nil, err + } + + // Add filter to fetch only RUNNING executions + if filters, err = addPhaseFilter(filters, core.WorkflowExecution_RUNNING); err != nil { + return nil, err + } + + countRunningExecutionsInput := repositoryInterfaces.CountResourceInput{ + InlineFilters: filters, + } + countRunningExecutionsOutput, err := m.db.ExecutionRepo().Count(ctx, countRunningExecutionsInput) + if err != nil { + logger.Debugf(ctx, "Failed to get running executions count using input [%+v] with err %v", countRunningExecutionsOutput, err) + return nil, err + } + + return &admin.RunningExecutionsCountGetResponse{ + Count: countRunningExecutionsOutput, + }, nil +} + // publishNotifications will only forward major errors because the assumption made is all of the objects // that are being manipulated have already been validated/manipulated by Flyte itself. // Note: This method should be refactored somewhere else once the interaction with pushing to SNS. @@ -2109,3 +2183,13 @@ func addStateFilter(filters []common.InlineFilter) ([]common.InlineFilter, error } return filters, nil } + +func addPhaseFilter(filters []common.InlineFilter, phase core.WorkflowExecution_Phase) ([]common.InlineFilter, error) { + phaseFilter, err := common.NewSingleValueFilter(common.Execution, common.Equal, shared.Phase, + phase.String()) + if err != nil { + return filters, err + } + filters = append(filters, phaseFilter) + return filters, nil +} diff --git a/flyteadmin/pkg/manager/impl/execution_manager_test.go b/flyteadmin/pkg/manager/impl/execution_manager_test.go index 250d2be954..4ee3fce58a 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager_test.go +++ b/flyteadmin/pkg/manager/impl/execution_manager_test.go @@ -55,8 +55,15 @@ import ( ) const ( - principal = "principal" - rawOutput = "raw_output" + principal = "principal" + rawOutput = "raw_output" + executionOrgQueryExpr = "execution_org = ?" + executionProjectQueryExpr = "execution_project = ?" + executionDomainQueryExpr = "execution_domain = ?" + executionNameQueryExpr = "execution_name = ?" + executionCreatedAtFilter = "gte(execution_created_at,2021-01-01T00:00:00Z)" + executionCreatedAtValue = "2021-01-01T00:00:00Z" + executionCreatedAtQueryExpr = "execution_created_at >= ?" ) var spec = testutils.GetExecutionRequest().Spec @@ -2995,13 +3002,13 @@ func TestListExecutions(t *testing.T) { for _, filter := range input.InlineFilters { assert.Equal(t, common.Execution, filter.GetEntity()) queryExpr, _ := filter.GetGormQueryExpr() - if queryExpr.Args == projectValue && queryExpr.Query == "execution_project = ?" { + if queryExpr.Args == projectValue && queryExpr.Query == executionProjectQueryExpr { projectFilter = true } - if queryExpr.Args == domainValue && queryExpr.Query == "execution_domain = ?" { + if queryExpr.Args == domainValue && queryExpr.Query == executionDomainQueryExpr { domainFilter = true } - if queryExpr.Args == nameValue && queryExpr.Query == "execution_name = ?" { + if queryExpr.Args == nameValue && queryExpr.Query == executionNameQueryExpr { nameFilter = true } } @@ -3165,6 +3172,218 @@ func TestListExecutions_TransformerError(t *testing.T) { assert.Nil(t, executionList) } +func TestGetExecutionCounts(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + getExecutionCountsFunc := func( + ctx context.Context, input interfaces.CountResourceInput) (interfaces.ExecutionCountsByPhaseOutput, error) { + var orgFilter, projectFilter, domainFilter, updatedAtFilter, nameFilter bool + for _, filter := range input.InlineFilters { + assert.Equal(t, common.Execution, filter.GetEntity()) + queryExpr, _ := filter.GetGormQueryExpr() + if queryExpr.Args == orgValue && queryExpr.Query == executionOrgQueryExpr { + orgFilter = true + } + if queryExpr.Args == projectValue && queryExpr.Query == executionProjectQueryExpr { + projectFilter = true + } + if queryExpr.Args == domainValue && queryExpr.Query == executionDomainQueryExpr { + domainFilter = true + } + if queryExpr.Args == executionCreatedAtValue && queryExpr.Query == executionCreatedAtQueryExpr { + updatedAtFilter = true + } + if queryExpr.Args == nameValue && queryExpr.Query == executionNameQueryExpr { + nameFilter = true + } + } + assert.True(t, orgFilter, "Missing org equality filter") + assert.True(t, projectFilter, "Missing project equality filter") + assert.True(t, domainFilter, "Missing domain equality filter") + assert.True(t, updatedAtFilter, "Missing updated at filter") + assert.False(t, nameFilter, "Included name equality filter") + return interfaces.ExecutionCountsByPhaseOutput{ + { + Phase: "FAILED", + Count: int64(3), + }, + { + Phase: "SUCCEEDED", + Count: int64(4), + }, + }, nil + } + repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetCountByPhaseCallback(getExecutionCountsFunc) + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repository, r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + + executionCountsGetResponse, err := execManager.GetExecutionCounts(context.Background(), admin.ExecutionCountsGetRequest{ + Org: orgValue, + Project: projectValue, + Domain: domainValue, + Filters: executionCreatedAtFilter, + }) + executionCounts := executionCountsGetResponse.ExecutionCounts + assert.NoError(t, err) + assert.NotNil(t, executionCounts) + assert.Len(t, executionCounts, 2) + + assert.Equal(t, core.WorkflowExecution_FAILED, executionCounts[0].Phase) + assert.Equal(t, int64(3), executionCounts[0].Count) + assert.Equal(t, core.WorkflowExecution_SUCCEEDED, executionCounts[1].Phase) + assert.Equal(t, int64(4), executionCounts[1].Count) +} + +func TestGetExecutionCounts_MissingParameters(t *testing.T) { + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repositoryMocks.NewMockRepository(), r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + + // Test missing domain + _, err := execManager.GetExecutionCounts(context.Background(), admin.ExecutionCountsGetRequest{ + Project: projectValue, + Filters: executionCreatedAtFilter, + }) + assert.Error(t, err) + assert.Equal(t, codes.InvalidArgument, err.(flyteAdminErrors.FlyteAdminError).Code()) + + // Test missing project + _, err = execManager.GetExecutionCounts(context.Background(), admin.ExecutionCountsGetRequest{ + Domain: domainValue, + Filters: executionCreatedAtFilter, + }) + assert.Error(t, err) + assert.Equal(t, codes.InvalidArgument, err.(flyteAdminErrors.FlyteAdminError).Code()) + + // Filter is optional + _, err = execManager.GetExecutionCounts(context.Background(), admin.ExecutionCountsGetRequest{ + Project: projectValue, + Domain: domainValue, + }) + assert.NoError(t, err) +} + +func TestGetExecutionCounts_DatabaseError(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + expectedErr := errors.New("expected error") + getExecutionCountsFunc := func( + ctx context.Context, input interfaces.CountResourceInput) (interfaces.ExecutionCountsByPhaseOutput, error) { + return interfaces.ExecutionCountsByPhaseOutput{}, expectedErr + } + repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetCountByPhaseCallback(getExecutionCountsFunc) + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repository, r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + _, err := execManager.GetExecutionCounts(context.Background(), admin.ExecutionCountsGetRequest{ + Project: projectValue, + Domain: domainValue, + Filters: executionCreatedAtFilter, + }) + assert.EqualError(t, err, expectedErr.Error()) +} + +func TestGetExecutionCounts_TransformerError(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + getExecutionCountsFunc := func( + ctx context.Context, input interfaces.CountResourceInput) (interfaces.ExecutionCountsByPhaseOutput, error) { + return interfaces.ExecutionCountsByPhaseOutput{ + { + Phase: "INVALID_PHASE", + Count: int64(3), + }, + }, nil + } + repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetCountByPhaseCallback(getExecutionCountsFunc) + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repository, r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + + executionCountsGetResponse, err := execManager.GetExecutionCounts(context.Background(), admin.ExecutionCountsGetRequest{ + Project: projectValue, + Domain: domainValue, + Filters: executionCreatedAtFilter, + }) + assert.EqualError(t, err, "Failed to transform INVALID_PHASE into an execution phase.") + assert.Nil(t, executionCountsGetResponse) +} + +func TestGetRunningExecutionsCount(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + getRunningExecutionsCountFunc := func( + ctx context.Context, input interfaces.CountResourceInput) (int64, error) { + var orgFilter, projectFilter, domainFilter, nameFilter bool + for _, filter := range input.InlineFilters { + assert.Equal(t, common.Execution, filter.GetEntity()) + queryExpr, _ := filter.GetGormQueryExpr() + if queryExpr.Args == orgValue && queryExpr.Query == executionOrgQueryExpr { + orgFilter = true + } + if queryExpr.Args == projectValue && queryExpr.Query == executionProjectQueryExpr { + projectFilter = true + } + if queryExpr.Args == domainValue && queryExpr.Query == executionDomainQueryExpr { + domainFilter = true + } + if queryExpr.Args == nameValue && queryExpr.Query == executionNameQueryExpr { + nameFilter = true + } + } + assert.True(t, orgFilter, "Missing org equality filter") + assert.True(t, projectFilter, "Missing project equality filter") + assert.True(t, domainFilter, "Missing domain equality filter") + assert.False(t, nameFilter, "Included name equality filter") + return 3, nil + } + repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetCountCallback(getRunningExecutionsCountFunc) + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repository, r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + + runningExecutionsCountGetResponse, err := execManager.GetRunningExecutionsCount(context.Background(), admin.RunningExecutionsCountGetRequest{ + Org: orgValue, + Project: projectValue, + Domain: domainValue, + }) + assert.NoError(t, err) + assert.NotNil(t, runningExecutionsCountGetResponse) + assert.Equal(t, int64(3), runningExecutionsCountGetResponse.Count) +} + +func TestGetRunningExecutionsCount_MissingParameters(t *testing.T) { + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repositoryMocks.NewMockRepository(), r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + _, err := execManager.GetRunningExecutionsCount(context.Background(), admin.RunningExecutionsCountGetRequest{ + Project: projectValue, + }) + assert.Error(t, err) + assert.Equal(t, codes.InvalidArgument, err.(flyteAdminErrors.FlyteAdminError).Code()) + + _, err = execManager.GetRunningExecutionsCount(context.Background(), admin.RunningExecutionsCountGetRequest{ + Domain: domainValue, + }) + assert.Error(t, err) + assert.Equal(t, codes.InvalidArgument, err.(flyteAdminErrors.FlyteAdminError).Code()) +} + +func TestGetRunningExecutionsCount_DatabaseError(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + expectedErr := errors.New("expected error") + getRunningExecutionsCountFunc := func( + ctx context.Context, input interfaces.CountResourceInput) (int64, error) { + return 0, expectedErr + } + repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetCountCallback(getRunningExecutionsCountFunc) + r := plugins.NewRegistry() + r.RegisterDefault(plugins.PluginIDWorkflowExecutor, &defaultTestExecutor) + execManager := NewExecutionManager(repository, r, getMockExecutionsConfigProvider(), getMockStorageForExecTest(context.Background()), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil, nil, &eventWriterMocks.WorkflowExecutionEventWriter{}, artifacts.NewArtifactRegistry(context.Background(), nil)) + _, err := execManager.GetRunningExecutionsCount(context.Background(), admin.RunningExecutionsCountGetRequest{ + Project: projectValue, + Domain: domainValue, + }) + assert.EqualError(t, err, expectedErr.Error()) +} + func TestExecutionManager_PublishNotifications(t *testing.T) { repository := repositoryMocks.NewMockRepository() queue := executions.NewQueueAllocator(getMockExecutionsConfigProvider(), repository) @@ -3979,13 +4198,13 @@ func TestListExecutions_LegacyModel(t *testing.T) { for _, filter := range input.InlineFilters { assert.Equal(t, common.Execution, filter.GetEntity()) queryExpr, _ := filter.GetGormQueryExpr() - if queryExpr.Args == projectValue && queryExpr.Query == "execution_project = ?" { + if queryExpr.Args == projectValue && queryExpr.Query == executionProjectQueryExpr { projectFilter = true } - if queryExpr.Args == domainValue && queryExpr.Query == "execution_domain = ?" { + if queryExpr.Args == domainValue && queryExpr.Query == executionDomainQueryExpr { domainFilter = true } - if queryExpr.Args == nameValue && queryExpr.Query == "execution_name = ?" { + if queryExpr.Args == nameValue && queryExpr.Query == executionNameQueryExpr { nameFilter = true } } diff --git a/flyteadmin/pkg/manager/impl/shared/constants.go b/flyteadmin/pkg/manager/impl/shared/constants.go index 87d53a6f5c..daf068b14d 100644 --- a/flyteadmin/pkg/manager/impl/shared/constants.go +++ b/flyteadmin/pkg/manager/impl/shared/constants.go @@ -34,6 +34,10 @@ const ( Attributes = "attributes" MatchingAttributes = "matching_attributes" // Parent of a node execution in the node executions table - ParentID = "parent_id" - WorkflowClosure = "workflow_closure" + ParentID = "parent_id" + WorkflowClosure = "workflow_closure" + Phase = "phase" + StartedAt = "started_at" + ExecutionCreatedAt = "execution_created_at" + ExecutionUpdatedAt = "execution_updated_at" ) diff --git a/flyteadmin/pkg/manager/impl/task_manager_test.go b/flyteadmin/pkg/manager/impl/task_manager_test.go index 85a39b3c68..4be2eff3b5 100644 --- a/flyteadmin/pkg/manager/impl/task_manager_test.go +++ b/flyteadmin/pkg/manager/impl/task_manager_test.go @@ -31,7 +31,7 @@ import ( ) // Static values for test -const orgValue = "" +const orgValue = "foobar" const projectValue = "foo" const domainValue = "bar" const nameValue = "baz" diff --git a/flyteadmin/pkg/manager/impl/validation/validation.go b/flyteadmin/pkg/manager/impl/validation/validation.go index 1958f25021..2d7755004f 100644 --- a/flyteadmin/pkg/manager/impl/validation/validation.go +++ b/flyteadmin/pkg/manager/impl/validation/validation.go @@ -159,6 +159,21 @@ func ValidateResourceListRequest(request admin.ResourceListRequest) error { return nil } +func ValidateExecutionCountsGetRequest(request admin.ExecutionCountsGetRequest) error { + return ValidateProjectDomain(request.Project, request.Domain) +} + +func ValidateRunningExecutionsGetRequest(request admin.RunningExecutionsCountGetRequest) error { + return ValidateProjectDomain(request.Project, request.Domain) +} + +func ValidateProjectDomain(project, domain string) error { + if err := ValidateEmptyStringField(project, shared.Project); err != nil { + return err + } + return ValidateEmptyStringField(domain, shared.Domain) +} + func ValidateDescriptionEntityListRequest(request admin.DescriptionEntityListRequest) error { if request.Id == nil { return shared.GetMissingArgumentError(shared.ID) diff --git a/flyteadmin/pkg/manager/impl/workflow_manager_test.go b/flyteadmin/pkg/manager/impl/workflow_manager_test.go index 8c4b708e1b..86c45b502f 100644 --- a/flyteadmin/pkg/manager/impl/workflow_manager_test.go +++ b/flyteadmin/pkg/manager/impl/workflow_manager_test.go @@ -454,6 +454,7 @@ func TestListWorkflows(t *testing.T) { CreatedAt: testutils.MockCreatedAtValue, }, WorkflowKey: models.WorkflowKey{ + Org: orgValue, Project: projectValue, Domain: domainValue, Name: nameValue, @@ -466,6 +467,7 @@ func TestListWorkflows(t *testing.T) { CreatedAt: testutils.MockCreatedAtValue, }, WorkflowKey: models.WorkflowKey{ + Org: orgValue, Project: projectValue, Domain: domainValue, Name: nameValue, @@ -490,6 +492,7 @@ func TestListWorkflows(t *testing.T) { workflowList, err := workflowManager.ListWorkflows(context.Background(), admin.ResourceListRequest{ Id: &admin.NamedEntityIdentifier{ + Org: orgValue, Project: projectValue, Domain: domainValue, Name: nameValue, @@ -506,6 +509,7 @@ func TestListWorkflows(t *testing.T) { assert.Len(t, workflowList.Workflows, 2) for idx, workflow := range workflowList.Workflows { + assert.Equal(t, orgValue, workflow.Id.Org) assert.Equal(t, projectValue, workflow.Id.Project) assert.Equal(t, domainValue, workflow.Id.Domain) assert.Equal(t, nameValue, workflow.Id.Name) diff --git a/flyteadmin/pkg/manager/interfaces/execution.go b/flyteadmin/pkg/manager/interfaces/execution.go index 73b521afbb..cacaf57d14 100644 --- a/flyteadmin/pkg/manager/interfaces/execution.go +++ b/flyteadmin/pkg/manager/interfaces/execution.go @@ -28,4 +28,6 @@ type ExecutionInterface interface { ListExecutions(ctx context.Context, request admin.ResourceListRequest) (*admin.ExecutionList, error) TerminateExecution( ctx context.Context, request admin.ExecutionTerminateRequest) (*admin.ExecutionTerminateResponse, error) + GetExecutionCounts(ctx context.Context, request admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) + GetRunningExecutionsCount(ctx context.Context, request admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) } diff --git a/flyteadmin/pkg/manager/mocks/execution.go b/flyteadmin/pkg/manager/mocks/execution.go index b754eea873..bc381f292c 100644 --- a/flyteadmin/pkg/manager/mocks/execution.go +++ b/flyteadmin/pkg/manager/mocks/execution.go @@ -25,17 +25,23 @@ type GetExecutionDataFunc func(ctx context.Context, request admin.WorkflowExecut type ListExecutionFunc func(ctx context.Context, request admin.ResourceListRequest) (*admin.ExecutionList, error) type TerminateExecutionFunc func( ctx context.Context, request admin.ExecutionTerminateRequest) (*admin.ExecutionTerminateResponse, error) +type GetExecutionCountsFunc func( + ctx context.Context, request admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) +type GetRunningExecutionsCountFunc func( + ctx context.Context, request admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) type MockExecutionManager struct { - createExecutionFunc CreateExecutionFunc - relaunchExecutionFunc RelaunchExecutionFunc - RecoverExecutionFunc RecoverExecutionFunc - createExecutionEventFunc CreateExecutionEventFunc - getExecutionFunc GetExecutionFunc - updateExecutionFunc UpdateExecutionFunc - getExecutionDataFunc GetExecutionDataFunc - listExecutionFunc ListExecutionFunc - terminateExecutionFunc TerminateExecutionFunc + createExecutionFunc CreateExecutionFunc + relaunchExecutionFunc RelaunchExecutionFunc + RecoverExecutionFunc RecoverExecutionFunc + createExecutionEventFunc CreateExecutionEventFunc + getExecutionFunc GetExecutionFunc + updateExecutionFunc UpdateExecutionFunc + getExecutionDataFunc GetExecutionDataFunc + listExecutionFunc ListExecutionFunc + terminateExecutionFunc TerminateExecutionFunc + getExecutionCountsFunc GetExecutionCountsFunc + getRunningExecutionsCountFunc GetRunningExecutionsCountFunc } func (m *MockExecutionManager) SetCreateCallback(createFunction CreateExecutionFunc) { @@ -144,3 +150,25 @@ func (m *MockExecutionManager) TerminateExecution( } return nil, nil } + +func (m *MockExecutionManager) SetGetExecutionCountsCallback(getExecutionCountsFunc GetExecutionCountsFunc) { + m.getExecutionCountsFunc = getExecutionCountsFunc +} + +func (m *MockExecutionManager) GetExecutionCounts(ctx context.Context, request admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) { + if m.getExecutionCountsFunc != nil { + return m.getExecutionCountsFunc(ctx, request) + } + return nil, nil +} + +func (m *MockExecutionManager) SetGetRunningExecutionsCountCallback(getRunningExecutionsCountFunc GetRunningExecutionsCountFunc) { + m.getRunningExecutionsCountFunc = getRunningExecutionsCountFunc +} + +func (m *MockExecutionManager) GetRunningExecutionsCount(ctx context.Context, request admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) { + if m.getRunningExecutionsCountFunc != nil { + return m.getRunningExecutionsCountFunc(ctx, request) + } + return nil, nil +} diff --git a/flyteadmin/pkg/repositories/config/migrations.go b/flyteadmin/pkg/repositories/config/migrations.go index 8dcade44e4..345ac21a76 100644 --- a/flyteadmin/pkg/repositories/config/migrations.go +++ b/flyteadmin/pkg/repositories/config/migrations.go @@ -1192,6 +1192,67 @@ var UnionMigrations = []*gormigrate.Migration{ return rollbackAddOrg(tx) }, }, + { + ID: "2024-03-21-execution-idx_org_project_domain_phase_execution_created_at", + Migrate: func(tx *gorm.DB) error { + type Execution struct { + ID uint `gorm:"index;autoIncrement;not null"` + CreatedAt time.Time `gorm:"type:time"` + UpdatedAt time.Time `gorm:"type:time"` + DeletedAt *time.Time `gorm:"index"` + Project string `gorm:"primary_key;column:execution_project;index:idx_org_project_domain_phase_execution_created_at,priority:2" valid:"length(0|255)"` + Domain string `gorm:"primary_key;column:execution_domain;index:idx_org_project_domain_phase_execution_created_at,priority:3" valid:"length(0|255)"` + Name string `gorm:"primary_key;column:execution_name" valid:"length(0|255)"` + Org string `gorm:"primary_key;column:execution_org;index:idx_org_project_domain_phase_execution_created_at,priority:1" valid:"length(0|255)"` + LaunchPlanID uint `gorm:"index"` + WorkflowID uint `gorm:"index"` + TaskID uint `gorm:"index"` + Phase string `gorm:"index:idx_org_project_domain_phase_execution_created_at,priority:4" valid:"length(0|255)"` + Closure []byte + Spec []byte `gorm:"not null"` + StartedAt *time.Time + // Corresponds to the CreatedAt field in the Execution closure. + // Prefixed with Execution to avoid clashes with gorm.Model CreatedAt + ExecutionCreatedAt *time.Time `gorm:"index:idx_executions_created_at;index:idx_org_project_domain_phase_execution_created_at,priority:5"` + // Corresponds to the UpdatedAt field in the Execution closure + // Prefixed with Execution to avoid clashes with gorm.Model UpdatedAt + ExecutionUpdatedAt *time.Time + Duration time.Duration + // In the case of an aborted execution this string may be non-empty. + // It should be ignored for any other value of phase other than aborted. + AbortCause string `valid:"length(0|255)"` + // Corresponds to the execution mode used to trigger this execution + Mode int32 + // The "parent" execution (if there is one) that is related to this execution. + SourceExecutionID uint + // The parent node execution if this was launched by a node + ParentNodeExecutionID uint + // Cluster where execution was triggered + Cluster string `valid:"length(0|255)"` + // Offloaded location of inputs LiteralMap. These are the inputs evaluated and contain applied defaults. + InputsURI storage.DataReference + // User specified inputs. This map might be incomplete and not include defaults applied + UserInputsURI storage.DataReference + // Execution Error Kind. nullable + ErrorKind *string `gorm:"index"` + // Execution Error Code nullable + ErrorCode *string `valid:"length(0|255)"` + // The user responsible for launching this execution. + // This is also stored in the spec but promoted as a column for filtering. + User string `gorm:"index" valid:"length(0|255)"` + // GORM doesn't save the zero value for ints, so we use a pointer for the State field + State *int32 `gorm:"index;default:0"` + // The resource type of the entity used to launch the execution, one of 'launch_plan' or 'task' + LaunchEntity string + // Tags associated with the execution + Tags []models.AdminTag `gorm:"many2many:execution_admin_tags;"` + } + return tx.AutoMigrate(&Execution{}) + }, + Rollback: func(tx *gorm.DB) error { + return tx.Table("executions").Migrator().DropIndex(&models.Execution{}, "idx_org_project_domain_phase_execution_created_at") + }, + }, } // ContinuedMigrations - Above are a series of migrations labeled as no-op migrations. These are migrations that we diff --git a/flyteadmin/pkg/repositories/gormimpl/execution_repo.go b/flyteadmin/pkg/repositories/gormimpl/execution_repo.go index 00ce3e8db7..4496f4df51 100644 --- a/flyteadmin/pkg/repositories/gormimpl/execution_repo.go +++ b/flyteadmin/pkg/repositories/gormimpl/execution_repo.go @@ -15,6 +15,8 @@ import ( "github.com/flyteorg/flyte/flytestdlib/promutils" ) +const phase = "phase" + // Implementation of ExecutionInterface. type ExecutionRepo struct { db *gorm.DB @@ -22,6 +24,29 @@ type ExecutionRepo struct { metrics gormMetrics } +func applyJoinTableEntitiesOnExecution(tx *gorm.DB, joinTableEntities map[common.Entity]bool) *gorm.DB { + if ok := joinTableEntities[common.LaunchPlan]; ok { + tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.launch_plan_id = %s.id", + launchPlanTableName, executionTableName, launchPlanTableName)) + } + if ok := joinTableEntities[common.Workflow]; ok { + tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.workflow_id = %s.id", + workflowTableName, executionTableName, workflowTableName)) + } + if ok := joinTableEntities[common.Task]; ok { + tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.task_id = %s.id", + taskTableName, executionTableName, taskTableName)) + } + + if ok := joinTableEntities[common.AdminTag]; ok { + tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.execution_name = %s.execution_name AND %s.execution_org = %s.execution_org", + executionAdminTagsTableName, executionTableName, executionAdminTagsTableName, executionTableName, executionAdminTagsTableName)) + tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.id = %s.admin_tag_id", + AdminTagsTableName, AdminTagsTableName, executionAdminTagsTableName)) + } + return tx +} + func (r *ExecutionRepo) Create(ctx context.Context, input models.Execution) error { timer := r.metrics.CreateDuration.Start() tx := r.db.WithContext(ctx).Omit("id").Create(&input) @@ -76,26 +101,9 @@ func (r *ExecutionRepo) List(ctx context.Context, input interfaces.ListResourceI } var executions []models.Execution tx := r.db.WithContext(ctx).Limit(input.Limit).Offset(input.Offset) - // And add join condition as required by user-specified filters (which can potentially include join table attrs). - if ok := input.JoinTableEntities[common.LaunchPlan]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.launch_plan_id = %s.id", - launchPlanTableName, executionTableName, launchPlanTableName)) - } - if ok := input.JoinTableEntities[common.Workflow]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.workflow_id = %s.id", - workflowTableName, executionTableName, workflowTableName)) - } - if ok := input.JoinTableEntities[common.Task]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.task_id = %s.id", - taskTableName, executionTableName, taskTableName)) - } - if ok := input.JoinTableEntities[common.AdminTag]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.execution_name = %s.execution_name AND %s.execution_org = %s.execution_org", - executionAdminTagsTableName, executionTableName, executionAdminTagsTableName, executionTableName, executionAdminTagsTableName)) - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.id = %s.admin_tag_id", - AdminTagsTableName, AdminTagsTableName, executionAdminTagsTableName)) - } + // Add join condition as required by user-specified filters (which can potentially include join table attrs). + tx = applyJoinTableEntitiesOnExecution(tx, input.JoinTableEntities) // Apply filters tx, err = applyScopedFilters(tx, input.InlineFilters, input.MapFilters) @@ -123,18 +131,7 @@ func (r *ExecutionRepo) Count(ctx context.Context, input interfaces.CountResourc tx := r.db.WithContext(ctx).Model(&models.Execution{}) // Add join condition as required by user-specified filters (which can potentially include join table attrs). - if ok := input.JoinTableEntities[common.LaunchPlan]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.launch_plan_id = %s.id", - launchPlanTableName, executionTableName, launchPlanTableName)) - } - if ok := input.JoinTableEntities[common.Workflow]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.workflow_id = %s.id", - workflowTableName, executionTableName, workflowTableName)) - } - if ok := input.JoinTableEntities[common.Task]; ok { - tx = tx.Joins(fmt.Sprintf("INNER JOIN %s ON %s.task_id = %s.id", - taskTableName, executionTableName, taskTableName)) - } + tx = applyJoinTableEntitiesOnExecution(tx, input.JoinTableEntities) // Apply filters tx, err = applyScopedFilters(tx, input.InlineFilters, input.MapFilters) @@ -153,6 +150,33 @@ func (r *ExecutionRepo) Count(ctx context.Context, input interfaces.CountResourc return count, nil } +func (r *ExecutionRepo) CountByPhase(ctx context.Context, input interfaces.CountResourceInput) (interfaces.ExecutionCountsByPhaseOutput, error) { + var err error + tx := r.db.WithContext(ctx).Model(&models.Execution{}) + + // Add join condition as required by user-specified filters (which can potentially include join table attrs). + tx = applyJoinTableEntitiesOnExecution(tx, input.JoinTableEntities) + + // Apply filters + tx, err = applyScopedFilters(tx, input.InlineFilters, input.MapFilters) + if err != nil { + return interfaces.ExecutionCountsByPhaseOutput{}, err + } + + // Prepare query and output + query := fmt.Sprintf("%s as phase, COUNT(%s) as count", phase, phase) + var counts interfaces.ExecutionCountsByPhaseOutput + + // Run the query + timer := r.metrics.CountDuration.Start() + tx = tx.Select(query).Group(phase).Scan(&counts) + timer.Stop() + if tx.Error != nil { + return interfaces.ExecutionCountsByPhaseOutput{}, r.errorTransformer.ToFlyteAdminError(tx.Error) + } + return counts, nil +} + // Returns an instance of ExecutionRepoInterface func NewExecutionRepo( db *gorm.DB, errorTransformer adminErrors.ErrorTransformer, scope promutils.Scope) interfaces.ExecutionRepoInterface { diff --git a/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go b/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go index 692d0a40c7..7d78edf809 100644 --- a/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go +++ b/flyteadmin/pkg/repositories/gormimpl/execution_repo_test.go @@ -421,3 +421,70 @@ func TestCountExecutions_Filters(t *testing.T) { assert.NoError(t, err) assert.Equal(t, int64(3), count) } + +func TestCountExecutionsByPhase(t *testing.T) { + executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) + + executionCountByPhase := []map[string]interface{}{ + { + "Phase": "FAILED", + "Count": 5, + }, + { + "Phase": "SUCCEEDED", + "Count": 9, + }, + } + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + GlobalMock.NewMock().WithQuery(`SELECT phase as phase, COUNT(phase) as count FROM "executions" GROUP BY "phase"`).WithReply(executionCountByPhase) + + count, err := executionRepo.CountByPhase(context.Background(), interfaces.CountResourceInput{}) + assert.NoError(t, err) + assert.Equal(t, "FAILED", count[0].Phase) + assert.Equal(t, int64(5), count[0].Count) + assert.Equal(t, "SUCCEEDED", count[1].Phase) + assert.Equal(t, int64(9), count[1].Count) +} + +func TestCountExecutionsByPhase_Filters(t *testing.T) { + executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) + + executionCountByPhase := []map[string]interface{}{ + { + "Phase": "RUNNING", + "Count": 3, + }, + { + "Phase": "SUCCEEDED", + "Count": 2, + }, + } + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + GlobalMock.NewMock().WithQuery( + `SELECT phase as phase, COUNT(phase) as count FROM "executions" INNER JOIN workflows ON executions.workflow_id = workflows.id INNER JOIN tasks ON executions.task_id = tasks.id WHERE executions.duration = $1 AND "error_code" IS NULL GROUP BY "phase"`, + ).WithReply(executionCountByPhase) + + count, err := executionRepo.CountByPhase(context.Background(), interfaces.CountResourceInput{ + InlineFilters: []common.InlineFilter{ + getEqualityFilter(common.Execution, "duration", time.Duration.Seconds(100)), + }, + MapFilters: []common.MapFilter{ + common.NewMapFilter(map[string]interface{}{ + "error_code": nil, + }), + }, + JoinTableEntities: map[common.Entity]bool{ + common.Workflow: true, + common.Task: true, + }, + }) + assert.NoError(t, err) + assert.Equal(t, "RUNNING", count[0].Phase) + assert.Equal(t, int64(3), count[0].Count) + assert.Equal(t, "SUCCEEDED", count[1].Phase) + assert.Equal(t, int64(2), count[1].Count) +} diff --git a/flyteadmin/pkg/repositories/interfaces/execution_repo.go b/flyteadmin/pkg/repositories/interfaces/execution_repo.go index 29e46c69ca..da36df31de 100644 --- a/flyteadmin/pkg/repositories/interfaces/execution_repo.go +++ b/flyteadmin/pkg/repositories/interfaces/execution_repo.go @@ -18,9 +18,18 @@ type ExecutionRepoInterface interface { List(ctx context.Context, input ListResourceInput) (ExecutionCollectionOutput, error) // Returns count of executions matching query parameters. Count(ctx context.Context, input CountResourceInput) (int64, error) + // Returns count of executions matching query parameters, grouped by phase. + CountByPhase(ctx context.Context, input CountResourceInput) (ExecutionCountsByPhaseOutput, error) } // Response format for a query on workflows. type ExecutionCollectionOutput struct { Executions []models.Execution } + +type ExecutionCountsByPhase struct { + Phase string + Count int64 +} + +type ExecutionCountsByPhaseOutput []ExecutionCountsByPhase diff --git a/flyteadmin/pkg/repositories/mocks/execution_repo.go b/flyteadmin/pkg/repositories/mocks/execution_repo.go index 8649bcaa3c..a9da91a2b7 100644 --- a/flyteadmin/pkg/repositories/mocks/execution_repo.go +++ b/flyteadmin/pkg/repositories/mocks/execution_repo.go @@ -13,13 +13,15 @@ type GetExecutionFunc func(ctx context.Context, input interfaces.Identifier) (mo type ListExecutionFunc func(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.ExecutionCollectionOutput, error) type CountExecutionFunc func(ctx context.Context, input interfaces.CountResourceInput) (int64, error) +type CountByPhaseExecutionFunc func(ctx context.Context, input interfaces.CountResourceInput) (interfaces.ExecutionCountsByPhaseOutput, error) type MockExecutionRepo struct { - createFunction CreateExecutionFunc - updateFunction UpdateExecutionFunc - getFunction GetExecutionFunc - listFunction ListExecutionFunc - countFunction CountExecutionFunc + createFunction CreateExecutionFunc + updateFunction UpdateExecutionFunc + getFunction GetExecutionFunc + listFunction ListExecutionFunc + countFunction CountExecutionFunc + countByPhaseFunction CountByPhaseExecutionFunc } func (r *MockExecutionRepo) Create(ctx context.Context, input models.Execution) error { @@ -78,6 +80,17 @@ func (r *MockExecutionRepo) SetCountCallback(countFunction CountExecutionFunc) { r.countFunction = countFunction } +func (r *MockExecutionRepo) CountByPhase(ctx context.Context, input interfaces.CountResourceInput) (interfaces.ExecutionCountsByPhaseOutput, error) { + if r.countByPhaseFunction != nil { + return r.countByPhaseFunction(ctx, input) + } + return interfaces.ExecutionCountsByPhaseOutput{}, nil +} + +func (r *MockExecutionRepo) SetCountByPhaseCallback(countByPhaseFunction CountByPhaseExecutionFunc) { + r.countByPhaseFunction = countByPhaseFunction +} + func NewMockExecutionRepo() interfaces.ExecutionRepoInterface { return &MockExecutionRepo{} } diff --git a/flyteadmin/pkg/repositories/models/execution.go b/flyteadmin/pkg/repositories/models/execution.go index ad967870d7..26ecdc494f 100644 --- a/flyteadmin/pkg/repositories/models/execution.go +++ b/flyteadmin/pkg/repositories/models/execution.go @@ -14,10 +14,10 @@ import ( // Execution primary key type ExecutionKey struct { - Project string `gorm:"primary_key;column:execution_project" valid:"length(0|255)"` - Domain string `gorm:"primary_key;column:execution_domain" valid:"length(0|255)"` + Project string `gorm:"primary_key;column:execution_project;index:idx_org_project_domain_phase_execution_created_at,priority:2" valid:"length(0|255)"` + Domain string `gorm:"primary_key;column:execution_domain;index:idx_org_project_domain_phase_execution_created_at,priority:3" valid:"length(0|255)"` Name string `gorm:"primary_key;column:execution_name" valid:"length(0|255)"` - Org string `gorm:"primary_key;column:execution_org" valid:"length(0|255)"` + Org string `gorm:"primary_key;column:execution_org;index:idx_org_project_domain_phase_execution_created_at,priority:1" valid:"length(0|255)"` } // Database model to encapsulate a (workflow) execution. @@ -27,13 +27,13 @@ type Execution struct { LaunchPlanID uint `gorm:"index"` WorkflowID uint `gorm:"index"` TaskID uint `gorm:"index"` - Phase string `valid:"length(0|255)"` + Phase string `gorm:"index:idx_org_project_domain_phase_execution_created_at,priority:4" valid:"length(0|255)"` Closure []byte Spec []byte `gorm:"not null"` StartedAt *time.Time // Corresponds to the CreatedAt field in the Execution closure. // Prefixed with Execution to avoid clashes with gorm.Model CreatedAt - ExecutionCreatedAt *time.Time `gorm:"index:idx_executions_created_at"` + ExecutionCreatedAt *time.Time `gorm:"index:idx_executions_created_at;index:idx_org_project_domain_phase_execution_created_at,priority:5"` // Corresponds to the UpdatedAt field in the Execution closure // Prefixed with Execution to avoid clashes with gorm.Model UpdatedAt ExecutionUpdatedAt *time.Time diff --git a/flyteadmin/pkg/repositories/transformers/execution.go b/flyteadmin/pkg/repositories/transformers/execution.go index 742638a298..1795c9f4d9 100644 --- a/flyteadmin/pkg/repositories/transformers/execution.go +++ b/flyteadmin/pkg/repositories/transformers/execution.go @@ -15,6 +15,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/common" flyteErrs "github.com/flyteorg/flyte/flyteadmin/pkg/errors" + repositoryInterfaces "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/interfaces" "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" @@ -442,3 +443,29 @@ func TrimErrorMessage(errMsg string) string { } return strings.ToValidUTF8(errMsg[:trimmedErrMessageLen], "") } + +func StringToWorkflowExecutionPhase(s string) (core.WorkflowExecution_Phase, error) { + workflowExecutionPhase, ok := core.WorkflowExecution_Phase_value[s] + if !ok { + return 0, flyteErrs.NewFlyteAdminErrorf(codes.Internal, "Failed to transform %s into an execution phase.", s) + } + return core.WorkflowExecution_Phase(workflowExecutionPhase), nil +} + +func FromExecutionCountsByPhase(ctx context.Context, executionCountsByPhase repositoryInterfaces.ExecutionCountsByPhaseOutput) ([]*admin.ExecutionCountsByPhase, error) { + var executionCounts []*admin.ExecutionCountsByPhase + for _, executionCount := range executionCountsByPhase { + phase, err := StringToWorkflowExecutionPhase(executionCount.Phase) + if err != nil { + logger.Errorf(ctx, + "Failed to transform string [%s] to execution phase with err: %v", executionCount.Phase, err) + return nil, err + } + executionCountsByPhase := &admin.ExecutionCountsByPhase{ + Phase: phase, + Count: executionCount.Count, + } + executionCounts = append(executionCounts, executionCountsByPhase) + } + return executionCounts, nil +} diff --git a/flyteadmin/pkg/rpc/adminservice/execution.go b/flyteadmin/pkg/rpc/adminservice/execution.go index 919ed851a3..7b83ddf5ae 100644 --- a/flyteadmin/pkg/rpc/adminservice/execution.go +++ b/flyteadmin/pkg/rpc/adminservice/execution.go @@ -195,3 +195,39 @@ func (m *AdminService) TerminateExecution( m.Metrics.executionEndpointMetrics.terminate.Success() return response, nil } + +func (m *AdminService) GetExecutionCounts( + ctx context.Context, request *admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) { + defer m.interceptPanic(ctx, request) + if request == nil { + return nil, status.Errorf(codes.InvalidArgument, "Incorrect request, nil requests not allowed") + } + var response *admin.ExecutionCountsGetResponse + var err error + m.Metrics.executionEndpointMetrics.count.Time(func() { + response, err = m.ExecutionManager.GetExecutionCounts(ctx, *request) + }) + if err != nil { + return nil, util.TransformAndRecordError(err, &m.Metrics.executionEndpointMetrics.count) + } + m.Metrics.executionEndpointMetrics.count.Success() + return response, nil +} + +func (m *AdminService) GetRunningExecutionsCount( + ctx context.Context, request *admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) { + defer m.interceptPanic(ctx, request) + if request == nil { + return nil, status.Errorf(codes.InvalidArgument, "Incorrect request, nil requests not allowed") + } + var response *admin.RunningExecutionsCountGetResponse + var err error + m.Metrics.executionEndpointMetrics.runningCount.Time(func() { + response, err = m.ExecutionManager.GetRunningExecutionsCount(ctx, *request) + }) + if err != nil { + return nil, util.TransformAndRecordError(err, &m.Metrics.executionEndpointMetrics.runningCount) + } + m.Metrics.executionEndpointMetrics.runningCount.Success() + return response, nil +} diff --git a/flyteadmin/pkg/rpc/adminservice/metrics.go b/flyteadmin/pkg/rpc/adminservice/metrics.go index 6e5060cab5..3c12a794fd 100644 --- a/flyteadmin/pkg/rpc/adminservice/metrics.go +++ b/flyteadmin/pkg/rpc/adminservice/metrics.go @@ -11,16 +11,18 @@ import ( type executionEndpointMetrics struct { scope promutils.Scope - create util.RequestMetrics - relaunch util.RequestMetrics - recover util.RequestMetrics - createEvent util.RequestMetrics - get util.RequestMetrics - update util.RequestMetrics - getData util.RequestMetrics - getMetrics util.RequestMetrics - list util.RequestMetrics - terminate util.RequestMetrics + create util.RequestMetrics + relaunch util.RequestMetrics + recover util.RequestMetrics + createEvent util.RequestMetrics + get util.RequestMetrics + update util.RequestMetrics + getData util.RequestMetrics + getMetrics util.RequestMetrics + list util.RequestMetrics + terminate util.RequestMetrics + count util.RequestMetrics + runningCount util.RequestMetrics } type launchPlanEndpointMetrics struct { @@ -133,17 +135,19 @@ func InitMetrics(adminScope promutils.Scope) AdminMetrics { "panics encountered while handling requests to the admin service"), executionEndpointMetrics: executionEndpointMetrics{ - scope: adminScope, - create: util.NewRequestMetrics(adminScope, "create_execution"), - relaunch: util.NewRequestMetrics(adminScope, "relaunch_execution"), - recover: util.NewRequestMetrics(adminScope, "recover_execution"), - createEvent: util.NewRequestMetrics(adminScope, "create_execution_event"), - get: util.NewRequestMetrics(adminScope, "get_execution"), - update: util.NewRequestMetrics(adminScope, "update_execution"), - getData: util.NewRequestMetrics(adminScope, "get_execution_data"), - getMetrics: util.NewRequestMetrics(adminScope, "get_execution_metrics"), - list: util.NewRequestMetrics(adminScope, "list_execution"), - terminate: util.NewRequestMetrics(adminScope, "terminate_execution"), + scope: adminScope, + create: util.NewRequestMetrics(adminScope, "create_execution"), + relaunch: util.NewRequestMetrics(adminScope, "relaunch_execution"), + recover: util.NewRequestMetrics(adminScope, "recover_execution"), + createEvent: util.NewRequestMetrics(adminScope, "create_execution_event"), + get: util.NewRequestMetrics(adminScope, "get_execution"), + update: util.NewRequestMetrics(adminScope, "update_execution"), + getData: util.NewRequestMetrics(adminScope, "get_execution_data"), + getMetrics: util.NewRequestMetrics(adminScope, "get_execution_metrics"), + list: util.NewRequestMetrics(adminScope, "list_execution"), + terminate: util.NewRequestMetrics(adminScope, "terminate_execution"), + count: util.NewRequestMetrics(adminScope, "count_execution"), + runningCount: util.NewRequestMetrics(adminScope, "count_running_execution"), }, launchPlanEndpointMetrics: launchPlanEndpointMetrics{ scope: adminScope, diff --git a/flyteadmin/tests/bootstrap.go b/flyteadmin/tests/bootstrap.go index 88a8af0716..b003ca02c9 100644 --- a/flyteadmin/tests/bootstrap.go +++ b/flyteadmin/tests/bootstrap.go @@ -16,8 +16,8 @@ import ( ) const insertExecutionQueryStr = `INSERT INTO "executions" ` + - `("execution_org", "execution_project","execution_domain","execution_name","phase","launch_plan_id","workflow_id") ` + - `VALUES ('', '%s', '%s', '%s', '%s', '%d', '%d')` + `("execution_org", "execution_project","execution_domain","execution_name","phase","launch_plan_id","workflow_id","execution_created_at") ` + + `VALUES ('', '%s', '%s', '%s', '%s', '%d', '%d', '%s')` var adminScope = promutils.NewScope("flyteadmin") @@ -106,7 +106,7 @@ func truncateAllTablesForTestingOnly() { } func populateWorkflowExecutionForTestingOnly(project, domain, name string) { - InsertExecution := fmt.Sprintf(insertExecutionQueryStr, project, domain, name, "UNDEFINED", 1, 2) + InsertExecution := fmt.Sprintf(insertExecutionQueryStr, project, domain, name, "UNDEFINED", 1, 2, "2020-01-01T00:00:00Z") db, err := repositories.GetDB(context.Background(), getDbConfig(), getLoggerConfig()) ctx := context.Background() if err != nil { diff --git a/flyteadmin/tests/execution_test.go b/flyteadmin/tests/execution_test.go index db8421b85f..8a20d1a54d 100644 --- a/flyteadmin/tests/execution_test.go +++ b/flyteadmin/tests/execution_test.go @@ -143,19 +143,19 @@ func TestUpdateWorkflowExecution_InvalidPhaseTransitions(t *testing.T) { func populateWorkflowExecutionsForTestingOnly() { insertExecutionStatements := []string{ // Insert a couple of executions with the same project + domain for the same launch plan & workflow - fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name1", "RUNNING", 1, 2), - fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name2", "SUCCEEDED", 1, 2), + fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name1", "RUNNING", 1, 2, "2020-01-01T00:00:00Z"), + fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name2", "SUCCEEDED", 1, 2, "2020-01-01T00:00:00Z"), // And one with a different launch plan - fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name3", "RUNNING", 3, 2), + fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name3", "RUNNING", 3, 2, "2020-01-01T00:00:00Z"), // And another with a different workflow - fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name4", "FAILED", 1, 4), + fmt.Sprintf(insertExecutionQueryStr, "project1", "domain1", "name4", "FAILED", 1, 4, "2020-01-01T00:00:00Z"), // And a few in a whole different project + domain scope // (still referencing the same launch plan and workflow just to avoid inserting additional values in the db). - fmt.Sprintf(insertExecutionQueryStr, "project1", "domain2", "name1", "RUNNING", 1, 2), - fmt.Sprintf(insertExecutionQueryStr, "project2", "domain2", "name1", "SUCCEEDED", 1, 2), + fmt.Sprintf(insertExecutionQueryStr, "project1", "domain2", "name1", "RUNNING", 1, 2, "2020-01-01T00:00:00Z"), + fmt.Sprintf(insertExecutionQueryStr, "project2", "domain2", "name1", "SUCCEEDED", 1, 2, "2020-01-01T00:00:00Z"), } db, err := repositories.GetDB(context.Background(), getDbConfig(), getLoggerConfig()) ctx := context.Background() @@ -320,3 +320,98 @@ func TestListWorkflowExecutions_Pagination(t *testing.T) { assert.Equal(t, len(resp.Executions), 1) assert.Empty(t, resp.Token) } + +func TestGetWorkflowExecutionCounts(t *testing.T) { + truncateAllTablesForTestingOnly() + populateWorkflowExecutionsForTestingOnly() + + ctx := context.Background() + client, conn := GetTestAdminServiceClient() + defer conn.Close() + + executionCountsResp, err := client.GetExecutionCounts(ctx, &admin.ExecutionCountsGetRequest{ + Project: "project1", + Domain: "domain1", + Filters: "gte(execution_created_at,2000-01-01T00:00:00Z)", + }) + assert.Nil(t, err) + assert.Equal(t, 3, len(executionCountsResp.ExecutionCounts)) + otherPhase := false + for _, item := range executionCountsResp.ExecutionCounts { + if item.Phase == core.WorkflowExecution_FAILED { + assert.Equal(t, int64(1), item.Count) + } else if item.Phase == core.WorkflowExecution_SUCCEEDED { + assert.Equal(t, int64(1), item.Count) + } else if item.Phase == core.WorkflowExecution_RUNNING { + assert.Equal(t, int64(2), item.Count) + } else { + otherPhase = true + } + } + assert.False(t, otherPhase) +} + +func TestGetWorkflowExecutionCounts_Filters(t *testing.T) { + truncateAllTablesForTestingOnly() + populateWorkflowExecutionsForTestingOnly() + + ctx := context.Background() + client, conn := GetTestAdminServiceClient() + defer conn.Close() + + executionCountsResp, err := client.GetExecutionCounts(ctx, &admin.ExecutionCountsGetRequest{ + Project: "project1", + Domain: "domain1", + Filters: "gte(execution_created_at,2000-01-01T00:00:00Z)+eq(launch_plan_id, 1)", + }) + assert.Nil(t, err) + assert.Equal(t, 3, len(executionCountsResp.ExecutionCounts)) + otherPhase := false + for _, item := range executionCountsResp.ExecutionCounts { + if item.Phase == core.WorkflowExecution_SUCCEEDED { + assert.Equal(t, int64(1), item.Count) + } else if item.Phase == core.WorkflowExecution_RUNNING { + assert.Equal(t, int64(1), item.Count) + } else if item.Phase == core.WorkflowExecution_FAILED { + assert.Equal(t, int64(1), item.Count) + } else { + otherPhase = true + } + } + assert.False(t, otherPhase) +} + +func TestGetWorkflowExecutionCounts_PhaseFilter(t *testing.T) { + truncateAllTablesForTestingOnly() + populateWorkflowExecutionsForTestingOnly() + + ctx := context.Background() + client, conn := GetTestAdminServiceClient() + defer conn.Close() + + executionCountsResp, err := client.GetExecutionCounts(ctx, &admin.ExecutionCountsGetRequest{ + Project: "project1", + Domain: "domain1", + Filters: "gte(execution_created_at,2000-01-01T00:00:00Z)+eq(phase,RUNNING)", + }) + assert.Nil(t, err) + assert.Equal(t, 1, len(executionCountsResp.ExecutionCounts)) + assert.Equal(t, core.WorkflowExecution_RUNNING, executionCountsResp.ExecutionCounts[0].Phase) + assert.Equal(t, int64(2), executionCountsResp.ExecutionCounts[0].Count) +} + +func TestGetRunningExecutionsCount(t *testing.T) { + truncateAllTablesForTestingOnly() + populateWorkflowExecutionsForTestingOnly() + + ctx := context.Background() + client, conn := GetTestAdminServiceClient() + defer conn.Close() + + runningExecutionsCountResp, err := client.GetRunningExecutionsCount(ctx, &admin.RunningExecutionsCountGetRequest{ + Project: "project1", + Domain: "domain1", + }) + assert.Nil(t, err) + assert.Equal(t, int64(2), runningExecutionsCountResp.Count) +} diff --git a/flyteidl/clients/go/admin/mocks/AdminServiceClient.go b/flyteidl/clients/go/admin/mocks/AdminServiceClient.go index 3d4d3039b4..ee6b02f44a 100644 --- a/flyteidl/clients/go/admin/mocks/AdminServiceClient.go +++ b/flyteidl/clients/go/admin/mocks/AdminServiceClient.go @@ -689,6 +689,54 @@ func (_m *AdminServiceClient) GetExecution(ctx context.Context, in *admin.Workfl return r0, r1 } +type AdminServiceClient_GetExecutionCounts struct { + *mock.Call +} + +func (_m AdminServiceClient_GetExecutionCounts) Return(_a0 *admin.ExecutionCountsGetResponse, _a1 error) *AdminServiceClient_GetExecutionCounts { + return &AdminServiceClient_GetExecutionCounts{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceClient) OnGetExecutionCounts(ctx context.Context, in *admin.ExecutionCountsGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetExecutionCounts { + c_call := _m.On("GetExecutionCounts", ctx, in, opts) + return &AdminServiceClient_GetExecutionCounts{Call: c_call} +} + +func (_m *AdminServiceClient) OnGetExecutionCountsMatch(matchers ...interface{}) *AdminServiceClient_GetExecutionCounts { + c_call := _m.On("GetExecutionCounts", matchers...) + return &AdminServiceClient_GetExecutionCounts{Call: c_call} +} + +// GetExecutionCounts provides a mock function with given fields: ctx, in, opts +func (_m *AdminServiceClient) GetExecutionCounts(ctx context.Context, in *admin.ExecutionCountsGetRequest, opts ...grpc.CallOption) (*admin.ExecutionCountsGetResponse, 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.ExecutionCountsGetResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionCountsGetRequest, ...grpc.CallOption) *admin.ExecutionCountsGetResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecutionCountsGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionCountsGetRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminServiceClient_GetExecutionData struct { *mock.Call } @@ -1073,6 +1121,54 @@ func (_m *AdminServiceClient) GetProjectDomainAttributes(ctx context.Context, in return r0, r1 } +type AdminServiceClient_GetRunningExecutionsCount struct { + *mock.Call +} + +func (_m AdminServiceClient_GetRunningExecutionsCount) Return(_a0 *admin.RunningExecutionsCountGetResponse, _a1 error) *AdminServiceClient_GetRunningExecutionsCount { + return &AdminServiceClient_GetRunningExecutionsCount{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceClient) OnGetRunningExecutionsCount(ctx context.Context, in *admin.RunningExecutionsCountGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetRunningExecutionsCount { + c_call := _m.On("GetRunningExecutionsCount", ctx, in, opts) + return &AdminServiceClient_GetRunningExecutionsCount{Call: c_call} +} + +func (_m *AdminServiceClient) OnGetRunningExecutionsCountMatch(matchers ...interface{}) *AdminServiceClient_GetRunningExecutionsCount { + c_call := _m.On("GetRunningExecutionsCount", matchers...) + return &AdminServiceClient_GetRunningExecutionsCount{Call: c_call} +} + +// GetRunningExecutionsCount provides a mock function with given fields: ctx, in, opts +func (_m *AdminServiceClient) GetRunningExecutionsCount(ctx context.Context, in *admin.RunningExecutionsCountGetRequest, opts ...grpc.CallOption) (*admin.RunningExecutionsCountGetResponse, 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.RunningExecutionsCountGetResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.RunningExecutionsCountGetRequest, ...grpc.CallOption) *admin.RunningExecutionsCountGetResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.RunningExecutionsCountGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.RunningExecutionsCountGetRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminServiceClient_GetTask struct { *mock.Call } diff --git a/flyteidl/clients/go/admin/mocks/AdminServiceServer.go b/flyteidl/clients/go/admin/mocks/AdminServiceServer.go index 37d540f5ae..9a8927199c 100644 --- a/flyteidl/clients/go/admin/mocks/AdminServiceServer.go +++ b/flyteidl/clients/go/admin/mocks/AdminServiceServer.go @@ -589,6 +589,47 @@ func (_m *AdminServiceServer) GetExecution(_a0 context.Context, _a1 *admin.Workf return r0, r1 } +type AdminServiceServer_GetExecutionCounts struct { + *mock.Call +} + +func (_m AdminServiceServer_GetExecutionCounts) Return(_a0 *admin.ExecutionCountsGetResponse, _a1 error) *AdminServiceServer_GetExecutionCounts { + return &AdminServiceServer_GetExecutionCounts{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceServer) OnGetExecutionCounts(_a0 context.Context, _a1 *admin.ExecutionCountsGetRequest) *AdminServiceServer_GetExecutionCounts { + c_call := _m.On("GetExecutionCounts", _a0, _a1) + return &AdminServiceServer_GetExecutionCounts{Call: c_call} +} + +func (_m *AdminServiceServer) OnGetExecutionCountsMatch(matchers ...interface{}) *AdminServiceServer_GetExecutionCounts { + c_call := _m.On("GetExecutionCounts", matchers...) + return &AdminServiceServer_GetExecutionCounts{Call: c_call} +} + +// GetExecutionCounts provides a mock function with given fields: _a0, _a1 +func (_m *AdminServiceServer) GetExecutionCounts(_a0 context.Context, _a1 *admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *admin.ExecutionCountsGetResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionCountsGetRequest) *admin.ExecutionCountsGetResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecutionCountsGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionCountsGetRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminServiceServer_GetExecutionData struct { *mock.Call } @@ -917,6 +958,47 @@ func (_m *AdminServiceServer) GetProjectDomainAttributes(_a0 context.Context, _a return r0, r1 } +type AdminServiceServer_GetRunningExecutionsCount struct { + *mock.Call +} + +func (_m AdminServiceServer_GetRunningExecutionsCount) Return(_a0 *admin.RunningExecutionsCountGetResponse, _a1 error) *AdminServiceServer_GetRunningExecutionsCount { + return &AdminServiceServer_GetRunningExecutionsCount{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceServer) OnGetRunningExecutionsCount(_a0 context.Context, _a1 *admin.RunningExecutionsCountGetRequest) *AdminServiceServer_GetRunningExecutionsCount { + c_call := _m.On("GetRunningExecutionsCount", _a0, _a1) + return &AdminServiceServer_GetRunningExecutionsCount{Call: c_call} +} + +func (_m *AdminServiceServer) OnGetRunningExecutionsCountMatch(matchers ...interface{}) *AdminServiceServer_GetRunningExecutionsCount { + c_call := _m.On("GetRunningExecutionsCount", matchers...) + return &AdminServiceServer_GetRunningExecutionsCount{Call: c_call} +} + +// GetRunningExecutionsCount provides a mock function with given fields: _a0, _a1 +func (_m *AdminServiceServer) GetRunningExecutionsCount(_a0 context.Context, _a1 *admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *admin.RunningExecutionsCountGetResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.RunningExecutionsCountGetRequest) *admin.RunningExecutionsCountGetResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.RunningExecutionsCountGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.RunningExecutionsCountGetRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminServiceServer_GetTask struct { *mock.Call } diff --git a/flyteidl/clients/go/assets/admin.swagger.json b/flyteidl/clients/go/assets/admin.swagger.json index ebcd60d247..0e4e0e4155 100644 --- a/flyteidl/clients/go/assets/admin.swagger.json +++ b/flyteidl/clients/go/assets/admin.swagger.json @@ -308,6 +308,59 @@ ] } }, + "/api/v1/count/executions/{project}/{domain}": { + "get": { + "summary": "Fetch the count of :ref:`ref_flyteidl.admin.Execution`.", + "operationId": "AdminService_GetExecutionCounts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminExecutionCountsGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "filters", + "description": "Indicates a list of filters passed as string.\n+optional", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/data/executions/{id.project}/{id.domain}/{id.name}": { "get": { "summary": "Fetches input and output data for a :ref:`ref_flyteidl.admin.Execution`.", @@ -2609,6 +2662,59 @@ ] } }, + "/api/v1/org/count/executions/{org}/{project}/{domain}": { + "get": { + "summary": "Fetch the count of :ref:`ref_flyteidl.admin.Execution`.", + "operationId": "AdminService_GetExecutionCounts2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminExecutionCountsGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "filters", + "description": "Indicates a list of filters passed as string.\n+optional", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/org/data/executions/{id.org}/{id.project}/{id.domain}/{id.name}": { "get": { "summary": "Fetches input and output data for a :ref:`ref_flyteidl.admin.Execution`.", @@ -5194,6 +5300,51 @@ ] } }, + "/api/v1/org/running_count/executions/{org}/{project}/{domain}": { + "get": { + "operationId": "AdminService_GetRunningExecutionsCount2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminRunningExecutionsCountGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/org/task_executions/{id.node_execution_id.execution_id.org}/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}": { "get": { "summary": "Fetches a :ref:`ref_flyteidl.admin.TaskExecution`.", @@ -6854,6 +7005,51 @@ ] } }, + "/api/v1/running_count/executions/{project}/{domain}": { + "get": { + "operationId": "AdminService_GetRunningExecutionsCount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminRunningExecutionsCountGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}": { "get": { "summary": "Fetches a :ref:`ref_flyteidl.admin.TaskExecution`.", @@ -9322,6 +9518,35 @@ } } }, + "adminExecutionCountsByPhase": { + "type": "object", + "properties": { + "phase": { + "$ref": "#/definitions/coreWorkflowExecutionPhase", + "description": "execution phase." + }, + "count": { + "type": "string", + "format": "int64", + "description": "Count of the executions in corresponding phase." + } + }, + "description": "Execution count of a phase." + }, + "adminExecutionCountsGetResponse": { + "type": "object", + "properties": { + "execution_counts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/adminExecutionCountsByPhase" + }, + "description": "Count of the executions in all phases." + } + }, + "description": "Execution count response." + }, "adminExecutionCreateRequest": { "type": "object", "properties": { @@ -10420,6 +10645,17 @@ }, "description": "Reason is a single message annotated with a timestamp to indicate the instant the reason occurred." }, + "adminRunningExecutionsCountGetResponse": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64", + "description": "Count of the running executions." + } + }, + "description": "Running execution count response." + }, "adminSchedule": { "type": "object", "properties": { diff --git a/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts b/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts index bce98af489..ac9e059465 100644 --- a/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/admin/execution_pb.ts @@ -4,7 +4,7 @@ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { BoolValue, Duration, Message, proto3, Timestamp } from "@bufbuild/protobuf"; +import { BoolValue, Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; import { LiteralMap } from "../core/literals_pb.js"; import { Identifier, NodeExecutionIdentifier, WorkflowExecutionIdentifier } from "../core/identifier_pb.js"; import { ExecutionError, QualityOfService, WorkflowExecution_Phase } from "../core/execution_pb.js"; @@ -1580,3 +1580,265 @@ export class WorkflowExecutionGetMetricsResponse extends Message { + /** + * Name of the project the execution belongs to. + * +required + * + * @generated from field: string project = 1; + */ + project = ""; + + /** + * Name of the domain the execution belongs to. + * A domain can be considered as a subset within a specific project. + * +required + * + * @generated from field: string domain = 2; + */ + domain = ""; + + /** + * org filter applied to execution count request. + * +optional + * + * @generated from field: string org = 3; + */ + org = ""; + + /** + * Indicates a list of filters passed as string. + * +optional + * + * @generated from field: string filters = 4; + */ + filters = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.ExecutionCountsGetRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "project", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "domain", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "org", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "filters", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecutionCountsGetRequest { + return new ExecutionCountsGetRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecutionCountsGetRequest { + return new ExecutionCountsGetRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecutionCountsGetRequest { + return new ExecutionCountsGetRequest().fromJsonString(jsonString, options); + } + + static equals(a: ExecutionCountsGetRequest | PlainMessage | undefined, b: ExecutionCountsGetRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecutionCountsGetRequest, a, b); + } +} + +/** + * Execution count of a phase. + * + * @generated from message flyteidl.admin.ExecutionCountsByPhase + */ +export class ExecutionCountsByPhase extends Message { + /** + * execution phase. + * + * @generated from field: flyteidl.core.WorkflowExecution.Phase phase = 1; + */ + phase = WorkflowExecution_Phase.UNDEFINED; + + /** + * Count of the executions in corresponding phase. + * + * @generated from field: int64 count = 2; + */ + count = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.ExecutionCountsByPhase"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "phase", kind: "enum", T: proto3.getEnumType(WorkflowExecution_Phase) }, + { no: 2, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecutionCountsByPhase { + return new ExecutionCountsByPhase().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecutionCountsByPhase { + return new ExecutionCountsByPhase().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecutionCountsByPhase { + return new ExecutionCountsByPhase().fromJsonString(jsonString, options); + } + + static equals(a: ExecutionCountsByPhase | PlainMessage | undefined, b: ExecutionCountsByPhase | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecutionCountsByPhase, a, b); + } +} + +/** + * Execution count response. + * + * @generated from message flyteidl.admin.ExecutionCountsGetResponse + */ +export class ExecutionCountsGetResponse extends Message { + /** + * Count of the executions in all phases. + * + * @generated from field: repeated flyteidl.admin.ExecutionCountsByPhase execution_counts = 1; + */ + executionCounts: ExecutionCountsByPhase[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.ExecutionCountsGetResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "execution_counts", kind: "message", T: ExecutionCountsByPhase, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecutionCountsGetResponse { + return new ExecutionCountsGetResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecutionCountsGetResponse { + return new ExecutionCountsGetResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecutionCountsGetResponse { + return new ExecutionCountsGetResponse().fromJsonString(jsonString, options); + } + + static equals(a: ExecutionCountsGetResponse | PlainMessage | undefined, b: ExecutionCountsGetResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecutionCountsGetResponse, a, b); + } +} + +/** + * Request to get the count of running executions with the given project, domain and optionally-assigned org. + * + * @generated from message flyteidl.admin.RunningExecutionsCountGetRequest + */ +export class RunningExecutionsCountGetRequest extends Message { + /** + * Name of the project the execution belongs to. + * +required + * + * @generated from field: string project = 1; + */ + project = ""; + + /** + * Name of the domain the execution belongs to. + * A domain can be considered as a subset within a specific project. + * +required + * + * @generated from field: string domain = 2; + */ + domain = ""; + + /** + * org filter applied to execution count request. + * +optional + * + * @generated from field: string org = 3; + */ + org = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.RunningExecutionsCountGetRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "project", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "domain", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "org", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RunningExecutionsCountGetRequest { + return new RunningExecutionsCountGetRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RunningExecutionsCountGetRequest { + return new RunningExecutionsCountGetRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RunningExecutionsCountGetRequest { + return new RunningExecutionsCountGetRequest().fromJsonString(jsonString, options); + } + + static equals(a: RunningExecutionsCountGetRequest | PlainMessage | undefined, b: RunningExecutionsCountGetRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(RunningExecutionsCountGetRequest, a, b); + } +} + +/** + * Running execution count response. + * + * @generated from message flyteidl.admin.RunningExecutionsCountGetResponse + */ +export class RunningExecutionsCountGetResponse extends Message { + /** + * Count of the running executions. + * + * @generated from field: int64 count = 1; + */ + count = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.admin.RunningExecutionsCountGetResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RunningExecutionsCountGetResponse { + return new RunningExecutionsCountGetResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RunningExecutionsCountGetResponse { + return new RunningExecutionsCountGetResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RunningExecutionsCountGetResponse { + return new RunningExecutionsCountGetResponse().fromJsonString(jsonString, options); + } + + static equals(a: RunningExecutionsCountGetResponse | PlainMessage | undefined, b: RunningExecutionsCountGetResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(RunningExecutionsCountGetResponse, a, b); + } +} + diff --git a/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts b/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts index 3a174aeffc..2a98421dd1 100644 --- a/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts +++ b/flyteidl/gen/pb-es/flyteidl/service/admin_connect.ts @@ -8,7 +8,7 @@ import { MethodKind } from "@bufbuild/protobuf"; import { NamedEntity, NamedEntityGetRequest, NamedEntityIdentifierList, NamedEntityIdentifierListRequest, NamedEntityList, NamedEntityListRequest, NamedEntityUpdateRequest, NamedEntityUpdateResponse, ObjectGetRequest, ResourceListRequest } from "../admin/common_pb.js"; import { Workflow, WorkflowCreateRequest, WorkflowCreateResponse, WorkflowList } from "../admin/workflow_pb.js"; import { ActiveLaunchPlanListRequest, ActiveLaunchPlanRequest, LaunchPlan, LaunchPlanCreateRequest, LaunchPlanCreateResponse, LaunchPlanList, LaunchPlanUpdateRequest, LaunchPlanUpdateResponse } from "../admin/launch_plan_pb.js"; -import { Execution, ExecutionCreateRequest, ExecutionCreateResponse, ExecutionList, ExecutionRecoverRequest, ExecutionRelaunchRequest, ExecutionTerminateRequest, ExecutionTerminateResponse, ExecutionUpdateRequest, ExecutionUpdateResponse, WorkflowExecutionGetDataRequest, WorkflowExecutionGetDataResponse, WorkflowExecutionGetMetricsRequest, WorkflowExecutionGetMetricsResponse, WorkflowExecutionGetRequest } from "../admin/execution_pb.js"; +import { Execution, ExecutionCountsGetRequest, ExecutionCountsGetResponse, ExecutionCreateRequest, ExecutionCreateResponse, ExecutionList, ExecutionRecoverRequest, ExecutionRelaunchRequest, ExecutionTerminateRequest, ExecutionTerminateResponse, ExecutionUpdateRequest, ExecutionUpdateResponse, RunningExecutionsCountGetRequest, RunningExecutionsCountGetResponse, WorkflowExecutionGetDataRequest, WorkflowExecutionGetDataResponse, WorkflowExecutionGetMetricsRequest, WorkflowExecutionGetMetricsResponse, WorkflowExecutionGetRequest } from "../admin/execution_pb.js"; import { DynamicNodeWorkflowResponse, GetDynamicNodeWorkflowRequest, NodeExecution, NodeExecutionForTaskListRequest, NodeExecutionGetDataRequest, NodeExecutionGetDataResponse, NodeExecutionGetRequest, NodeExecutionList, NodeExecutionListRequest } from "../admin/node_execution_pb.js"; import { Project, ProjectListRequest, ProjectRegisterRequest, ProjectRegisterResponse, Projects, ProjectUpdateResponse } from "../admin/project_pb.js"; import { NodeExecutionEventRequest, NodeExecutionEventResponse, TaskExecutionEventRequest, TaskExecutionEventResponse, WorkflowExecutionEventRequest, WorkflowExecutionEventResponse } from "../admin/event_pb.js"; @@ -627,6 +627,26 @@ export const AdminService = { O: WorkflowExecutionGetMetricsResponse, kind: MethodKind.Unary, }, + /** + * Fetch the count of :ref:`ref_flyteidl.admin.Execution`. + * + * @generated from rpc flyteidl.service.AdminService.GetExecutionCounts + */ + getExecutionCounts: { + name: "GetExecutionCounts", + I: ExecutionCountsGetRequest, + O: ExecutionCountsGetResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc flyteidl.service.AdminService.GetRunningExecutionsCount + */ + getRunningExecutionsCount: { + name: "GetRunningExecutionsCount", + I: RunningExecutionsCountGetRequest, + O: RunningExecutionsCountGetResponse, + kind: MethodKind.Unary, + }, } } as const; diff --git a/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go index e288f658ad..aa67ea3820 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/execution.pb.go @@ -1952,6 +1952,314 @@ func (x *WorkflowExecutionGetMetricsResponse) GetSpan() *core.Span { return nil } +// Request to count executions with the given project, domain and optionally-assigned org. +type ExecutionCountsGetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the project the execution belongs to. + // +required + Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + // Name of the domain the execution belongs to. + // A domain can be considered as a subset within a specific project. + // +required + Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` + // org filter applied to execution count request. + // +optional + Org string `protobuf:"bytes,3,opt,name=org,proto3" json:"org,omitempty"` + // Indicates a list of filters passed as string. + // +optional + Filters string `protobuf:"bytes,4,opt,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *ExecutionCountsGetRequest) Reset() { + *x = ExecutionCountsGetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_execution_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionCountsGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionCountsGetRequest) ProtoMessage() {} + +func (x *ExecutionCountsGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_execution_proto_msgTypes[23] + 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 ExecutionCountsGetRequest.ProtoReflect.Descriptor instead. +func (*ExecutionCountsGetRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_execution_proto_rawDescGZIP(), []int{23} +} + +func (x *ExecutionCountsGetRequest) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +func (x *ExecutionCountsGetRequest) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *ExecutionCountsGetRequest) GetOrg() string { + if x != nil { + return x.Org + } + return "" +} + +func (x *ExecutionCountsGetRequest) GetFilters() string { + if x != nil { + return x.Filters + } + return "" +} + +// Execution count of a phase. +type ExecutionCountsByPhase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // execution phase. + Phase core.WorkflowExecution_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=flyteidl.core.WorkflowExecution_Phase" json:"phase,omitempty"` + // Count of the executions in corresponding phase. + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *ExecutionCountsByPhase) Reset() { + *x = ExecutionCountsByPhase{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_execution_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionCountsByPhase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionCountsByPhase) ProtoMessage() {} + +func (x *ExecutionCountsByPhase) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_execution_proto_msgTypes[24] + 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 ExecutionCountsByPhase.ProtoReflect.Descriptor instead. +func (*ExecutionCountsByPhase) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_execution_proto_rawDescGZIP(), []int{24} +} + +func (x *ExecutionCountsByPhase) GetPhase() core.WorkflowExecution_Phase { + if x != nil { + return x.Phase + } + return core.WorkflowExecution_Phase(0) +} + +func (x *ExecutionCountsByPhase) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// Execution count response. +type ExecutionCountsGetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Count of the executions in all phases. + ExecutionCounts []*ExecutionCountsByPhase `protobuf:"bytes,1,rep,name=execution_counts,json=executionCounts,proto3" json:"execution_counts,omitempty"` +} + +func (x *ExecutionCountsGetResponse) Reset() { + *x = ExecutionCountsGetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_execution_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionCountsGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionCountsGetResponse) ProtoMessage() {} + +func (x *ExecutionCountsGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_execution_proto_msgTypes[25] + 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 ExecutionCountsGetResponse.ProtoReflect.Descriptor instead. +func (*ExecutionCountsGetResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_execution_proto_rawDescGZIP(), []int{25} +} + +func (x *ExecutionCountsGetResponse) GetExecutionCounts() []*ExecutionCountsByPhase { + if x != nil { + return x.ExecutionCounts + } + return nil +} + +// Request to get the count of running executions with the given project, domain and optionally-assigned org. +type RunningExecutionsCountGetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the project the execution belongs to. + // +required + Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + // Name of the domain the execution belongs to. + // A domain can be considered as a subset within a specific project. + // +required + Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` + // org filter applied to execution count request. + // +optional + Org string `protobuf:"bytes,3,opt,name=org,proto3" json:"org,omitempty"` +} + +func (x *RunningExecutionsCountGetRequest) Reset() { + *x = RunningExecutionsCountGetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_execution_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunningExecutionsCountGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunningExecutionsCountGetRequest) ProtoMessage() {} + +func (x *RunningExecutionsCountGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_execution_proto_msgTypes[26] + 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 RunningExecutionsCountGetRequest.ProtoReflect.Descriptor instead. +func (*RunningExecutionsCountGetRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_execution_proto_rawDescGZIP(), []int{26} +} + +func (x *RunningExecutionsCountGetRequest) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +func (x *RunningExecutionsCountGetRequest) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RunningExecutionsCountGetRequest) GetOrg() string { + if x != nil { + return x.Org + } + return "" +} + +// Running execution count response. +type RunningExecutionsCountGetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Count of the running executions. + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *RunningExecutionsCountGetResponse) Reset() { + *x = RunningExecutionsCountGetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_admin_execution_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunningExecutionsCountGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunningExecutionsCountGetResponse) ProtoMessage() {} + +func (x *RunningExecutionsCountGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_admin_execution_proto_msgTypes[27] + 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 RunningExecutionsCountGetResponse.ProtoReflect.Descriptor instead. +func (*RunningExecutionsCountGetResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_admin_execution_proto_rawDescGZIP(), []int{27} +} + +func (x *RunningExecutionsCountGetResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + var File_flyteidl_admin_execution_proto protoreflect.FileDescriptor var file_flyteidl_admin_execution_proto_rawDesc = []byte{ @@ -2293,24 +2601,55 @@ var file_flyteidl_admin_execution_proto_rawDesc = []byte{ 0x6e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x2a, 0x3e, 0x0a, 0x0e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, - 0x0a, 0x10, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, - 0x56, 0x45, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x42, 0xba, 0x01, 0x0a, - 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x42, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x65, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x22, 0x79, 0x0a, 0x19, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, + 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x12, 0x18, 0x0a, + 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x6c, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x50, 0x68, 0x61, 0x73, + 0x65, 0x12, 0x3c, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6f, 0x0a, 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x79, + 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x66, 0x0a, 0x20, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x6f, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x22, 0x39, + 0x0a, 0x21, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x3e, 0x0a, 0x0e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x45, + 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, + 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x12, 0x63, 0x6f, + 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x42, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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 ( @@ -2326,7 +2665,7 @@ func file_flyteidl_admin_execution_proto_rawDescGZIP() []byte { } var file_flyteidl_admin_execution_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_flyteidl_admin_execution_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_flyteidl_admin_execution_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_flyteidl_admin_execution_proto_goTypes = []interface{}{ (ExecutionState)(0), // 0: flyteidl.admin.ExecutionState (ExecutionMetadata_ExecutionMode)(0), // 1: flyteidl.admin.ExecutionMetadata.ExecutionMode @@ -2353,91 +2692,98 @@ var file_flyteidl_admin_execution_proto_goTypes = []interface{}{ (*ExecutionUpdateResponse)(nil), // 22: flyteidl.admin.ExecutionUpdateResponse (*WorkflowExecutionGetMetricsRequest)(nil), // 23: flyteidl.admin.WorkflowExecutionGetMetricsRequest (*WorkflowExecutionGetMetricsResponse)(nil), // 24: flyteidl.admin.WorkflowExecutionGetMetricsResponse - (*core.LiteralMap)(nil), // 25: flyteidl.core.LiteralMap - (*core.WorkflowExecutionIdentifier)(nil), // 26: flyteidl.core.WorkflowExecutionIdentifier - (*core.ExecutionError)(nil), // 27: flyteidl.core.ExecutionError - (core.WorkflowExecution_Phase)(0), // 28: flyteidl.core.WorkflowExecution.Phase - (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 30: google.protobuf.Duration - (*Notification)(nil), // 31: flyteidl.admin.Notification - (*core.Identifier)(nil), // 32: flyteidl.core.Identifier - (*core.NodeExecutionIdentifier)(nil), // 33: flyteidl.core.NodeExecutionIdentifier - (*core.ArtifactID)(nil), // 34: flyteidl.core.ArtifactID - (*Labels)(nil), // 35: flyteidl.admin.Labels - (*Annotations)(nil), // 36: flyteidl.admin.Annotations - (*core.SecurityContext)(nil), // 37: flyteidl.core.SecurityContext - (*AuthRole)(nil), // 38: flyteidl.admin.AuthRole - (*core.QualityOfService)(nil), // 39: flyteidl.core.QualityOfService - (*RawOutputDataConfig)(nil), // 40: flyteidl.admin.RawOutputDataConfig - (*ClusterAssignment)(nil), // 41: flyteidl.admin.ClusterAssignment - (*wrapperspb.BoolValue)(nil), // 42: google.protobuf.BoolValue - (*Envs)(nil), // 43: flyteidl.admin.Envs - (*UrlBlob)(nil), // 44: flyteidl.admin.UrlBlob - (*core.Span)(nil), // 45: flyteidl.core.Span + (*ExecutionCountsGetRequest)(nil), // 25: flyteidl.admin.ExecutionCountsGetRequest + (*ExecutionCountsByPhase)(nil), // 26: flyteidl.admin.ExecutionCountsByPhase + (*ExecutionCountsGetResponse)(nil), // 27: flyteidl.admin.ExecutionCountsGetResponse + (*RunningExecutionsCountGetRequest)(nil), // 28: flyteidl.admin.RunningExecutionsCountGetRequest + (*RunningExecutionsCountGetResponse)(nil), // 29: flyteidl.admin.RunningExecutionsCountGetResponse + (*core.LiteralMap)(nil), // 30: flyteidl.core.LiteralMap + (*core.WorkflowExecutionIdentifier)(nil), // 31: flyteidl.core.WorkflowExecutionIdentifier + (*core.ExecutionError)(nil), // 32: flyteidl.core.ExecutionError + (core.WorkflowExecution_Phase)(0), // 33: flyteidl.core.WorkflowExecution.Phase + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 35: google.protobuf.Duration + (*Notification)(nil), // 36: flyteidl.admin.Notification + (*core.Identifier)(nil), // 37: flyteidl.core.Identifier + (*core.NodeExecutionIdentifier)(nil), // 38: flyteidl.core.NodeExecutionIdentifier + (*core.ArtifactID)(nil), // 39: flyteidl.core.ArtifactID + (*Labels)(nil), // 40: flyteidl.admin.Labels + (*Annotations)(nil), // 41: flyteidl.admin.Annotations + (*core.SecurityContext)(nil), // 42: flyteidl.core.SecurityContext + (*AuthRole)(nil), // 43: flyteidl.admin.AuthRole + (*core.QualityOfService)(nil), // 44: flyteidl.core.QualityOfService + (*RawOutputDataConfig)(nil), // 45: flyteidl.admin.RawOutputDataConfig + (*ClusterAssignment)(nil), // 46: flyteidl.admin.ClusterAssignment + (*wrapperspb.BoolValue)(nil), // 47: google.protobuf.BoolValue + (*Envs)(nil), // 48: flyteidl.admin.Envs + (*UrlBlob)(nil), // 49: flyteidl.admin.UrlBlob + (*core.Span)(nil), // 50: flyteidl.core.Span } var file_flyteidl_admin_execution_proto_depIdxs = []int32{ 15, // 0: flyteidl.admin.ExecutionCreateRequest.spec:type_name -> flyteidl.admin.ExecutionSpec - 25, // 1: flyteidl.admin.ExecutionCreateRequest.inputs:type_name -> flyteidl.core.LiteralMap - 26, // 2: flyteidl.admin.ExecutionRelaunchRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier - 26, // 3: flyteidl.admin.ExecutionRecoverRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 30, // 1: flyteidl.admin.ExecutionCreateRequest.inputs:type_name -> flyteidl.core.LiteralMap + 31, // 2: flyteidl.admin.ExecutionRelaunchRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 31, // 3: flyteidl.admin.ExecutionRecoverRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier 13, // 4: flyteidl.admin.ExecutionRecoverRequest.metadata:type_name -> flyteidl.admin.ExecutionMetadata - 26, // 5: flyteidl.admin.ExecutionCreateResponse.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier - 26, // 6: flyteidl.admin.WorkflowExecutionGetRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier - 26, // 7: flyteidl.admin.Execution.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 31, // 5: flyteidl.admin.ExecutionCreateResponse.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 31, // 6: flyteidl.admin.WorkflowExecutionGetRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 31, // 7: flyteidl.admin.Execution.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier 15, // 8: flyteidl.admin.Execution.spec:type_name -> flyteidl.admin.ExecutionSpec 11, // 9: flyteidl.admin.Execution.closure:type_name -> flyteidl.admin.ExecutionClosure 7, // 10: flyteidl.admin.ExecutionList.executions:type_name -> flyteidl.admin.Execution - 25, // 11: flyteidl.admin.LiteralMapBlob.values:type_name -> flyteidl.core.LiteralMap + 30, // 11: flyteidl.admin.LiteralMapBlob.values:type_name -> flyteidl.core.LiteralMap 9, // 12: flyteidl.admin.ExecutionClosure.outputs:type_name -> flyteidl.admin.LiteralMapBlob - 27, // 13: flyteidl.admin.ExecutionClosure.error:type_name -> flyteidl.core.ExecutionError + 32, // 13: flyteidl.admin.ExecutionClosure.error:type_name -> flyteidl.core.ExecutionError 10, // 14: flyteidl.admin.ExecutionClosure.abort_metadata:type_name -> flyteidl.admin.AbortMetadata - 25, // 15: flyteidl.admin.ExecutionClosure.output_data:type_name -> flyteidl.core.LiteralMap - 25, // 16: flyteidl.admin.ExecutionClosure.computed_inputs:type_name -> flyteidl.core.LiteralMap - 28, // 17: flyteidl.admin.ExecutionClosure.phase:type_name -> flyteidl.core.WorkflowExecution.Phase - 29, // 18: flyteidl.admin.ExecutionClosure.started_at:type_name -> google.protobuf.Timestamp - 30, // 19: flyteidl.admin.ExecutionClosure.duration:type_name -> google.protobuf.Duration - 29, // 20: flyteidl.admin.ExecutionClosure.created_at:type_name -> google.protobuf.Timestamp - 29, // 21: flyteidl.admin.ExecutionClosure.updated_at:type_name -> google.protobuf.Timestamp - 31, // 22: flyteidl.admin.ExecutionClosure.notifications:type_name -> flyteidl.admin.Notification - 32, // 23: flyteidl.admin.ExecutionClosure.workflow_id:type_name -> flyteidl.core.Identifier + 30, // 15: flyteidl.admin.ExecutionClosure.output_data:type_name -> flyteidl.core.LiteralMap + 30, // 16: flyteidl.admin.ExecutionClosure.computed_inputs:type_name -> flyteidl.core.LiteralMap + 33, // 17: flyteidl.admin.ExecutionClosure.phase:type_name -> flyteidl.core.WorkflowExecution.Phase + 34, // 18: flyteidl.admin.ExecutionClosure.started_at:type_name -> google.protobuf.Timestamp + 35, // 19: flyteidl.admin.ExecutionClosure.duration:type_name -> google.protobuf.Duration + 34, // 20: flyteidl.admin.ExecutionClosure.created_at:type_name -> google.protobuf.Timestamp + 34, // 21: flyteidl.admin.ExecutionClosure.updated_at:type_name -> google.protobuf.Timestamp + 36, // 22: flyteidl.admin.ExecutionClosure.notifications:type_name -> flyteidl.admin.Notification + 37, // 23: flyteidl.admin.ExecutionClosure.workflow_id:type_name -> flyteidl.core.Identifier 21, // 24: flyteidl.admin.ExecutionClosure.state_change_details:type_name -> flyteidl.admin.ExecutionStateChangeDetails 1, // 25: flyteidl.admin.ExecutionMetadata.mode:type_name -> flyteidl.admin.ExecutionMetadata.ExecutionMode - 29, // 26: flyteidl.admin.ExecutionMetadata.scheduled_at:type_name -> google.protobuf.Timestamp - 33, // 27: flyteidl.admin.ExecutionMetadata.parent_node_execution:type_name -> flyteidl.core.NodeExecutionIdentifier - 26, // 28: flyteidl.admin.ExecutionMetadata.reference_execution:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 34, // 26: flyteidl.admin.ExecutionMetadata.scheduled_at:type_name -> google.protobuf.Timestamp + 38, // 27: flyteidl.admin.ExecutionMetadata.parent_node_execution:type_name -> flyteidl.core.NodeExecutionIdentifier + 31, // 28: flyteidl.admin.ExecutionMetadata.reference_execution:type_name -> flyteidl.core.WorkflowExecutionIdentifier 12, // 29: flyteidl.admin.ExecutionMetadata.system_metadata:type_name -> flyteidl.admin.SystemMetadata - 34, // 30: flyteidl.admin.ExecutionMetadata.artifact_ids:type_name -> flyteidl.core.ArtifactID - 31, // 31: flyteidl.admin.NotificationList.notifications:type_name -> flyteidl.admin.Notification - 32, // 32: flyteidl.admin.ExecutionSpec.launch_plan:type_name -> flyteidl.core.Identifier - 25, // 33: flyteidl.admin.ExecutionSpec.inputs:type_name -> flyteidl.core.LiteralMap + 39, // 30: flyteidl.admin.ExecutionMetadata.artifact_ids:type_name -> flyteidl.core.ArtifactID + 36, // 31: flyteidl.admin.NotificationList.notifications:type_name -> flyteidl.admin.Notification + 37, // 32: flyteidl.admin.ExecutionSpec.launch_plan:type_name -> flyteidl.core.Identifier + 30, // 33: flyteidl.admin.ExecutionSpec.inputs:type_name -> flyteidl.core.LiteralMap 13, // 34: flyteidl.admin.ExecutionSpec.metadata:type_name -> flyteidl.admin.ExecutionMetadata 14, // 35: flyteidl.admin.ExecutionSpec.notifications:type_name -> flyteidl.admin.NotificationList - 35, // 36: flyteidl.admin.ExecutionSpec.labels:type_name -> flyteidl.admin.Labels - 36, // 37: flyteidl.admin.ExecutionSpec.annotations:type_name -> flyteidl.admin.Annotations - 37, // 38: flyteidl.admin.ExecutionSpec.security_context:type_name -> flyteidl.core.SecurityContext - 38, // 39: flyteidl.admin.ExecutionSpec.auth_role:type_name -> flyteidl.admin.AuthRole - 39, // 40: flyteidl.admin.ExecutionSpec.quality_of_service:type_name -> flyteidl.core.QualityOfService - 40, // 41: flyteidl.admin.ExecutionSpec.raw_output_data_config:type_name -> flyteidl.admin.RawOutputDataConfig - 41, // 42: flyteidl.admin.ExecutionSpec.cluster_assignment:type_name -> flyteidl.admin.ClusterAssignment - 42, // 43: flyteidl.admin.ExecutionSpec.interruptible:type_name -> google.protobuf.BoolValue - 43, // 44: flyteidl.admin.ExecutionSpec.envs:type_name -> flyteidl.admin.Envs - 26, // 45: flyteidl.admin.ExecutionTerminateRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier - 26, // 46: flyteidl.admin.WorkflowExecutionGetDataRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier - 44, // 47: flyteidl.admin.WorkflowExecutionGetDataResponse.outputs:type_name -> flyteidl.admin.UrlBlob - 44, // 48: flyteidl.admin.WorkflowExecutionGetDataResponse.inputs:type_name -> flyteidl.admin.UrlBlob - 25, // 49: flyteidl.admin.WorkflowExecutionGetDataResponse.full_inputs:type_name -> flyteidl.core.LiteralMap - 25, // 50: flyteidl.admin.WorkflowExecutionGetDataResponse.full_outputs:type_name -> flyteidl.core.LiteralMap - 26, // 51: flyteidl.admin.ExecutionUpdateRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 40, // 36: flyteidl.admin.ExecutionSpec.labels:type_name -> flyteidl.admin.Labels + 41, // 37: flyteidl.admin.ExecutionSpec.annotations:type_name -> flyteidl.admin.Annotations + 42, // 38: flyteidl.admin.ExecutionSpec.security_context:type_name -> flyteidl.core.SecurityContext + 43, // 39: flyteidl.admin.ExecutionSpec.auth_role:type_name -> flyteidl.admin.AuthRole + 44, // 40: flyteidl.admin.ExecutionSpec.quality_of_service:type_name -> flyteidl.core.QualityOfService + 45, // 41: flyteidl.admin.ExecutionSpec.raw_output_data_config:type_name -> flyteidl.admin.RawOutputDataConfig + 46, // 42: flyteidl.admin.ExecutionSpec.cluster_assignment:type_name -> flyteidl.admin.ClusterAssignment + 47, // 43: flyteidl.admin.ExecutionSpec.interruptible:type_name -> google.protobuf.BoolValue + 48, // 44: flyteidl.admin.ExecutionSpec.envs:type_name -> flyteidl.admin.Envs + 31, // 45: flyteidl.admin.ExecutionTerminateRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 31, // 46: flyteidl.admin.WorkflowExecutionGetDataRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 49, // 47: flyteidl.admin.WorkflowExecutionGetDataResponse.outputs:type_name -> flyteidl.admin.UrlBlob + 49, // 48: flyteidl.admin.WorkflowExecutionGetDataResponse.inputs:type_name -> flyteidl.admin.UrlBlob + 30, // 49: flyteidl.admin.WorkflowExecutionGetDataResponse.full_inputs:type_name -> flyteidl.core.LiteralMap + 30, // 50: flyteidl.admin.WorkflowExecutionGetDataResponse.full_outputs:type_name -> flyteidl.core.LiteralMap + 31, // 51: flyteidl.admin.ExecutionUpdateRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier 0, // 52: flyteidl.admin.ExecutionUpdateRequest.state:type_name -> flyteidl.admin.ExecutionState 0, // 53: flyteidl.admin.ExecutionStateChangeDetails.state:type_name -> flyteidl.admin.ExecutionState - 29, // 54: flyteidl.admin.ExecutionStateChangeDetails.occurred_at:type_name -> google.protobuf.Timestamp - 26, // 55: flyteidl.admin.WorkflowExecutionGetMetricsRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier - 45, // 56: flyteidl.admin.WorkflowExecutionGetMetricsResponse.span:type_name -> flyteidl.core.Span - 57, // [57:57] is the sub-list for method output_type - 57, // [57:57] is the sub-list for method input_type - 57, // [57:57] is the sub-list for extension type_name - 57, // [57:57] is the sub-list for extension extendee - 0, // [0:57] is the sub-list for field type_name + 34, // 54: flyteidl.admin.ExecutionStateChangeDetails.occurred_at:type_name -> google.protobuf.Timestamp + 31, // 55: flyteidl.admin.WorkflowExecutionGetMetricsRequest.id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 50, // 56: flyteidl.admin.WorkflowExecutionGetMetricsResponse.span:type_name -> flyteidl.core.Span + 33, // 57: flyteidl.admin.ExecutionCountsByPhase.phase:type_name -> flyteidl.core.WorkflowExecution.Phase + 26, // 58: flyteidl.admin.ExecutionCountsGetResponse.execution_counts:type_name -> flyteidl.admin.ExecutionCountsByPhase + 59, // [59:59] is the sub-list for method output_type + 59, // [59:59] is the sub-list for method input_type + 59, // [59:59] is the sub-list for extension type_name + 59, // [59:59] is the sub-list for extension extendee + 0, // [0:59] is the sub-list for field type_name } func init() { file_flyteidl_admin_execution_proto_init() } @@ -2724,6 +3070,66 @@ func file_flyteidl_admin_execution_proto_init() { return nil } } + file_flyteidl_admin_execution_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionCountsGetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_execution_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionCountsByPhase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_execution_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionCountsGetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_execution_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunningExecutionsCountGetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_admin_execution_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunningExecutionsCountGetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_flyteidl_admin_execution_proto_msgTypes[7].OneofWrappers = []interface{}{ (*LiteralMapBlob_Values)(nil), @@ -2746,7 +3152,7 @@ func file_flyteidl_admin_execution_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_admin_execution_proto_rawDesc, NumEnums: 2, - NumMessages: 23, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, diff --git a/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go b/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go index c26f15eb7f..eb71d1f9dd 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/admin.pb.go @@ -65,8 +65,8 @@ var file_flyteidl_service_admin_proto_rawDesc = []byte{ 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb0, - 0x9b, 0x01, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x8d, + 0x9f, 0x01, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xe6, 0x02, 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, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, @@ -1309,19 +1309,49 @@ var file_flyteidl_service_admin_proto_rawDesc = []byte{ 0x72, 0x69, 0x63, 0x73, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 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, 0x64, 0x6d, - 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, - 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x7d, 0x12, 0xd9, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x66, 0x5a, 0x37, 0x12, 0x35, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x7d, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x7d, 0x12, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0xfe, + 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x7c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x76, 0x5a, 0x3f, 0x12, 0x3d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x2f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x7d, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x12, 0x33, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 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, 0x64, 0x6d, 0x69, 0x6e, 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_admin_proto_goTypes = []interface{}{ @@ -1371,53 +1401,57 @@ var file_flyteidl_service_admin_proto_goTypes = []interface{}{ (*admin.GetVersionRequest)(nil), // 43: flyteidl.admin.GetVersionRequest (*admin.DescriptionEntityListRequest)(nil), // 44: flyteidl.admin.DescriptionEntityListRequest (*admin.WorkflowExecutionGetMetricsRequest)(nil), // 45: flyteidl.admin.WorkflowExecutionGetMetricsRequest - (*admin.TaskCreateResponse)(nil), // 46: flyteidl.admin.TaskCreateResponse - (*admin.Task)(nil), // 47: flyteidl.admin.Task - (*admin.NamedEntityIdentifierList)(nil), // 48: flyteidl.admin.NamedEntityIdentifierList - (*admin.TaskList)(nil), // 49: flyteidl.admin.TaskList - (*admin.WorkflowCreateResponse)(nil), // 50: flyteidl.admin.WorkflowCreateResponse - (*admin.Workflow)(nil), // 51: flyteidl.admin.Workflow - (*admin.WorkflowList)(nil), // 52: flyteidl.admin.WorkflowList - (*admin.LaunchPlanCreateResponse)(nil), // 53: flyteidl.admin.LaunchPlanCreateResponse - (*admin.LaunchPlan)(nil), // 54: flyteidl.admin.LaunchPlan - (*admin.LaunchPlanList)(nil), // 55: flyteidl.admin.LaunchPlanList - (*admin.LaunchPlanUpdateResponse)(nil), // 56: flyteidl.admin.LaunchPlanUpdateResponse - (*admin.ExecutionCreateResponse)(nil), // 57: flyteidl.admin.ExecutionCreateResponse - (*admin.Execution)(nil), // 58: flyteidl.admin.Execution - (*admin.ExecutionUpdateResponse)(nil), // 59: flyteidl.admin.ExecutionUpdateResponse - (*admin.WorkflowExecutionGetDataResponse)(nil), // 60: flyteidl.admin.WorkflowExecutionGetDataResponse - (*admin.ExecutionList)(nil), // 61: flyteidl.admin.ExecutionList - (*admin.ExecutionTerminateResponse)(nil), // 62: flyteidl.admin.ExecutionTerminateResponse - (*admin.NodeExecution)(nil), // 63: flyteidl.admin.NodeExecution - (*admin.DynamicNodeWorkflowResponse)(nil), // 64: flyteidl.admin.DynamicNodeWorkflowResponse - (*admin.NodeExecutionList)(nil), // 65: flyteidl.admin.NodeExecutionList - (*admin.NodeExecutionGetDataResponse)(nil), // 66: flyteidl.admin.NodeExecutionGetDataResponse - (*admin.ProjectRegisterResponse)(nil), // 67: flyteidl.admin.ProjectRegisterResponse - (*admin.ProjectUpdateResponse)(nil), // 68: flyteidl.admin.ProjectUpdateResponse - (*admin.Projects)(nil), // 69: flyteidl.admin.Projects - (*admin.WorkflowExecutionEventResponse)(nil), // 70: flyteidl.admin.WorkflowExecutionEventResponse - (*admin.NodeExecutionEventResponse)(nil), // 71: flyteidl.admin.NodeExecutionEventResponse - (*admin.TaskExecutionEventResponse)(nil), // 72: flyteidl.admin.TaskExecutionEventResponse - (*admin.TaskExecution)(nil), // 73: flyteidl.admin.TaskExecution - (*admin.TaskExecutionList)(nil), // 74: flyteidl.admin.TaskExecutionList - (*admin.TaskExecutionGetDataResponse)(nil), // 75: flyteidl.admin.TaskExecutionGetDataResponse - (*admin.ProjectDomainAttributesUpdateResponse)(nil), // 76: flyteidl.admin.ProjectDomainAttributesUpdateResponse - (*admin.ProjectDomainAttributesGetResponse)(nil), // 77: flyteidl.admin.ProjectDomainAttributesGetResponse - (*admin.ProjectDomainAttributesDeleteResponse)(nil), // 78: flyteidl.admin.ProjectDomainAttributesDeleteResponse - (*admin.ProjectAttributesUpdateResponse)(nil), // 79: flyteidl.admin.ProjectAttributesUpdateResponse - (*admin.ProjectAttributesGetResponse)(nil), // 80: flyteidl.admin.ProjectAttributesGetResponse - (*admin.ProjectAttributesDeleteResponse)(nil), // 81: flyteidl.admin.ProjectAttributesDeleteResponse - (*admin.WorkflowAttributesUpdateResponse)(nil), // 82: flyteidl.admin.WorkflowAttributesUpdateResponse - (*admin.WorkflowAttributesGetResponse)(nil), // 83: flyteidl.admin.WorkflowAttributesGetResponse - (*admin.WorkflowAttributesDeleteResponse)(nil), // 84: flyteidl.admin.WorkflowAttributesDeleteResponse - (*admin.ListMatchableAttributesResponse)(nil), // 85: flyteidl.admin.ListMatchableAttributesResponse - (*admin.NamedEntityList)(nil), // 86: flyteidl.admin.NamedEntityList - (*admin.NamedEntity)(nil), // 87: flyteidl.admin.NamedEntity - (*admin.NamedEntityUpdateResponse)(nil), // 88: flyteidl.admin.NamedEntityUpdateResponse - (*admin.GetVersionResponse)(nil), // 89: flyteidl.admin.GetVersionResponse - (*admin.DescriptionEntity)(nil), // 90: flyteidl.admin.DescriptionEntity - (*admin.DescriptionEntityList)(nil), // 91: flyteidl.admin.DescriptionEntityList - (*admin.WorkflowExecutionGetMetricsResponse)(nil), // 92: flyteidl.admin.WorkflowExecutionGetMetricsResponse + (*admin.ExecutionCountsGetRequest)(nil), // 46: flyteidl.admin.ExecutionCountsGetRequest + (*admin.RunningExecutionsCountGetRequest)(nil), // 47: flyteidl.admin.RunningExecutionsCountGetRequest + (*admin.TaskCreateResponse)(nil), // 48: flyteidl.admin.TaskCreateResponse + (*admin.Task)(nil), // 49: flyteidl.admin.Task + (*admin.NamedEntityIdentifierList)(nil), // 50: flyteidl.admin.NamedEntityIdentifierList + (*admin.TaskList)(nil), // 51: flyteidl.admin.TaskList + (*admin.WorkflowCreateResponse)(nil), // 52: flyteidl.admin.WorkflowCreateResponse + (*admin.Workflow)(nil), // 53: flyteidl.admin.Workflow + (*admin.WorkflowList)(nil), // 54: flyteidl.admin.WorkflowList + (*admin.LaunchPlanCreateResponse)(nil), // 55: flyteidl.admin.LaunchPlanCreateResponse + (*admin.LaunchPlan)(nil), // 56: flyteidl.admin.LaunchPlan + (*admin.LaunchPlanList)(nil), // 57: flyteidl.admin.LaunchPlanList + (*admin.LaunchPlanUpdateResponse)(nil), // 58: flyteidl.admin.LaunchPlanUpdateResponse + (*admin.ExecutionCreateResponse)(nil), // 59: flyteidl.admin.ExecutionCreateResponse + (*admin.Execution)(nil), // 60: flyteidl.admin.Execution + (*admin.ExecutionUpdateResponse)(nil), // 61: flyteidl.admin.ExecutionUpdateResponse + (*admin.WorkflowExecutionGetDataResponse)(nil), // 62: flyteidl.admin.WorkflowExecutionGetDataResponse + (*admin.ExecutionList)(nil), // 63: flyteidl.admin.ExecutionList + (*admin.ExecutionTerminateResponse)(nil), // 64: flyteidl.admin.ExecutionTerminateResponse + (*admin.NodeExecution)(nil), // 65: flyteidl.admin.NodeExecution + (*admin.DynamicNodeWorkflowResponse)(nil), // 66: flyteidl.admin.DynamicNodeWorkflowResponse + (*admin.NodeExecutionList)(nil), // 67: flyteidl.admin.NodeExecutionList + (*admin.NodeExecutionGetDataResponse)(nil), // 68: flyteidl.admin.NodeExecutionGetDataResponse + (*admin.ProjectRegisterResponse)(nil), // 69: flyteidl.admin.ProjectRegisterResponse + (*admin.ProjectUpdateResponse)(nil), // 70: flyteidl.admin.ProjectUpdateResponse + (*admin.Projects)(nil), // 71: flyteidl.admin.Projects + (*admin.WorkflowExecutionEventResponse)(nil), // 72: flyteidl.admin.WorkflowExecutionEventResponse + (*admin.NodeExecutionEventResponse)(nil), // 73: flyteidl.admin.NodeExecutionEventResponse + (*admin.TaskExecutionEventResponse)(nil), // 74: flyteidl.admin.TaskExecutionEventResponse + (*admin.TaskExecution)(nil), // 75: flyteidl.admin.TaskExecution + (*admin.TaskExecutionList)(nil), // 76: flyteidl.admin.TaskExecutionList + (*admin.TaskExecutionGetDataResponse)(nil), // 77: flyteidl.admin.TaskExecutionGetDataResponse + (*admin.ProjectDomainAttributesUpdateResponse)(nil), // 78: flyteidl.admin.ProjectDomainAttributesUpdateResponse + (*admin.ProjectDomainAttributesGetResponse)(nil), // 79: flyteidl.admin.ProjectDomainAttributesGetResponse + (*admin.ProjectDomainAttributesDeleteResponse)(nil), // 80: flyteidl.admin.ProjectDomainAttributesDeleteResponse + (*admin.ProjectAttributesUpdateResponse)(nil), // 81: flyteidl.admin.ProjectAttributesUpdateResponse + (*admin.ProjectAttributesGetResponse)(nil), // 82: flyteidl.admin.ProjectAttributesGetResponse + (*admin.ProjectAttributesDeleteResponse)(nil), // 83: flyteidl.admin.ProjectAttributesDeleteResponse + (*admin.WorkflowAttributesUpdateResponse)(nil), // 84: flyteidl.admin.WorkflowAttributesUpdateResponse + (*admin.WorkflowAttributesGetResponse)(nil), // 85: flyteidl.admin.WorkflowAttributesGetResponse + (*admin.WorkflowAttributesDeleteResponse)(nil), // 86: flyteidl.admin.WorkflowAttributesDeleteResponse + (*admin.ListMatchableAttributesResponse)(nil), // 87: flyteidl.admin.ListMatchableAttributesResponse + (*admin.NamedEntityList)(nil), // 88: flyteidl.admin.NamedEntityList + (*admin.NamedEntity)(nil), // 89: flyteidl.admin.NamedEntity + (*admin.NamedEntityUpdateResponse)(nil), // 90: flyteidl.admin.NamedEntityUpdateResponse + (*admin.GetVersionResponse)(nil), // 91: flyteidl.admin.GetVersionResponse + (*admin.DescriptionEntity)(nil), // 92: flyteidl.admin.DescriptionEntity + (*admin.DescriptionEntityList)(nil), // 93: flyteidl.admin.DescriptionEntityList + (*admin.WorkflowExecutionGetMetricsResponse)(nil), // 94: flyteidl.admin.WorkflowExecutionGetMetricsResponse + (*admin.ExecutionCountsGetResponse)(nil), // 95: flyteidl.admin.ExecutionCountsGetResponse + (*admin.RunningExecutionsCountGetResponse)(nil), // 96: flyteidl.admin.RunningExecutionsCountGetResponse } var file_flyteidl_service_admin_proto_depIdxs = []int32{ 0, // 0: flyteidl.service.AdminService.CreateTask:input_type -> flyteidl.admin.TaskCreateRequest @@ -1474,62 +1508,66 @@ var file_flyteidl_service_admin_proto_depIdxs = []int32{ 1, // 51: flyteidl.service.AdminService.GetDescriptionEntity:input_type -> flyteidl.admin.ObjectGetRequest 44, // 52: flyteidl.service.AdminService.ListDescriptionEntities:input_type -> flyteidl.admin.DescriptionEntityListRequest 45, // 53: flyteidl.service.AdminService.GetExecutionMetrics:input_type -> flyteidl.admin.WorkflowExecutionGetMetricsRequest - 46, // 54: flyteidl.service.AdminService.CreateTask:output_type -> flyteidl.admin.TaskCreateResponse - 47, // 55: flyteidl.service.AdminService.GetTask:output_type -> flyteidl.admin.Task - 48, // 56: flyteidl.service.AdminService.ListTaskIds:output_type -> flyteidl.admin.NamedEntityIdentifierList - 49, // 57: flyteidl.service.AdminService.ListTasks:output_type -> flyteidl.admin.TaskList - 50, // 58: flyteidl.service.AdminService.CreateWorkflow:output_type -> flyteidl.admin.WorkflowCreateResponse - 51, // 59: flyteidl.service.AdminService.GetWorkflow:output_type -> flyteidl.admin.Workflow - 48, // 60: flyteidl.service.AdminService.ListWorkflowIds:output_type -> flyteidl.admin.NamedEntityIdentifierList - 52, // 61: flyteidl.service.AdminService.ListWorkflows:output_type -> flyteidl.admin.WorkflowList - 53, // 62: flyteidl.service.AdminService.CreateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanCreateResponse - 54, // 63: flyteidl.service.AdminService.GetLaunchPlan:output_type -> flyteidl.admin.LaunchPlan - 54, // 64: flyteidl.service.AdminService.GetActiveLaunchPlan:output_type -> flyteidl.admin.LaunchPlan - 55, // 65: flyteidl.service.AdminService.ListActiveLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList - 48, // 66: flyteidl.service.AdminService.ListLaunchPlanIds:output_type -> flyteidl.admin.NamedEntityIdentifierList - 55, // 67: flyteidl.service.AdminService.ListLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList - 56, // 68: flyteidl.service.AdminService.UpdateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanUpdateResponse - 57, // 69: flyteidl.service.AdminService.CreateExecution:output_type -> flyteidl.admin.ExecutionCreateResponse - 57, // 70: flyteidl.service.AdminService.RelaunchExecution:output_type -> flyteidl.admin.ExecutionCreateResponse - 57, // 71: flyteidl.service.AdminService.RecoverExecution:output_type -> flyteidl.admin.ExecutionCreateResponse - 58, // 72: flyteidl.service.AdminService.GetExecution:output_type -> flyteidl.admin.Execution - 59, // 73: flyteidl.service.AdminService.UpdateExecution:output_type -> flyteidl.admin.ExecutionUpdateResponse - 60, // 74: flyteidl.service.AdminService.GetExecutionData:output_type -> flyteidl.admin.WorkflowExecutionGetDataResponse - 61, // 75: flyteidl.service.AdminService.ListExecutions:output_type -> flyteidl.admin.ExecutionList - 62, // 76: flyteidl.service.AdminService.TerminateExecution:output_type -> flyteidl.admin.ExecutionTerminateResponse - 63, // 77: flyteidl.service.AdminService.GetNodeExecution:output_type -> flyteidl.admin.NodeExecution - 64, // 78: flyteidl.service.AdminService.GetDynamicNodeWorkflow:output_type -> flyteidl.admin.DynamicNodeWorkflowResponse - 65, // 79: flyteidl.service.AdminService.ListNodeExecutions:output_type -> flyteidl.admin.NodeExecutionList - 65, // 80: flyteidl.service.AdminService.ListNodeExecutionsForTask:output_type -> flyteidl.admin.NodeExecutionList - 66, // 81: flyteidl.service.AdminService.GetNodeExecutionData:output_type -> flyteidl.admin.NodeExecutionGetDataResponse - 67, // 82: flyteidl.service.AdminService.RegisterProject:output_type -> flyteidl.admin.ProjectRegisterResponse - 68, // 83: flyteidl.service.AdminService.UpdateProject:output_type -> flyteidl.admin.ProjectUpdateResponse - 69, // 84: flyteidl.service.AdminService.ListProjects:output_type -> flyteidl.admin.Projects - 70, // 85: flyteidl.service.AdminService.CreateWorkflowEvent:output_type -> flyteidl.admin.WorkflowExecutionEventResponse - 71, // 86: flyteidl.service.AdminService.CreateNodeEvent:output_type -> flyteidl.admin.NodeExecutionEventResponse - 72, // 87: flyteidl.service.AdminService.CreateTaskEvent:output_type -> flyteidl.admin.TaskExecutionEventResponse - 73, // 88: flyteidl.service.AdminService.GetTaskExecution:output_type -> flyteidl.admin.TaskExecution - 74, // 89: flyteidl.service.AdminService.ListTaskExecutions:output_type -> flyteidl.admin.TaskExecutionList - 75, // 90: flyteidl.service.AdminService.GetTaskExecutionData:output_type -> flyteidl.admin.TaskExecutionGetDataResponse - 76, // 91: flyteidl.service.AdminService.UpdateProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesUpdateResponse - 77, // 92: flyteidl.service.AdminService.GetProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesGetResponse - 78, // 93: flyteidl.service.AdminService.DeleteProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesDeleteResponse - 79, // 94: flyteidl.service.AdminService.UpdateProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesUpdateResponse - 80, // 95: flyteidl.service.AdminService.GetProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesGetResponse - 81, // 96: flyteidl.service.AdminService.DeleteProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesDeleteResponse - 82, // 97: flyteidl.service.AdminService.UpdateWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesUpdateResponse - 83, // 98: flyteidl.service.AdminService.GetWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesGetResponse - 84, // 99: flyteidl.service.AdminService.DeleteWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesDeleteResponse - 85, // 100: flyteidl.service.AdminService.ListMatchableAttributes:output_type -> flyteidl.admin.ListMatchableAttributesResponse - 86, // 101: flyteidl.service.AdminService.ListNamedEntities:output_type -> flyteidl.admin.NamedEntityList - 87, // 102: flyteidl.service.AdminService.GetNamedEntity:output_type -> flyteidl.admin.NamedEntity - 88, // 103: flyteidl.service.AdminService.UpdateNamedEntity:output_type -> flyteidl.admin.NamedEntityUpdateResponse - 89, // 104: flyteidl.service.AdminService.GetVersion:output_type -> flyteidl.admin.GetVersionResponse - 90, // 105: flyteidl.service.AdminService.GetDescriptionEntity:output_type -> flyteidl.admin.DescriptionEntity - 91, // 106: flyteidl.service.AdminService.ListDescriptionEntities:output_type -> flyteidl.admin.DescriptionEntityList - 92, // 107: flyteidl.service.AdminService.GetExecutionMetrics:output_type -> flyteidl.admin.WorkflowExecutionGetMetricsResponse - 54, // [54:108] is the sub-list for method output_type - 0, // [0:54] is the sub-list for method input_type + 46, // 54: flyteidl.service.AdminService.GetExecutionCounts:input_type -> flyteidl.admin.ExecutionCountsGetRequest + 47, // 55: flyteidl.service.AdminService.GetRunningExecutionsCount:input_type -> flyteidl.admin.RunningExecutionsCountGetRequest + 48, // 56: flyteidl.service.AdminService.CreateTask:output_type -> flyteidl.admin.TaskCreateResponse + 49, // 57: flyteidl.service.AdminService.GetTask:output_type -> flyteidl.admin.Task + 50, // 58: flyteidl.service.AdminService.ListTaskIds:output_type -> flyteidl.admin.NamedEntityIdentifierList + 51, // 59: flyteidl.service.AdminService.ListTasks:output_type -> flyteidl.admin.TaskList + 52, // 60: flyteidl.service.AdminService.CreateWorkflow:output_type -> flyteidl.admin.WorkflowCreateResponse + 53, // 61: flyteidl.service.AdminService.GetWorkflow:output_type -> flyteidl.admin.Workflow + 50, // 62: flyteidl.service.AdminService.ListWorkflowIds:output_type -> flyteidl.admin.NamedEntityIdentifierList + 54, // 63: flyteidl.service.AdminService.ListWorkflows:output_type -> flyteidl.admin.WorkflowList + 55, // 64: flyteidl.service.AdminService.CreateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanCreateResponse + 56, // 65: flyteidl.service.AdminService.GetLaunchPlan:output_type -> flyteidl.admin.LaunchPlan + 56, // 66: flyteidl.service.AdminService.GetActiveLaunchPlan:output_type -> flyteidl.admin.LaunchPlan + 57, // 67: flyteidl.service.AdminService.ListActiveLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList + 50, // 68: flyteidl.service.AdminService.ListLaunchPlanIds:output_type -> flyteidl.admin.NamedEntityIdentifierList + 57, // 69: flyteidl.service.AdminService.ListLaunchPlans:output_type -> flyteidl.admin.LaunchPlanList + 58, // 70: flyteidl.service.AdminService.UpdateLaunchPlan:output_type -> flyteidl.admin.LaunchPlanUpdateResponse + 59, // 71: flyteidl.service.AdminService.CreateExecution:output_type -> flyteidl.admin.ExecutionCreateResponse + 59, // 72: flyteidl.service.AdminService.RelaunchExecution:output_type -> flyteidl.admin.ExecutionCreateResponse + 59, // 73: flyteidl.service.AdminService.RecoverExecution:output_type -> flyteidl.admin.ExecutionCreateResponse + 60, // 74: flyteidl.service.AdminService.GetExecution:output_type -> flyteidl.admin.Execution + 61, // 75: flyteidl.service.AdminService.UpdateExecution:output_type -> flyteidl.admin.ExecutionUpdateResponse + 62, // 76: flyteidl.service.AdminService.GetExecutionData:output_type -> flyteidl.admin.WorkflowExecutionGetDataResponse + 63, // 77: flyteidl.service.AdminService.ListExecutions:output_type -> flyteidl.admin.ExecutionList + 64, // 78: flyteidl.service.AdminService.TerminateExecution:output_type -> flyteidl.admin.ExecutionTerminateResponse + 65, // 79: flyteidl.service.AdminService.GetNodeExecution:output_type -> flyteidl.admin.NodeExecution + 66, // 80: flyteidl.service.AdminService.GetDynamicNodeWorkflow:output_type -> flyteidl.admin.DynamicNodeWorkflowResponse + 67, // 81: flyteidl.service.AdminService.ListNodeExecutions:output_type -> flyteidl.admin.NodeExecutionList + 67, // 82: flyteidl.service.AdminService.ListNodeExecutionsForTask:output_type -> flyteidl.admin.NodeExecutionList + 68, // 83: flyteidl.service.AdminService.GetNodeExecutionData:output_type -> flyteidl.admin.NodeExecutionGetDataResponse + 69, // 84: flyteidl.service.AdminService.RegisterProject:output_type -> flyteidl.admin.ProjectRegisterResponse + 70, // 85: flyteidl.service.AdminService.UpdateProject:output_type -> flyteidl.admin.ProjectUpdateResponse + 71, // 86: flyteidl.service.AdminService.ListProjects:output_type -> flyteidl.admin.Projects + 72, // 87: flyteidl.service.AdminService.CreateWorkflowEvent:output_type -> flyteidl.admin.WorkflowExecutionEventResponse + 73, // 88: flyteidl.service.AdminService.CreateNodeEvent:output_type -> flyteidl.admin.NodeExecutionEventResponse + 74, // 89: flyteidl.service.AdminService.CreateTaskEvent:output_type -> flyteidl.admin.TaskExecutionEventResponse + 75, // 90: flyteidl.service.AdminService.GetTaskExecution:output_type -> flyteidl.admin.TaskExecution + 76, // 91: flyteidl.service.AdminService.ListTaskExecutions:output_type -> flyteidl.admin.TaskExecutionList + 77, // 92: flyteidl.service.AdminService.GetTaskExecutionData:output_type -> flyteidl.admin.TaskExecutionGetDataResponse + 78, // 93: flyteidl.service.AdminService.UpdateProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesUpdateResponse + 79, // 94: flyteidl.service.AdminService.GetProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesGetResponse + 80, // 95: flyteidl.service.AdminService.DeleteProjectDomainAttributes:output_type -> flyteidl.admin.ProjectDomainAttributesDeleteResponse + 81, // 96: flyteidl.service.AdminService.UpdateProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesUpdateResponse + 82, // 97: flyteidl.service.AdminService.GetProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesGetResponse + 83, // 98: flyteidl.service.AdminService.DeleteProjectAttributes:output_type -> flyteidl.admin.ProjectAttributesDeleteResponse + 84, // 99: flyteidl.service.AdminService.UpdateWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesUpdateResponse + 85, // 100: flyteidl.service.AdminService.GetWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesGetResponse + 86, // 101: flyteidl.service.AdminService.DeleteWorkflowAttributes:output_type -> flyteidl.admin.WorkflowAttributesDeleteResponse + 87, // 102: flyteidl.service.AdminService.ListMatchableAttributes:output_type -> flyteidl.admin.ListMatchableAttributesResponse + 88, // 103: flyteidl.service.AdminService.ListNamedEntities:output_type -> flyteidl.admin.NamedEntityList + 89, // 104: flyteidl.service.AdminService.GetNamedEntity:output_type -> flyteidl.admin.NamedEntity + 90, // 105: flyteidl.service.AdminService.UpdateNamedEntity:output_type -> flyteidl.admin.NamedEntityUpdateResponse + 91, // 106: flyteidl.service.AdminService.GetVersion:output_type -> flyteidl.admin.GetVersionResponse + 92, // 107: flyteidl.service.AdminService.GetDescriptionEntity:output_type -> flyteidl.admin.DescriptionEntity + 93, // 108: flyteidl.service.AdminService.ListDescriptionEntities:output_type -> flyteidl.admin.DescriptionEntityList + 94, // 109: flyteidl.service.AdminService.GetExecutionMetrics:output_type -> flyteidl.admin.WorkflowExecutionGetMetricsResponse + 95, // 110: flyteidl.service.AdminService.GetExecutionCounts:output_type -> flyteidl.admin.ExecutionCountsGetResponse + 96, // 111: flyteidl.service.AdminService.GetRunningExecutionsCount:output_type -> flyteidl.admin.RunningExecutionsCountGetResponse + 56, // [56:112] is the sub-list for method output_type + 0, // [0:56] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go index 2f96e962f9..162101d2b6 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/admin_grpc.pb.go @@ -74,6 +74,8 @@ const ( AdminService_GetDescriptionEntity_FullMethodName = "/flyteidl.service.AdminService/GetDescriptionEntity" AdminService_ListDescriptionEntities_FullMethodName = "/flyteidl.service.AdminService/ListDescriptionEntities" AdminService_GetExecutionMetrics_FullMethodName = "/flyteidl.service.AdminService/GetExecutionMetrics" + AdminService_GetExecutionCounts_FullMethodName = "/flyteidl.service.AdminService/GetExecutionCounts" + AdminService_GetRunningExecutionsCount_FullMethodName = "/flyteidl.service.AdminService/GetRunningExecutionsCount" ) // AdminServiceClient is the client API for AdminService service. @@ -193,6 +195,9 @@ type AdminServiceClient interface { ListDescriptionEntities(ctx context.Context, in *admin.DescriptionEntityListRequest, opts ...grpc.CallOption) (*admin.DescriptionEntityList, error) // Fetches runtime metrics for a :ref:`ref_flyteidl.admin.Execution`. GetExecutionMetrics(ctx context.Context, in *admin.WorkflowExecutionGetMetricsRequest, opts ...grpc.CallOption) (*admin.WorkflowExecutionGetMetricsResponse, error) + // Fetch the count of :ref:`ref_flyteidl.admin.Execution`. + GetExecutionCounts(ctx context.Context, in *admin.ExecutionCountsGetRequest, opts ...grpc.CallOption) (*admin.ExecutionCountsGetResponse, error) + GetRunningExecutionsCount(ctx context.Context, in *admin.RunningExecutionsCountGetRequest, opts ...grpc.CallOption) (*admin.RunningExecutionsCountGetResponse, error) } type adminServiceClient struct { @@ -689,6 +694,24 @@ func (c *adminServiceClient) GetExecutionMetrics(ctx context.Context, in *admin. return out, nil } +func (c *adminServiceClient) GetExecutionCounts(ctx context.Context, in *admin.ExecutionCountsGetRequest, opts ...grpc.CallOption) (*admin.ExecutionCountsGetResponse, error) { + out := new(admin.ExecutionCountsGetResponse) + err := c.cc.Invoke(ctx, AdminService_GetExecutionCounts_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) GetRunningExecutionsCount(ctx context.Context, in *admin.RunningExecutionsCountGetRequest, opts ...grpc.CallOption) (*admin.RunningExecutionsCountGetResponse, error) { + out := new(admin.RunningExecutionsCountGetResponse) + err := c.cc.Invoke(ctx, AdminService_GetRunningExecutionsCount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AdminServiceServer is the server API for AdminService service. // All implementations should embed UnimplementedAdminServiceServer // for forward compatibility @@ -806,6 +829,9 @@ type AdminServiceServer interface { ListDescriptionEntities(context.Context, *admin.DescriptionEntityListRequest) (*admin.DescriptionEntityList, error) // Fetches runtime metrics for a :ref:`ref_flyteidl.admin.Execution`. GetExecutionMetrics(context.Context, *admin.WorkflowExecutionGetMetricsRequest) (*admin.WorkflowExecutionGetMetricsResponse, error) + // Fetch the count of :ref:`ref_flyteidl.admin.Execution`. + GetExecutionCounts(context.Context, *admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) + GetRunningExecutionsCount(context.Context, *admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) } // UnimplementedAdminServiceServer should be embedded to have forward compatible implementations. @@ -974,6 +1000,12 @@ func (UnimplementedAdminServiceServer) ListDescriptionEntities(context.Context, func (UnimplementedAdminServiceServer) GetExecutionMetrics(context.Context, *admin.WorkflowExecutionGetMetricsRequest) (*admin.WorkflowExecutionGetMetricsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetExecutionMetrics not implemented") } +func (UnimplementedAdminServiceServer) GetExecutionCounts(context.Context, *admin.ExecutionCountsGetRequest) (*admin.ExecutionCountsGetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExecutionCounts not implemented") +} +func (UnimplementedAdminServiceServer) GetRunningExecutionsCount(context.Context, *admin.RunningExecutionsCountGetRequest) (*admin.RunningExecutionsCountGetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRunningExecutionsCount not implemented") +} // UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdminServiceServer will @@ -1958,6 +1990,42 @@ func _AdminService_GetExecutionMetrics_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _AdminService_GetExecutionCounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(admin.ExecutionCountsGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).GetExecutionCounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_GetExecutionCounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).GetExecutionCounts(ctx, req.(*admin.ExecutionCountsGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_GetRunningExecutionsCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(admin.RunningExecutionsCountGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).GetRunningExecutionsCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_GetRunningExecutionsCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).GetRunningExecutionsCount(ctx, req.(*admin.RunningExecutionsCountGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + // AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2181,6 +2249,14 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetExecutionMetrics", Handler: _AdminService_GetExecutionMetrics_Handler, }, + { + MethodName: "GetExecutionCounts", + Handler: _AdminService_GetExecutionCounts_Handler, + }, + { + MethodName: "GetRunningExecutionsCount", + Handler: _AdminService_GetRunningExecutionsCount_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "flyteidl/service/admin.proto", diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go index fbbba2c35c..ae1e7ed4a0 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.pb.gw.go @@ -12614,6 +12614,388 @@ func local_request_AdminService_GetExecutionMetrics_1(ctx context.Context, marsh } +var ( + filter_AdminService_GetExecutionCounts_0 = &utilities.DoubleArray{Encoding: map[string]int{"project": 0, "domain": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_AdminService_GetExecutionCounts_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.ExecutionCountsGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_GetExecutionCounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetExecutionCounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AdminService_GetExecutionCounts_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.ExecutionCountsGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_GetExecutionCounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetExecutionCounts(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AdminService_GetExecutionCounts_1 = &utilities.DoubleArray{Encoding: map[string]int{"org": 0, "project": 1, "domain": 2}, Base: []int{1, 2, 4, 6, 0, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 2, 3, 3, 4, 4}} +) + +func request_AdminService_GetExecutionCounts_1(ctx context.Context, marshaler runtime.Marshaler, client extService.AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.ExecutionCountsGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org") + } + + protoReq.Org, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org", err) + } + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_GetExecutionCounts_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetExecutionCounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AdminService_GetExecutionCounts_1(ctx context.Context, marshaler runtime.Marshaler, server extService.AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.ExecutionCountsGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org") + } + + protoReq.Org, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org", err) + } + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_GetExecutionCounts_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetExecutionCounts(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AdminService_GetRunningExecutionsCount_0 = &utilities.DoubleArray{Encoding: map[string]int{"project": 0, "domain": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_AdminService_GetRunningExecutionsCount_0(ctx context.Context, marshaler runtime.Marshaler, client extService.AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.RunningExecutionsCountGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_GetRunningExecutionsCount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRunningExecutionsCount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AdminService_GetRunningExecutionsCount_0(ctx context.Context, marshaler runtime.Marshaler, server extService.AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.RunningExecutionsCountGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_GetRunningExecutionsCount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRunningExecutionsCount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AdminService_GetRunningExecutionsCount_1(ctx context.Context, marshaler runtime.Marshaler, client extService.AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.RunningExecutionsCountGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org") + } + + protoReq.Org, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org", err) + } + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + msg, err := client.GetRunningExecutionsCount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AdminService_GetRunningExecutionsCount_1(ctx context.Context, marshaler runtime.Marshaler, server extService.AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extAdmin.RunningExecutionsCountGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org") + } + + protoReq.Org, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org", err) + } + + val, ok = pathParams["project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") + } + + protoReq.Project, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) + } + + val, ok = pathParams["domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "domain") + } + + protoReq.Domain, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "domain", err) + } + + msg, err := server.GetRunningExecutionsCount(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterAdminServiceHandlerServer registers the http handlers for service AdminService to "mux". // UnaryRPC :call AdminServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -15495,6 +15877,106 @@ func RegisterAdminServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_AdminService_GetExecutionCounts_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.AdminService/GetExecutionCounts", runtime.WithHTTPPathPattern("/api/v1/count/executions/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AdminService_GetExecutionCounts_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_AdminService_GetExecutionCounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminService_GetExecutionCounts_1, 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.AdminService/GetExecutionCounts", runtime.WithHTTPPathPattern("/api/v1/org/count/executions/{org}/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AdminService_GetExecutionCounts_1(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_AdminService_GetExecutionCounts_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminService_GetRunningExecutionsCount_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.AdminService/GetRunningExecutionsCount", runtime.WithHTTPPathPattern("/api/v1/running_count/executions/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AdminService_GetRunningExecutionsCount_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_AdminService_GetRunningExecutionsCount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminService_GetRunningExecutionsCount_1, 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.AdminService/GetRunningExecutionsCount", runtime.WithHTTPPathPattern("/api/v1/org/running_count/executions/{org}/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AdminService_GetRunningExecutionsCount_1(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_AdminService_GetRunningExecutionsCount_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -18066,6 +18548,94 @@ func RegisterAdminServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_AdminService_GetExecutionCounts_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.AdminService/GetExecutionCounts", runtime.WithHTTPPathPattern("/api/v1/count/executions/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminService_GetExecutionCounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_GetExecutionCounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminService_GetExecutionCounts_1, 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.AdminService/GetExecutionCounts", runtime.WithHTTPPathPattern("/api/v1/org/count/executions/{org}/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminService_GetExecutionCounts_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_GetExecutionCounts_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminService_GetRunningExecutionsCount_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.AdminService/GetRunningExecutionsCount", runtime.WithHTTPPathPattern("/api/v1/running_count/executions/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminService_GetRunningExecutionsCount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_GetRunningExecutionsCount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminService_GetRunningExecutionsCount_1, 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.AdminService/GetRunningExecutionsCount", runtime.WithHTTPPathPattern("/api/v1/org/running_count/executions/{org}/{project}/{domain}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminService_GetRunningExecutionsCount_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_GetRunningExecutionsCount_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -18299,6 +18869,14 @@ var ( pattern_AdminService_GetExecutionMetrics_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", "metrics", "executions", "id.project", "id.domain", "id.name"}, "")) pattern_AdminService_GetExecutionMetrics_1 = 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, 1, 0, 4, 1, 5, 8}, []string{"api", "v1", "org", "metrics", "executions", "id.org", "id.project", "id.domain", "id.name"}, "")) + + pattern_AdminService_GetExecutionCounts_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}, []string{"api", "v1", "count", "executions", "project", "domain"}, "")) + + pattern_AdminService_GetExecutionCounts_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "org", "count", "executions", "project", "domain"}, "")) + + pattern_AdminService_GetRunningExecutionsCount_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}, []string{"api", "v1", "running_count", "executions", "project", "domain"}, "")) + + pattern_AdminService_GetRunningExecutionsCount_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "org", "running_count", "executions", "project", "domain"}, "")) ) var ( @@ -18531,4 +19109,12 @@ var ( forward_AdminService_GetExecutionMetrics_0 = runtime.ForwardResponseMessage forward_AdminService_GetExecutionMetrics_1 = runtime.ForwardResponseMessage + + forward_AdminService_GetExecutionCounts_0 = runtime.ForwardResponseMessage + + forward_AdminService_GetExecutionCounts_1 = runtime.ForwardResponseMessage + + forward_AdminService_GetRunningExecutionsCount_0 = runtime.ForwardResponseMessage + + forward_AdminService_GetRunningExecutionsCount_1 = runtime.ForwardResponseMessage ) diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json index ebcd60d247..0e4e0e4155 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json @@ -308,6 +308,59 @@ ] } }, + "/api/v1/count/executions/{project}/{domain}": { + "get": { + "summary": "Fetch the count of :ref:`ref_flyteidl.admin.Execution`.", + "operationId": "AdminService_GetExecutionCounts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminExecutionCountsGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "filters", + "description": "Indicates a list of filters passed as string.\n+optional", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/data/executions/{id.project}/{id.domain}/{id.name}": { "get": { "summary": "Fetches input and output data for a :ref:`ref_flyteidl.admin.Execution`.", @@ -2609,6 +2662,59 @@ ] } }, + "/api/v1/org/count/executions/{org}/{project}/{domain}": { + "get": { + "summary": "Fetch the count of :ref:`ref_flyteidl.admin.Execution`.", + "operationId": "AdminService_GetExecutionCounts2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminExecutionCountsGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "filters", + "description": "Indicates a list of filters passed as string.\n+optional", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/org/data/executions/{id.org}/{id.project}/{id.domain}/{id.name}": { "get": { "summary": "Fetches input and output data for a :ref:`ref_flyteidl.admin.Execution`.", @@ -5194,6 +5300,51 @@ ] } }, + "/api/v1/org/running_count/executions/{org}/{project}/{domain}": { + "get": { + "operationId": "AdminService_GetRunningExecutionsCount2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminRunningExecutionsCountGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/org/task_executions/{id.node_execution_id.execution_id.org}/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}": { "get": { "summary": "Fetches a :ref:`ref_flyteidl.admin.TaskExecution`.", @@ -6854,6 +7005,51 @@ ] } }, + "/api/v1/running_count/executions/{project}/{domain}": { + "get": { + "operationId": "AdminService_GetRunningExecutionsCount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminRunningExecutionsCountGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "project", + "description": "Name of the project the execution belongs to.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "domain", + "description": "Name of the domain the execution belongs to.\nA domain can be considered as a subset within a specific project.\n+required", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org", + "description": "org filter applied to execution count request.\n+optional", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdminService" + ] + } + }, "/api/v1/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}": { "get": { "summary": "Fetches a :ref:`ref_flyteidl.admin.TaskExecution`.", @@ -9322,6 +9518,35 @@ } } }, + "adminExecutionCountsByPhase": { + "type": "object", + "properties": { + "phase": { + "$ref": "#/definitions/coreWorkflowExecutionPhase", + "description": "execution phase." + }, + "count": { + "type": "string", + "format": "int64", + "description": "Count of the executions in corresponding phase." + } + }, + "description": "Execution count of a phase." + }, + "adminExecutionCountsGetResponse": { + "type": "object", + "properties": { + "execution_counts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/adminExecutionCountsByPhase" + }, + "description": "Count of the executions in all phases." + } + }, + "description": "Execution count response." + }, "adminExecutionCreateRequest": { "type": "object", "properties": { @@ -10420,6 +10645,17 @@ }, "description": "Reason is a single message annotated with a timestamp to indicate the instant the reason occurred." }, + "adminRunningExecutionsCountGetResponse": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64", + "description": "Count of the running executions." + } + }, + "description": "Running execution count response." + }, "adminSchedule": { "type": "object", "properties": { diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 98f6666e72..40a6b6cb42 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -14588,6 +14588,302 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of an ExecutionCountsGetRequest. */ + interface IExecutionCountsGetRequest { + + /** ExecutionCountsGetRequest project */ + project?: (string|null); + + /** ExecutionCountsGetRequest domain */ + domain?: (string|null); + + /** ExecutionCountsGetRequest org */ + org?: (string|null); + + /** ExecutionCountsGetRequest filters */ + filters?: (string|null); + } + + /** Represents an ExecutionCountsGetRequest. */ + class ExecutionCountsGetRequest implements IExecutionCountsGetRequest { + + /** + * Constructs a new ExecutionCountsGetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IExecutionCountsGetRequest); + + /** ExecutionCountsGetRequest project. */ + public project: string; + + /** ExecutionCountsGetRequest domain. */ + public domain: string; + + /** ExecutionCountsGetRequest org. */ + public org: string; + + /** ExecutionCountsGetRequest filters. */ + public filters: string; + + /** + * Creates a new ExecutionCountsGetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionCountsGetRequest instance + */ + public static create(properties?: flyteidl.admin.IExecutionCountsGetRequest): flyteidl.admin.ExecutionCountsGetRequest; + + /** + * Encodes the specified ExecutionCountsGetRequest message. Does not implicitly {@link flyteidl.admin.ExecutionCountsGetRequest.verify|verify} messages. + * @param message ExecutionCountsGetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IExecutionCountsGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionCountsGetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionCountsGetRequest + * @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.ExecutionCountsGetRequest; + + /** + * Verifies an ExecutionCountsGetRequest 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 ExecutionCountsByPhase. */ + interface IExecutionCountsByPhase { + + /** ExecutionCountsByPhase phase */ + phase?: (flyteidl.core.WorkflowExecution.Phase|null); + + /** ExecutionCountsByPhase count */ + count?: (Long|null); + } + + /** Represents an ExecutionCountsByPhase. */ + class ExecutionCountsByPhase implements IExecutionCountsByPhase { + + /** + * Constructs a new ExecutionCountsByPhase. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IExecutionCountsByPhase); + + /** ExecutionCountsByPhase phase. */ + public phase: flyteidl.core.WorkflowExecution.Phase; + + /** ExecutionCountsByPhase count. */ + public count: Long; + + /** + * Creates a new ExecutionCountsByPhase instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionCountsByPhase instance + */ + public static create(properties?: flyteidl.admin.IExecutionCountsByPhase): flyteidl.admin.ExecutionCountsByPhase; + + /** + * Encodes the specified ExecutionCountsByPhase message. Does not implicitly {@link flyteidl.admin.ExecutionCountsByPhase.verify|verify} messages. + * @param message ExecutionCountsByPhase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IExecutionCountsByPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionCountsByPhase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionCountsByPhase + * @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.ExecutionCountsByPhase; + + /** + * Verifies an ExecutionCountsByPhase 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 ExecutionCountsGetResponse. */ + interface IExecutionCountsGetResponse { + + /** ExecutionCountsGetResponse executionCounts */ + executionCounts?: (flyteidl.admin.IExecutionCountsByPhase[]|null); + } + + /** Represents an ExecutionCountsGetResponse. */ + class ExecutionCountsGetResponse implements IExecutionCountsGetResponse { + + /** + * Constructs a new ExecutionCountsGetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IExecutionCountsGetResponse); + + /** ExecutionCountsGetResponse executionCounts. */ + public executionCounts: flyteidl.admin.IExecutionCountsByPhase[]; + + /** + * Creates a new ExecutionCountsGetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionCountsGetResponse instance + */ + public static create(properties?: flyteidl.admin.IExecutionCountsGetResponse): flyteidl.admin.ExecutionCountsGetResponse; + + /** + * Encodes the specified ExecutionCountsGetResponse message. Does not implicitly {@link flyteidl.admin.ExecutionCountsGetResponse.verify|verify} messages. + * @param message ExecutionCountsGetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IExecutionCountsGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionCountsGetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionCountsGetResponse + * @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.ExecutionCountsGetResponse; + + /** + * Verifies an ExecutionCountsGetResponse 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 RunningExecutionsCountGetRequest. */ + interface IRunningExecutionsCountGetRequest { + + /** RunningExecutionsCountGetRequest project */ + project?: (string|null); + + /** RunningExecutionsCountGetRequest domain */ + domain?: (string|null); + + /** RunningExecutionsCountGetRequest org */ + org?: (string|null); + } + + /** Represents a RunningExecutionsCountGetRequest. */ + class RunningExecutionsCountGetRequest implements IRunningExecutionsCountGetRequest { + + /** + * Constructs a new RunningExecutionsCountGetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IRunningExecutionsCountGetRequest); + + /** RunningExecutionsCountGetRequest project. */ + public project: string; + + /** RunningExecutionsCountGetRequest domain. */ + public domain: string; + + /** RunningExecutionsCountGetRequest org. */ + public org: string; + + /** + * Creates a new RunningExecutionsCountGetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunningExecutionsCountGetRequest instance + */ + public static create(properties?: flyteidl.admin.IRunningExecutionsCountGetRequest): flyteidl.admin.RunningExecutionsCountGetRequest; + + /** + * Encodes the specified RunningExecutionsCountGetRequest message. Does not implicitly {@link flyteidl.admin.RunningExecutionsCountGetRequest.verify|verify} messages. + * @param message RunningExecutionsCountGetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IRunningExecutionsCountGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunningExecutionsCountGetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunningExecutionsCountGetRequest + * @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.RunningExecutionsCountGetRequest; + + /** + * Verifies a RunningExecutionsCountGetRequest 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 RunningExecutionsCountGetResponse. */ + interface IRunningExecutionsCountGetResponse { + + /** RunningExecutionsCountGetResponse count */ + count?: (Long|null); + } + + /** Represents a RunningExecutionsCountGetResponse. */ + class RunningExecutionsCountGetResponse implements IRunningExecutionsCountGetResponse { + + /** + * Constructs a new RunningExecutionsCountGetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IRunningExecutionsCountGetResponse); + + /** RunningExecutionsCountGetResponse count. */ + public count: Long; + + /** + * Creates a new RunningExecutionsCountGetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunningExecutionsCountGetResponse instance + */ + public static create(properties?: flyteidl.admin.IRunningExecutionsCountGetResponse): flyteidl.admin.RunningExecutionsCountGetResponse; + + /** + * Encodes the specified RunningExecutionsCountGetResponse message. Does not implicitly {@link flyteidl.admin.RunningExecutionsCountGetResponse.verify|verify} messages. + * @param message RunningExecutionsCountGetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IRunningExecutionsCountGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunningExecutionsCountGetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunningExecutionsCountGetResponse + * @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.RunningExecutionsCountGetResponse; + + /** + * Verifies a RunningExecutionsCountGetResponse 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 LaunchPlanCreateRequest. */ interface ILaunchPlanCreateRequest { @@ -21819,6 +22115,34 @@ export namespace flyteidl { * @returns Promise */ public getExecutionMetrics(request: flyteidl.admin.IWorkflowExecutionGetMetricsRequest): Promise; + + /** + * Calls GetExecutionCounts. + * @param request ExecutionCountsGetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecutionCountsGetResponse + */ + public getExecutionCounts(request: flyteidl.admin.IExecutionCountsGetRequest, callback: flyteidl.service.AdminService.GetExecutionCountsCallback): void; + + /** + * Calls GetExecutionCounts. + * @param request ExecutionCountsGetRequest message or plain object + * @returns Promise + */ + public getExecutionCounts(request: flyteidl.admin.IExecutionCountsGetRequest): Promise; + + /** + * Calls GetRunningExecutionsCount. + * @param request RunningExecutionsCountGetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunningExecutionsCountGetResponse + */ + public getRunningExecutionsCount(request: flyteidl.admin.IRunningExecutionsCountGetRequest, callback: flyteidl.service.AdminService.GetRunningExecutionsCountCallback): void; + + /** + * Calls GetRunningExecutionsCount. + * @param request RunningExecutionsCountGetRequest message or plain object + * @returns Promise + */ + public getRunningExecutionsCount(request: flyteidl.admin.IRunningExecutionsCountGetRequest): Promise; } namespace AdminService { @@ -22200,6 +22524,20 @@ export namespace flyteidl { * @param [response] WorkflowExecutionGetMetricsResponse */ type GetExecutionMetricsCallback = (error: (Error|null), response?: flyteidl.admin.WorkflowExecutionGetMetricsResponse) => void; + + /** + * Callback as used by {@link flyteidl.service.AdminService#getExecutionCounts}. + * @param error Error, if any + * @param [response] ExecutionCountsGetResponse + */ + type GetExecutionCountsCallback = (error: (Error|null), response?: flyteidl.admin.ExecutionCountsGetResponse) => void; + + /** + * Callback as used by {@link flyteidl.service.AdminService#getRunningExecutionsCount}. + * @param error Error, if any + * @param [response] RunningExecutionsCountGetResponse + */ + type GetRunningExecutionsCountCallback = (error: (Error|null), response?: flyteidl.admin.RunningExecutionsCountGetResponse) => void; } /** Represents a SyncAgentService */ diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index c50bbaa2ef..fb3bcfe650 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -35303,6 +35303,681 @@ return WorkflowExecutionGetMetricsResponse; })(); + admin.ExecutionCountsGetRequest = (function() { + + /** + * Properties of an ExecutionCountsGetRequest. + * @memberof flyteidl.admin + * @interface IExecutionCountsGetRequest + * @property {string|null} [project] ExecutionCountsGetRequest project + * @property {string|null} [domain] ExecutionCountsGetRequest domain + * @property {string|null} [org] ExecutionCountsGetRequest org + * @property {string|null} [filters] ExecutionCountsGetRequest filters + */ + + /** + * Constructs a new ExecutionCountsGetRequest. + * @memberof flyteidl.admin + * @classdesc Represents an ExecutionCountsGetRequest. + * @implements IExecutionCountsGetRequest + * @constructor + * @param {flyteidl.admin.IExecutionCountsGetRequest=} [properties] Properties to set + */ + function ExecutionCountsGetRequest(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]]; + } + + /** + * ExecutionCountsGetRequest project. + * @member {string} project + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @instance + */ + ExecutionCountsGetRequest.prototype.project = ""; + + /** + * ExecutionCountsGetRequest domain. + * @member {string} domain + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @instance + */ + ExecutionCountsGetRequest.prototype.domain = ""; + + /** + * ExecutionCountsGetRequest org. + * @member {string} org + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @instance + */ + ExecutionCountsGetRequest.prototype.org = ""; + + /** + * ExecutionCountsGetRequest filters. + * @member {string} filters + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @instance + */ + ExecutionCountsGetRequest.prototype.filters = ""; + + /** + * Creates a new ExecutionCountsGetRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @static + * @param {flyteidl.admin.IExecutionCountsGetRequest=} [properties] Properties to set + * @returns {flyteidl.admin.ExecutionCountsGetRequest} ExecutionCountsGetRequest instance + */ + ExecutionCountsGetRequest.create = function create(properties) { + return new ExecutionCountsGetRequest(properties); + }; + + /** + * Encodes the specified ExecutionCountsGetRequest message. Does not implicitly {@link flyteidl.admin.ExecutionCountsGetRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @static + * @param {flyteidl.admin.IExecutionCountsGetRequest} message ExecutionCountsGetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionCountsGetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && message.hasOwnProperty("project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.domain != null && message.hasOwnProperty("domain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain); + if (message.org != null && message.hasOwnProperty("org")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.org); + if (message.filters != null && message.hasOwnProperty("filters")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filters); + return writer; + }; + + /** + * Decodes an ExecutionCountsGetRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ExecutionCountsGetRequest} ExecutionCountsGetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionCountsGetRequest.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.ExecutionCountsGetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.project = reader.string(); + break; + case 2: + message.domain = reader.string(); + break; + case 3: + message.org = reader.string(); + break; + case 4: + message.filters = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an ExecutionCountsGetRequest message. + * @function verify + * @memberof flyteidl.admin.ExecutionCountsGetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionCountsGetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.domain != null && message.hasOwnProperty("domain")) + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (message.org != null && message.hasOwnProperty("org")) + if (!$util.isString(message.org)) + return "org: string expected"; + if (message.filters != null && message.hasOwnProperty("filters")) + if (!$util.isString(message.filters)) + return "filters: string expected"; + return null; + }; + + return ExecutionCountsGetRequest; + })(); + + admin.ExecutionCountsByPhase = (function() { + + /** + * Properties of an ExecutionCountsByPhase. + * @memberof flyteidl.admin + * @interface IExecutionCountsByPhase + * @property {flyteidl.core.WorkflowExecution.Phase|null} [phase] ExecutionCountsByPhase phase + * @property {Long|null} [count] ExecutionCountsByPhase count + */ + + /** + * Constructs a new ExecutionCountsByPhase. + * @memberof flyteidl.admin + * @classdesc Represents an ExecutionCountsByPhase. + * @implements IExecutionCountsByPhase + * @constructor + * @param {flyteidl.admin.IExecutionCountsByPhase=} [properties] Properties to set + */ + function ExecutionCountsByPhase(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]]; + } + + /** + * ExecutionCountsByPhase phase. + * @member {flyteidl.core.WorkflowExecution.Phase} phase + * @memberof flyteidl.admin.ExecutionCountsByPhase + * @instance + */ + ExecutionCountsByPhase.prototype.phase = 0; + + /** + * ExecutionCountsByPhase count. + * @member {Long} count + * @memberof flyteidl.admin.ExecutionCountsByPhase + * @instance + */ + ExecutionCountsByPhase.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ExecutionCountsByPhase instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ExecutionCountsByPhase + * @static + * @param {flyteidl.admin.IExecutionCountsByPhase=} [properties] Properties to set + * @returns {flyteidl.admin.ExecutionCountsByPhase} ExecutionCountsByPhase instance + */ + ExecutionCountsByPhase.create = function create(properties) { + return new ExecutionCountsByPhase(properties); + }; + + /** + * Encodes the specified ExecutionCountsByPhase message. Does not implicitly {@link flyteidl.admin.ExecutionCountsByPhase.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ExecutionCountsByPhase + * @static + * @param {flyteidl.admin.IExecutionCountsByPhase} message ExecutionCountsByPhase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionCountsByPhase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phase != null && message.hasOwnProperty("phase")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.phase); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Decodes an ExecutionCountsByPhase message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ExecutionCountsByPhase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ExecutionCountsByPhase} ExecutionCountsByPhase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionCountsByPhase.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.ExecutionCountsByPhase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.phase = reader.int32(); + break; + case 2: + message.count = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an ExecutionCountsByPhase message. + * @function verify + * @memberof flyteidl.admin.ExecutionCountsByPhase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionCountsByPhase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phase != null && message.hasOwnProperty("phase")) + switch (message.phase) { + default: + return "phase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + return ExecutionCountsByPhase; + })(); + + admin.ExecutionCountsGetResponse = (function() { + + /** + * Properties of an ExecutionCountsGetResponse. + * @memberof flyteidl.admin + * @interface IExecutionCountsGetResponse + * @property {Array.|null} [executionCounts] ExecutionCountsGetResponse executionCounts + */ + + /** + * Constructs a new ExecutionCountsGetResponse. + * @memberof flyteidl.admin + * @classdesc Represents an ExecutionCountsGetResponse. + * @implements IExecutionCountsGetResponse + * @constructor + * @param {flyteidl.admin.IExecutionCountsGetResponse=} [properties] Properties to set + */ + function ExecutionCountsGetResponse(properties) { + this.executionCounts = []; + 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]]; + } + + /** + * ExecutionCountsGetResponse executionCounts. + * @member {Array.} executionCounts + * @memberof flyteidl.admin.ExecutionCountsGetResponse + * @instance + */ + ExecutionCountsGetResponse.prototype.executionCounts = $util.emptyArray; + + /** + * Creates a new ExecutionCountsGetResponse instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ExecutionCountsGetResponse + * @static + * @param {flyteidl.admin.IExecutionCountsGetResponse=} [properties] Properties to set + * @returns {flyteidl.admin.ExecutionCountsGetResponse} ExecutionCountsGetResponse instance + */ + ExecutionCountsGetResponse.create = function create(properties) { + return new ExecutionCountsGetResponse(properties); + }; + + /** + * Encodes the specified ExecutionCountsGetResponse message. Does not implicitly {@link flyteidl.admin.ExecutionCountsGetResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ExecutionCountsGetResponse + * @static + * @param {flyteidl.admin.IExecutionCountsGetResponse} message ExecutionCountsGetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionCountsGetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executionCounts != null && message.executionCounts.length) + for (var i = 0; i < message.executionCounts.length; ++i) + $root.flyteidl.admin.ExecutionCountsByPhase.encode(message.executionCounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes an ExecutionCountsGetResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ExecutionCountsGetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ExecutionCountsGetResponse} ExecutionCountsGetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionCountsGetResponse.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.ExecutionCountsGetResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.executionCounts && message.executionCounts.length)) + message.executionCounts = []; + message.executionCounts.push($root.flyteidl.admin.ExecutionCountsByPhase.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an ExecutionCountsGetResponse message. + * @function verify + * @memberof flyteidl.admin.ExecutionCountsGetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionCountsGetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executionCounts != null && message.hasOwnProperty("executionCounts")) { + if (!Array.isArray(message.executionCounts)) + return "executionCounts: array expected"; + for (var i = 0; i < message.executionCounts.length; ++i) { + var error = $root.flyteidl.admin.ExecutionCountsByPhase.verify(message.executionCounts[i]); + if (error) + return "executionCounts." + error; + } + } + return null; + }; + + return ExecutionCountsGetResponse; + })(); + + admin.RunningExecutionsCountGetRequest = (function() { + + /** + * Properties of a RunningExecutionsCountGetRequest. + * @memberof flyteidl.admin + * @interface IRunningExecutionsCountGetRequest + * @property {string|null} [project] RunningExecutionsCountGetRequest project + * @property {string|null} [domain] RunningExecutionsCountGetRequest domain + * @property {string|null} [org] RunningExecutionsCountGetRequest org + */ + + /** + * Constructs a new RunningExecutionsCountGetRequest. + * @memberof flyteidl.admin + * @classdesc Represents a RunningExecutionsCountGetRequest. + * @implements IRunningExecutionsCountGetRequest + * @constructor + * @param {flyteidl.admin.IRunningExecutionsCountGetRequest=} [properties] Properties to set + */ + function RunningExecutionsCountGetRequest(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]]; + } + + /** + * RunningExecutionsCountGetRequest project. + * @member {string} project + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @instance + */ + RunningExecutionsCountGetRequest.prototype.project = ""; + + /** + * RunningExecutionsCountGetRequest domain. + * @member {string} domain + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @instance + */ + RunningExecutionsCountGetRequest.prototype.domain = ""; + + /** + * RunningExecutionsCountGetRequest org. + * @member {string} org + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @instance + */ + RunningExecutionsCountGetRequest.prototype.org = ""; + + /** + * Creates a new RunningExecutionsCountGetRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @static + * @param {flyteidl.admin.IRunningExecutionsCountGetRequest=} [properties] Properties to set + * @returns {flyteidl.admin.RunningExecutionsCountGetRequest} RunningExecutionsCountGetRequest instance + */ + RunningExecutionsCountGetRequest.create = function create(properties) { + return new RunningExecutionsCountGetRequest(properties); + }; + + /** + * Encodes the specified RunningExecutionsCountGetRequest message. Does not implicitly {@link flyteidl.admin.RunningExecutionsCountGetRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @static + * @param {flyteidl.admin.IRunningExecutionsCountGetRequest} message RunningExecutionsCountGetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunningExecutionsCountGetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && message.hasOwnProperty("project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.domain != null && message.hasOwnProperty("domain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain); + if (message.org != null && message.hasOwnProperty("org")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.org); + return writer; + }; + + /** + * Decodes a RunningExecutionsCountGetRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.RunningExecutionsCountGetRequest} RunningExecutionsCountGetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunningExecutionsCountGetRequest.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.RunningExecutionsCountGetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.project = reader.string(); + break; + case 2: + message.domain = reader.string(); + break; + case 3: + message.org = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a RunningExecutionsCountGetRequest message. + * @function verify + * @memberof flyteidl.admin.RunningExecutionsCountGetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunningExecutionsCountGetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.domain != null && message.hasOwnProperty("domain")) + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (message.org != null && message.hasOwnProperty("org")) + if (!$util.isString(message.org)) + return "org: string expected"; + return null; + }; + + return RunningExecutionsCountGetRequest; + })(); + + admin.RunningExecutionsCountGetResponse = (function() { + + /** + * Properties of a RunningExecutionsCountGetResponse. + * @memberof flyteidl.admin + * @interface IRunningExecutionsCountGetResponse + * @property {Long|null} [count] RunningExecutionsCountGetResponse count + */ + + /** + * Constructs a new RunningExecutionsCountGetResponse. + * @memberof flyteidl.admin + * @classdesc Represents a RunningExecutionsCountGetResponse. + * @implements IRunningExecutionsCountGetResponse + * @constructor + * @param {flyteidl.admin.IRunningExecutionsCountGetResponse=} [properties] Properties to set + */ + function RunningExecutionsCountGetResponse(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]]; + } + + /** + * RunningExecutionsCountGetResponse count. + * @member {Long} count + * @memberof flyteidl.admin.RunningExecutionsCountGetResponse + * @instance + */ + RunningExecutionsCountGetResponse.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RunningExecutionsCountGetResponse instance using the specified properties. + * @function create + * @memberof flyteidl.admin.RunningExecutionsCountGetResponse + * @static + * @param {flyteidl.admin.IRunningExecutionsCountGetResponse=} [properties] Properties to set + * @returns {flyteidl.admin.RunningExecutionsCountGetResponse} RunningExecutionsCountGetResponse instance + */ + RunningExecutionsCountGetResponse.create = function create(properties) { + return new RunningExecutionsCountGetResponse(properties); + }; + + /** + * Encodes the specified RunningExecutionsCountGetResponse message. Does not implicitly {@link flyteidl.admin.RunningExecutionsCountGetResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.RunningExecutionsCountGetResponse + * @static + * @param {flyteidl.admin.IRunningExecutionsCountGetResponse} message RunningExecutionsCountGetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunningExecutionsCountGetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + return writer; + }; + + /** + * Decodes a RunningExecutionsCountGetResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.RunningExecutionsCountGetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.RunningExecutionsCountGetResponse} RunningExecutionsCountGetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunningExecutionsCountGetResponse.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.RunningExecutionsCountGetResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a RunningExecutionsCountGetResponse message. + * @function verify + * @memberof flyteidl.admin.RunningExecutionsCountGetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunningExecutionsCountGetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + return RunningExecutionsCountGetResponse; + })(); + admin.LaunchPlanCreateRequest = (function() { /** @@ -52278,6 +52953,72 @@ * @variation 2 */ + /** + * Callback as used by {@link flyteidl.service.AdminService#getExecutionCounts}. + * @memberof flyteidl.service.AdminService + * @typedef GetExecutionCountsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.ExecutionCountsGetResponse} [response] ExecutionCountsGetResponse + */ + + /** + * Calls GetExecutionCounts. + * @function getExecutionCounts + * @memberof flyteidl.service.AdminService + * @instance + * @param {flyteidl.admin.IExecutionCountsGetRequest} request ExecutionCountsGetRequest message or plain object + * @param {flyteidl.service.AdminService.GetExecutionCountsCallback} callback Node-style callback called with the error, if any, and ExecutionCountsGetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AdminService.prototype.getExecutionCounts = function getExecutionCounts(request, callback) { + return this.rpcCall(getExecutionCounts, $root.flyteidl.admin.ExecutionCountsGetRequest, $root.flyteidl.admin.ExecutionCountsGetResponse, request, callback); + }, "name", { value: "GetExecutionCounts" }); + + /** + * Calls GetExecutionCounts. + * @function getExecutionCounts + * @memberof flyteidl.service.AdminService + * @instance + * @param {flyteidl.admin.IExecutionCountsGetRequest} request ExecutionCountsGetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link flyteidl.service.AdminService#getRunningExecutionsCount}. + * @memberof flyteidl.service.AdminService + * @typedef GetRunningExecutionsCountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.RunningExecutionsCountGetResponse} [response] RunningExecutionsCountGetResponse + */ + + /** + * Calls GetRunningExecutionsCount. + * @function getRunningExecutionsCount + * @memberof flyteidl.service.AdminService + * @instance + * @param {flyteidl.admin.IRunningExecutionsCountGetRequest} request RunningExecutionsCountGetRequest message or plain object + * @param {flyteidl.service.AdminService.GetRunningExecutionsCountCallback} callback Node-style callback called with the error, if any, and RunningExecutionsCountGetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AdminService.prototype.getRunningExecutionsCount = function getRunningExecutionsCount(request, callback) { + return this.rpcCall(getRunningExecutionsCount, $root.flyteidl.admin.RunningExecutionsCountGetRequest, $root.flyteidl.admin.RunningExecutionsCountGetResponse, request, callback); + }, "name", { value: "GetRunningExecutionsCount" }); + + /** + * Calls GetRunningExecutionsCount. + * @function getRunningExecutionsCount + * @memberof flyteidl.service.AdminService + * @instance + * @param {flyteidl.admin.IRunningExecutionsCountGetRequest} request RunningExecutionsCountGetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return AdminService; })(); diff --git a/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py index 4c2a628407..bdcda37744 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.py @@ -24,7 +24,7 @@ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x66lyteidl/admin/execution.proto\x12\x0e\x66lyteidl.admin\x1a\'flyteidl/admin/cluster_assignment.proto\x1a\x1b\x66lyteidl/admin/common.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1f\x66lyteidl/core/artifact_id.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1c\x66lyteidl/core/security.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xd6\x01\n\x16\x45xecutionCreateRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x31\n\x04spec\x18\x04 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12\x31\n\x06inputs\x18\x05 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x10\n\x03org\x18\x06 \x01(\tR\x03org\"\x99\x01\n\x18\x45xecutionRelaunchRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\'\n\x0foverwrite_cache\x18\x04 \x01(\x08R\x0eoverwriteCacheJ\x04\x08\x02\x10\x03\"\xa8\x01\n\x17\x45xecutionRecoverRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\"U\n\x17\x45xecutionCreateResponse\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"Y\n\x1bWorkflowExecutionGetRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\xb6\x01\n\tExecution\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x31\n\x04spec\x18\x02 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12:\n\x07\x63losure\x18\x03 \x01(\x0b\x32 .flyteidl.admin.ExecutionClosureR\x07\x63losure\"`\n\rExecutionList\x12\x39\n\nexecutions\x18\x01 \x03(\x0b\x32\x19.flyteidl.admin.ExecutionR\nexecutions\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"e\n\x0eLiteralMapBlob\x12\x37\n\x06values\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\x06values\x12\x12\n\x03uri\x18\x02 \x01(\tH\x00R\x03uriB\x06\n\x04\x64\x61ta\"C\n\rAbortMetadata\x12\x14\n\x05\x63\x61use\x18\x01 \x01(\tR\x05\x63\x61use\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\"\x98\x07\n\x10\x45xecutionClosure\x12>\n\x07outputs\x18\x01 \x01(\x0b\x32\x1e.flyteidl.admin.LiteralMapBlobB\x02\x18\x01H\x00R\x07outputs\x12\x35\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x12%\n\x0b\x61\x62ort_cause\x18\n \x01(\tB\x02\x18\x01H\x00R\nabortCause\x12\x46\n\x0e\x61\x62ort_metadata\x18\x0c \x01(\x0b\x32\x1d.flyteidl.admin.AbortMetadataH\x00R\rabortMetadata\x12@\n\x0boutput_data\x18\r \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\noutputData\x12\x46\n\x0f\x63omputed_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x0e\x63omputedInputs\x12<\n\x05phase\x18\x04 \x01(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x05phase\x12\x39\n\nstarted_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartedAt\x12\x35\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x42\n\rnotifications\x18\t \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\x12:\n\x0bworkflow_id\x18\x0b \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nworkflowId\x12]\n\x14state_change_details\x18\x0e \x01(\x0b\x32+.flyteidl.admin.ExecutionStateChangeDetailsR\x12stateChangeDetailsB\x0f\n\routput_result\"[\n\x0eSystemMetadata\x12+\n\x11\x65xecution_cluster\x18\x01 \x01(\tR\x10\x65xecutionCluster\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\"\x85\x05\n\x11\x45xecutionMetadata\x12\x43\n\x04mode\x18\x01 \x01(\x0e\x32/.flyteidl.admin.ExecutionMetadata.ExecutionModeR\x04mode\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x18\n\x07nesting\x18\x03 \x01(\rR\x07nesting\x12=\n\x0cscheduled_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bscheduledAt\x12Z\n\x15parent_node_execution\x18\x05 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierR\x13parentNodeExecution\x12[\n\x13reference_execution\x18\x10 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x12referenceExecution\x12G\n\x0fsystem_metadata\x18\x11 \x01(\x0b\x32\x1e.flyteidl.admin.SystemMetadataR\x0esystemMetadata\x12<\n\x0c\x61rtifact_ids\x18\x12 \x03(\x0b\x32\x19.flyteidl.core.ArtifactIDR\x0b\x61rtifactIds\"t\n\rExecutionMode\x12\n\n\x06MANUAL\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0c\n\x08RELAUNCH\x10\x03\x12\x12\n\x0e\x43HILD_WORKFLOW\x10\x04\x12\r\n\tRECOVERED\x10\x05\x12\x0b\n\x07TRIGGER\x10\x06\"V\n\x10NotificationList\x12\x42\n\rnotifications\x18\x01 \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\"\x90\x08\n\rExecutionSpec\x12:\n\x0blaunch_plan\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nlaunchPlan\x12\x35\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x06inputs\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\x12H\n\rnotifications\x18\x05 \x01(\x0b\x32 .flyteidl.admin.NotificationListH\x00R\rnotifications\x12!\n\x0b\x64isable_all\x18\x06 \x01(\x08H\x00R\ndisableAll\x12.\n\x06labels\x18\x07 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12=\n\x0b\x61nnotations\x18\x08 \x01(\x0b\x32\x1b.flyteidl.admin.AnnotationsR\x0b\x61nnotations\x12I\n\x10security_context\x18\n \x01(\x0b\x32\x1e.flyteidl.core.SecurityContextR\x0fsecurityContext\x12\x39\n\tauth_role\x18\x10 \x01(\x0b\x32\x18.flyteidl.admin.AuthRoleB\x02\x18\x01R\x08\x61uthRole\x12M\n\x12quality_of_service\x18\x11 \x01(\x0b\x32\x1f.flyteidl.core.QualityOfServiceR\x10qualityOfService\x12\'\n\x0fmax_parallelism\x18\x12 \x01(\x05R\x0emaxParallelism\x12X\n\x16raw_output_data_config\x18\x13 \x01(\x0b\x32#.flyteidl.admin.RawOutputDataConfigR\x13rawOutputDataConfig\x12P\n\x12\x63luster_assignment\x18\x14 \x01(\x0b\x32!.flyteidl.admin.ClusterAssignmentR\x11\x63lusterAssignment\x12@\n\rinterruptible\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.BoolValueR\rinterruptible\x12\'\n\x0foverwrite_cache\x18\x16 \x01(\x08R\x0eoverwriteCache\x12(\n\x04\x65nvs\x18\x17 \x01(\x0b\x32\x14.flyteidl.admin.EnvsR\x04\x65nvs\x12\x12\n\x04tags\x18\x18 \x03(\tR\x04tagsB\x18\n\x16notification_overridesJ\x04\x08\x04\x10\x05\"m\n\x19\x45xecutionTerminateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x63\x61use\x18\x02 \x01(\tR\x05\x63\x61use\"\x1c\n\x1a\x45xecutionTerminateResponse\"]\n\x1fWorkflowExecutionGetDataRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\x88\x02\n WorkflowExecutionGetDataResponse\x12\x35\n\x07outputs\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x07outputs\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x06inputs\x12:\n\x0b\x66ull_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\nfullInputs\x12<\n\x0c\x66ull_outputs\x18\x04 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x0b\x66ullOutputs\"\x8a\x01\n\x16\x45xecutionUpdateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\"\xae\x01\n\x1b\x45xecutionStateChangeDetails\x12\x34\n\x05state\x18\x01 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\x12;\n\x0boccurred_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\noccurredAt\x12\x1c\n\tprincipal\x18\x03 \x01(\tR\tprincipal\"\x19\n\x17\x45xecutionUpdateResponse\"v\n\"WorkflowExecutionGetMetricsRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x64\x65pth\x18\x02 \x01(\x05R\x05\x64\x65pth\"N\n#WorkflowExecutionGetMetricsResponse\x12\'\n\x04span\x18\x01 \x01(\x0b\x32\x13.flyteidl.core.SpanR\x04span*>\n\x0e\x45xecutionState\x12\x14\n\x10\x45XECUTION_ACTIVE\x10\x00\x12\x16\n\x12\x45XECUTION_ARCHIVED\x10\x01\x42\xba\x01\n\x12\x63om.flyteidl.adminB\x0e\x45xecutionProtoP\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\x1e\x66lyteidl/admin/execution.proto\x12\x0e\x66lyteidl.admin\x1a\'flyteidl/admin/cluster_assignment.proto\x1a\x1b\x66lyteidl/admin/common.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1f\x66lyteidl/core/artifact_id.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1b\x66lyteidl/core/metrics.proto\x1a\x1c\x66lyteidl/core/security.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xd6\x01\n\x16\x45xecutionCreateRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x31\n\x04spec\x18\x04 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12\x31\n\x06inputs\x18\x05 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x10\n\x03org\x18\x06 \x01(\tR\x03org\"\x99\x01\n\x18\x45xecutionRelaunchRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\'\n\x0foverwrite_cache\x18\x04 \x01(\x08R\x0eoverwriteCacheJ\x04\x08\x02\x10\x03\"\xa8\x01\n\x17\x45xecutionRecoverRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\"U\n\x17\x45xecutionCreateResponse\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"Y\n\x1bWorkflowExecutionGetRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\xb6\x01\n\tExecution\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x31\n\x04spec\x18\x02 \x01(\x0b\x32\x1d.flyteidl.admin.ExecutionSpecR\x04spec\x12:\n\x07\x63losure\x18\x03 \x01(\x0b\x32 .flyteidl.admin.ExecutionClosureR\x07\x63losure\"`\n\rExecutionList\x12\x39\n\nexecutions\x18\x01 \x03(\x0b\x32\x19.flyteidl.admin.ExecutionR\nexecutions\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"e\n\x0eLiteralMapBlob\x12\x37\n\x06values\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\x06values\x12\x12\n\x03uri\x18\x02 \x01(\tH\x00R\x03uriB\x06\n\x04\x64\x61ta\"C\n\rAbortMetadata\x12\x14\n\x05\x63\x61use\x18\x01 \x01(\tR\x05\x63\x61use\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\"\x98\x07\n\x10\x45xecutionClosure\x12>\n\x07outputs\x18\x01 \x01(\x0b\x32\x1e.flyteidl.admin.LiteralMapBlobB\x02\x18\x01H\x00R\x07outputs\x12\x35\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x12%\n\x0b\x61\x62ort_cause\x18\n \x01(\tB\x02\x18\x01H\x00R\nabortCause\x12\x46\n\x0e\x61\x62ort_metadata\x18\x0c \x01(\x0b\x32\x1d.flyteidl.admin.AbortMetadataH\x00R\rabortMetadata\x12@\n\x0boutput_data\x18\r \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01H\x00R\noutputData\x12\x46\n\x0f\x63omputed_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x0e\x63omputedInputs\x12<\n\x05phase\x18\x04 \x01(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x05phase\x12\x39\n\nstarted_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartedAt\x12\x35\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x42\n\rnotifications\x18\t \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\x12:\n\x0bworkflow_id\x18\x0b \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nworkflowId\x12]\n\x14state_change_details\x18\x0e \x01(\x0b\x32+.flyteidl.admin.ExecutionStateChangeDetailsR\x12stateChangeDetailsB\x0f\n\routput_result\"[\n\x0eSystemMetadata\x12+\n\x11\x65xecution_cluster\x18\x01 \x01(\tR\x10\x65xecutionCluster\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\"\x85\x05\n\x11\x45xecutionMetadata\x12\x43\n\x04mode\x18\x01 \x01(\x0e\x32/.flyteidl.admin.ExecutionMetadata.ExecutionModeR\x04mode\x12\x1c\n\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x18\n\x07nesting\x18\x03 \x01(\rR\x07nesting\x12=\n\x0cscheduled_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bscheduledAt\x12Z\n\x15parent_node_execution\x18\x05 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierR\x13parentNodeExecution\x12[\n\x13reference_execution\x18\x10 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x12referenceExecution\x12G\n\x0fsystem_metadata\x18\x11 \x01(\x0b\x32\x1e.flyteidl.admin.SystemMetadataR\x0esystemMetadata\x12<\n\x0c\x61rtifact_ids\x18\x12 \x03(\x0b\x32\x19.flyteidl.core.ArtifactIDR\x0b\x61rtifactIds\"t\n\rExecutionMode\x12\n\n\x06MANUAL\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0c\n\x08RELAUNCH\x10\x03\x12\x12\n\x0e\x43HILD_WORKFLOW\x10\x04\x12\r\n\tRECOVERED\x10\x05\x12\x0b\n\x07TRIGGER\x10\x06\"V\n\x10NotificationList\x12\x42\n\rnotifications\x18\x01 \x03(\x0b\x32\x1c.flyteidl.admin.NotificationR\rnotifications\"\x90\x08\n\rExecutionSpec\x12:\n\x0blaunch_plan\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\nlaunchPlan\x12\x35\n\x06inputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapB\x02\x18\x01R\x06inputs\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32!.flyteidl.admin.ExecutionMetadataR\x08metadata\x12H\n\rnotifications\x18\x05 \x01(\x0b\x32 .flyteidl.admin.NotificationListH\x00R\rnotifications\x12!\n\x0b\x64isable_all\x18\x06 \x01(\x08H\x00R\ndisableAll\x12.\n\x06labels\x18\x07 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12=\n\x0b\x61nnotations\x18\x08 \x01(\x0b\x32\x1b.flyteidl.admin.AnnotationsR\x0b\x61nnotations\x12I\n\x10security_context\x18\n \x01(\x0b\x32\x1e.flyteidl.core.SecurityContextR\x0fsecurityContext\x12\x39\n\tauth_role\x18\x10 \x01(\x0b\x32\x18.flyteidl.admin.AuthRoleB\x02\x18\x01R\x08\x61uthRole\x12M\n\x12quality_of_service\x18\x11 \x01(\x0b\x32\x1f.flyteidl.core.QualityOfServiceR\x10qualityOfService\x12\'\n\x0fmax_parallelism\x18\x12 \x01(\x05R\x0emaxParallelism\x12X\n\x16raw_output_data_config\x18\x13 \x01(\x0b\x32#.flyteidl.admin.RawOutputDataConfigR\x13rawOutputDataConfig\x12P\n\x12\x63luster_assignment\x18\x14 \x01(\x0b\x32!.flyteidl.admin.ClusterAssignmentR\x11\x63lusterAssignment\x12@\n\rinterruptible\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.BoolValueR\rinterruptible\x12\'\n\x0foverwrite_cache\x18\x16 \x01(\x08R\x0eoverwriteCache\x12(\n\x04\x65nvs\x18\x17 \x01(\x0b\x32\x14.flyteidl.admin.EnvsR\x04\x65nvs\x12\x12\n\x04tags\x18\x18 \x03(\tR\x04tagsB\x18\n\x16notification_overridesJ\x04\x08\x04\x10\x05\"m\n\x19\x45xecutionTerminateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x63\x61use\x18\x02 \x01(\tR\x05\x63\x61use\"\x1c\n\x1a\x45xecutionTerminateResponse\"]\n\x1fWorkflowExecutionGetDataRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\"\x88\x02\n WorkflowExecutionGetDataResponse\x12\x35\n\x07outputs\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x07outputs\x12\x33\n\x06inputs\x18\x02 \x01(\x0b\x32\x17.flyteidl.admin.UrlBlobB\x02\x18\x01R\x06inputs\x12:\n\x0b\x66ull_inputs\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\nfullInputs\x12<\n\x0c\x66ull_outputs\x18\x04 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x0b\x66ullOutputs\"\x8a\x01\n\x16\x45xecutionUpdateRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\"\xae\x01\n\x1b\x45xecutionStateChangeDetails\x12\x34\n\x05state\x18\x01 \x01(\x0e\x32\x1e.flyteidl.admin.ExecutionStateR\x05state\x12;\n\x0boccurred_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\noccurredAt\x12\x1c\n\tprincipal\x18\x03 \x01(\tR\tprincipal\"\x19\n\x17\x45xecutionUpdateResponse\"v\n\"WorkflowExecutionGetMetricsRequest\x12:\n\x02id\x18\x01 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierR\x02id\x12\x14\n\x05\x64\x65pth\x18\x02 \x01(\x05R\x05\x64\x65pth\"N\n#WorkflowExecutionGetMetricsResponse\x12\'\n\x04span\x18\x01 \x01(\x0b\x32\x13.flyteidl.core.SpanR\x04span\"y\n\x19\x45xecutionCountsGetRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x10\n\x03org\x18\x03 \x01(\tR\x03org\x12\x18\n\x07\x66ilters\x18\x04 \x01(\tR\x07\x66ilters\"l\n\x16\x45xecutionCountsByPhase\x12<\n\x05phase\x18\x01 \x01(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x05phase\x12\x14\n\x05\x63ount\x18\x02 \x01(\x03R\x05\x63ount\"o\n\x1a\x45xecutionCountsGetResponse\x12Q\n\x10\x65xecution_counts\x18\x01 \x03(\x0b\x32&.flyteidl.admin.ExecutionCountsByPhaseR\x0f\x65xecutionCounts\"f\n RunningExecutionsCountGetRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x10\n\x03org\x18\x03 \x01(\tR\x03org\"9\n!RunningExecutionsCountGetResponse\x12\x14\n\x05\x63ount\x18\x01 \x01(\x03R\x05\x63ount*>\n\x0e\x45xecutionState\x12\x14\n\x10\x45XECUTION_ACTIVE\x10\x00\x12\x16\n\x12\x45XECUTION_ARCHIVED\x10\x01\x42\xba\x01\n\x12\x63om.flyteidl.adminB\x0e\x45xecutionProtoP\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) @@ -51,8 +51,8 @@ _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['outputs']._serialized_options = b'\030\001' _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['inputs']._options = None _WORKFLOWEXECUTIONGETDATARESPONSE.fields_by_name['inputs']._serialized_options = b'\030\001' - _globals['_EXECUTIONSTATE']._serialized_start=5422 - _globals['_EXECUTIONSTATE']._serialized_end=5484 + _globals['_EXECUTIONSTATE']._serialized_start=5931 + _globals['_EXECUTIONSTATE']._serialized_end=5993 _globals['_EXECUTIONCREATEREQUEST']._serialized_start=403 _globals['_EXECUTIONCREATEREQUEST']._serialized_end=617 _globals['_EXECUTIONRELAUNCHREQUEST']._serialized_start=620 @@ -101,4 +101,14 @@ _globals['_WORKFLOWEXECUTIONGETMETRICSREQUEST']._serialized_end=5340 _globals['_WORKFLOWEXECUTIONGETMETRICSRESPONSE']._serialized_start=5342 _globals['_WORKFLOWEXECUTIONGETMETRICSRESPONSE']._serialized_end=5420 + _globals['_EXECUTIONCOUNTSGETREQUEST']._serialized_start=5422 + _globals['_EXECUTIONCOUNTSGETREQUEST']._serialized_end=5543 + _globals['_EXECUTIONCOUNTSBYPHASE']._serialized_start=5545 + _globals['_EXECUTIONCOUNTSBYPHASE']._serialized_end=5653 + _globals['_EXECUTIONCOUNTSGETRESPONSE']._serialized_start=5655 + _globals['_EXECUTIONCOUNTSGETRESPONSE']._serialized_end=5766 + _globals['_RUNNINGEXECUTIONSCOUNTGETREQUEST']._serialized_start=5768 + _globals['_RUNNINGEXECUTIONSCOUNTGETREQUEST']._serialized_end=5870 + _globals['_RUNNINGEXECUTIONSCOUNTGETRESPONSE']._serialized_start=5872 + _globals['_RUNNINGEXECUTIONSCOUNTGETRESPONSE']._serialized_end=5929 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.pyi index c832b3a429..f4099ac3d6 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/execution_pb2.pyi @@ -291,3 +291,45 @@ class WorkflowExecutionGetMetricsResponse(_message.Message): SPAN_FIELD_NUMBER: _ClassVar[int] span: _metrics_pb2.Span def __init__(self, span: _Optional[_Union[_metrics_pb2.Span, _Mapping]] = ...) -> None: ... + +class ExecutionCountsGetRequest(_message.Message): + __slots__ = ["project", "domain", "org", "filters"] + PROJECT_FIELD_NUMBER: _ClassVar[int] + DOMAIN_FIELD_NUMBER: _ClassVar[int] + ORG_FIELD_NUMBER: _ClassVar[int] + FILTERS_FIELD_NUMBER: _ClassVar[int] + project: str + domain: str + org: str + filters: str + def __init__(self, project: _Optional[str] = ..., domain: _Optional[str] = ..., org: _Optional[str] = ..., filters: _Optional[str] = ...) -> None: ... + +class ExecutionCountsByPhase(_message.Message): + __slots__ = ["phase", "count"] + PHASE_FIELD_NUMBER: _ClassVar[int] + COUNT_FIELD_NUMBER: _ClassVar[int] + phase: _execution_pb2.WorkflowExecution.Phase + count: int + def __init__(self, phase: _Optional[_Union[_execution_pb2.WorkflowExecution.Phase, str]] = ..., count: _Optional[int] = ...) -> None: ... + +class ExecutionCountsGetResponse(_message.Message): + __slots__ = ["execution_counts"] + EXECUTION_COUNTS_FIELD_NUMBER: _ClassVar[int] + execution_counts: _containers.RepeatedCompositeFieldContainer[ExecutionCountsByPhase] + def __init__(self, execution_counts: _Optional[_Iterable[_Union[ExecutionCountsByPhase, _Mapping]]] = ...) -> None: ... + +class RunningExecutionsCountGetRequest(_message.Message): + __slots__ = ["project", "domain", "org"] + PROJECT_FIELD_NUMBER: _ClassVar[int] + DOMAIN_FIELD_NUMBER: _ClassVar[int] + ORG_FIELD_NUMBER: _ClassVar[int] + project: str + domain: str + org: str + def __init__(self, project: _Optional[str] = ..., domain: _Optional[str] = ..., org: _Optional[str] = ...) -> None: ... + +class RunningExecutionsCountGetResponse(_message.Message): + __slots__ = ["count"] + COUNT_FIELD_NUMBER: _ClassVar[int] + count: int + def __init__(self, count: _Optional[int] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py index 5fb89bbb49..64605fcd22 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/service/admin_pb2.py @@ -30,7 +30,7 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/admin.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1c\x66lyteidl/admin/project.proto\x1a.flyteidl/admin/project_domain_attributes.proto\x1a\'flyteidl/admin/project_attributes.proto\x1a\x19\x66lyteidl/admin/task.proto\x1a\x1d\x66lyteidl/admin/workflow.proto\x1a(flyteidl/admin/workflow_attributes.proto\x1a flyteidl/admin/launch_plan.proto\x1a\x1a\x66lyteidl/admin/event.proto\x1a\x1e\x66lyteidl/admin/execution.proto\x1a\'flyteidl/admin/matchable_resource.proto\x1a#flyteidl/admin/node_execution.proto\x1a#flyteidl/admin/task_execution.proto\x1a\x1c\x66lyteidl/admin/version.proto\x1a\x1b\x66lyteidl/admin/common.proto\x1a\'flyteidl/admin/description_entity.proto\x1a.protoc-gen-openapiv2/options/annotations.proto2\xb0\x9b\x01\n\x0c\x41\x64minService\x12\xe6\x02\n\nCreateTask\x12!.flyteidl.admin.TaskCreateRequest\x1a\".flyteidl.admin.TaskCreateResponse\"\x90\x02\x92\x41\xd3\x01\x1a&Create and register a task definition.JB\n\x03\x34\x30\x30\x12;\n9Returned for bad request that may have failed validation.Je\n\x03\x34\x30\x39\x12^\n\\Returned for a request that references an identical entity that has already been registered.\x82\xd3\xe4\x93\x02\x33:\x01*Z\x1f:\x01*\"\x1a/api/v1/org/tasks/{id.org}\"\r/api/v1/tasks\x12\x82\x02\n\x07GetTask\x12 .flyteidl.admin.ObjectGetRequest\x1a\x14.flyteidl.admin.Task\"\xbe\x01\x92\x41\'\x1a%Retrieve an existing task definition.\x82\xd3\xe4\x93\x02\x8d\x01ZL\x12J/api/v1/org/tasks/{id.org}/{id.project}/{id.domain}/{id.name}/{id.version}\x12=/api/v1/tasks/{id.project}/{id.domain}/{id.name}/{id.version}\x12\x8d\x02\n\x0bListTaskIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"\xa0\x01\x92\x41\x44\x1a\x42\x46\x65tch existing task definition identifiers matching input filters.\x82\xd3\xe4\x93\x02SZ,\x12*/api/v1/org/tasks/{org}/{project}/{domain}\x12#/api/v1/task_ids/{project}/{domain}\x12\xe4\x02\n\tListTasks\x12#.flyteidl.admin.ResourceListRequest\x1a\x18.flyteidl.admin.TaskList\"\x97\x02\x92\x41\x39\x1a\x37\x46\x65tch existing task definitions matching input filters.\x82\xd3\xe4\x93\x02\xd4\x01Z?\x12=/api/v1/org/tasks/{id.org}/{id.project}/{id.domain}/{id.name}Z(\x12&/api/v1/tasks/{id.project}/{id.domain}Z5\x12\x33/api/v1/org/tasks/{id.org}/{id.project}/{id.domain}\x12\x30/api/v1/tasks/{id.project}/{id.domain}/{id.name}\x12\xfe\x02\n\x0e\x43reateWorkflow\x12%.flyteidl.admin.WorkflowCreateRequest\x1a&.flyteidl.admin.WorkflowCreateResponse\"\x9c\x02\x92\x41\xd7\x01\x1a*Create and register a workflow definition.JB\n\x03\x34\x30\x30\x12;\n9Returned for bad request that may have failed validation.Je\n\x03\x34\x30\x39\x12^\n\\Returned for a request that references an identical entity that has already been registered.\x82\xd3\xe4\x93\x02;:\x01*Z#:\x01*\"\x1e/api/v1/org/workflows/{id.org}\"\x11/api/v1/workflows\x12\x96\x02\n\x0bGetWorkflow\x12 .flyteidl.admin.ObjectGetRequest\x1a\x18.flyteidl.admin.Workflow\"\xca\x01\x92\x41+\x1a)Retrieve an existing workflow definition.\x82\xd3\xe4\x93\x02\x95\x01ZP\x12N/api/v1/org/workflows/{id.org}/{id.project}/{id.domain}/{id.name}/{id.version}\x12\x41/api/v1/workflows/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xd1\x01\n\x0fListWorkflowIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"a\x82\xd3\xe4\x93\x02[Z0\x12./api/v1/org/workflows/{org}/{project}/{domain}\x12\'/api/v1/workflow_ids/{project}/{domain}\x12\x80\x03\n\rListWorkflows\x12#.flyteidl.admin.ResourceListRequest\x1a\x1c.flyteidl.admin.WorkflowList\"\xab\x02\x92\x41=\x1a;Fetch existing workflow definitions matching input filters.\x82\xd3\xe4\x93\x02\xe4\x01ZC\x12\x41/api/v1/org/workflows/{id.org}/{id.project}/{id.domain}/{id.name}Z,\x12*/api/v1/workflows/{id.project}/{id.domain}Z9\x12\x37/api/v1/org/workflows/{id.org}/{id.project}/{id.domain}\x12\x34/api/v1/workflows/{id.project}/{id.domain}/{id.name}\x12\x8d\x03\n\x10\x43reateLaunchPlan\x12\'.flyteidl.admin.LaunchPlanCreateRequest\x1a(.flyteidl.admin.LaunchPlanCreateResponse\"\xa5\x02\x92\x41\xda\x01\x1a-Create and register a launch plan definition.JB\n\x03\x34\x30\x30\x12;\n9Returned for bad request that may have failed validation.Je\n\x03\x34\x30\x39\x12^\n\\Returned for a request that references an identical entity that has already been registered.\x82\xd3\xe4\x93\x02\x41:\x01*Z&:\x01*\"!/api/v1/org/launch_plans/{id.org}\"\x14/api/v1/launch_plans\x12\xa3\x02\n\rGetLaunchPlan\x12 .flyteidl.admin.ObjectGetRequest\x1a\x1a.flyteidl.admin.LaunchPlan\"\xd3\x01\x92\x41.\x1a,Retrieve an existing launch plan definition.\x82\xd3\xe4\x93\x02\x9b\x01ZS\x12Q/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}/{id.name}/{id.version}\x12\x44/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xc3\x02\n\x13GetActiveLaunchPlan\x12\'.flyteidl.admin.ActiveLaunchPlanRequest\x1a\x1a.flyteidl.admin.LaunchPlan\"\xe6\x01\x92\x41M\x1aKRetrieve the active launch plan version specified by input request filters.\x82\xd3\xe4\x93\x02\x8f\x01ZM\x12K/api/v1/org/active_launch_plans/{id.org}/{id.project}/{id.domain}/{id.name}\x12>/api/v1/active_launch_plans/{id.project}/{id.domain}/{id.name}\x12\xa7\x02\n\x15ListActiveLaunchPlans\x12+.flyteidl.admin.ActiveLaunchPlanListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\xc0\x01\x92\x41K\x1aIFetch the active launch plan versions specified by input request filters.\x82\xd3\xe4\x93\x02lZ:\x12\x38/api/v1/org/active_launch_plans/{org}/{project}/{domain}\x12./api/v1/active_launch_plans/{project}/{domain}\x12\xab\x02\n\x11ListLaunchPlanIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"\xb8\x01\x92\x41K\x1aIFetch existing launch plan definition identifiers matching input filters.\x82\xd3\xe4\x93\x02\x64Z6\x12\x34/api/v1/org/launch_plan_ids/{org}/{project}/{domain}\x12*/api/v1/launch_plan_ids/{project}/{domain}\x12\x93\x03\n\x0fListLaunchPlans\x12#.flyteidl.admin.ResourceListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\xba\x02\x92\x41@\x1a>Fetch existing launch plan definitions matching input filters.\x82\xd3\xe4\x93\x02\xf0\x01ZF\x12\x44/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}/{id.name}Z/\x12-/api/v1/launch_plans/{id.project}/{id.domain}Z<\x12:/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}\x12\x37/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}\x12\x96\x07\n\x10UpdateLaunchPlan\x12\'.flyteidl.admin.LaunchPlanUpdateRequest\x1a(.flyteidl.admin.LaunchPlanUpdateResponse\"\xae\x06\x92\x41\x85\x05\x1a\x82\x05Update the status of an existing launch plan definition. At most one launch plan version for a given {project, domain, name} can be active at a time. If this call sets a launch plan to active and existing version is already active, the result of this call will be that the formerly active launch plan will be made inactive and specified launch plan in this request will be made active. In the event that the formerly active launch plan had a schedule associated it with it, this schedule will be disabled. If the reference launch plan in this request is being set to active and has a schedule associated with it, the schedule will be enabled.\x82\xd3\xe4\x93\x02\x9e\x01:\x01*ZS\x1aQ/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}/{id.name}/{id.version}\x1a\x44/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xc5\x01\n\x0f\x43reateExecution\x12&.flyteidl.admin.ExecutionCreateRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"a\x92\x41\x1e\x1a\x1c\x43reate a workflow execution.\x82\xd3\xe4\x93\x02::\x01*Z!:\x01*\"\x1c/api/v1/org/executions/{org}\"\x12/api/v1/executions\x12\xe0\x01\n\x11RelaunchExecution\x12(.flyteidl.admin.ExecutionRelaunchRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"x\x92\x41 \x1a\x1eRelaunch a workflow execution.\x82\xd3\xe4\x93\x02O:\x01*Z-:\x01*\"(/api/v1/org/executions/{id.org}/relaunch\"\x1b/api/v1/executions/relaunch\x12\xcb\x05\n\x10RecoverExecution\x12\'.flyteidl.admin.ExecutionRecoverRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"\xe4\x04\x92\x41\x8d\x04\x1a\x8a\x04Recreates a previously-run workflow execution that will only start executing from the last known failure point. In Recover mode, users cannot change any input parameters or update the version of the execution. This is extremely useful to recover from system errors and byzantine faults like - Loss of K8s cluster, bugs in platform or instability, machine failures, downstream system failures (downstream services), or simply to recover executions that failed because of retry exhaustion and should complete if tried again.\x82\xd3\xe4\x93\x02M:\x01*Z,:\x01*\"\'/api/v1/org/executions/{id.org}/recover\"\x1a/api/v1/executions/recover\x12\x89\x02\n\x0cGetExecution\x12+.flyteidl.admin.WorkflowExecutionGetRequest\x1a\x19.flyteidl.admin.Execution\"\xb0\x01\x92\x41*\x1a(Retrieve an existing workflow execution.\x82\xd3\xe4\x93\x02}ZD\x12\x42/api/v1/org/executions/{id.org}/{id.project}/{id.domain}/{id.name}\x12\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xef\x01\n\x0fUpdateExecution\x12&.flyteidl.admin.ExecutionUpdateRequest\x1a\'.flyteidl.admin.ExecutionUpdateResponse\"\x8a\x01\x82\xd3\xe4\x93\x02\x83\x01:\x01*ZG:\x01*\x1a\x42/api/v1/org/executions/{id.org}/{id.project}/{id.domain}/{id.name}\x1a\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\x86\x02\n\x10GetExecutionData\x12/.flyteidl.admin.WorkflowExecutionGetDataRequest\x1a\x30.flyteidl.admin.WorkflowExecutionGetDataResponse\"\x8e\x01\x82\xd3\xe4\x93\x02\x87\x01ZI\x12G/api/v1/org/data/executions/{id.org}/{id.project}/{id.domain}/{id.name}\x12:/api/v1/data/executions/{id.project}/{id.domain}/{id.name}\x12\xc5\x01\n\x0eListExecutions\x12#.flyteidl.admin.ResourceListRequest\x1a\x1d.flyteidl.admin.ExecutionList\"o\x82\xd3\xe4\x93\x02iZ:\x12\x38/api/v1/org/executions/{id.org}/{id.project}/{id.domain}\x12+/api/v1/executions/{id.project}/{id.domain}\x12\xf8\x01\n\x12TerminateExecution\x12).flyteidl.admin.ExecutionTerminateRequest\x1a*.flyteidl.admin.ExecutionTerminateResponse\"\x8a\x01\x82\xd3\xe4\x93\x02\x83\x01:\x01*ZG:\x01**B/api/v1/org/executions/{id.org}/{id.project}/{id.domain}/{id.name}*5/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xe2\x02\n\x10GetNodeExecution\x12\'.flyteidl.admin.NodeExecutionGetRequest\x1a\x1d.flyteidl.admin.NodeExecution\"\x85\x02\x82\xd3\xe4\x93\x02\xfe\x01Z\x8b\x01\x12\x88\x01/api/v1/org/node_executions/{id.execution_id.org}/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12n/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\x9e\x03\n\x16GetDynamicNodeWorkflow\x12-.flyteidl.admin.GetDynamicNodeWorkflowRequest\x1a+.flyteidl.admin.DynamicNodeWorkflowResponse\"\xa7\x02\x82\xd3\xe4\x93\x02\xa0\x02Z\x9c\x01\x12\x99\x01/api/v1/org/node_executions/{id.execution_id.org}/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}/dynamic_workflow\x12\x7f/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}/dynamic_workflow\x12\xf9\x02\n\x12ListNodeExecutions\x12(.flyteidl.admin.NodeExecutionListRequest\x1a!.flyteidl.admin.NodeExecutionList\"\x95\x02\x82\xd3\xe4\x93\x02\x8e\x02Z\x96\x01\x12\x93\x01/api/v1/org/node_executions/{workflow_execution_id.org}/{workflow_execution_id.project}/{workflow_execution_id.domain}/{workflow_execution_id.name}\x12s/api/v1/node_executions/{workflow_execution_id.project}/{workflow_execution_id.domain}/{workflow_execution_id.name}\x12\x8f\x08\n\x19ListNodeExecutionsForTask\x12/.flyteidl.admin.NodeExecutionForTaskListRequest\x1a!.flyteidl.admin.NodeExecutionList\"\x9d\x07\x82\xd3\xe4\x93\x02\x96\x07Z\xe7\x03\x12\xe4\x03/api/v1/org/children/{task_execution_id.node_execution_id.execution_id.org}/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}\x12\xa9\x03/api/v1/children/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}\x12\x83\x03\n\x14GetNodeExecutionData\x12+.flyteidl.admin.NodeExecutionGetDataRequest\x1a,.flyteidl.admin.NodeExecutionGetDataResponse\"\x8f\x02\x82\xd3\xe4\x93\x02\x88\x02Z\x90\x01\x12\x8d\x01/api/v1/org/data/node_executions/{id.execution_id.org}/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12s/api/v1/data/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\xa8\x01\n\x0fRegisterProject\x12&.flyteidl.admin.ProjectRegisterRequest\x1a\'.flyteidl.admin.ProjectRegisterResponse\"D\x82\xd3\xe4\x93\x02>:\x01*Z\':\x01*\"\"/api/v1/org/projects/{project.org}\"\x10/api/v1/projects\x12\xad\x01\n\rUpdateProject\x12\x17.flyteidl.admin.Project\x1a%.flyteidl.admin.ProjectUpdateResponse\"\\\x92\x41\x13\x1a\x11Update a project.\x82\xd3\xe4\x93\x02@:\x01*Z$:\x01*\x1a\x1f/api/v1/org/projects/{org}/{id}\x1a\x15/api/v1/projects/{id}\x12\xa3\x01\n\x0cListProjects\x12\".flyteidl.admin.ProjectListRequest\x1a\x18.flyteidl.admin.Projects\"U\x92\x41\x1c\x1a\x1a\x46\x65tch registered projects.\x82\xd3\xe4\x93\x02\x30Z\x1c\x12\x1a/api/v1/org/projects/{org}\x12\x10/api/v1/projects\x12\x9a\x02\n\x13\x43reateWorkflowEvent\x12-.flyteidl.admin.WorkflowExecutionEventRequest\x1a..flyteidl.admin.WorkflowExecutionEventResponse\"\xa3\x01\x92\x41\x41\x1a?Create a workflow execution event recording a phase transition.\x82\xd3\xe4\x93\x02Y:\x01*Z::\x01*\"5/api/v1/org/events/{event.execution_id.org}/workflows\"\x18/api/v1/events/workflows\x12\x85\x02\n\x0f\x43reateNodeEvent\x12).flyteidl.admin.NodeExecutionEventRequest\x1a*.flyteidl.admin.NodeExecutionEventResponse\"\x9a\x01\x92\x41=\x1a;Create a node execution event recording a phase transition.\x82\xd3\xe4\x93\x02T:\x01*Z9:\x01*\"4/api/v1/org/events/{event.id.execution_id.org}/nodes\"\x14/api/v1/events/nodes\x12\x9b\x02\n\x0f\x43reateTaskEvent\x12).flyteidl.admin.TaskExecutionEventRequest\x1a*.flyteidl.admin.TaskExecutionEventResponse\"\xb0\x01\x92\x41=\x1a;Create a task execution event recording a phase transition.\x82\xd3\xe4\x93\x02j:\x01*ZO:\x01*\"J/api/v1/org/events/{event.parent_node_execution_id.execution_id.org}/tasks\"\x14/api/v1/events/tasks\x12\xf4\x05\n\x10GetTaskExecution\x12\'.flyteidl.admin.TaskExecutionGetRequest\x1a\x1d.flyteidl.admin.TaskExecution\"\x97\x05\x92\x41&\x1a$Retrieve an existing task execution.\x82\xd3\xe4\x93\x02\xe7\x04Z\xc8\x02\x12\xc5\x02/api/v1/org/task_executions/{id.node_execution_id.execution_id.org}/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\x99\x02/api/v1/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xac\x04\n\x12ListTaskExecutions\x12(.flyteidl.admin.TaskExecutionListRequest\x1a!.flyteidl.admin.TaskExecutionList\"\xc8\x03\x92\x41\x38\x1a\x36\x46\x65tch existing task executions matching input filters.\x82\xd3\xe4\x93\x02\x86\x03Z\xd6\x01\x12\xd3\x01/api/v1/org/task_executions/{node_execution_id.execution_id.org}/{node_execution_id.execution_id.project}/{node_execution_id.execution_id.domain}/{node_execution_id.execution_id.name}/{node_execution_id.node_id}\x12\xaa\x01/api/v1/task_executions/{node_execution_id.execution_id.project}/{node_execution_id.execution_id.domain}/{node_execution_id.execution_id.name}/{node_execution_id.node_id}\x12\xb0\x06\n\x14GetTaskExecutionData\x12+.flyteidl.admin.TaskExecutionGetDataRequest\x1a,.flyteidl.admin.TaskExecutionGetDataResponse\"\xbc\x05\x92\x41\x41\x1a?Retrieve input and output data from an existing task execution.\x82\xd3\xe4\x93\x02\xf1\x04Z\xcd\x02\x12\xca\x02/api/v1/org/data/task_executions/{id.node_execution_id.execution_id.org}/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\x9e\x02/api/v1/data/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xa6\x03\n\x1dUpdateProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesUpdateRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesUpdateResponse\"\x97\x02\x92\x41X\x1aVUpdate the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02\xb5\x01:\x01*Zd:\x01*\x1a_/api/v1/org/project_domain_attributes/{attributes.org}/{attributes.project}/{attributes.domain}\x1aJ/api/v1/project_domain_attributes/{attributes.project}/{attributes.domain}\x12\xe1\x02\n\x1aGetProjectDomainAttributes\x12\x31.flyteidl.admin.ProjectDomainAttributesGetRequest\x1a\x32.flyteidl.admin.ProjectDomainAttributesGetResponse\"\xdb\x01\x92\x41Z\x1aXRetrieve the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02xZ@\x12>/api/v1/org/project_domain_attributes/{org}/{project}/{domain}\x12\x34/api/v1/project_domain_attributes/{project}/{domain}\x12\xee\x02\n\x1d\x44\x65leteProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesDeleteRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesDeleteResponse\"\xdf\x01\x92\x41X\x1aVDelete the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02~:\x01*ZC:\x01**>/api/v1/org/project_domain_attributes/{org}/{project}/{domain}*4/api/v1/project_domain_attributes/{project}/{domain}\x12\xd2\x02\n\x17UpdateProjectAttributes\x12..flyteidl.admin.ProjectAttributesUpdateRequest\x1a/.flyteidl.admin.ProjectAttributesUpdateResponse\"\xd5\x01\x92\x41\x45\x1a\x43Update the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02\x86\x01:\x01*ZP:\x01*\x1aK/api/v1/org/project_domain_attributes/{attributes.org}/{attributes.project}\x1a//api/v1/project_attributes/{attributes.project}\x12\xa3\x02\n\x14GetProjectAttributes\x12+.flyteidl.admin.ProjectAttributesGetRequest\x1a,.flyteidl.admin.ProjectAttributesGetResponse\"\xaf\x01\x92\x41G\x1a\x45Retrieve the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02_Z7\x12\x35/api/v1/org/project_domain_attributes/{org}/{project}\x12$/api/v1/project_attributes/{project}\x12\xb0\x02\n\x17\x44\x65leteProjectAttributes\x12..flyteidl.admin.ProjectAttributesDeleteRequest\x1a/.flyteidl.admin.ProjectAttributesDeleteResponse\"\xb3\x01\x92\x41\x45\x1a\x43\x44\x65lete the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02\x65:\x01*Z::\x01**5/api/v1/org/project_domain_attributes/{org}/{project}*$/api/v1/project_attributes/{project}\x12\xc5\x03\n\x18UpdateWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesUpdateRequest\x1a\x30.flyteidl.admin.WorkflowAttributesUpdateResponse\"\xc5\x02\x92\x41\x66\x1a\x64Update the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02\xd5\x01:\x01*Zt:\x01*\x1ao/api/v1/org/workflow_attributes/{attributes.org}/{attributes.project}/{attributes.domain}/{attributes.workflow}\x1aZ/api/v1/workflow_attributes/{attributes.project}/{attributes.domain}/{attributes.workflow}\x12\xeb\x02\n\x15GetWorkflowAttributes\x12,.flyteidl.admin.WorkflowAttributesGetRequest\x1a-.flyteidl.admin.WorkflowAttributesGetResponse\"\xf4\x01\x92\x41h\x1a\x66Retrieve the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02\x82\x01ZE\x12\x43/api/v1/org/workflow_attributes/{org}/{project}/{domain}/{workflow}\x12\x39/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\xf8\x02\n\x18\x44\x65leteWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesDeleteRequest\x1a\x30.flyteidl.admin.WorkflowAttributesDeleteResponse\"\xf8\x01\x92\x41\x66\x1a\x64\x44\x65lete the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02\x88\x01:\x01*ZH:\x01**C/api/v1/org/workflow_attributes/{org}/{project}/{domain}/{workflow}*9/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\x8c\x02\n\x17ListMatchableAttributes\x12..flyteidl.admin.ListMatchableAttributesRequest\x1a/.flyteidl.admin.ListMatchableAttributesResponse\"\x8f\x01\x92\x41>\x1a/api/v1/active_launch_plans/{id.project}/{id.domain}/{id.name}\x12\xa7\x02\n\x15ListActiveLaunchPlans\x12+.flyteidl.admin.ActiveLaunchPlanListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\xc0\x01\x92\x41K\x1aIFetch the active launch plan versions specified by input request filters.\x82\xd3\xe4\x93\x02lZ:\x12\x38/api/v1/org/active_launch_plans/{org}/{project}/{domain}\x12./api/v1/active_launch_plans/{project}/{domain}\x12\xab\x02\n\x11ListLaunchPlanIds\x12\x30.flyteidl.admin.NamedEntityIdentifierListRequest\x1a).flyteidl.admin.NamedEntityIdentifierList\"\xb8\x01\x92\x41K\x1aIFetch existing launch plan definition identifiers matching input filters.\x82\xd3\xe4\x93\x02\x64Z6\x12\x34/api/v1/org/launch_plan_ids/{org}/{project}/{domain}\x12*/api/v1/launch_plan_ids/{project}/{domain}\x12\x93\x03\n\x0fListLaunchPlans\x12#.flyteidl.admin.ResourceListRequest\x1a\x1e.flyteidl.admin.LaunchPlanList\"\xba\x02\x92\x41@\x1a>Fetch existing launch plan definitions matching input filters.\x82\xd3\xe4\x93\x02\xf0\x01ZF\x12\x44/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}/{id.name}Z/\x12-/api/v1/launch_plans/{id.project}/{id.domain}Z<\x12:/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}\x12\x37/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}\x12\x96\x07\n\x10UpdateLaunchPlan\x12\'.flyteidl.admin.LaunchPlanUpdateRequest\x1a(.flyteidl.admin.LaunchPlanUpdateResponse\"\xae\x06\x92\x41\x85\x05\x1a\x82\x05Update the status of an existing launch plan definition. At most one launch plan version for a given {project, domain, name} can be active at a time. If this call sets a launch plan to active and existing version is already active, the result of this call will be that the formerly active launch plan will be made inactive and specified launch plan in this request will be made active. In the event that the formerly active launch plan had a schedule associated it with it, this schedule will be disabled. If the reference launch plan in this request is being set to active and has a schedule associated with it, the schedule will be enabled.\x82\xd3\xe4\x93\x02\x9e\x01:\x01*ZS\x1aQ/api/v1/org/launch_plans/{id.org}/{id.project}/{id.domain}/{id.name}/{id.version}\x1a\x44/api/v1/launch_plans/{id.project}/{id.domain}/{id.name}/{id.version}\x12\xc5\x01\n\x0f\x43reateExecution\x12&.flyteidl.admin.ExecutionCreateRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"a\x92\x41\x1e\x1a\x1c\x43reate a workflow execution.\x82\xd3\xe4\x93\x02::\x01*Z!:\x01*\"\x1c/api/v1/org/executions/{org}\"\x12/api/v1/executions\x12\xe0\x01\n\x11RelaunchExecution\x12(.flyteidl.admin.ExecutionRelaunchRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"x\x92\x41 \x1a\x1eRelaunch a workflow execution.\x82\xd3\xe4\x93\x02O:\x01*Z-:\x01*\"(/api/v1/org/executions/{id.org}/relaunch\"\x1b/api/v1/executions/relaunch\x12\xcb\x05\n\x10RecoverExecution\x12\'.flyteidl.admin.ExecutionRecoverRequest\x1a\'.flyteidl.admin.ExecutionCreateResponse\"\xe4\x04\x92\x41\x8d\x04\x1a\x8a\x04Recreates a previously-run workflow execution that will only start executing from the last known failure point. In Recover mode, users cannot change any input parameters or update the version of the execution. This is extremely useful to recover from system errors and byzantine faults like - Loss of K8s cluster, bugs in platform or instability, machine failures, downstream system failures (downstream services), or simply to recover executions that failed because of retry exhaustion and should complete if tried again.\x82\xd3\xe4\x93\x02M:\x01*Z,:\x01*\"\'/api/v1/org/executions/{id.org}/recover\"\x1a/api/v1/executions/recover\x12\x89\x02\n\x0cGetExecution\x12+.flyteidl.admin.WorkflowExecutionGetRequest\x1a\x19.flyteidl.admin.Execution\"\xb0\x01\x92\x41*\x1a(Retrieve an existing workflow execution.\x82\xd3\xe4\x93\x02}ZD\x12\x42/api/v1/org/executions/{id.org}/{id.project}/{id.domain}/{id.name}\x12\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xef\x01\n\x0fUpdateExecution\x12&.flyteidl.admin.ExecutionUpdateRequest\x1a\'.flyteidl.admin.ExecutionUpdateResponse\"\x8a\x01\x82\xd3\xe4\x93\x02\x83\x01:\x01*ZG:\x01*\x1a\x42/api/v1/org/executions/{id.org}/{id.project}/{id.domain}/{id.name}\x1a\x35/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\x86\x02\n\x10GetExecutionData\x12/.flyteidl.admin.WorkflowExecutionGetDataRequest\x1a\x30.flyteidl.admin.WorkflowExecutionGetDataResponse\"\x8e\x01\x82\xd3\xe4\x93\x02\x87\x01ZI\x12G/api/v1/org/data/executions/{id.org}/{id.project}/{id.domain}/{id.name}\x12:/api/v1/data/executions/{id.project}/{id.domain}/{id.name}\x12\xc5\x01\n\x0eListExecutions\x12#.flyteidl.admin.ResourceListRequest\x1a\x1d.flyteidl.admin.ExecutionList\"o\x82\xd3\xe4\x93\x02iZ:\x12\x38/api/v1/org/executions/{id.org}/{id.project}/{id.domain}\x12+/api/v1/executions/{id.project}/{id.domain}\x12\xf8\x01\n\x12TerminateExecution\x12).flyteidl.admin.ExecutionTerminateRequest\x1a*.flyteidl.admin.ExecutionTerminateResponse\"\x8a\x01\x82\xd3\xe4\x93\x02\x83\x01:\x01*ZG:\x01**B/api/v1/org/executions/{id.org}/{id.project}/{id.domain}/{id.name}*5/api/v1/executions/{id.project}/{id.domain}/{id.name}\x12\xe2\x02\n\x10GetNodeExecution\x12\'.flyteidl.admin.NodeExecutionGetRequest\x1a\x1d.flyteidl.admin.NodeExecution\"\x85\x02\x82\xd3\xe4\x93\x02\xfe\x01Z\x8b\x01\x12\x88\x01/api/v1/org/node_executions/{id.execution_id.org}/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12n/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\x9e\x03\n\x16GetDynamicNodeWorkflow\x12-.flyteidl.admin.GetDynamicNodeWorkflowRequest\x1a+.flyteidl.admin.DynamicNodeWorkflowResponse\"\xa7\x02\x82\xd3\xe4\x93\x02\xa0\x02Z\x9c\x01\x12\x99\x01/api/v1/org/node_executions/{id.execution_id.org}/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}/dynamic_workflow\x12\x7f/api/v1/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}/dynamic_workflow\x12\xf9\x02\n\x12ListNodeExecutions\x12(.flyteidl.admin.NodeExecutionListRequest\x1a!.flyteidl.admin.NodeExecutionList\"\x95\x02\x82\xd3\xe4\x93\x02\x8e\x02Z\x96\x01\x12\x93\x01/api/v1/org/node_executions/{workflow_execution_id.org}/{workflow_execution_id.project}/{workflow_execution_id.domain}/{workflow_execution_id.name}\x12s/api/v1/node_executions/{workflow_execution_id.project}/{workflow_execution_id.domain}/{workflow_execution_id.name}\x12\x8f\x08\n\x19ListNodeExecutionsForTask\x12/.flyteidl.admin.NodeExecutionForTaskListRequest\x1a!.flyteidl.admin.NodeExecutionList\"\x9d\x07\x82\xd3\xe4\x93\x02\x96\x07Z\xe7\x03\x12\xe4\x03/api/v1/org/children/{task_execution_id.node_execution_id.execution_id.org}/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}\x12\xa9\x03/api/v1/children/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}\x12\x83\x03\n\x14GetNodeExecutionData\x12+.flyteidl.admin.NodeExecutionGetDataRequest\x1a,.flyteidl.admin.NodeExecutionGetDataResponse\"\x8f\x02\x82\xd3\xe4\x93\x02\x88\x02Z\x90\x01\x12\x8d\x01/api/v1/org/data/node_executions/{id.execution_id.org}/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12s/api/v1/data/node_executions/{id.execution_id.project}/{id.execution_id.domain}/{id.execution_id.name}/{id.node_id}\x12\xa8\x01\n\x0fRegisterProject\x12&.flyteidl.admin.ProjectRegisterRequest\x1a\'.flyteidl.admin.ProjectRegisterResponse\"D\x82\xd3\xe4\x93\x02>:\x01*Z\':\x01*\"\"/api/v1/org/projects/{project.org}\"\x10/api/v1/projects\x12\xad\x01\n\rUpdateProject\x12\x17.flyteidl.admin.Project\x1a%.flyteidl.admin.ProjectUpdateResponse\"\\\x92\x41\x13\x1a\x11Update a project.\x82\xd3\xe4\x93\x02@:\x01*Z$:\x01*\x1a\x1f/api/v1/org/projects/{org}/{id}\x1a\x15/api/v1/projects/{id}\x12\xa3\x01\n\x0cListProjects\x12\".flyteidl.admin.ProjectListRequest\x1a\x18.flyteidl.admin.Projects\"U\x92\x41\x1c\x1a\x1a\x46\x65tch registered projects.\x82\xd3\xe4\x93\x02\x30Z\x1c\x12\x1a/api/v1/org/projects/{org}\x12\x10/api/v1/projects\x12\x9a\x02\n\x13\x43reateWorkflowEvent\x12-.flyteidl.admin.WorkflowExecutionEventRequest\x1a..flyteidl.admin.WorkflowExecutionEventResponse\"\xa3\x01\x92\x41\x41\x1a?Create a workflow execution event recording a phase transition.\x82\xd3\xe4\x93\x02Y:\x01*Z::\x01*\"5/api/v1/org/events/{event.execution_id.org}/workflows\"\x18/api/v1/events/workflows\x12\x85\x02\n\x0f\x43reateNodeEvent\x12).flyteidl.admin.NodeExecutionEventRequest\x1a*.flyteidl.admin.NodeExecutionEventResponse\"\x9a\x01\x92\x41=\x1a;Create a node execution event recording a phase transition.\x82\xd3\xe4\x93\x02T:\x01*Z9:\x01*\"4/api/v1/org/events/{event.id.execution_id.org}/nodes\"\x14/api/v1/events/nodes\x12\x9b\x02\n\x0f\x43reateTaskEvent\x12).flyteidl.admin.TaskExecutionEventRequest\x1a*.flyteidl.admin.TaskExecutionEventResponse\"\xb0\x01\x92\x41=\x1a;Create a task execution event recording a phase transition.\x82\xd3\xe4\x93\x02j:\x01*ZO:\x01*\"J/api/v1/org/events/{event.parent_node_execution_id.execution_id.org}/tasks\"\x14/api/v1/events/tasks\x12\xf4\x05\n\x10GetTaskExecution\x12\'.flyteidl.admin.TaskExecutionGetRequest\x1a\x1d.flyteidl.admin.TaskExecution\"\x97\x05\x92\x41&\x1a$Retrieve an existing task execution.\x82\xd3\xe4\x93\x02\xe7\x04Z\xc8\x02\x12\xc5\x02/api/v1/org/task_executions/{id.node_execution_id.execution_id.org}/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\x99\x02/api/v1/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xac\x04\n\x12ListTaskExecutions\x12(.flyteidl.admin.TaskExecutionListRequest\x1a!.flyteidl.admin.TaskExecutionList\"\xc8\x03\x92\x41\x38\x1a\x36\x46\x65tch existing task executions matching input filters.\x82\xd3\xe4\x93\x02\x86\x03Z\xd6\x01\x12\xd3\x01/api/v1/org/task_executions/{node_execution_id.execution_id.org}/{node_execution_id.execution_id.project}/{node_execution_id.execution_id.domain}/{node_execution_id.execution_id.name}/{node_execution_id.node_id}\x12\xaa\x01/api/v1/task_executions/{node_execution_id.execution_id.project}/{node_execution_id.execution_id.domain}/{node_execution_id.execution_id.name}/{node_execution_id.node_id}\x12\xb0\x06\n\x14GetTaskExecutionData\x12+.flyteidl.admin.TaskExecutionGetDataRequest\x1a,.flyteidl.admin.TaskExecutionGetDataResponse\"\xbc\x05\x92\x41\x41\x1a?Retrieve input and output data from an existing task execution.\x82\xd3\xe4\x93\x02\xf1\x04Z\xcd\x02\x12\xca\x02/api/v1/org/data/task_executions/{id.node_execution_id.execution_id.org}/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\x9e\x02/api/v1/data/task_executions/{id.node_execution_id.execution_id.project}/{id.node_execution_id.execution_id.domain}/{id.node_execution_id.execution_id.name}/{id.node_execution_id.node_id}/{id.task_id.project}/{id.task_id.domain}/{id.task_id.name}/{id.task_id.version}/{id.retry_attempt}\x12\xa6\x03\n\x1dUpdateProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesUpdateRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesUpdateResponse\"\x97\x02\x92\x41X\x1aVUpdate the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02\xb5\x01:\x01*Zd:\x01*\x1a_/api/v1/org/project_domain_attributes/{attributes.org}/{attributes.project}/{attributes.domain}\x1aJ/api/v1/project_domain_attributes/{attributes.project}/{attributes.domain}\x12\xe1\x02\n\x1aGetProjectDomainAttributes\x12\x31.flyteidl.admin.ProjectDomainAttributesGetRequest\x1a\x32.flyteidl.admin.ProjectDomainAttributesGetResponse\"\xdb\x01\x92\x41Z\x1aXRetrieve the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02xZ@\x12>/api/v1/org/project_domain_attributes/{org}/{project}/{domain}\x12\x34/api/v1/project_domain_attributes/{project}/{domain}\x12\xee\x02\n\x1d\x44\x65leteProjectDomainAttributes\x12\x34.flyteidl.admin.ProjectDomainAttributesDeleteRequest\x1a\x35.flyteidl.admin.ProjectDomainAttributesDeleteResponse\"\xdf\x01\x92\x41X\x1aVDelete the customized resource attributes associated with a project-domain combination\x82\xd3\xe4\x93\x02~:\x01*ZC:\x01**>/api/v1/org/project_domain_attributes/{org}/{project}/{domain}*4/api/v1/project_domain_attributes/{project}/{domain}\x12\xd2\x02\n\x17UpdateProjectAttributes\x12..flyteidl.admin.ProjectAttributesUpdateRequest\x1a/.flyteidl.admin.ProjectAttributesUpdateResponse\"\xd5\x01\x92\x41\x45\x1a\x43Update the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02\x86\x01:\x01*ZP:\x01*\x1aK/api/v1/org/project_domain_attributes/{attributes.org}/{attributes.project}\x1a//api/v1/project_attributes/{attributes.project}\x12\xa3\x02\n\x14GetProjectAttributes\x12+.flyteidl.admin.ProjectAttributesGetRequest\x1a,.flyteidl.admin.ProjectAttributesGetResponse\"\xaf\x01\x92\x41G\x1a\x45Retrieve the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02_Z7\x12\x35/api/v1/org/project_domain_attributes/{org}/{project}\x12$/api/v1/project_attributes/{project}\x12\xb0\x02\n\x17\x44\x65leteProjectAttributes\x12..flyteidl.admin.ProjectAttributesDeleteRequest\x1a/.flyteidl.admin.ProjectAttributesDeleteResponse\"\xb3\x01\x92\x41\x45\x1a\x43\x44\x65lete the customized resource attributes associated with a project\x82\xd3\xe4\x93\x02\x65:\x01*Z::\x01**5/api/v1/org/project_domain_attributes/{org}/{project}*$/api/v1/project_attributes/{project}\x12\xc5\x03\n\x18UpdateWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesUpdateRequest\x1a\x30.flyteidl.admin.WorkflowAttributesUpdateResponse\"\xc5\x02\x92\x41\x66\x1a\x64Update the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02\xd5\x01:\x01*Zt:\x01*\x1ao/api/v1/org/workflow_attributes/{attributes.org}/{attributes.project}/{attributes.domain}/{attributes.workflow}\x1aZ/api/v1/workflow_attributes/{attributes.project}/{attributes.domain}/{attributes.workflow}\x12\xeb\x02\n\x15GetWorkflowAttributes\x12,.flyteidl.admin.WorkflowAttributesGetRequest\x1a-.flyteidl.admin.WorkflowAttributesGetResponse\"\xf4\x01\x92\x41h\x1a\x66Retrieve the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02\x82\x01ZE\x12\x43/api/v1/org/workflow_attributes/{org}/{project}/{domain}/{workflow}\x12\x39/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\xf8\x02\n\x18\x44\x65leteWorkflowAttributes\x12/.flyteidl.admin.WorkflowAttributesDeleteRequest\x1a\x30.flyteidl.admin.WorkflowAttributesDeleteResponse\"\xf8\x01\x92\x41\x66\x1a\x64\x44\x65lete the customized resource attributes associated with a project, domain and workflow combination\x82\xd3\xe4\x93\x02\x88\x01:\x01*ZH:\x01**C/api/v1/org/workflow_attributes/{org}/{project}/{domain}/{workflow}*9/api/v1/workflow_attributes/{project}/{domain}/{workflow}\x12\x8c\x02\n\x17ListMatchableAttributes\x12..flyteidl.admin.ListMatchableAttributesRequest\x1a/.flyteidl.admin.ListMatchableAttributesResponse\"\x8f\x01\x92\x41>\x1a, } +/// Request to count executions with the given project, domain and optionally-assigned org. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionCountsGetRequest { + /// Name of the project the execution belongs to. + /// +required + #[prost(string, tag="1")] + pub project: ::prost::alloc::string::String, + /// Name of the domain the execution belongs to. + /// A domain can be considered as a subset within a specific project. + /// +required + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, + /// org filter applied to execution count request. + /// +optional + #[prost(string, tag="3")] + pub org: ::prost::alloc::string::String, + /// Indicates a list of filters passed as string. + /// +optional + #[prost(string, tag="4")] + pub filters: ::prost::alloc::string::String, +} +/// Execution count of a phase. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionCountsByPhase { + /// execution phase. + #[prost(enumeration="super::core::workflow_execution::Phase", tag="1")] + pub phase: i32, + /// Count of the executions in corresponding phase. + #[prost(int64, tag="2")] + pub count: i64, +} +/// Execution count response. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionCountsGetResponse { + /// Count of the executions in all phases. + #[prost(message, repeated, tag="1")] + pub execution_counts: ::prost::alloc::vec::Vec, +} +/// Request to get the count of running executions with the given project, domain and optionally-assigned org. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RunningExecutionsCountGetRequest { + /// Name of the project the execution belongs to. + /// +required + #[prost(string, tag="1")] + pub project: ::prost::alloc::string::String, + /// Name of the domain the execution belongs to. + /// A domain can be considered as a subset within a specific project. + /// +required + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, + /// org filter applied to execution count request. + /// +optional + #[prost(string, tag="3")] + pub org: ::prost::alloc::string::String, +} +/// Running execution count response. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RunningExecutionsCountGetResponse { + /// Count of the running executions. + #[prost(int64, tag="1")] + pub count: i64, +} /// 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/go.mod b/flyteidl/go.mod index fa9a73f275..54f69af28d 100644 --- a/flyteidl/go.mod +++ b/flyteidl/go.mod @@ -7,11 +7,9 @@ toolchain go1.21.3 require ( github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000 github.com/go-test/deep v1.0.7 - github.com/golang/glog v1.1.2 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 github.com/jinzhu/copier v0.3.5 github.com/mitchellh/mapstructure v1.5.0 @@ -21,7 +19,6 @@ require ( github.com/stretchr/testify v1.8.4 golang.org/x/net v0.20.0 golang.org/x/oauth2 v0.13.0 - google.golang.org/api v0.128.0 google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 google.golang.org/grpc v1.60.1 google.golang.org/protobuf v1.32.0 @@ -34,7 +31,6 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.2 // indirect cloud.google.com/go/storage v1.30.1 // indirect - connectrpc.com/connect v1.14.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect @@ -102,6 +98,7 @@ require ( golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.128.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect diff --git a/flyteidl/go.sum b/flyteidl/go.sum index 5bef7b1031..7e7d113c34 100644 --- a/flyteidl/go.sum +++ b/flyteidl/go.sum @@ -40,8 +40,6 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= -connectrpc.com/connect v1.14.0 h1:PDS+J7uoz5Oui2VEOMcfz6Qft7opQM9hPiKvtGC01pA= -connectrpc.com/connect v1.14.0/go.mod h1:uoAq5bmhhn43TwhaKdGKN/bZcGtzPW1v+ngDTn5u+8s= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -220,7 +218,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdR github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= diff --git a/flyteidl/protos/flyteidl/admin/execution.proto b/flyteidl/protos/flyteidl/admin/execution.proto index a46d6efdd3..eea42b0ff3 100644 --- a/flyteidl/protos/flyteidl/admin/execution.proto +++ b/flyteidl/protos/flyteidl/admin/execution.proto @@ -418,3 +418,60 @@ message WorkflowExecutionGetMetricsResponse { // hierarchical structure using Flyte entity references. core.Span span = 1; } + +// Request to count executions with the given project, domain and optionally-assigned org. +message ExecutionCountsGetRequest { + // Name of the project the execution belongs to. + // +required + string project = 1; + + // Name of the domain the execution belongs to. + // A domain can be considered as a subset within a specific project. + // +required + string domain = 2; + + // org filter applied to execution count request. + // +optional + string org = 3; + + // Indicates a list of filters passed as string. + // +optional + string filters = 4; +} + +// Execution count of a phase. +message ExecutionCountsByPhase { + // execution phase. + core.WorkflowExecution.Phase phase = 1; + + // Count of the executions in corresponding phase. + int64 count = 2; +} + +// Execution count response. +message ExecutionCountsGetResponse { + // Count of the executions in all phases. + repeated ExecutionCountsByPhase execution_counts = 1; +} + +// Request to get the count of running executions with the given project, domain and optionally-assigned org. +message RunningExecutionsCountGetRequest { + // Name of the project the execution belongs to. + // +required + string project = 1; + + // Name of the domain the execution belongs to. + // A domain can be considered as a subset within a specific project. + // +required + string domain = 2; + + // org filter applied to execution count request. + // +optional + string org = 3; +} + +// Running execution count response. +message RunningExecutionsCountGetResponse { + // Count of the running executions. + int64 count = 1; +} \ No newline at end of file diff --git a/flyteidl/protos/flyteidl/service/admin.proto b/flyteidl/protos/flyteidl/service/admin.proto index dae0af5170..043e5ef6f1 100644 --- a/flyteidl/protos/flyteidl/service/admin.proto +++ b/flyteidl/protos/flyteidl/service/admin.proto @@ -837,4 +837,23 @@ service AdminService { description: "Retrieve metrics from an existing workflow execution." }; }; + + // Fetch the count of :ref:`ref_flyteidl.admin.Execution`. + rpc GetExecutionCounts (flyteidl.admin.ExecutionCountsGetRequest) returns (flyteidl.admin.ExecutionCountsGetResponse) { + option (google.api.http) = { + get: "/api/v1/count/executions/{project}/{domain}" + additional_bindings { + get: "/api/v1/org/count/executions/{org}/{project}/{domain}" + } + }; + } + + rpc GetRunningExecutionsCount (flyteidl.admin.RunningExecutionsCountGetRequest) returns (flyteidl.admin.RunningExecutionsCountGetResponse) { + option (google.api.http) = { + get: "/api/v1/running_count/executions/{project}/{domain}" + additional_bindings { + get: "/api/v1/org/running_count/executions/{org}/{project}/{domain}" + } + }; + } } diff --git a/go.mod b/go.mod index e1742958b8..2c6e9e5767 100644 --- a/go.mod +++ b/go.mod @@ -68,7 +68,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/eapache/go-resiliency v1.2.0 // indirect @@ -207,7 +206,6 @@ require ( golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.17.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.149.0 // indirect google.golang.org/appengine v1.6.8 // indirect