Open oliver-sanders opened 3 years ago
Nice idea, but the "weaknesses" you've listed above are significant. Worth thinking about on the back burner though.
Thinking again about chaining, I guess we might be able to do something at the UIS to run the mutations in order. Once we have mutation tracking (i.e. the ability to follow the status of a mutation until completion) that could become quite powerful.
After a quick search it looks like if you define multiple mutations the server should execute them in order, halting if one of them fails.
At the moment this means that the commands are guaranteed to be queued in order.
Once we have mutation tracking that means they will be guaranteed to execute in order.
One weakness removed from the list.
Good use cases for both workflow-defined macros (e.g. setting reservations) and user/group-defined macros (e.g. managing workflows).
Follow-on from https://github.com/cylc/cylc-ui/issues/339
Api-On-The-Fly (AOTF) allows us to integrate mutations into the UI automatically, adding them to the relevant context menus and creating forms for manual input.
This means that we could very easily support user-defined mutations. For example here is a (slightly contrived) version of a common operation, setting HPC reservations via broadcasts:
AOTF understands what
WorkflowID
andCyclePoint
mean so would add this mutation to the context menus for cycle points and workflows. Ah the power of automation.Strengths:
Weaknesses:
{inputName: helpMarkdown}
to go along with the mutation.Here's another operations-like example, it's somewhat a toy example, just intended to demonstrate the point:
And another toy example:
Anyway, this is potentially quite simple to implement.