Skip to content

test: enforce headless package manager conformance - #1717

Open
Eduardo Villalpando Mello (edvilme) wants to merge 2 commits into
mainfrom
package-manager-integration-coverage-feedback
Open

test: enforce headless package manager conformance#1717
Eduardo Villalpando Mello (edvilme) wants to merge 2 commits into
mainfrom
package-manager-integration-coverage-feedback

Conversation

@edvilme

Copy link
Copy Markdown
Contributor

Follow-up to #1704. Adds shared conformance coverage ensuring Pip, Conda, and Poetry do not prompt or show error UI during headless package operations, while failures still reject.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3fd1a810-6840-4ac9-ac33-c8a9fda4bfc4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds unit-level “headless conformance” coverage to ensure package manager operations (Pip/Conda/Poetry) do not prompt for interactive input or display error UI when runHeadless: true, while still rejecting on failures. Also aligns Pip’s UI entry points with the existing VS Code wrapper APIs so they can be controlled/stubbed consistently in tests.

Changes:

  • Added a shared unit test suite that exercises headless package-management behavior across Pip, Conda, and Poetry.
  • Updated PipPackageManager to use withProgress / showErrorMessage from common/window.apis instead of vscode.window directly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/test/managers/common/packageManagerHeadlessConformance.unit.test.ts New conformance unit tests asserting headless runs do not prompt and do not show error UI, while failures still reject.
src/managers/builtin/pipPackageManager.ts Switched from vscode.window to window API wrappers for progress + error UI to support headless/test stubbing.
Suppressed comments (1)

src/managers/builtin/pipPackageManager.ts:82

  • New/updated user-facing strings in this hunk (progress titles like "Installing packages" and the error UI text/button) are not localized. The repo consistently localizes UI strings via l10n.t(...) or centralized string modules (e.g., CondaStrings from src/common/localize.ts). Please localize these strings so they’re translatable.
        await withProgress(
            {
                location: ProgressLocation.Notification,
                title: 'Installing packages',
                cancellable: true,
            },

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants