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

Command task matching requirements #5827

Open
9 tasks
hjoliver opened this issue Nov 18, 2023 · 3 comments
Open
9 tasks

Command task matching requirements #5827

hjoliver opened this issue Nov 18, 2023 · 3 comments
Labels
could be better Not exactly a bug, but not ideal.
Milestone

Comments

@hjoliver
Copy link
Member

hjoliver commented Nov 18, 2023

Supersedes: #5763, #5695

See also: #5752, #5416, #5677

TODO:

  • hold
  • set
  • trigger
  • release
  • kill
  • poll
  • remove
  • show
    • show command
    • Update the troubleshooting page to remove the note about cylc show not working outside the n=0 window.

target task population

Different commands need to select tasks from different populations:

command population
hold, set, trigger pool, future, past
release held-tasks list only #5752
kill, poll pool only
remove pool, past
show pool only (but maybe future, past too #5677)

task name wildcards

We need to support matching task names by glob (or regex) and family name in all cases (not just in the pool.

For future and past tasks this means:

  • find all matching task def names (or member tasks of matching family names)
  • check which are valid for the given cycle point(s)

cycle point wildcards

We need to support matching cycle points by glob in the pool, e.g. to target all incomplete tasks.

We should not support cycle point wildcards outside of the pool (well, * is certainly bad; [5-8] (e.g.) may be OK in principle but still dangerous and not that much of a plus to users anyway).

task qualifiers

Use of some task qualifiers (i.e. :output) necessarily restricts matching to the pool. E.g. cylc set --out=succeeded "*:failed" should set all n=0 incomplete failed tasks to succeeded.

We can probably decide that use of any qualifier means pool only (is there any need to distinguish between e.g. completed-succeeded and completed-failed past tasks?)


Terminology:

  • pool: task proxies in the n=0 active window
  • future, past: abstract tasks anywhere else in the graph, i.e. n>0 and n<0
@hjoliver
Copy link
Member Author

Update to the above, regarding cycle point wildcards:

  • it would not be OK to allow cylc trigger */* in an infinite workflow - that would cause a meltdown
  • but it would be OK to allow cylc hold */* - that just means "hold any task that gets spawned" which is perfectly safe

So that's another difference in task-matching requirements for different commands.

@hjoliver
Copy link
Member Author

hjoliver commented Jul 1, 2024

task name wildcards

We need to support matching task names by glob (or regex) and family name in all cases (not just in the pool.
For future and past tasks this means:

  • find all matching task def names (or member tasks of matching family names)
  • check which are valid for the given cycle point(s)

Note we already have the machinery to determine if given tasks (by name) are valid at a particular cycle point.

There is still potentially an issue as to whether the task would actually end up running there automatically due to optional branching (or even manual interventions) upstream of it.

However, I don't think that really matters, because:

  • if you manually set or trigger such a task, you are saying do it now regardless of that
  • if you (say) hold such a task, that essentially says "hold it IF it gets spawned in the future". If it doesn't get spawned we're just left with a small housekeeping problem in the hold list.

Finally, for task names, this "problem" (if it is one) applies equally to individual future tasks - which we already allow. For a family name or glob, we just end up with more tasks at the target point.

@dwsutherland
Copy link
Member

Agreed this is needed ..
And if it is to work using a broadcast style/approach, without reading context (which may address this), we should think about using a pop-up window in the UI to show all current broadcasts/actions.
This means we/users can just click an x on whatever items/future-actions we want to stop/undo (i.e. those that don't or haven't decay(ed) naturally with task completion).

@MetRonnie MetRonnie marked this as a duplicate of #5763 Feb 17, 2025
@MetRonnie MetRonnie marked this as a duplicate of #5695 Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

No branches or pull requests

2 participants