Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid querying the Python extension for the interpreter #528

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Jul 12, 2024

Summary

Fix the CI failure on main. I think the tests are currently unpredictable in the sense that the tests could begin before the server starts which then creates the failure. The main reason I believe this is happening is because the extension uses a PubSub mechanism here:

if (api) {
disposables.push(
api.environments.onDidChangeActiveEnvironmentPath((e) => {
onDidChangePythonInterpreterEvent.fire({ path: [e.path], resource: e.resource?.uri });
}),
);
traceLog("Waiting for interpreter from python extension.");
onDidChangePythonInterpreterEvent.fire(await getInterpreterDetails());
}

This change is so that it never hits this by always testing with the bundled executable and always using the native server.

Test Plan

I don't really have a good way to test this until it's being triggered multiple times which will verify the consistency now.

@dhruvmanila dhruvmanila changed the title Fix CI Avoid querying the Python extension for the interpreter Jul 12, 2024
@dhruvmanila dhruvmanila marked this pull request as ready for review July 12, 2024 15:17
@dhruvmanila dhruvmanila merged commit e3bcd44 into main Jul 15, 2024
7 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/fix-ci branch July 15, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants