cylc / cylc-flow

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

task globbing: add cli interface #4357

Open oliver-sanders opened 3 years ago

oliver-sanders commented 3 years ago

Some Cylc subcommands allow us to glob over the active task window e.g. cylc trigger.

It would be useful if there was a way to get a list of the tasks that this would trigger before triggering.

Ideas:

We can also print out the list of the tasks that were triggered, note this aspect is currently blocked by #3329 due to the command queueing system.

Additional context

Pull requests welcome!

MetRonnie commented 3 years ago

Having a separate command might be tricky, due to the two types of task matching (dumping explanation here as it may be useful to whoever tackles this):

https://github.com/cylc/cylc-flow/blob/4686ba63e26777e2e828752b1c0dfbb48cdf0ed9/cylc/flow/task_pool.py#L1523-L1526

which matches spawned tasks (hidden + main pool). It looks like this is used by cylc kill for example.

And

https://github.com/cylc/cylc-flow/blob/4686ba63e26777e2e828752b1c0dfbb48cdf0ed9/cylc/flow/task_pool.py#L1348-L1351

which matches any task that is in the graph, whether it has spawned or not. I think this is use by cylc trigger.

Additionally, cylc hold uses both