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

Held running tasks: delay spawning or hold children? #5696

Open
hjoliver opened this issue Aug 16, 2023 · 3 comments
Open

Held running tasks: delay spawning or hold children? #5696

hjoliver opened this issue Aug 16, 2023 · 3 comments
Labels
question Flag this as a question for the next Cylc project meeting.
Milestone

Comments

@hjoliver
Copy link
Member

hjoliver commented Aug 16, 2023

With spawn-on-demand there are often no waiting tasks in the pool, which makes "hold" (by glob to match in the pool) pretty
much useless. Holding a task that is already running has no effect (except to hold back any retries).

...
a => b => FAM  # b is currently running
...

If b is running and I want to pause execution of this branch without pausing the whole workflow, I currently have to individually hold all members of FAM (family names and globs currently only match in the task pool).

Making hold work the way that users no doubt expect - i.e., to be able to easily hold parts of a running workflow without pausing the whole thing - should IMO be part of our current push to get intervention capability nailed down in Cylc 8.


Option A

Held running tasks should pass the held "attribute" on to children.

If I hold b, members of FAM will be spawned when b succeeds, but they will be held.

Pros:

  • easy to implement

Cons:

  • we end up with held tasks that I didn't explicitly ask to hold
  • they get held some time after I issued the hold command
    • (BUT we already have that for future hold by explicit task ID)

Option B

Held running tasks should not spawn children until released.

If I hold b, it will remain in the pool as succeed and held, until released, at which point it will spawn FAM.

Pros:

  • more direct and more intuitive (the only tasks that get held are those I explicitly ask for)

Cons:

  • delayed spawning is more difficult to implement and requires DB support.
    • (BUT we already have that for the --wait flow trigger option)

I think I prefer Option B. It is more intuitive and has one less "con" by my count.

@hjoliver hjoliver added the question Flag this as a question for the next Cylc project meeting. label Aug 16, 2023
@hjoliver hjoliver added this to the cylc-8.x milestone Aug 16, 2023
@hjoliver hjoliver changed the title Should children of a held-but-running task be held? Held running tasks: delay spawning or hold children? Aug 17, 2023
@oliver-sanders
Copy link
Member

oliver-sanders commented Aug 21, 2023

Suggest merging this with:

Which should all be "solved" together if we agree to an approach, rather than debate each aspect of each command on a command by command basis.

Suggest changing issue title to: "task globing beyond n=0 window"

@hjoliver
Copy link
Member Author

Maybe, if you can convince me of the need for a more general approach.

I mean, what commands other than hold will this globbing apply to? There's an obvious need to keep to track of tasks that we need to "hold" when/if they eventually spawn j- but poll, kill, etc??

cylc show (for prerequisites) is not in the same category. That is for presenting information about future tasks now, not when/if they are spawned in the future.

@oliver-sanders
Copy link
Member

I mean, what commands other than hold will this globbing apply to

  • [re]set
    • e.g. cylc set <GLOB> --output=succeeded (set all tasks in GLOB as succeeded whether spawned or not)
  • trigger
    • e.g. cylc trigger <GLOB> (trigger all tasks in glob)
  • remove
    • e.g. cylc remove <GLOB> (remove all tasks in GLOB whether they are still in the pool or not)

To name just three!

cylc show (for prerequisites) is not in the same category

It is and it isn't. These commands use the same code for globing tasks and handing the situation where tasks are not found. Unless we want to implement this code separately for each command (and have a confusing CLI) and changing the implementation (and documentation which is also common), then adapting one will adapt all.

But also, if cylc hold FAMILY works, then why shouldn't cylc show FAMILY?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Flag this as a question for the next Cylc project meeting.
Projects
None yet
Development

No branches or pull requests

2 participants