cylc / cylc-flow

Cylc: a workflow engine for cycling systems.
https://cylc.github.io
GNU General Public License v3.0
335 stars 94 forks source link

data store: add a workflow flow numbers field #5646

Open oliver-sanders opened 1 year ago

oliver-sanders commented 1 year ago

Add a flow_nums field to the workflow thinggy in GraphQL.

We already have TaskProxy.flow_nums which gives the flow numbers for a given task. To assist with https://github.com/cylc/cylc-ui/issues/470 we could do with a flow_nums field which contains all combinations of flow numbers in the store.

E.G: If we have the following tasks in the store:

Then we would expect Workflows.flow_nums to contain all unique flow number combinations i.e:

Workflows.flow_nums = [
  [1],  // note: lists not sets because the response gets sent as JSON
  [2],
  [1,2],
  [None]
]

The UI can then use this information to provide consistent visual filtering with the aim of making flows visible across all views in the GUI.

This work becomes important with #5643 which will strip flow numbers from tasks.

oliver-sanders commented 1 year ago

(I think it will be easier to maintain this list server-side than trying to maintain it client-side, hence a cylc-flow issue)

oliver-sanders commented 1 year ago

Just realised, when we have offline data in the GUI this field may not reflect the truth so this issue might require a little more thought.