Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: guard against /tasks failing #750

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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