File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ export function buildProposedApi(
149149 }
150150 if ( e . old ) {
151151 if ( e . new ) {
152+ traceVerbose ( 'Python API env change detected' , env . id , 'update' ) ;
152153 onEnvironmentsChanged . fire ( { type : 'update' , env : convertEnvInfoAndGetReference ( e . new ) } ) ;
153154 reportInterpretersChanged ( [
154155 {
@@ -157,6 +158,7 @@ export function buildProposedApi(
157158 } ,
158159 ] ) ;
159160 } else {
161+ traceVerbose ( 'Python API env change detected' , env . id , 'remove' ) ;
160162 onEnvironmentsChanged . fire ( { type : 'remove' , env : convertEnvInfoAndGetReference ( e . old ) } ) ;
161163 reportInterpretersChanged ( [
162164 {
@@ -166,6 +168,7 @@ export function buildProposedApi(
166168 ] ) ;
167169 }
168170 } else if ( e . new ) {
171+ traceVerbose ( 'Python API env change detected' , env . id , 'add' ) ;
169172 onEnvironmentsChanged . fire ( { type : 'add' , env : convertEnvInfoAndGetReference ( e . new ) } ) ;
170173 reportInterpretersChanged ( [
171174 {
Original file line number Diff line number Diff line change 22// Licensed under the MIT License.
33
44import { PythonExecutableInfo , PythonVersion } from '.' ;
5+ import { isCI } from '../../../common/constants' ;
56import {
67 interpreterInfo as getInterpreterInfoCommand ,
78 InterpreterInfoJson ,
@@ -80,13 +81,15 @@ export async function getInterpreterInfo(
8081 '' ,
8182 ) ;
8283
84+ // Sometimes on CI, the python process takes a long time to start up. This is a workaround for that.
85+ const standardTimeout = isCI ? 30000 : 15000 ;
8386 // Try shell execing the command, followed by the arguments. This will make node kill the process if it
8487 // takes too long.
8588 // Sometimes the python path isn't valid, timeout if that's the case.
8689 // See these two bugs:
8790 // https://github.com/microsoft/vscode-python/issues/7569
8891 // https://github.com/microsoft/vscode-python/issues/7760
89- const result = await shellExecute ( quoted , { timeout : timeout ?? 15000 } ) ;
92+ const result = await shellExecute ( quoted , { timeout : timeout ?? standardTimeout } ) ;
9093 if ( result . stderr ) {
9194 traceError (
9295 `Stderr when executing script with >> ${ quoted } << stderr: ${ result . stderr } , still attempting to parse output` ,
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ export class PythonEnvInfoCache extends PythonEnvsWatcher<PythonEnvCollectionCha
126126 . reverse ( ) ; // Reversed so indexes do not change when deleting
127127 invalidIndexes . forEach ( ( index ) => {
128128 const env = this . envs . splice ( index , 1 ) [ 0 ] ;
129+ traceVerbose ( `Removing invalid env from cache ${ env . id } ` ) ;
129130 this . fire ( { old : env , new : undefined } ) ;
130131 } ) ;
131132 if ( envs ) {
You can’t perform that action at this time.
0 commit comments