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

Task that depends on multiple wall_clock xtriggers will submit when first is satisfied #5783

Closed
MetRonnie opened this issue Oct 20, 2023 · 2 comments · Fixed by #5791
Closed
Assignees
Labels
bug Something is wrong :(
Milestone

Comments

@MetRonnie
Copy link
Member

Reproducible Example

Weird example but demonstrates the bug

[scheduler]
    allow implicit tasks = True
[scheduling]
    initial cycle point = 2018-01-01
    [[xtriggers]]
        clock_1 = wall_clock()  # satisfied when now > 2018-01-01
        clock_2 = wall_clock(offset=P10Y)  # satisfied when now > 2028-01-01
    [[graph]]
        R1 = @clock_1 & @clock_2 => foo
INFO - [20180101T0000Z/foo waiting(runahead) job:00 flows:1] => waiting
INFO - xtrigger satisfied: clock_1 = wall_clock(trigger_time=1514764800)
INFO - xtrigger satisfied: clock_2 = wall_clock(trigger_time=1514764800) <-- note same trigger time logged
...
INFO - [20180101T0000Z/foo preparing job:01 flows:1] => submitted

Expected Behaviour

foo only submits when all the wall_clock xtriggers it depends on are satisfied.

Additional Context

I think the log is wrong - I don't think clock_2 is satisfied yet; it's just ignored by foo. If you change it to

R1 = """
   @clock_1 & clock_2 => foo
   @clock_2 => bar
"""

then foo still submits immediately but bar does not submit yet

@MetRonnie MetRonnie added the bug Something is wrong :( label Oct 20, 2023
@MetRonnie MetRonnie added this to the cylc-8.2.3 milestone Oct 20, 2023
@wxtim wxtim self-assigned this Oct 25, 2023
@wxtim
Copy link
Member

wxtim commented Oct 25, 2023

This is caused by itask.get_clock_trigger_time caching the clock trigger time, causing it to return the first value it was ever fed every time.

Can we safely not cache this?

@MetRonnie MetRonnie linked a pull request Oct 30, 2023 that will close this issue
8 tasks
@oliver-sanders
Copy link
Member

Closed by #5791

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.

3 participants