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

Change extension to run in remote workspace by default #1233

Merged
merged 2 commits into from
Sep 9, 2019
Merged

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Aug 28, 2019

Fixes #954. See that issue for more info on why we want to default to workspace extension instead of ui extension.

In addition to changing the default (which is the most important change), I added some helpful error messages to common scenarios.

Scenario 1

User has Docker installed as "ui" extension. Currently they will see a bunch of random errors for unsupported actions like this:
Screen Shot 2019-08-27 at 11 36 12 AM
Screen Shot 2019-08-27 at 11 36 39 AM

I added this error message instead:
Screen Shot 2019-08-28 at 2 55 03 PM

Scenario 2

User has Docker installed as "workspace" extension in dev container. "Add Docker Files to Workspace" should work, but any commands using the terminal won't work and the explorer won't show anything.

All I did was add a link in the explorer. The docs still need to be written, but we will likely direct them to one of these options:

  1. Forward some ports so that the explorer works when running as a workspace extension
  2. Just open a local VS Code instance if you want to see local containers in the explorer
  3. Last resort docker in docker
    Screen Shot 2019-08-27 at 2 31 48 PM

In terms of commands that require a terminal - I still think the long term fix is to move those over to Dockerode anyways.

@ejizba ejizba requested a review from a team as a code owner August 28, 2019 22:09
];

if (isLinux()) {
result.push(new OpenUrlTreeItem(this, 'Manage Docker as a non-root user on Linux...', linuxPostInstallUrl))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this per discussion with Matt since it's already in the troubleshooting link and 4 links (in the dev container case) seemed excessive

@ejizba
Copy link
Contributor Author

ejizba commented Sep 5, 2019

} else { // otherwise update the global setting
target = ConfigurationTarget.Global;
if (typeof values.globalValue === 'object' && values.globalValue !== null) {
value = values.globalValue || {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The ||{} is just defensive, right? If it's an object and not null, then can it be falsy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right - shouldn't be possible to be falsy

@ejizba ejizba merged commit 1da7882 into master Sep 9, 2019
@ejizba ejizba deleted the ej/remote branch September 9, 2019 17:38
@microsoft microsoft locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve default behavior in VS Code Remote scenarios
2 participants