Skip to content

Creating Dev Container for development of extension  #21387

Closed

Description

Creating Dev Container support for development of VSCode-Python extension on Codespaces, in which consists of:

  • Creating Dockerfile with multiple supported versions of Python, Node.js installed
  • Creating devcontainer.json that will point to the Docker file and relate to customization of necessary VSCode extension(s) customization
  • Script(s) and prebuilds related materials

Note the base image in the Dockerfile will be the latest version of Fedora Linux instead of mcr.microsoft.com/devcontainers/python:3.7 (Debian) referenced in #20960.

After completion should be able to close: #20942 and #20960


Testing: #21435

Steps:

  1. Open VS Code Python Repo via Codespaces from: https://github.com/microsoft/vscode-python
  2. Check to see .venv appear as one of the directories on the file explorer.
  3. Open a new instance of terminal, make sure it is the terminal with virtual environment activated (.venv)
  4. run "npm run test:functional"
  5. run "npm run test:unittests"
  6. run "npm run test"

Expected output:

  • Virtual environment is activated successfully after creating new instance of terminal as:
Screenshot 2023-06-26 at 4 23 38 PM
  • Typing "python" on virtual environment activated terminal gives access to "Python 3.7.16"

  • Typing "node" on virtual environment activated terminal gives access to "Node.js v16.17.1."

  • Expected output for step 4: One test failing ("pyenvs common utils - finding Python executables
    mixed
    "before all" hook in "mixed":....)

Screenshot 2023-06-26 at 4 19 25 PM
  • Expected output for step 5: Five tests failing (One from Interpreter Path Service and four tests from Activated Env Launch)
Screenshot 2023-06-26 at 4 20 47 PM
  • Expected output for step 6: Failing with ("error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
    Exit code: 127
    End Standard tests (with errors) Failed")
Screenshot 2023-06-26 at 4 22 29 PM

Activity

  1. changed the title [-]Creating Dev Container support for extension support [/-] [+]Creating Dev Container for development of extension [/+] on Jun 8, 2023
  2. added
    needs PRReady to be worked on
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Jun 8, 2023
  3. dbaeumer commented on Jun 28, 2023

    @dbaeumer
    Member

    Actually the expected output looks different for me:

    • first the steps should mention that you need to run npm run compile
    • after step 4 I get:
      Python envs locator - WindowsPathEnvVarLocator
        iterEnvs()
         no executables found
         no executables match
         some executables match
    
    
      120 passing (21s)
      21 pending
    

    Anthony Kim (@anthonykim1) please decide whether this is still OK or not.

  4. anthonykim1 commented on Jun 28, 2023

    @anthonykim1
    Author

    Dirk Bäumer (@dbaeumer)
    Thank you for testing!

    It seems like virtual environment wasn't activated automatically (I'm assuming because of the killed terminal process). I was able to get the same result without the virtual environment and I believe this is issue with test itself since the base image is linux not windows..

    However, manually activating .venv by typing "source /workspaces/vscode-python/.venv/bin/activate" should yield the same result as the pictures.

    I'll look more into the issue. Thank you!

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

Metadata

Metadata

Labels

feature-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