File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ export function buildProposedApi(
149
149
}
150
150
if ( e . old ) {
151
151
if ( e . new ) {
152
+ traceVerbose ( 'Python API env change detected' , env . id , 'update' ) ;
152
153
onEnvironmentsChanged . fire ( { type : 'update' , env : convertEnvInfoAndGetReference ( e . new ) } ) ;
153
154
reportInterpretersChanged ( [
154
155
{
@@ -157,6 +158,7 @@ export function buildProposedApi(
157
158
} ,
158
159
] ) ;
159
160
} else {
161
+ traceVerbose ( 'Python API env change detected' , env . id , 'remove' ) ;
160
162
onEnvironmentsChanged . fire ( { type : 'remove' , env : convertEnvInfoAndGetReference ( e . old ) } ) ;
161
163
reportInterpretersChanged ( [
162
164
{
@@ -166,6 +168,7 @@ export function buildProposedApi(
166
168
] ) ;
167
169
}
168
170
} else if ( e . new ) {
171
+ traceVerbose ( 'Python API env change detected' , env . id , 'add' ) ;
169
172
onEnvironmentsChanged . fire ( { type : 'add' , env : convertEnvInfoAndGetReference ( e . new ) } ) ;
170
173
reportInterpretersChanged ( [
171
174
{
Original file line number Diff line number Diff line change 2
2
// Licensed under the MIT License.
3
3
4
4
import { PythonExecutableInfo , PythonVersion } from '.' ;
5
+ import { isCI } from '../../../common/constants' ;
5
6
import {
6
7
interpreterInfo as getInterpreterInfoCommand ,
7
8
InterpreterInfoJson ,
@@ -80,13 +81,15 @@ export async function getInterpreterInfo(
80
81
'' ,
81
82
) ;
82
83
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 ;
83
86
// Try shell execing the command, followed by the arguments. This will make node kill the process if it
84
87
// takes too long.
85
88
// Sometimes the python path isn't valid, timeout if that's the case.
86
89
// See these two bugs:
87
90
// https://github.com/microsoft/vscode-python/issues/7569
88
91
// 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 } ) ;
90
93
if ( result . stderr ) {
91
94
traceError (
92
95
`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
126
126
. reverse ( ) ; // Reversed so indexes do not change when deleting
127
127
invalidIndexes . forEach ( ( index ) => {
128
128
const env = this . envs . splice ( index , 1 ) [ 0 ] ;
129
+ traceVerbose ( `Removing invalid env from cache ${ env . id } ` ) ;
129
130
this . fire ( { old : env , new : undefined } ) ;
130
131
} ) ;
131
132
if ( envs ) {
You can’t perform that action at this time.
0 commit comments