cylc-ui
cylc-ui copied to clipboard
Edit runtime: add trigger action to form
Problem
Users may be used to the Cylc 7 trigger-edit functionality, might forget to trigger after submitting the Edit Runtime form.
Proposed Solution
Add a toggle switch for trigger to the form (either top or maybe in the bottom left next to the other form buttons).
The problem is making sure the broadcast has happened before the trigger - this is a cylc-flow problem and may depend on https://github.com/cylc/cylc-flow/issues/3329
Could be a bit dangerous if you're applying edit runtime to a family?
The toggle could only be enabled for tasks
It's possible you want to trigger a whole family though. Just add a warning?
Possibly but a bit icky at present.
It is possible to call multiple mutations in a single GraphQL request e.g:
mutation broadcast (...) { result }
mutation trigger (...) { result)
And (when last tested) these mutations are actioned in canon (not in parallel).
However (as identified in the OP), issuing a mutation only queues it on the scheduler, the mutation returns as soon as the command is queued. Due to the scheduler implementation commands should be run in the order they are received providing they only require one action to complete i.e. do not require the involvement of other parts of the main loop which some commands do.
So in theory, this is probably technically possible ATM, however, might not be completely stable in practice until https://github.com/cylc/cylc-flow/issues/3329.