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
[x] I have read CONTRIBUTING.md and added my name as a Code Contributor.
[x] Contains logically grouped changes (else tidy your branch by rebase).
[x] Does not contain off-topic changes (use other PRs for other changes).
[x] No dependency changes
[x] Tests are included
[x] Changelog entry included if this is a change that can affect users
[x] No docs needed
[x] If this is a bug fix, PR should be raised against the relevant ?.?.x branch.
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 wasflow=none
, this would result in the task being triggered withflow=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 toflow=none
, you could end up with the situation where all tasks in the DB areflow=none
, so again this would still result in the task being triggered withflow=none
.Solution: fall back to
flow=1
.Check List
CONTRIBUTING.md
and added my name as a Code Contributor.?.?.x
branch.