When the remote extension host disconnects, ask the server if it actually just crashed (using the management connection)

This commit is contained in:
Alex Dima
2022-03-21 16:13:51 +01:00
parent 0a644fc765
commit d61e2520e0
14 changed files with 171 additions and 36 deletions

View File

@@ -67,6 +67,7 @@ import { ServerEnvironmentService, ServerParsedArgs } from 'vs/server/node/serve
import { REMOTE_TERMINAL_CHANNEL_NAME } from 'vs/workbench/contrib/terminal/common/remoteTerminalChannel';
import { RemoteExtensionLogFileName } from 'vs/workbench/services/remote/common/remoteAgentService';
import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/common/remoteFileSystemProviderClient';
import { ExtensionHostStatusService, IExtensionHostStatusService } from 'vs/server/node/extensionHostStatusService';
const eventPrefix = 'monacoworkbench';
@@ -107,6 +108,9 @@ export async function setupServerServices(connectionToken: ServerConnectionToken
const configurationService = new ConfigurationService(environmentService.machineSettingsResource, fileService);
services.set(IConfigurationService, configurationService);
const extensionHostStatusService = new ExtensionHostStatusService();
services.set(IExtensionHostStatusService, extensionHostStatusService);
// URI Identity
services.set(IUriIdentityService, new UriIdentityService(fileService));
@@ -171,7 +175,7 @@ export async function setupServerServices(connectionToken: ServerConnectionToken
services.set(ICredentialsMainService, new SyncDescriptor(CredentialsMainService, [true]));
instantiationService.invokeFunction(accessor => {
const remoteExtensionEnvironmentChannel = new RemoteAgentEnvironmentChannel(connectionToken, environmentService, extensionManagementCLIService, logService, productService);
const remoteExtensionEnvironmentChannel = new RemoteAgentEnvironmentChannel(connectionToken, environmentService, extensionManagementCLIService, logService, productService, extensionHostStatusService);
socketServer.registerChannel('remoteextensionsenvironment', remoteExtensionEnvironmentChannel);
const telemetryChannel = new ServerTelemetryChannel(accessor.get(IServerTelemetryService), appInsightsAppender);