Skip to content

Commit

Permalink
chore: guard against /tasks failing (#750)
Browse files Browse the repository at this point in the history
* chore: guard against /tasks failing

Signed-off-by: Carina Ursu <[email protected]>

* chore: pkg

Signed-off-by: Carina Ursu <[email protected]>

---------

Signed-off-by: Carina Ursu <[email protected]>
  • Loading branch information
ursucarina committed May 10, 2023
1 parent f38d120 commit f2b89e6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/console/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flyteorg/console",
"version": "0.0.25",
"version": "0.0.26",
"description": "Flyteconsole main app module",
"main": "./dist/index.js",
"module": "./lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ import { ignoredNodeIds } from 'models/Node/constants';
import { isMapTaskV1 } from 'models/Task/utils';
import { QueryClient } from 'react-query';
import { getTask } from 'models';
import { createDebugLogger } from 'common/log';
import { WorkflowNodeExecution, WorkflowTaskExecution } from './contexts';
import { fetchTaskExecutionList } from './taskExecutionQueries';
import { formatRetryAttempt, getGroupedLogs } from './TaskExecutionsList/utils';
import { NodeExecutionGroup } from './types';
import { isDynamicNode, isParentNode, nodeExecutionIsTerminal } from './utils';

const debug = createDebugLogger('@nodeExecutionQueries');

function removeSystemNodes(nodeExecutions: NodeExecution[]): NodeExecution[] {
return nodeExecutions.filter(ne => {
if (ignoredNodeIds.includes(ne.id.nodeId)) {
Expand Down Expand Up @@ -86,7 +89,14 @@ export function makeNodeExecutionAndTasksQuery(
const taskExecutions = workflowNodeExecution?.taskExecutions || [];
const taskId = taskExecutions?.[0]?.id?.taskId;
const compiledTaskClosure = await (taskId
? getTask(taskId!)
? getTask(taskId!).catch(e => {
debug(
'\t failed to get compiled task closure for taskId: ',
taskId,
' Error message:',
e,
);
})
: Promise.resolve(null));

// step 5: get each task's executions data
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@flyteorg/common": "^0.0.4",
"@flyteorg/console": "^0.0.25",
"@flyteorg/console": "^0.0.26",
"long": "^4.0.0",
"protobufjs": "~6.11.3",
"react-ga4": "^1.4.1",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ __metadata:
resolution: "@flyteconsole/client-app@workspace:website"
dependencies:
"@flyteorg/common": ^0.0.4
"@flyteorg/console": ^0.0.25
"@flyteorg/console": ^0.0.26
"@types/long": ^3.0.32
long: ^4.0.0
protobufjs: ~6.11.3
Expand Down Expand Up @@ -2059,7 +2059,7 @@ __metadata:
languageName: unknown
linkType: soft

"@flyteorg/console@^0.0.25, @flyteorg/console@workspace:packages/console":
"@flyteorg/console@^0.0.26, @flyteorg/console@workspace:packages/console":
version: 0.0.0-use.local
resolution: "@flyteorg/console@workspace:packages/console"
dependencies:
Expand Down

0 comments on commit f2b89e6

Please sign in to comment.