| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3fd1a810-6840-4ac9-ac33-c8a9fda4bfc4
There was a problem hiding this comment.
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:
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. |
src/managers/builtin/pipPackageManager.ts:82
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.
Sorry, something went wrong.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Keep PR #1717 focused on deterministic headless package manager conformance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edcaaa35-9a42-4351-98fa-55bcf8f1968e
Copilot-Session: 3fd1a810-6840-4ac9-ac33-c8a9fda4bfc4 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
CI diagnosis and fix pushed in df6d1a2. The opt-in live-network suite introduced by #1704 fails identically on #1704, current main, and this PR: Pip version lookup returns undefined, then Conda quick-create hangs until the shared 300s Mocha timeout. Because PR #1717's intended coverage is deterministic headless conformance, the fix removes only the automatic VSC_PYTHON_PACKAGE_NETWORK_TEST invocation from PR/push workflows; it retains the tests behind their explicit opt-in gate, regular integration profile coverage, and the new deterministic unit conformance. Local validation: lint, compile-tests, 1628 unit tests, workflow YAML/Prettier, and targeted Package Manager profile coverage integration test all pass. |
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (2).github/workflows/pr-check.yml:337
if: runner.os == 'Linux'
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d # v1.6
with:
run: npm run integration-test
- name: Run Integration Tests (non-Linux)
if: runner.os != 'Linux'
run: npm run integration-test
.github/workflows/push-check.yml:336
- name: Run Integration Tests (Linux)
if: runner.os == 'Linux'
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d # v1.6
with:
run: npm run integration-test
- name: Run Integration Tests (non-Linux)
if: runner.os != 'Linux'
Sorry, something went wrong.
|
🔒 Automated review in progress — Stella Huang (@StellaHuang95) is auto-reviewing this PR. |
Sorry, something went wrong.
Bypass progress UI for headless Pip, Conda, and Poetry operations while preserving refresh and error propagation. Cover post-operation refresh failures and keep live network lifecycle tests available through a manual workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edcaaa35-9a42-4351-98fa-55bcf8f1968e
There was a problem hiding this comment.
Approved via Review Center.
Sorry, something went wrong.
Enable the guarded package-manager network suites in the existing integration step for every OS and Python version, and remove the separate manual workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edcaaa35-9a42-4351-98fa-55bcf8f1968e
|
The public package-version lookup API now rejects where it previously resolved undefined, creating a breaking consumer contract change. |
Sorry, something went wrong.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: edcaaa35-9a42-4351-98fa-55bcf8f1968e
There was a problem hiding this comment.
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Suppressed comments (2)src/test/integration/environmentFixture.ts:379
void terminateProcessTree(child).catch((error) => {
finish(new Error(`${timeoutError.message}\nFailed to terminate process tree: ${toError(error).message}`));
});
forceTimer = setTimeout(() => finish(timeoutError), 10_000);
src/test/managers/builtin/pipPackageManager.unit.test.ts:133
environmentPath: Uri.file('/path/to/environment'),
Sorry, something went wrong.
There was a problem hiding this comment.
No approval-blocking issues found. The headless package operations suppress progress/error UI while preserving operational failures, and the integration cleanup uses randomized ownership markers plus strict path-containment checks before destructive removal. I also confirmed that both PR and push CI enable the network lifecycle coverage.
Non-blocking follow-up: additional focused cleanup tests for ownership mismatch, out-of-root prefixes, partial setup, and removal timeout would strengthen the fixture coverage.
Written by an AI agent on behalf of Eleanor.
Sorry, something went wrong.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb5f0ccb-cc13-4185-af62-e49f660c239a
| return await runPython( | ||
| environment.execInfo.run.executable, | ||
| ['-m', 'pip', 'list', '--format=json', ...(args ?? [])], | ||
| ['-m', 'pip', 'list', '--format=json', '--disable-pip-version-check', ...(args ?? [])], |
There was a problem hiding this comment.
Fixes #1650
Sorry, something went wrong.
| const checkCondition = async () => { | ||
| try { | ||
| const result = await condition(); | ||
| lastError = undefined; |
There was a problem hiding this comment.
Warning · Non-blocking recommendation
A mixed sequence of rejection followed by false clears lastError, so rejectWithLastError emits a generic timeout instead of the operational failure. Preserve the last rejection across later false results and add a reject-then-false regression test.
[verified]
Sorry, something went wrong.
| if (cleanupErrors.length > 0) { | ||
| throw new Error(cleanupErrors.map((error) => error.message).join('\n')); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Warning · Non-blocking recommendation
This fixture combines provisioning, configuration, ownership enforcement, timeout handling, subprocess termination, and cleanup state, while direct unit coverage exercises only the single-flight helper. Split the bounded-process/termination machinery from the environment lease and add focused tests for ownership rejection, partial setup, removal timeout, and fallback cleanup.
[verified]
Sorry, something went wrong.
|
GitHub cannot anchor PR review comments to unchanged lines in the diff. Falling back to a general PR comment for .github/workflows/pr-check.yml:L350.
Network package operations and Conda provisioning now affect every OS/Python integration job, mirrored in push-check.yml, making unrelated integration coverage dependent on external indexes and channels. Move this coverage to a dedicated package-manager matrix or otherwise bound the added network exposure. [verified] |
Sorry, something went wrong.
|
GitHub cannot anchor PR review comments to unchanged lines in the diff. Falling back to a general PR comment for src/managers/builtin/pipPackageManager.ts:L128.
The headless/progress/error-notification policy is independently duplicated in the Pip, Conda, and Poetry managers. Extract a small shared operation runner so new managers cannot silently drift from the conformance contract. [verified] |
Sorry, something went wrong.
| 5. **✅ Validation** - Ensure coverage and resilience | ||
|
|
||
| ## Learnings | ||
|
|
There was a problem hiding this comment.
Info · Optional note
The learning ends with an unexplained (1) citation marker. Remove it or add the referenced footnote.
[verified]
Sorry, something went wrong.
There was a problem hiding this comment.
Approved via Review Center.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Follow-up to #1704.
Summary
Validation