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

Display failure node in workflow graph #845

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,28 @@
};
}

/* Build failure node and add downstream connection for edges building */
const failureNode = context.template.failureNode;
if (failureNode && failureNode.id) {
parseNode({

Check warning on line 498 in packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx#L498

Added line #L498 was not covered by tests
node: failureNode as CompiledNode,
root: root,
dynamicToMerge,
nodeExecutionsById,
staticExecutionIdsMap,
workflow,
});
nodeMap[failureNode.id] = {

Check warning on line 506 in packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx#L506

Added line #L506 was not covered by tests
dNode: root.nodes[root.nodes.length - 1],
compiledNode: failureNode as CompiledNode,
};
if (

Check warning on line 510 in packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx#L510

Added line #L510 was not covered by tests
!context.connections.downstream[startNodeId].ids.includes(failureNode.id)
) {
context.connections.downstream[startNodeId].ids.push(failureNode.id);

Check warning on line 513 in packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/WorkflowGraph/transformerWorkflowToDag.tsx#L513

Added line #L513 was not covered by tests
}
}

/* Build Edges */
buildWorkflowEdges(root, context.connections, startNodeId, nodeMap);
return root;
Expand Down
Loading