Skip to content

Investigate environment detection in our overall environment UX to see if there are scenarios where discovery is unnecessary #19102

Closed

Description

@karrtikr

Related: #17498 #18647 #18671

Users can use the API or the refresh icon for triggering it if needed:

Check #19102 (comment) for investigation results.

Activity

  1. added this to the May 2022 milestone on May 9, 2022
  2. karrtikr commented on May 13, 2022

    @karrtikr
    Author

    Auto-triggering discovery is probably not needed. Only a couple places need it:

    • When auto-selecting interpreters for a new workspace.
    • Triggering it for every scope exactly once (across sessions).
  3. karrtikr commented on May 13, 2022

    @karrtikr
    Author

    Question: Is triggering it once in the first session even needed, if an interpreter is already selected?

    Perhaps not from a user perspective (#18647), but yes, the discovery API is only considered to be ready for query once refresh has been triggered.

    Reasons for doing it in the first session:

  4. changed the title [-]Investigate environment detection in our overall environment UX to see if there are scenarios where discovery is unnecessary[/-] [+]Only trigger auto environment discovery once in the first session for a particular scope[/+] on May 13, 2022
  5. changed the title [-]Only trigger auto environment discovery once in the first session for a particular scope[/-] [+]Investigate environment detection in our overall environment UX to see if there are scenarios where discovery is unnecessary[/+] on May 13, 2022
  6. karrtikr commented on May 16, 2022

    @karrtikr
    Author

    We also need to make sure legacy jupyter integration APIs still work.

  7. karrtikr commented on May 17, 2022

    @karrtikr
    Author

    Proposed approach, only auto-trigger discovery if:

    • A user attempts to choose a different interpreter
    • When a particular scope (workspace or global) is opened for the first time
    • When jupyter queries legacy discovery APIs for envs (Jupyter currently queries this on startup)
    • Environment cache is empty

    Note we also need to make sure that the selected environment has the latest version, now that discovery isn't run by default.

  8. karrtikr commented on May 18, 2022

    @karrtikr
    Author

    Verification steps:

    If Jupyter is not installed or disabled, verify we auto-trigger discovery only if:

    • A user attempts to choose a different interpreter when quickpick list is opened the first time.
    • When a particular scope (workspace or global) is opened for the first time
    • No Python is installed

    If Jupyter is installed, discovery is always triggered.

  9. karrtikr commented on May 19, 2022

    @karrtikr
    Author

    Certain components (like diagnostics) call for hasInterpreters() API, which requires that discovery is triggered atleast once for it to work. See if we can avoid calling it and make sure information returned by it is reliable enough.

  10. rchiodo commented on Jun 1, 2022

    @rchiodo

    /verified?

    It does trigger discovery just when opening 'Select interpreters'? Is this expected?

    Otherwise behaves as you outlined.

  11. karrtikr commented on Jun 1, 2022

    @karrtikr
    Author

    A user attempts to choose a different interpreter when quickpick list is opened the first time

    Yep, that's what the above point means in #19102 (comment), only happens the first time though.

  12. locked as resolved and limited conversation to collaborators on Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionalityverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions