From c8422b1a89bf0119219df2e8a0b320e8efac2ccb Mon Sep 17 00:00:00 2001 From: Roman Nikitenko Date: Wed, 16 Jun 2021 15:50:50 +0300 Subject: [PATCH 1/2] chore(tasks): Align Task Service to upstream changes Signed-off-by: Roman Nikitenko --- .../src/browser/task-config-service.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extensions/eclipse-che-theia-plugin-ext/src/browser/task-config-service.ts b/extensions/eclipse-che-theia-plugin-ext/src/browser/task-config-service.ts index 36712eeef..faef836fd 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/browser/task-config-service.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/browser/task-config-service.ts @@ -39,8 +39,9 @@ export class TaskConfigurationsService extends TaskService { this.getOpenerOptions(resolvedTask) ); + let taskInfo: TaskInfo | undefined; try { - const taskInfo = await this.taskServer.run(resolvedTask, this.getContext(), option); + taskInfo = await this.taskServer.run(resolvedTask, this.getContext(), option); terminal.start(taskInfo.terminalId); this.lastTask = { source, taskLabel, scope: resolvedTask._scope }; @@ -62,14 +63,14 @@ export class TaskConfigurationsService extends TaskService { console.error(errorMessage, error); this.messageService.error(errorMessage); + if (taskInfo && !this.isRemoteTask(taskInfo.config) && typeof taskInfo.terminalId === 'number') { + this.shellTerminalServer.onAttachAttempted(taskInfo.terminalId); + } return undefined; } } - async attach(terminalId: number, taskId: number): Promise { - const runningTasks = await this.getRunningTasks(); - - const taskInfo = runningTasks.find((t: TaskInfo) => t.taskId === taskId); + async attach(terminalId: number, taskInfo: TaskInfo): Promise { if (taskInfo) { const kind = this.isRemoteTask(taskInfo.config) ? REMOTE_TASK_KIND : TASK_KIND; const terminalWidget = this.terminalService.all.find( @@ -87,7 +88,7 @@ export class TaskConfigurationsService extends TaskService { this.getOpenerOptions(taskConfig) ); - widget.start(terminalId); + return widget.start(terminalId); } protected getFactoryOptions(config?: TaskConfiguration): TerminalWidgetFactoryOptions { From 3225b380125af5064b3a8e5bf70e3362a430cda9 Mon Sep 17 00:00:00 2001 From: Roman Nikitenko Date: Wed, 16 Jun 2021 15:53:20 +0300 Subject: [PATCH 2/2] chore: Pin Che-Theia to upstream Theia before the breaking changes Signed-off-by: Roman Nikitenko --- build.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.include b/build.include index 45c57841b..4cbee781e 100644 --- a/build.include +++ b/build.include @@ -14,7 +14,7 @@ IMAGE_TAG="next" THEIA_GITHUB_REPO="eclipse-theia/theia" THEIA_VERSION="master" THEIA_BRANCH="master" -THEIA_COMMIT_SHA="d734315e505ad4a7691a3f6f4a07d2209af0d9cf" +THEIA_COMMIT_SHA="9b9cc2ba4864a45edcb34b459485d8aa54268a5d" THEIA_GIT_REFS="refs\\/heads\\/master" THEIA_DOCKER_IMAGE_VERSION=