| 1 |
# This workflow should behave the same as if 3/foo is not force-triggered. |
| 2 |
|
| 3 |
# Force-triggering 3/foo to put a running no-flow task in the way of the main flow. |
| 4 |
# When 2/foo tries to spawn its successor 3/foo, we merge its flow number into |
| 5 |
# the running 3/foo. Once 3/foo belongs to the flow its successor 4/foo and |
| 6 |
# child 3/bar must be spawned retroactively. |
| 7 |
|
| 8 |
[scheduling] |
| 9 |
cycling mode = integer |
| 10 |
initial cycle point = 1 |
| 11 |
final cycle point = 4 |
| 12 |
runahead limit = P0 |
| 13 |
[[graph]] |
| 14 |
P1 = "foo:start => bar" |
| 15 |
[runtime] |
| 16 |
[[foo]] |
| 17 |
script = """ |
| 18 |
if ((CYLC_TASK_CYCLE_POINT == 1)); then |
| 19 |
# Force trigger 3/foo while 2/foo is runahead limited. |
| 20 |
expected="foo, 2, waiting, not-held, not-queued, runahead" |
| 21 |
diff <(cylc dump -l -t "${CYLC_WORKFLOW_ID}" | grep 'foo, 2') \ |
| 22 |
<(echo "$expected") |
| 23 |
cylc trigger --flow=none $CYLC_WORKFLOW_ID//3/foo |
| 24 |
elif ((CYLC_TASK_CYCLE_POINT == 3)); then |
| 25 |
# Run until I get merged. |
| 26 |
cylc__job__poll_grep_workflow_log -E "3/foo.* merged in flow\(s\) 1" |
| 27 |
fi |
| 28 |
""" |
| 29 |
[[bar]] |