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

[feature] explicit serial/parallel task execution control #801

Open
theoephraim opened this issue Apr 20, 2023 · 0 comments
Open

[feature] explicit serial/parallel task execution control #801

theoephraim opened this issue Apr 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@theoephraim
Copy link

theoephraim commented Apr 20, 2023

Is your feature request related to a problem? Please describe.

Not a huge issue, but in my use case, I have a task that I'd like to call before a set of other tasks in some situations. It's not necessarily a strict dependency, but maybe it would affect caching or perform some setup. I'd like to be able to describe a flow where I say, run this thing first, then these tasks in parallel.

Describe the solution you'd like

When opting out of the automatic parallelism that is controlled purely by task dependencies, it would be nice to still have a bit more control than "run these tasks serially".

I can imagine a very simple solution using nested arrays, for example:

tasks:
  foo:
    options:
      runDepsInParallel: false
    dependsOn:
      - 'task-a'
      - ['task-b1', 'task-b2', 'task-b3']
      - 'task-c'

      # (or the yml way of doing nested lists)
      - 'task-a'
      - - 'task-b1'
        - 'task-b2'
        - 'task-b3'
      - 'task-c'

This would run task A, then all the B tasks in parallel, then C.

Describe alternatives you've considered

You may be able to accomplish this by breaking the task up in to multiple subtasks, but it kind of pollutes your config if those subtasks are not meant to be called on their own

@theoephraim theoephraim added the enhancement New feature or request label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant