From 4babe5986a5adb812938db4c084f5381ba2c1e40 Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Tue, 16 May 2023 12:23:47 -0700 Subject: [PATCH 1/2] fix: task recent runs should filter by version Signed-off-by: Carina Ursu --- .../src/components/Entities/generators.ts | 63 +++++++++---------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/packages/console/src/components/Entities/generators.ts b/packages/console/src/components/Entities/generators.ts index 5d4f3291e..ad98c4713 100644 --- a/packages/console/src/components/Entities/generators.ts +++ b/packages/console/src/components/Entities/generators.ts @@ -16,56 +16,55 @@ export const executionFilterGenerator: { ) => FilterOperation[]; } = { [ResourceType.DATASET]: noFilters, - [ResourceType.LAUNCH_PLAN]: ({ name }, version) => - version + [ResourceType.LAUNCH_PLAN]: ({ name }, version) => [ + { + key: 'launch_plan.name', + operation: FilterOperationName.EQ, + value: name, + }, + ...(version ? [ - { - key: 'launch_plan.name', - operation: FilterOperationName.EQ, - value: name, - }, { key: 'launch_plan.version', operation: FilterOperationName.EQ, value: version, }, ] - : [ - { - key: 'launch_plan.name', - operation: FilterOperationName.EQ, - value: name, - }, - ], - [ResourceType.TASK]: ({ name }) => [ + : []), + ], + [ResourceType.TASK]: ({ name }, version) => [ { key: 'task.name', operation: FilterOperationName.EQ, value: name, }, - ], - [ResourceType.UNSPECIFIED]: noFilters, - [ResourceType.WORKFLOW]: ({ name }, version) => - version + ...(version ? [ { key: 'workflow.version', operation: FilterOperationName.EQ, value: version, }, - { - key: 'workflow.name', - operation: FilterOperationName.EQ, - value: name, - }, ] - : [ + : []), + ], + [ResourceType.UNSPECIFIED]: noFilters, + [ResourceType.WORKFLOW]: ({ name }, version) => [ + { + key: 'workflow.name', + operation: FilterOperationName.EQ, + value: name, + }, + ...(version + ? [ { - key: 'workflow.name', + key: 'workflow.version', operation: FilterOperationName.EQ, - value: name, + value: version, }, - ], + ] + : []), + ], }; const workflowListGenerator = ({ project, domain }: ResourceIdentifier) => @@ -75,14 +74,14 @@ const launchPlanListGenerator = ({ project, domain }: ResourceIdentifier) => const taskListGenerator = ({ project, domain }: ResourceIdentifier) => Routes.ProjectDetails.sections.tasks.makeUrl(project, domain); const unspecifiedGenerator = ({ - project, - domain, + project: _project, + domain: _domain, }: ResourceIdentifier | Identifier) => { throw new Error('Unspecified Resourcetype.'); }; const unimplementedGenerator = ({ - project, - domain, + project: _project, + domain: _domain, }: ResourceIdentifier | Identifier) => { throw new Error('Method not implemented.'); }; From 0e1ca8d45dfe1bcca37274dfcf9405259147670a Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Tue, 16 May 2023 17:27:50 -0700 Subject: [PATCH 2/2] chore: package Signed-off-by: Carina Ursu --- packages/console/package.json | 2 +- website/package.json | 2 +- yarn.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/console/package.json b/packages/console/package.json index a555487ce..3c19f9cff 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@flyteorg/console", - "version": "0.0.33", + "version": "0.0.34", "description": "Flyteconsole main app module", "main": "./dist/index.js", "module": "./lib/index.js", diff --git a/website/package.json b/website/package.json index 688d22db8..07d0e6796 100644 --- a/website/package.json +++ b/website/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "@flyteorg/common": "^0.0.4", - "@flyteorg/console": "^0.0.33", + "@flyteorg/console": "^0.0.34", "long": "^4.0.0", "protobufjs": "~6.11.3", "react-ga4": "^1.4.1", diff --git a/yarn.lock b/yarn.lock index 17b652ff7..eb7680f40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,7 +2020,7 @@ __metadata: resolution: "@flyteconsole/client-app@workspace:website" dependencies: "@flyteorg/common": ^0.0.4 - "@flyteorg/console": ^0.0.33 + "@flyteorg/console": ^0.0.34 "@types/long": ^3.0.32 long: ^4.0.0 protobufjs: ~6.11.3 @@ -2059,7 +2059,7 @@ __metadata: languageName: unknown linkType: soft -"@flyteorg/console@^0.0.33, @flyteorg/console@workspace:packages/console": +"@flyteorg/console@^0.0.34, @flyteorg/console@workspace:packages/console": version: 0.0.0-use.local resolution: "@flyteorg/console@workspace:packages/console" dependencies: