From 4b8e6d92f6872bb0f54e788f4ad6fa7fbe1f07af Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 30 Sep 2021 11:37:59 -0700 Subject: [PATCH 1/3] Ensure conda info --json times out after 60 seconds --- .../pythonEnvironments/common/environmentManagers/conda.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/pythonEnvironments/common/environmentManagers/conda.ts b/src/client/pythonEnvironments/common/environmentManagers/conda.ts index 025cb7fc75b5..ffc4dfaa935a 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/conda.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/conda.ts @@ -354,7 +354,7 @@ export class Conda { // eslint-disable-next-line class-methods-use-this private async getInfoCached(command: string): Promise { const disposables = new Set(); - const result = await exec(command, ['info', '--json'], {}, disposables); + const result = await exec(command, ['info', '--json'], { timeout: 60000 }, disposables); traceVerbose(`conda info --json: ${result.stdout}`); // Ensure the process we started is cleaned up. From ba9f145f63d1f42a3d08fd64260a0003d8114b61 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 30 Sep 2021 11:53:58 -0700 Subject: [PATCH 2/3] News entry --- news/2 Fixes/17576.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/2 Fixes/17576.md diff --git a/news/2 Fixes/17576.md b/news/2 Fixes/17576.md new file mode 100644 index 000000000000..454e913d243f --- /dev/null +++ b/news/2 Fixes/17576.md @@ -0,0 +1 @@ +Add timeout of 60 seconds when discovery runs `conda info --json` command. From dcc99a8da0e334e170464ce5513f58e59c28e859 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 30 Sep 2021 15:44:20 -0700 Subject: [PATCH 3/3] Update time to 50 seconds --- news/2 Fixes/17576.md | 2 +- .../pythonEnvironments/common/environmentManagers/conda.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/news/2 Fixes/17576.md b/news/2 Fixes/17576.md index 454e913d243f..72e8ad8d11c8 100644 --- a/news/2 Fixes/17576.md +++ b/news/2 Fixes/17576.md @@ -1 +1 @@ -Add timeout of 60 seconds when discovery runs `conda info --json` command. +Add timeout when discovery runs `conda info --json` command. diff --git a/src/client/pythonEnvironments/common/environmentManagers/conda.ts b/src/client/pythonEnvironments/common/environmentManagers/conda.ts index ffc4dfaa935a..300b218864ae 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/conda.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/conda.ts @@ -354,7 +354,7 @@ export class Conda { // eslint-disable-next-line class-methods-use-this private async getInfoCached(command: string): Promise { const disposables = new Set(); - const result = await exec(command, ['info', '--json'], { timeout: 60000 }, disposables); + const result = await exec(command, ['info', '--json'], { timeout: 50000 }, disposables); traceVerbose(`conda info --json: ${result.stdout}`); // Ensure the process we started is cleaned up.