From 0e9387ccae67da9a9b16e4574000052abe013969 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Wed, 15 Jan 2025 16:52:21 +0100 Subject: [PATCH] Add missing execution-keyed entities for custom filters Signed-off-by: Katrina Rogan --- flyteadmin/pkg/common/filters.go | 8 +++++--- flyteadmin/pkg/repositories/gormimpl/signal_repo_test.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/flyteadmin/pkg/common/filters.go b/flyteadmin/pkg/common/filters.go index 697bb75179..d20ef21739 100644 --- a/flyteadmin/pkg/common/filters.go +++ b/flyteadmin/pkg/common/filters.go @@ -103,9 +103,11 @@ var executionIdentifierFields = map[string]bool{ // Entities that have special case handling for execution identifier fields. var executionIdentifierEntities = map[Entity]bool{ - Execution: true, - NodeExecution: true, - TaskExecution: true, + Execution: true, + NodeExecution: true, + NodeExecutionEvent: true, + TaskExecution: true, + Signal: true, } var entityMetadataFields = map[string]bool{ diff --git a/flyteadmin/pkg/repositories/gormimpl/signal_repo_test.go b/flyteadmin/pkg/repositories/gormimpl/signal_repo_test.go index 92b40ab337..a1d205b99c 100644 --- a/flyteadmin/pkg/repositories/gormimpl/signal_repo_test.go +++ b/flyteadmin/pkg/repositories/gormimpl/signal_repo_test.go @@ -138,7 +138,7 @@ func TestListSignals(t *testing.T) { signalModels := []map[string]interface{}{toSignalMap(*signalModel)} mockSelectQuery := GlobalMock.NewMock() mockSelectQuery.WithQuery( - `SELECT * FROM "signals" WHERE project = $1 AND domain = $2 AND name = $3 LIMIT 20`).WithReply(signalModels) + `SELECT * FROM "signals" WHERE execution_project = $1 AND execution_domain = $2 AND execution_name = $3 LIMIT 20`).WithReply(signalModels) signals, err := signalRepo.List(ctx, interfaces.ListResourceInput{ InlineFilters: []common.InlineFilter{