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

Ensure `cylc trigger` does not fall back to `flow=none` by default #6445

Closed MetRonnie closed 1 month ago

MetRonnie commented 1 month ago

Summary

Split off from #6370 as I think it's already a bug.

Problem 1

If you cylc trigger a task when there are no active flows (e.g. on restarting a completed workflow), it looks in the DB for the latest flow number(s). However, if the latest was flow=none, this would result in the task being triggered with flow=none as well.

Solution: choose the latest flow number(s) that is not flow=none.

Problem 2

With #6370 making it so that cylc remove will demote tasks to flow=none, you could end up with the situation where all tasks in the DB are flow=none, so again this would still result in the task being triggered with flow=none.

Solution: fall back to flow=1.

Check List