diff --git a/plugins/workspace-plugin/src/workspace-projects-manager.ts b/plugins/workspace-plugin/src/workspace-projects-manager.ts index b0b41b0d0..714396b81 100644 --- a/plugins/workspace-plugin/src/workspace-projects-manager.ts +++ b/plugins/workspace-plugin/src/workspace-projects-manager.ts @@ -80,8 +80,11 @@ export class WorkspaceProjectsManager { } } - await this.watchWorkspaceProjects(); - await this.watchMultiRootProjects(); + // Quick fix for https://github.com/eclipse/che/issues/21244 + // Considering 99% of the workspaces are single-project, + // there is no need to update the Devfile automatically. + // await this.watchWorkspaceProjects(); + // await this.watchMultiRootProjects(); } async buildCloneCommands(projects: che.devfile.DevfileProject[]): Promise { diff --git a/plugins/workspace-plugin/tests/workspace-projects-manager.spec.ts b/plugins/workspace-plugin/tests/workspace-projects-manager.spec.ts index 97e41cc09..873c322ed 100644 --- a/plugins/workspace-plugin/tests/workspace-projects-manager.spec.ts +++ b/plugins/workspace-plugin/tests/workspace-projects-manager.spec.ts @@ -372,13 +372,13 @@ describe('Test Workspace Projects Manager', () => { await fireFileSystemChangedEvent(PROJECTS_ROOT, 'create', 'test-project-to-add'); - expect(addWorkspaceFolderMock).toBeCalledTimes(1); + expect(addWorkspaceFolderMock).toBeCalledTimes(0); expect(removeWorkspaceFolderMock).toBeCalledTimes(0); - expect(onProjectChangedSpy).toBeCalledTimes(1); + expect(onProjectChangedSpy).toBeCalledTimes(0); expect(onProjectRemovedSpy).toBeCalledTimes(0); - expect(updateProjectMock).toBeCalledTimes(1); + expect(updateProjectMock).toBeCalledTimes(0); expect(deleteProjectMock).toBeCalledTimes(0); }); @@ -407,10 +407,10 @@ describe('Test Workspace Projects Manager', () => { await fireFileSystemChangedEvent(PROJECTS_ROOT, 'create', 'test-project-to-add'); - expect(addWorkspaceFolderMock).toBeCalledTimes(1); + expect(addWorkspaceFolderMock).toBeCalledTimes(0); expect(removeWorkspaceFolderMock).toBeCalledTimes(0); - expect(onProjectChangedSpy).toBeCalledTimes(1); + expect(onProjectChangedSpy).toBeCalledTimes(0); expect(onProjectRemovedSpy).toBeCalledTimes(0); expect(updateProjectMock).toBeCalledTimes(0); @@ -441,13 +441,13 @@ describe('Test Workspace Projects Manager', () => { await fireFileSystemChangedEvent(PROJECTS_ROOT, 'create', 'test-project-to-add'); expect(addWorkspaceFolderMock).toBeCalledTimes(0); - expect(removeWorkspaceFolderMock).toBeCalledTimes(1); + expect(removeWorkspaceFolderMock).toBeCalledTimes(0); expect(onProjectChangedSpy).toBeCalledTimes(0); - expect(onProjectRemovedSpy).toBeCalledTimes(1); + expect(onProjectRemovedSpy).toBeCalledTimes(0); expect(updateProjectMock).toBeCalledTimes(0); - expect(deleteProjectMock).toBeCalledTimes(1); + expect(deleteProjectMock).toBeCalledTimes(0); }); test('test rejecting in workspaceProjectsManager.onProjectChanged for non-git project', async () => {