Repository navigation
Fix global routing after clearing explicit selections - #1979
Eduardo Villalpando Mello (edvilme) merged 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change restoring configured/default manager routing when an explicit global selection is cleared.
No open issues 🎉
What changed in this PR
Fixes global environment routing so clearing an explicit selection restores the configured/default manager instead of retaining the cached manager.
Changes:
- Limits cached global-manager routing to active explicit global selections.
- Marks the cross-manager test selection as explicit to preserve its intended scenario.
| File | Description |
|---|---|
src/test/features/envManagers.unit.test.ts |
Makes the cross-manager test fixture explicitly select its environment. |
src/features/envManagers.ts |
Requires an explicit global selection before routing to the cached manager. |
Review effort: Balanced
|
🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR. |
|
Result: ✅ Verification detailsVerification: Automated verification is best effort. The PR author remains responsible for testing. Summary: All 29 environment-manager unit tests passed in the Linux container, including fallback reads after clearing explicit selections, change-event publication, and explicit cross-manager routing. Test compilation, lint, and the extension build also passed. Missing dependencies were restored successfully with `npm ci --offline`. The PR adds no new tests; it updates one existing fixture. Verification was targeted and did not include the full suite or Electron smoke tests. Test runs: 6 passed
|
Rich Chiodo (rchiodo)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
a4de778
into
microsoft:main
## Summary - map `python-envs.inlineScripts.enabled` to the dedicated `/pythonenvs/config.python-envs.inlineScripts.enabled` treatment - preserve the default-off setting and explicit user/workspace override behavior - run smoke tests in separate explicit-off and explicit-on VS Code hosts ## Validation - `npm run lint` - `npm run compile-tests` - `npm run compile` - `npm run smoke-test -- --fail-zero` — 31 passing in the default-off host and 1 passing in the explicit-on host - full Node 22 unit suite — 3,496 passing, 9 pending The commit is SSH-signed and rebased onto the current `main`, including the global-selection routing fix from #1979. Relates to #1602 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
A global environment selection is cached together with the manager that owns it. When an explicit system interpreter was later cleared, the stale cache still sent reads back to the system manager instead of the configured venv manager, so the old
system-312value remained visible and no change event announced the correctsystem-314fallback.This change lets cached global-manager routing override the configured/default manager only while an intentional explicit global selection is active. It also marks the existing cross-manager test fixture as explicit, preserving that scenario while leaving the two failing regression tests unchanged.
Validation
npm run lintnpm run compile-testsnpm run unittest(3,496 passing, 9 pending)npm run compilenpm run smoke-test -- --install-extensions ms-python.python(31 passing, 1 pending)