Skip to content

Commit 6059669

Browse files
edvilmedependabot[bot]eleanorjboydCopilotkarthiknadig
authored
Release 1.40: rebase release history onto main (#1933)
## Summary Bring every change from `main` through `9f1e63d152ead34491a4e3ddffd934a0fece839e` into `release/1.40`, while retaining the stable extension version `1.40.0`. ## History - Rebase the existing `release/1.40` history onto `main`; do not squash or selectively cherry-pick the main commits. - Preserve all 29 main-only commits with their original commit IDs. - Replay the two release-only version commits with their original authors and messages: - `11b8e83a` -> `61aeb25b`: bump extension version to `1.39.1`. - `e7d90fa0` -> `e6a89ad2`: bump extension version to `1.40.0`. - Resolve only the version conflicts in `package.json` and `package-lock.json`. - The final tree is identical to the selected main commit except for the three extension-version fields, which are `1.40.0`. Use a merge commit when merging this PR to preserve the existing main commit IDs. Squash merging or GitHub's rebase-and-merge would not preserve that ancestry. The existing release branch has not been force-pushed. ## Validation - `npm run lint` - `npm run compile-tests` - `npm run unittest -- --reporter dot`: 2,885 passing, 9 pending. - `npm run package` - `git diff --check` - Verified main is an ancestor of this branch, and `git range-diff` retains both release-only commits. - Verified the rebased tree matches the validated main-based `1.40.0` tree. ## Release coordination - This PR includes all main changes, including new features and API changes, rather than only the previously proposed fixes. - `main` remains at `1.41.0`; no follow-up development-version bump is currently necessary. - No release pipeline has been manually triggered and no publication has been authorized. - Before merging, confirm the active stable pipeline: the DevDiv stable definition triggers on `release/*` pushes and defaults publishing to enabled behind a manual validation gate. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eleanor Boyd <26030610+eleanorjboyd@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com> Co-authored-by: Stella Huang <100439259+StellaHuang95@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Bill Schnurr <bschnurr@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Copilot-Session: ce6aeb0a-6210-4716-8a84-2f3e7555625f
1 parent e7d90fa commit 6059669

122 files changed

Lines changed: 11019 additions & 1165 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Run Linux extension tests'
2+
description: 'Run tests under Xvfb and retain startup diagnostics on failure'
3+
4+
inputs:
5+
script:
6+
description: 'npm test script to run'
7+
required: true
8+
artifact-name:
9+
description: 'Unique diagnostic artifact name for this job'
10+
required: true
11+
12+
runs:
13+
using: 'composite'
14+
steps:
15+
- name: Install Xvfb
16+
shell: bash
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y xvfb x11-xserver-utils
20+
21+
- name: Run tests with diagnostics
22+
id: tests
23+
shell: bash
24+
env:
25+
TEST_SCRIPT: ${{ inputs.script }}
26+
VSCODE_TEST_DIAGNOSTICS_DIR: ${{ runner.temp }}/vscode-test-diagnostics
27+
run: |
28+
mkdir -p "$VSCODE_TEST_DIAGNOSTICS_DIR"
29+
xvfb-run --auto-servernum --error-file="$VSCODE_TEST_DIAGNOSTICS_DIR/xvfb.log" \
30+
npm run "$TEST_SCRIPT" 2>&1 | tee "$VSCODE_TEST_DIAGNOSTICS_DIR/launcher.log"
31+
32+
- name: Upload failure diagnostics
33+
if: ${{ failure() && steps.tests.outcome == 'failure' }}
34+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
35+
with:
36+
name: ${{ inputs.artifact-name }}
37+
path: ${{ runner.temp }}/vscode-test-diagnostics
38+
if-no-files-found: error
39+
retention-days: 7

‎.github/dependabot.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ updates:
88
schedule:
99
interval: "weekly"
1010
cooldown:
11-
default-days: 7
11+
# Delay updates beyond the highest-risk window after a release.
12+
default-days: 14

‎.github/instructions/testing-workflow.instructions.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ This guide covers the full testing lifecycle:
2020

2121
- Pip commands that return JSON must pass `--disable-pip-version-check`; the process helper combines stderr with stdout, so update notices can otherwise make valid JSON unparseable (1).
2222
- When a view subscribes to a newly added provider event, TypeMoq-based view tests must return a real `EventEmitter.event`; an unstubbed event yields an undefined disposable and fails during teardown (1).
23+
- Test agent selections across a full reload with `python.defaultInterpreterPath` set. An effective manager value equal to the extension default does not prove a workspace value was saved; tool-owned persistence must inspect `workspaceValue` or startup can restore the global interpreter (1).
24+
- `vscode.executeCodeLensProvider` verifies provider output, not visible editor refresh. VS Code cancels its debounced CodeLens refresh when the editor loses focus; account for background UI automation restoring focus to another app before diagnosing a stale rendered lens (1).
2325

2426
### When to Use This Guide
2527

@@ -614,3 +616,4 @@ envConfig.inspect
614616
- **pet binary is required for environment manager registration**: The smoke/E2E/integration tests require the `pet` binary from `microsoft/python-environment-tools` to be built and placed in `python-env-tools/bin/`. Without it, `waitForApiReady()` will timeout because managers never register. CI must build pet from source using `cargo build --release --package pet` (2)
615617
- **Check exact project registration with `getPythonProjects()`**: `getPythonProject(uri)` can return a containing parent project, so it cannot prove that a nested project was registered or unregistered (1)
616618
- **Use controlled fixture providers for package lifecycle integration tests**: Discovering an existing Conda environment does not guarantee API quick-create can succeed. Use `createEnvironmentFixture()` so creation prerequisites and cleanup are deterministic (1)
619+
- **Retry Windows integration-test cleanup at the filesystem operation, not the suite**: After closing VS Code editors, use bounded `fs.rm(..., { recursive: true, force: true, maxRetries, retryDelay })` for temporary workspaces because Windows can briefly return `EBUSY`; keep final failures visible instead of adding sleeps or Mocha retries (1)

‎.github/workflows/pr-check.yml‎

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
fail-fast: false
8383
matrix:
8484
os: [ubuntu-latest, windows-latest, macos-latest]
85-
python-version: ['3.9', '3.12', '3.14']
85+
python-version: ['3.10', '3.12', '3.14', '3.15']
8686

8787
steps:
8888
- name: Checkout
@@ -141,6 +141,7 @@ jobs:
141141
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
142142
with:
143143
python-version: ${{ matrix.python-version }}
144+
allow-prereleases: true
144145

145146
- name: Install Dependencies
146147
run: npm ci
@@ -153,9 +154,10 @@ jobs:
153154

154155
- name: Run Smoke Tests (Linux)
155156
if: runner.os == 'Linux'
156-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
157+
uses: ./.github/actions/run-linux-tests
157158
with:
158-
run: npm run smoke-test
159+
script: smoke-test
160+
artifact-name: smoke-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
159161

160162
- name: Run Smoke Tests (non-Linux)
161163
if: runner.os != 'Linux'
@@ -169,7 +171,7 @@ jobs:
169171
fail-fast: false
170172
matrix:
171173
os: [ubuntu-latest, windows-latest, macos-latest]
172-
python-version: ['3.10', '3.12', '3.14']
174+
python-version: ['3.10', '3.12', '3.14', '3.15']
173175

174176
steps:
175177
- name: Checkout
@@ -228,6 +230,7 @@ jobs:
228230
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
229231
with:
230232
python-version: ${{ matrix.python-version }}
233+
allow-prereleases: true
231234

232235
- name: Install Dependencies
233236
run: npm ci
@@ -240,9 +243,10 @@ jobs:
240243

241244
- name: Run E2E Tests (Linux)
242245
if: runner.os == 'Linux'
243-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
246+
uses: ./.github/actions/run-linux-tests
244247
with:
245-
run: npm run e2e-test
248+
script: e2e-test
249+
artifact-name: e2e-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
246250

247251
- name: Run E2E Tests (non-Linux)
248252
if: runner.os != 'Linux'
@@ -259,7 +263,7 @@ jobs:
259263
fail-fast: false
260264
matrix:
261265
os: [ubuntu-latest, windows-latest, macos-latest]
262-
python-version: ['3.10', '3.12', '3.14']
266+
python-version: ['3.10', '3.12', '3.14', '3.15']
263267

264268
steps:
265269
- name: Checkout
@@ -318,6 +322,7 @@ jobs:
318322
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
319323
with:
320324
python-version: ${{ matrix.python-version }}
325+
allow-prereleases: true
321326

322327
- name: Install Dependencies
323328
run: npm ci
@@ -336,9 +341,10 @@ jobs:
336341

337342
- name: Run Integration Tests (Linux)
338343
if: runner.os == 'Linux'
339-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
344+
uses: ./.github/actions/run-linux-tests
340345
with:
341-
run: npm run integration-test
346+
script: integration-test
347+
artifact-name: integration-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
342348

343349
- name: Run Integration Tests (non-Linux)
344350
if: runner.os != 'Linux'
@@ -352,7 +358,7 @@ jobs:
352358
fail-fast: false
353359
matrix:
354360
os: [ubuntu-latest, windows-latest, macos-latest]
355-
python-version: ['3.10', '3.12', '3.14']
361+
python-version: ['3.10', '3.12', '3.14', '3.15']
356362

357363
steps:
358364
- name: Checkout
@@ -368,6 +374,7 @@ jobs:
368374
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
369375
with:
370376
python-version: ${{ matrix.python-version }}
377+
allow-prereleases: true
371378

372379
- name: Install Dependencies
373380
run: npm ci
@@ -380,9 +387,10 @@ jobs:
380387

381388
- name: Run Integration Tests Multi-Root (Linux)
382389
if: runner.os == 'Linux'
383-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
390+
uses: ./.github/actions/run-linux-tests
384391
with:
385-
run: npm run integration-test-multiroot
392+
script: integration-test-multiroot
393+
artifact-name: integration-multiroot-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
386394

387395
- name: Run Integration Tests Multi-Root (non-Linux)
388396
if: runner.os != 'Linux'

‎.github/workflows/push-check.yml‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
fail-fast: false
8484
matrix:
8585
os: [ubuntu-latest, windows-latest, macos-latest]
86-
python-version: ['3.10', '3.12', '3.14']
86+
python-version: ['3.10', '3.12', '3.14', '3.15']
8787

8888
steps:
8989
- name: Checkout
@@ -142,6 +142,7 @@ jobs:
142142
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
143143
with:
144144
python-version: ${{ matrix.python-version }}
145+
allow-prereleases: true
145146

146147
- name: Install Dependencies
147148
run: npm ci
@@ -154,9 +155,10 @@ jobs:
154155

155156
- name: Run Smoke Tests (Linux)
156157
if: runner.os == 'Linux'
157-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
158+
uses: ./.github/actions/run-linux-tests
158159
with:
159-
run: npm run smoke-test
160+
script: smoke-test
161+
artifact-name: smoke-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
160162

161163
- name: Run Smoke Tests (non-Linux)
162164
if: runner.os != 'Linux'
@@ -170,7 +172,7 @@ jobs:
170172
fail-fast: false
171173
matrix:
172174
os: [ubuntu-latest, windows-latest, macos-latest]
173-
python-version: ['3.10', '3.12', '3.14']
175+
python-version: ['3.10', '3.12', '3.14', '3.15']
174176

175177
steps:
176178
- name: Checkout
@@ -229,6 +231,7 @@ jobs:
229231
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
230232
with:
231233
python-version: ${{ matrix.python-version }}
234+
allow-prereleases: true
232235

233236
- name: Install Dependencies
234237
run: npm ci
@@ -241,9 +244,10 @@ jobs:
241244

242245
- name: Run E2E Tests (Linux)
243246
if: runner.os == 'Linux'
244-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
247+
uses: ./.github/actions/run-linux-tests
245248
with:
246-
run: npm run e2e-test
249+
script: e2e-test
250+
artifact-name: e2e-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
247251

248252
- name: Run E2E Tests (non-Linux)
249253
if: runner.os != 'Linux'
@@ -260,7 +264,7 @@ jobs:
260264
fail-fast: false
261265
matrix:
262266
os: [ubuntu-latest, windows-latest, macos-latest]
263-
python-version: ['3.10', '3.12', '3.14']
267+
python-version: ['3.10', '3.12', '3.14', '3.15']
264268

265269
steps:
266270
- name: Checkout
@@ -319,6 +323,7 @@ jobs:
319323
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
320324
with:
321325
python-version: ${{ matrix.python-version }}
326+
allow-prereleases: true
322327

323328
- name: Install Dependencies
324329
run: npm ci
@@ -337,9 +342,10 @@ jobs:
337342

338343
- name: Run Integration Tests (Linux)
339344
if: runner.os == 'Linux'
340-
uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7
345+
uses: ./.github/actions/run-linux-tests
341346
with:
342-
run: npm run integration-test
347+
script: integration-test
348+
artifact-name: integration-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_attempt }}
343349

344350
- name: Run Integration Tests (non-Linux)
345351
if: runner.os != 'Linux'

‎.vscode-test.mjs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ import * as path from 'path';
77
// VS Code creates `<userDataDir>/<x.y>-main.sock`. An in-workspace location
88
// (e.g. /Users/runner/work/<repo>/<repo>/.vscode-test/user-data) overflows.
99
const userDataDir = path.join(os.tmpdir(), 'vsct-ud');
10+
const diagnosticsDir = process.env.VSCODE_TEST_DIAGNOSTICS_DIR;
11+
const diagnosticArgs = diagnosticsDir
12+
? [`--logsPath=${path.join(diagnosticsDir, 'vscode')}`, '--verbose']
13+
: [];
14+
const diagnosticMocha = diagnosticsDir
15+
? { require: [path.resolve('out', 'test', 'diagnostics.js')] }
16+
: {};
1017

1118
// Seed user settings.json so the extension actually activates: without
1219
// `python.useEnvironmentsExtension=true` it short-circuits during activation
@@ -23,13 +30,15 @@ export default defineConfig([
2330
label: 'smokeTests',
2431
files: 'out/test/smoke/**/*.smoke.test.js',
2532
mocha: {
33+
...diagnosticMocha,
2634
ui: 'tdd',
2735
timeout: 120000,
2836
},
2937
env: {
3038
VSC_PYTHON_SMOKE_TEST: '1',
3139
},
3240
launchArgs: [
41+
...diagnosticArgs,
3342
`--user-data-dir=${userDataDir}`,
3443
// Don't open any folder with Python files to prevent premature activation
3544
'--disable-workspace-trust',
@@ -43,13 +52,15 @@ export default defineConfig([
4352
label: 'e2eTests',
4453
files: 'out/test/e2e/**/*.e2e.test.js',
4554
mocha: {
55+
...diagnosticMocha,
4656
ui: 'tdd',
4757
timeout: 180000,
4858
},
4959
env: {
5060
VSC_PYTHON_E2E_TEST: '1',
5161
},
5262
launchArgs: [
63+
...diagnosticArgs,
5364
`--user-data-dir=${userDataDir}`,
5465
'--disable-workspace-trust',
5566
],
@@ -62,13 +73,15 @@ export default defineConfig([
6273
files: 'out/test/integration/*.integration.test.js',
6374
workspaceFolder: 'src/test/integration/test-workspace/project-a',
6475
mocha: {
76+
...diagnosticMocha,
6577
ui: 'tdd',
6678
timeout: 60000,
6779
},
6880
env: {
6981
VSC_PYTHON_INTEGRATION_TEST: '1',
7082
},
7183
launchArgs: [
84+
...diagnosticArgs,
7285
`--user-data-dir=${userDataDir}`,
7386
'--disable-workspace-trust',
7487
],
@@ -81,6 +94,7 @@ export default defineConfig([
8194
files: 'out/test/integration/multiroot/*.integration.test.js',
8295
workspaceFolder: 'src/test/integration/test-workspace/integration-tests.code-workspace',
8396
mocha: {
97+
...diagnosticMocha,
8498
ui: 'tdd',
8599
timeout: 60000,
86100
retries: 1,
@@ -89,6 +103,7 @@ export default defineConfig([
89103
VSC_PYTHON_INTEGRATION_TEST: '1',
90104
},
91105
launchArgs: [
106+
...diagnosticArgs,
92107
`--user-data-dir=${userDataDir}`,
93108
'--disable-workspace-trust',
94109
],

0 commit comments

Comments
 (0)