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

Launch Shell Commands on Start And Open Them in Terminal #705

Open
svenefftinge opened this issue Oct 22, 2017 · 4 comments
Open

Launch Shell Commands on Start And Open Them in Terminal #705

svenefftinge opened this issue Oct 22, 2017 · 4 comments
Labels
enhancement issues that are enhancements to current functionality - nice to haves

Comments

@svenefftinge
Copy link
Contributor

I'd like to be able to start arbitrary shell processes on start, and allow frontends to get a terminal widget for those processes including the output that was emitted so far.

The use case is a remote workspace that does things like, cloning a repo or executing its build. The use could have the Theia interface immediately and get progress reporting for those tasks through the natural console output.

@marcdumais-work I am not sure if that would be in the context of #686?

@svenefftinge svenefftinge changed the title Launch Shell Commands On Start And open them in Terminal Launch Shell Commands on Start And Open Them in Terminal Oct 22, 2017
@svenefftinge svenefftinge added the enhancement issues that are enhancements to current functionality - nice to haves label Oct 22, 2017
@hexa00
Copy link

hexa00 commented Oct 22, 2017

We could add the onstart property to tasks

We could see this issue has adding this to #686 ?

@marcdumais-work
Copy link
Contributor

@svenefftinge It sounds doable with tasks. Do you expect that multiple frontends would want to show a terminal widget for the same process/execution, or would each one have it's version of that process?

I am not sure what happens to the process output already emitted, in the case where we connect to it later. I guess there's a limit to what would be buffered.

@svenefftinge
Copy link
Contributor Author

We should keep the tasks that are running on a per workspace basis.
When starting a cloud workspace, I would like to start executing tasks. And then anyone opening a frontend at some point later should be able to see the progress of those tasks.

@marcdumais-work
Copy link
Contributor

I have added some infrastructure to support this, to be added to the Task PR soon (available ATM in my fork). Currently there is one task server, in the backend, for each connection/client. But there is an entity that keeps track of all tasks, "task-manager", that also keeps a mapping from workspace root to tasks.

I have added a "getRunningTasks()" method to the task API, that takes an optional workspace root parameter, and can return all currently running tasks for that ws. We are ATM missing a frontend UI that uses this, but it should not be too hard to add.

One thing that might need some more work is notifications for such tasks: ATM only the client that triggered a task is notified when it terminates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves
Projects
None yet
Development

No branches or pull requests

3 participants