Skip to content

Is "create environment" the right action on a missing dependency #21334

Open

Description

Testing #21289

It seems strange that adding a new dependency to the requirements.txt makes the "Create Environment" button if I already have an environment. If a new dependency comes in, I assume the most common action would to "Update [the] Environment" to include the new package. Maybe that opens a confirmation quickpick where they have an option to create a new environment instead.

Activity

  1. added
    triage-needed
    on May 30, 2023
  2. cwebster-99 commented on May 30, 2023

    @cwebster-99
    Member

    I had a similar thought process as I have been digging into our package management story. Providing an option to sync the dependency file with the selected environment is a typical user scenario and one that would improve our story here. We could provide an option to sync/update the environment and then Create Environment as a secondary option or based on specific scenario filtering.

  3. karthiknadig commented on Jun 2, 2023

    @karthiknadig
    Member

    There are a few things to consider here. We should not be updating a global environment, that can pretty much break everything on a user's system.

    1. We could show an Update environment button only if we can certainly identify the selected environment is a virtual environment that belongs to the current workspace.
    2. If the user has selected an environment that is not part of the workspace, but there is one such environment is the workspace then we should show a button that selects the right environment.
    3. If the user has selected an environment that is not part of the workspace, and there is no python that is part of the workspace then we should show create environment.
  4. added
    info-needed
    on Jun 2, 2023
  5. laurikoobas commented on Jun 9, 2023

    @laurikoobas

    The "Update environment" would also be useful when, for example, pyproject.toml has an error. I formatted project dependencies as object, not list.. and got an error. But there doesn't really seem to be a way to cleanly re-run the "create environment" command.
    I can re-run it, but it just considers that it's already completed. It doesn't re-run the failed dependencies installation, for example.

  6. github-actions commented on Jul 9, 2023

    @github-actions

    Hey Karthik Nadig (@karthiknadig) Courtney Webster (@cwebster-99), this issue might need further attention.

    Connor Peet (@connor4312), you can help us out by closing this issue if the problem no longer exists, or adding more information.

  7. added
    bug
    needs proposal
    and removed
    info-needed
    triage-needed
    on Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds proposal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions