Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-spawn on set of parentless sequential xtriggered task #6447

Closed
dwsutherland opened this issue Oct 24, 2024 · 2 comments · Fixed by #6448
Closed

no-spawn on set of parentless sequential xtriggered task #6447

dwsutherland opened this issue Oct 24, 2024 · 2 comments · Fixed by #6448
Assignees
Labels
bug Something is wrong :(
Milestone

Comments

@dwsutherland
Copy link
Member

dwsutherland commented Oct 24, 2024

Description

When setting the outputs on a parentless sequential xtriggered task, the next occurrence is not spawned.

Reproducible Example

Take this workflow, whose task is waiting on and xtrigger:

[scheduler]
    cycle point format = CCYYMMDDThh
    allow implicit tasks = True
[scheduling]
    initial cycle point = 20241017T22
    [[xtriggers]]
        clock_P5Y = wall_clock(offset=P5Y):PT20S
    [[graph]]
        T-00 = """
@clock_P5Y => a
"""
[runtime]
    [[root]]
        script = sleep $((1 + $RANDOM % 10))

if you use cylc set on a, the task will disappear and workflow shutdown:

.
.
.
2024-10-24T14:40:26+13:00 INFO - Cylc version: 8.3.6.dev
2024-10-24T14:40:26+13:00 INFO - Run mode: live
2024-10-24T14:40:26+13:00 INFO - Initial point: 20241017T22
2024-10-24T14:40:26+13:00 INFO - Final point: None
2024-10-24T14:40:26+13:00 INFO - Cold start from 20241017T22
2024-10-24T14:40:26+13:00 INFO - New flow: 1 (original flow from 20241017T22) 2024-10-24T14:40:26
2024-10-24T14:40:26+13:00 INFO - [20241017T22/a:waiting(runahead)] => waiting
2024-10-24T14:40:47+13:00 INFO - Command "set" received. ID=b961fa74-f88c-41e1-bbfc-bfed7bc81966
    set(flow=[], flow_wait=False, tasks=['20241017T22/a'])
2024-10-24T14:40:47+13:00 INFO - [20241017T22/a:waiting] setting implied output: submitted
2024-10-24T14:40:47+13:00 INFO - [20241017T22/a:waiting] setting implied output: started
2024-10-24T14:40:47+13:00 INFO - [20241017T22/a:waiting] => succeeded
2024-10-24T14:40:47+13:00 INFO - Command "set" actioned. ID=b961fa74-f88c-41e1-bbfc-bfed7bc81966
2024-10-24T14:40:47+13:00 INFO - Workflow shutting down - AUTOMATIC
2024-10-24T14:40:48+13:00 INFO - DONE

Expected Behaviour

The task should be spawned into the future/next-occurrence, as if the xtrigger was satisfied.

@dwsutherland dwsutherland added the bug Something is wrong :( label Oct 24, 2024
@dwsutherland dwsutherland added this to the 8.3.6 milestone Oct 24, 2024
@dwsutherland dwsutherland self-assigned this Oct 24, 2024
@dwsutherland
Copy link
Member Author

dwsutherland commented Oct 24, 2024

Solution is probably to spawn next instance on perhaps any use of set on the task.. As if the xtrigger was satisfied and the task produced that output.. Being parentless means setting prerequisites is irrelevant, i.e. this graph:

    [[graph]]
        T-00 = """
@clock_P5Y => a
"""
        T01, T03, T05, T07, T09, T11, T13, T15, T17, T19, T21, T23 = """
@wall_clock => z
z => a => b
"""

Will remove the even hours, but the odd hour as are spawned by z

@dwsutherland
Copy link
Member Author

Fix up:
#6448

An easier workflow to visualize is:

[scheduler]
    cycle point format = CCYYMMDDThh
    allow implicit tasks = True
[scheduling]
    initial cycle point = 20241017T22
    [[xtriggers]]
        clock_P5Y = wall_clock(offset=P5Y):PT20S
    [[graph]]
        T-00 = """
@clock_P5Y => a => b
b[-PT1H] => b
"""
[runtime]
    [[root]]
        script = sleep $((1 + $RANDOM % 10))

w/o this change the workflow shuts down when setting a as above.. with this change b kicks off and a is spawned forward.

@MetRonnie MetRonnie linked a pull request Oct 24, 2024 that will close this issue
7 tasks
@dwsutherland dwsutherland changed the title no-spawn on set of parentless sequential xtrigger no-spawn on set of parentless sequential xtriggered task Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant