-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refreshEnvironment does not return the latest details of the conda environment #20634
Comments
Added to the iteration plan. |
As part of this API call please can we ensure the Conda environment is updated Today I have a PR that installs Python into the conda environment from within the Jupyter extension (via custom code), however refreshing the Conda env takes more than 1 minute, hence that approach is not the best i.e. i will need the Python Extension api to
|
We can trigger an update immediately after the install, but I don't know if it will necessarily lead to a faster outcome since conda chooses what Python version to install. |
sorry, what I meant was the update of the environment information (environment info in api) would be faster if python extension updated the information for that specific conda env immediately |
Ah, so you're asking to just make sure that a changed event fires with the updated information once conda can provide that info to us instead of you having to to a manual trigger? |
Yes thats correct, thanks |
We were talking about this API in stand-up today, and we were wondering if you are calling If conda doesn't trigger an installation of Python then we should file a bug on conda to fix this. And if you're not running any installation command then this idea doesn't work. 😅 |
Will try that out and let you know |
@brettcannon Yes that works, there is no need of an API to install Python into a conda env from the Python extension. Right now running the refresh api and waiting for the env change event to get fired takes around 60s, and that is way too slow. Thats after installing python into conda. I can hack this as I know Python is installed, but that's just going around the issue and implementing a I'm referring to the following /**
* Returns details for the given environment, or `undefined` if the env is invalid.
* @param environment : Full path to environment folder or python executable for the environment. Can also pass
* the environment itself.
*/
resolveEnvironment(
environment: Environment | EnvironmentPath | string
): Promise<ResolvedEnvironment | undefined>; |
Great!
Seems reasonable. I have updated the title of the issue to reflect what I think your ask is. |
@DonJayamanne Right now the refresh API does not take additional parameters (like refresh only conda envs) to keep it simple. |
Ah, that was when IDs of conda envs after install were different, nevermind. |
No
We have a similar issue where the Also as mentioned here, a work around doesn't provide the best UX (it is slow) #20634 (comment) I think we should either close this issue and create a new one to indicate the fact that |
Yes, I indicated in the follow up comment I guess you missed that. #20634 (comment) |
@karrtikr should we just create a new issue? Or just hide the other comments and just leave the first issue comment and the last two comments open. |
Did either of these things happen? |
Since @karrtikr didn't reply, I assumed this was fine as is |
Thanks for the reminder, created #20765. |
Based on discussions with @brettcannon
Such an API will be provided that allows Jupyter ext to install Python into an empty conda envHere's what is happening
The text was updated successfully, but these errors were encountered: