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

Terminal task runner: multiple parallel tasks and the spinner #23160

Closed
dbaeumer opened this issue Mar 24, 2017 · 19 comments
Closed

Terminal task runner: multiple parallel tasks and the spinner #23160

dbaeumer opened this issue Mar 24, 2017 · 19 comments
Assignees
Labels
feature-request Request for new features or functionality tasks Task system issues

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Mar 24, 2017

We need to decide how to provide user feedback about running tasks. With the old output runner there was only one active task presented by the spinner. With the new terminal task system there can be n active parallel tasks which can not be represented by one spinner.

May be it would be cool to have something in the terminal UI for this and only show the spinner for build tasks. If terminals would be tabs we could add a batch to the tab to indicate activity like in the side bar.

@Tyriar FYI.

@dbaeumer dbaeumer added the tasks Task system issues label Mar 24, 2017
@dbaeumer dbaeumer added this to the April 2017 milestone Mar 24, 2017
@dbaeumer dbaeumer self-assigned this Mar 24, 2017
@Tyriar
Copy link
Member

Tyriar commented Mar 24, 2017

So ProcessTasks would always be busy and ShellTasks would never be, at least until we can pull more info about what's running from the terminal (#20676)?

I really like the idea of having busy indicators on each terminal, it's just a matter of how we change the UI to have tabs in tabs in a way that doesn't ruin our current relatively simple UI.

Another consideration is in how split terminals and terminal tabs would interact in the future, and how the indicator would show up then. Do tabs represent multiple terminals when split or only a single terminal? There are distinct advantages to grouping split terminals within tabs so it's more like how tmux behaves, rather than how editor tabs behave. Related #10546 #7504

@dbaeumer dbaeumer modified the milestones: Mai 2017, April 2017 Apr 13, 2017
@dbaeumer
Copy link
Member Author

I think we can even do that for shell tasks since they start a shell, run the command, and exit the shell. We have a defined begin/end pattern there as well. Otherwise I could not reuse a terminal since I have no idea when a shell is 'ready' to take input. And I think there is no way to every find that out reliable since a running command can read from stdin as well.

@Tyriar
Copy link
Member

Tyriar commented Apr 17, 2017

I think we can even do that for shell tasks since they start a shell, run the command, and exit the shell.

Oh it's not clear to me the distinction between shell and process tasks then? I was thinking a shell task was just running a shell (eg. bash) and a process task was running bash -c?

@wclr
Copy link

wclr commented Apr 20, 2017

Hope to see multiple running tasks soon.

@dbaeumer
Copy link
Member Author

@Tyriar no a shell task is running the shell and then the command provided. The process tasks runs the process directly without running a shell. There are situations where users didn't want to have shell interpretation for commands in the tasks system and I kept that for the terminal as well.

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Apr 26, 2017
@wclr
Copy link

wclr commented Apr 28, 2017

I think there running tasks with names should be displayed in the status bar (near git branch, where spinner appears) for user to be sure that task is running, and this probably should be configured in the tasks if task should be shown always when running. Click on this task would open output panel.

@dbaeumer
Copy link
Member Author

@whitecolor nice idea.

@dbaeumer dbaeumer modified the milestones: June 2017, May 2017 Jun 1, 2017
@rmgpinto
Copy link

rmgpinto commented Jun 9, 2017

Ideas:

  • Why not split the Output tab with many task tabs, eg: Task[<task_name_1>], Task[<task_name_2>], ..., Task[<task_name_n>]
  • Prompt to terminate a running task, if a task with the same is already running.

@k8w
Copy link

k8w commented Jun 20, 2017

Agree with @rmgpinto .

  1. User need to know what tasks is running. (output tab is a good way)
  2. User need to run multiple tasks parallelly which have different problemMatcher (such as tsc watch and tslint watch)
  3. User need to see their log seperately.

@k8w
Copy link

k8w commented Jun 20, 2017

And also suggest output panel can be splited horizontally.

For example I have 2 tsc watch running. (tsc watch for backend and frontend)
Always I need to see their output to know whether there is any error.
Always I will start 2 terminal, and layout them horizontally.
It may be great if output panel can do this, because problemMatcher is useful.

@dbaeumer
Copy link
Member Author

For June we decided to dedicate the spinner to the build task only. A real progress reporting UI for tasks needs some more UI design and planning.

@dbaeumer dbaeumer modified the milestones: On Deck, June 2017 Jun 20, 2017
@wclr
Copy link

wclr commented Jun 27, 2017

In the latest insiders I don't see spinner when tsc watch task is executed in status bar (it was before update).
Then I read the docs about tasks updates
I tried to add "runner": "process", to task:

{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
    "tasks": [
    {
      "taskName": "tsc",
      "version": "0.1.0",
      "runner": "process",
      "command": "node",
      "isShellCommand": true,
      "args": [       
        "./node_modules/typescript/lib/tsc.js", 
        "-w",
        "-p",
        "."
      ],
      "showOutput": "silent",
      "isBackground": true,
      "problemMatcher": "$tsc-watch"
    }    
  ]
}

but it still runs in terminal. How to make it run as a process?

@dbaeumer
Copy link
Member Author

@whitecolor

The runner property can't only be used globally. You are not able to set a runner property local to a task.

We need to check if the schema handles this correctly.

@wclr
Copy link

wclr commented Jun 29, 2017

The runner property can't only be used globally.

You mean can only?

Why is it so?

@dbaeumer
Copy link
Member Author

You are correct. Can only be used globally.

We basically want to get rid of the output runner because it has too many problems with output encoding, ANSI control characters and doesn't allow user input. So in the new future we might even deprecate the output runner.

@wclr
Copy link

wclr commented Jun 29, 2017

We basically want to get rid of the output runner because it has too many problems with output encoding,

Do not get it. Whou you mean get rid of the output runner? There will be only terminal?

And when it will be possilbe to see status of running task/process.

@dbaeumer dbaeumer modified the milestones: On Deck, Backlog Nov 9, 2017
@stamminator
Copy link

With the new terminal task system there can be n active parallel tasks which can not be represented by one spinner.

How can multiple tasks be run in parallel? Is there a way to execute multiple tasks with a single command (such as running all tasks within a given group, for example)? The only way I know to execute multiple tasks is to daisy chain them with dependsOn, but don't they execute synchronously?

@dbaeumer
Copy link
Member Author

If you list more than one task in the dependsOn property they are executed in parallel.

@alexr00
Copy link
Member

alexr00 commented Nov 15, 2021

Terminal tabs have solved this.

@alexr00 alexr00 closed this as completed Nov 15, 2021
@alexr00 alexr00 removed this from the Backlog milestone Nov 15, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality tasks Task system issues
Projects
None yet
Development

No branches or pull requests

7 participants