-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Unnecessary extra Terminal in IDE #6186
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
Comments
I would say it is rather a bug, but tricky one. We streamlined terminal integration by reusing the pty service from Microsoft and cannot control initial terminals anymore. So if you open a terminal panel and there are not yet terminals contributed by our extension then default pty service will create a new one. Right now we always show the terminal panel, maybe we don't do it. cc @loujaybee @svenefftinge I removed it from the inbox, since it does not seem to be major issue. |
That terminal doesn't usually have the environment variables I want the users of my workspace to have. |
Could you share steps to reproduce? I tried on gitpod-io/gitpod and seems to be fine there. |
In my case I was adding a tab completion script to However, some of this could be related to the other issue I've been battling for a while related to command failures in the The individual commits of this PR tell the story. golioth/example-application#1 |
I think you should add it as a part of Dockerimage. There is no guarantee that something sourced in one terminal can be available in another. There could be different race condition when a regular user terminal is started before task terminals execute any of your commands. |
Problem is, a command I need to run post dockerimage gives me the completion script. |
There is not way to generate the completion script in Dockerimage? It has to be post? |
It technically varies with the version of tooling specified by a config file in the workspace repository. I'm taking a note to dig into this a bit more and see if making sure I get the 'correct' completion script is redundant. |
FWIW, I'm having the same problem: I run a setup script when the workspace is started or restarted. This script detects Gitpod, and sets up the environment for development and testing. On bare metal, the script configures the environment for staging/production, loading a bunch of additional drivers that don't work on Gitpod. The configuration is reflected in a collection of environment variables that need to be added to the shell. I do this by appending a few lines to .bashrc. This works beautifully everywhere, except for that extra phantom terminal, which is confusing my developers and causing other problems. |
Pushed gitpod-io/openvscode-server@e83735d fixing this (this only works for new workspaces though). Should be in tomorrow's insiders. |
@jeanp413 i tried it seems to work I just want to understand whether issue is addressed or there is something to do. |
Was literally checking as you typed. |
@akosyakov my workspace is struggling to start... EDIT: (Restarted my browser and the workspace came up, chrome) |
@akosyakov Thanks for your help with this. I switched to the 'Insider' track in preferences and created a new workspace for an affected repo. This seems to work--no extra terminal, and the environment variables are present. |
@akosyakov But...we still get an extra terminal on restarts: |
@akosyakov is the restart issue existing because the terminal is stored in the layout and therefore we get the race again? I think users should get the same terminals on restarts as on first start. |
It will require changing MS code. Stock VS Code server does not preserve terminals between sessions. |
Same result here. Works then doesn't after workspace restart. |
Removing from groundwork as the main issue is fixed except for this edge case that will require changes in core vscode
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug description
When your
.gitpod.yml
implements a certain number oftasks
, there is now always an extra Terminal open in VS Code.For example, the Gitpod repository specifies three tasks (also known as Terminals):
gitpod/.gitpod.yml
Lines 38 to 46 in 9d4bfb5
However, when opening Gitpod in Gitpod, we observe four Terminals (the top-most one is empty):
Steps to reproduce
Workspace affected
No response
Expected behavior
There shouldn't be an unnecessary extra empty Terminal open in VS Code:
tasks
in.gitpod.yml
(Note: It is fine to have an empty Terminal open by default when there are no
tasks
in.gitpod.yml
)Example repository
https://github.com/gitpod-io/gitpod
Anything else?
No response
The text was updated successfully, but these errors were encountered: