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

Start-tasks: wait on xtriggers #6528

Merged
merged 5 commits into from
Dec 17, 2024
Merged

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented Dec 17, 2024

Start-tasks (cylc play --start-task=ID) are important for workflow DR failover.

Currently they get force-triggered at start-up, to run immediately. They should be spawned via setting all prerequisites instead, to wait on clock- and xtriggers. (c.f. clock-triggered tasks at the beginning of the graph, for normal start up).

(This came up in NIWA ops Cylc 8 migration, and @dwsutherland has had to work around it).

Very small change (+3/-1 lines code change + tests) but fairly important so should go in 8.4 IMO.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@hjoliver hjoliver added the small label Dec 17, 2024
@hjoliver hjoliver added this to the 8.4.0 milestone Dec 17, 2024
@hjoliver hjoliver self-assigned this Dec 17, 2024
@hjoliver
Copy link
Member Author

Example:

[scheduler]
    cycle point format = %Y
[scheduling]
    initial cycle point = 2024  # current year
    [[graph]]
        P1Y = "@wall_clock => a"
[runtime]
    [[a]]

Normal start:

  • cylc vip - 2024/a runs, 2025/a waits on the clock ✔️

Start-task, master:

  • cylc vip --start=task=2025/a - 2025/a runs immediately despite the unsatisfied clock trigger ❌

Start-task, this branch

  • cylc vip --start=task=2025/a - 2025/a spawns but waits on the clock ✔️

Copy link
Member

@dwsutherland dwsutherland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.. Much needed thanks 👍

@hjoliver hjoliver force-pushed the start-task-xtrigger branch from 8149562 to 2115529 Compare December 17, 2024 03:11
@hjoliver hjoliver marked this pull request as ready for review December 17, 2024 04:40
@wxtim wxtim self-requested a review December 17, 2024 09:01
@wxtim wxtim merged commit d934619 into cylc:master Dec 17, 2024
27 checks passed
@hjoliver hjoliver deleted the start-task-xtrigger branch December 17, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants