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

Ensure public environments API is reliable and stable #20240

Open
7 of 19 tasks
karrtikr opened this issue Nov 17, 2022 · 1 comment
Open
7 of 19 tasks

Ensure public environments API is reliable and stable #20240

karrtikr opened this issue Nov 17, 2022 · 1 comment
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. meta Issue that is tracking an overall project needs spike Label for issues that need investigation before they can be worked on.

Comments

@karrtikr
Copy link

karrtikr commented Nov 17, 2022

Postmortem on Python API related bugs and causes

Each bug is listed into categories and marked if it could've been prevented with the stated precaution:

Bugs and potential precautionary measures

  • resolveEnvironment returns undefined (only reproducible on Jupyter CI) #20147
    • Using public API internally
    • Adding unit tests for API surface
    • Adding VSCode system tests
  • Slow environments.known #20221
    • Using public API internally
    • Adding unit tests for API surface
    • Adding VSCode system tests
  • Newly created prefix conda environments are identified as named #20069
    • Using public API internally
    • Adding unit tests for API surface
    • Adding VSCode system tests
  • resolved Environments have an invalid type for workspaceFolder, cannot be stored in memento #20104
    • Using public API internally
    • Adding unit tests for API surface
    • Adding more internal tests
  • resolved version for environments without python is incorrect, should be undefined instead #20110
    • Using public API internally
    • Adding unit tests for API surface
  • resolved name changes from undefined to empty string while discovering #20070
    • Using public API internally
    • Adding unit tests for API surface
  • resolveEnvironment returns partial environment info from cache the first time (only the first session) #20147
    • Using public API internally
    • Adding unit tests for API surface
    • Adding more internal tests

Expected behavior (required clarification or bug at Jupyter):

Non reproducible:

  • Jupyter claims sysprefix changes, not reproducible #20070
@karrtikr karrtikr added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. meta Issue that is tracking an overall project needs spike Label for issues that need investigation before they can be worked on. labels Nov 17, 2022
@karrtikr karrtikr self-assigned this Nov 17, 2022
@karrtikr karrtikr added the area-environments Features relating to handling interpreter environments label Nov 17, 2022
@karrtikr
Copy link
Author

karrtikr commented Nov 17, 2022

Discussed with team and here're the next steps:

  • Use public API surface internally starting in the following order:
    • Interpreter quickpick UI
    • Components external to the interpreter component
    • Components external to the discovery component
  • Move all logic from environmentApi.ts into the discovery component
    • Consolidate all Environment types into the external API type: Environment, so there's no need for conversion between types which is significant perf wise: Make environments.known API faster #23010
    • ...and more
  • Fix testing holes where missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. meta Issue that is tracking an overall project needs spike Label for issues that need investigation before they can be worked on.
Projects
None yet
Development

No branches or pull requests

1 participant