cylc/cylc-ui

data store: tasks left behind in store on reload/restart

Closed this issue · 0 comments

Issue reported on Element:

I have found tasks not being pruned at the WUI when stopping and starting workflows (UIS and Sch stores are fine as you refresh WUI and it comes right)

think it would work with any workflow, but if you keep stop starting this one:

[scheduler]
   cycle point format = CCYY
[scheduling]
   runahead limit = P1
   initial cycle point = 2020
  [[graph]]
     P1Y = """
         a => b
         b[-P1Y] => a
      """
[runtime]
    [[root]]
        script = sleep 1
    [[a,b]]

it will incrementally leave a whole bunch of them in the WUI tree

-- https://matrix.to/#/!gMuCeOJBhYqgWDGwnR:matrix.org/$169278167693MlhWP:matrix.org?via=matrix.org

The root of the issue was a misunderstanding of protocol.

If an added delta is received for a workflow that is already in the store, this was intended to be a signal to the store to delete everything within the workflow, then rebuild the store. The UI wasn't aware of this and was simply overwriting the data in the store with the new value (i.e. interpreting it as an update). This caused nodes to get stuck in the store in some cases.