cylc/cylc-ui

TypeError during pruning causes tasks to be left behind as running when they have actually succeeded

Closed this issue · 6 comments

Description

A user has reported a problem that reliably occurs where tasks that have succeeded get left behind as running in the table and graph views, but not the tree view which shows everything correctly. This only seems to occur after the GUI has been left open with the workflow running overnight.

There is nothing special about the workflow itself.

I have tracked the TypeError down to this line in the workflows module function remove():

const familyNode = getIndex(state, treeNode.node.firstParent.id)

where firstParent is undefined.

Additionally, the arrows may disappear from the graph view, which I have tracked down to the layout() method:

cylc-ui/src/views/Graph.vue

Lines 652 to 659 in c151c9a

const bbox = nodeDimensions[obj.name]
// translations:
// 1. The graphviz node coordinates
// 2. Centers the node on this coordinate
// TODO convert (2) to maths OR fix it to avoid recomputation?
this.nodeTransformations[obj.name] = `
translate(${x}, -${y})
translate(-${bbox.width / 2}, -${bbox.height / 2})

where bbox is undefined.

@MetRonnie is the Graph error you posted associated with the firstParent.id error?

Don't know, but a user reported getting both in one workflow run

kinow commented

I came here to see looking for a similar error to what I had preparing some slides for a presentation this week.

I had a simple workflow and three views open, tree, table, graph. Once the workflow finished (a few minutes), every view was empty but the graph view.

I closed the tabs and reopened and the graph was empty. I will try to reproduce again tomorrow and share the workflow here and check if I got the TypeError too 👍

every view was empty but the graph view.

That's actually kinda intentional. The graph view will never fully empty because the SVG pan-zoom library we use can't handle an empty document. I'll try and put in some sort of placeholder to prevent this from happening.

I think #1513 should resolve the bulk of the errors I've been seeing.

I seem to easily reproduce this by closing all lumino tabs and then adding the graph view for a running workflow. Seems to be fixed by #1513