Repository navigation
API: create environment with name - #1802
Eduardo Villalpando Mello (edvilme) wants to merge 7 commits into
Conversation
|
🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR. |
Rich Chiodo (rchiodo)
left a comment
There was a problem hiding this comment.
I feel like the name needs to be validated to contain allowed path characters.
For example, I don't think a name of ..\..\ would work very well.
Bill Schnurr (bschnurr)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Stella Huang (StellaHuang95)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
ff18cf2
Eleanor Boyd (eleanorjboyd)
left a comment
There was a problem hiding this comment.
The updated API contract says managers should honor a supplied name, but:
- SysPythonManager.create ignores the options entirely.
- InlineScriptEnvManager.create ignores name and creates or reuses a hash-keyed environment.
Related: #1874 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a9796987-f9b0-451b-a3cd-35d8a950eac8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a9796987-f9b0-451b-a3cd-35d8a950eac8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Advertise environment.create.named for venv and Conda, keep legacy and unsupported managers disabled, and route named creation through scoped capability checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9606a9cf-3e6e-458f-a6e1-6707e4a490c7
98e495e to
f806dac
Compare
|
Result: 🔴 Verification detailsVerification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Program Files\RedHat\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "25d07e8f898c965774be5a374212633b1f6a2609c260045964f766639baf9e84": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found Test runs: none recorded. |
|
Result: 🔴 Verification detailsVerification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Program Files\RedHat\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "159da47d6add933adf8d5e5bc891cb4b508521e7430967391985a68f68409d7c": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found Test runs: none recorded. |
|
Result: 🔴 Verification detailsVerification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Program Files\RedHat\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "ef0bbded6bb6a246df154f9bad8e31e89965c6d55014b2efbd5605c44abe3ab0": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found Test runs: none recorded. |
|
Result: 🔴 Verification detailsVerification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Program Files\RedHat\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "9187bddee405d0a5b09b606fd33cc951f1bf27c9af6c0da4aa080aaba4baf064": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found Test runs: none recorded. |
|
Result: 🔴 Verification detailsVerification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Program Files\RedHat\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "e14a21018484b179cbea3d5b2859a4ed72bc5d72194946fd69103655248618f5": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found Test runs: none recorded. |
This pull request introduces a new optional
namefield to theCreateEnvironmentOptionsfor the@vscode/python-environmentsAPI, allowing API consumers to specify a desired environment name when creating Python environments. The implementation ensures that provided names are validated and integrated into both venv and conda environment creation flows. Documentation and versioning are updated accordingly.API and Documentation Updates:
Added an optional
nameproperty toCreateEnvironmentOptions, enabling consumers to request a specific environment name during creation. The documentation (docs/README.md) and changelog (api/CHANGELOG.md) are updated to reflect this new feature. [1] [2] [3] [4]Bumped package version to
1.5.0inpackage.jsonandpackage-lock.json. [1] [2]Validation and Core Logic:
namefield to ensure it is a non-empty path segment and does not contain invalid characters (e.g.,.,..,/,This pull request introduces a new optionalnamefield to theCreateEnvironmentOptionsfor the@vscode/python-environments` API, allowing API consumers to specify a desired environment name when creating Python environments. The implementation ensures that provided names are validated and integrated into both venv and conda environment creation flows. Documentation and versioning are updated accordingly.API and Documentation Updates:
Added an optional
nameproperty toCreateEnvironmentOptions, enabling consumers to request a specific environment name during creation. The documentation (docs/README.md) and changelog (api/CHANGELOG.md) are updated to reflect this new feature. [1] [2] [3] [4]Bumped package version to
1.5.0inpackage.jsonandpackage-lock.json. [1] [2]Validation and Core Logic:
, or null bytes).
Venv Environment Creation:
name, including validation for existing directories and proper handling in both quick and step-based flows. The state management is enhanced to track if the name was supplied by the user. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Conda Environment Creation:
nameparameter, ensuring correct flow control, state management, and back-navigation logic. The implementation also ensures that the environment is created with the requested name if provided. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]