Skip to content

Commit 0f0fbc8

Browse files
authored
package: bump minimum vscode to 1.68 #3369
Since #3328 5439f95 , CI job "Integration Tests - minimum" fails (timeout) of some (not all) "invokes and attaches" tests: 5 failing 1) SAM Integration Tests SAM runtime: python 3.10 (ZIP) Starting with a newly created python 3.10 (ZIP) SAM Application... target=api: invokes and attaches on debug request (F5): Error: Test length exceeded max duration: 300 seconds 2) SAM Integration Tests SAM runtime: python 3.10 (ZIP) Starting with a newly created python 3.10 (ZIP) SAM Application... target=template: invokes and attaches on debug request (F5): Error: Test length exceeded max duration: 300 seconds 3) SAM Integration Tests SAM runtime: go1.x (ZIP) Starting with a newly created go1.x (ZIP) SAM Application... target=template: invokes and attaches on debug request (F5): Error: Test length exceeded max duration: 300 seconds 4) SAM Integration Tests SAM runtime: python 3.10 (ZIP) Starting with a newly created python 3.10 (ZIP) SAM Application... target=template: invokes and attaches on debug request (F5): Error: Test length exceeded max duration: 300 seconds 5) SAM Integration Tests SAM runtime: go1.x (Image) Starting with a newly created go1.x (Image) SAM Application... target=template: invokes and attaches on debug request (F5): Error: Test length exceeded max duration: 300 seconds Solution: - Increase vscode minimum version to 1.68 (current Cloud9). - Skip test in "templateRegistry.test.ts". See 8faa551 #2622
1 parent 9e8e3ef commit 0f0fbc8

File tree

6 files changed

+8
-120
lines changed

6 files changed

+8
-120
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Breaking Change",
3+
"description": "Minimum required VS Code version is now 1.68"
4+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "https://github.com/aws/aws-toolkit-vscode"
1414
},
1515
"engines": {
16-
"vscode": "^1.65.0"
16+
"vscode": "^1.68.0"
1717
},
1818
"icon": "resources/marketplace/aws-icon-256x256.png",
1919
"bugs": {

src/test/codewhisperer/util/crossFileContextUtil.test.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import assert from 'assert'
77
import * as vscode from 'vscode'
88
import * as sinon from 'sinon'
9-
import * as semver from 'semver'
109
import * as crossFile from '../../../codewhisperer/util/supplementalContext/crossFileContextUtil'
1110
import { createMockTextEditor } from '../testUtil'
1211
import { CodeWhispererUserGroupSettings } from '../../../codewhisperer/util/userGroupUtil'
@@ -21,20 +20,11 @@ import {
2120
} from '../../testUtil'
2221
import { areEqual, normalize } from '../../../shared/utilities/pathUtils'
2322
import * as path from 'path'
24-
import { getMinVscodeVersion } from '../../../shared/vscode/env'
2523
import { crossFileContextConfig } from '../../../codewhisperer/models/constants'
2624

2725
const userGroupSettings = CodeWhispererUserGroupSettings.instance
2826
let tempFolder: string
2927

30-
// VSCode tab APIs are available since 1.68.0
31-
function shouldRunTheTest(): boolean {
32-
if (semver.gte(getMinVscodeVersion(), '1.68.0')) {
33-
throw new Error('Minimum VSCode version is greater than 1.68.0, this check should be removed')
34-
}
35-
return !!(semver.valid(vscode.version) && semver.gte(vscode.version, '1.68.0'))
36-
}
37-
3828
describe('crossFileContextUtil', function () {
3929
const fakeCancellationToken: vscode.CancellationToken = {
4030
isCancellationRequested: false,
@@ -64,19 +54,11 @@ describe('crossFileContextUtil', function () {
6454
}
6555

6656
it('control group', async function () {
67-
if (!shouldRunTheTest()) {
68-
this.skip()
69-
}
70-
7157
CodeWhispererUserGroupSettings.instance.userGroup = UserGroup.Control
7258
await assertCorrectCodeChunk()
7359
})
7460

7561
it('treatment group', async function () {
76-
if (!shouldRunTheTest()) {
77-
this.skip()
78-
}
79-
8062
CodeWhispererUserGroupSettings.instance.userGroup = UserGroup.CrossFile
8163
await assertCorrectCodeChunk()
8264
})
@@ -113,10 +95,6 @@ describe('crossFileContextUtil', function () {
11395
})
11496

11597
it('should return opened files, exclude test files and sorted ascendingly by file distance', async function () {
116-
if (!shouldRunTheTest()) {
117-
this.skip()
118-
}
119-
12098
const targetFile = path.join('src', 'service', 'microService', 'CodeWhispererFileContextProvider.java')
12199
const fileWithDistance3 = path.join('src', 'service', 'CodewhispererRecommendationService.java')
122100
const fileWithDistance5 = path.join('src', 'util', 'CodeWhispererConstants.java')
@@ -182,10 +160,6 @@ describe('crossFileContextUtil', function () {
182160

183161
fileExtLists.forEach(fileExt => {
184162
it('should be empty if userGroup is control', async function () {
185-
if (!shouldRunTheTest()) {
186-
this.skip()
187-
}
188-
189163
const editor = await openATextEditorWithText('content-1', `file-1.${fileExt}`, tempFolder)
190164
await openATextEditorWithText('content-2', `file-2.${fileExt}`, tempFolder, { preview: false })
191165
await openATextEditorWithText('content-3', `file-3.${fileExt}`, tempFolder, { preview: false })
@@ -218,10 +192,6 @@ describe('crossFileContextUtil', function () {
218192

219193
fileExtLists.forEach(fileExt => {
220194
it('should be non empty if usergroup is Crossfile', async function () {
221-
if (!shouldRunTheTest()) {
222-
this.skip()
223-
}
224-
225195
const editor = await openATextEditorWithText('content-1', `file-1.${fileExt}`, tempFolder)
226196
await openATextEditorWithText('content-2', `file-2.${fileExt}`, tempFolder, { preview: false })
227197
await openATextEditorWithText('content-3', `file-3.${fileExt}`, tempFolder, { preview: false })
@@ -254,10 +224,6 @@ describe('crossFileContextUtil', function () {
254224

255225
fileExtLists.forEach(fileExt => {
256226
it('should be non empty', async function () {
257-
if (!shouldRunTheTest()) {
258-
this.skip()
259-
}
260-
261227
const editor = await openATextEditorWithText('content-1', `file-1.${fileExt}`, tempFolder)
262228
await openATextEditorWithText('content-2', `file-2.${fileExt}`, tempFolder, { preview: false })
263229
await openATextEditorWithText('content-3', `file-3.${fileExt}`, tempFolder, { preview: false })

src/test/shared/utilities/editorUtilities.test.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,10 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import * as vscode from 'vscode'
76
import assert from 'assert'
87
import * as path from 'path'
9-
import * as semver from 'semver'
108
import { closeAllEditors, assertTabCount, createTestWorkspaceFolder, openATextEditorWithText } from '../../testUtil'
119
import { getOpenFilesInWindow } from '../../../shared/utilities/editorUtilities'
12-
import { getMinVscodeVersion } from '../../../shared/vscode/env'
13-
14-
// VSCode tab APIs are available since 1.68.0
15-
function shouldRunTheTest(): boolean {
16-
if (semver.gte(getMinVscodeVersion(), '1.68.0')) {
17-
throw new Error('Minimum VSCode version is greater than 1.68.0, this check should be removed')
18-
}
19-
return !!(semver.valid(vscode.version) && semver.gte(vscode.version, '1.68.0'))
20-
}
2110

2211
describe('supplementalContextUtil', function () {
2312
let tempFolder: string
@@ -37,10 +26,6 @@ describe('supplementalContextUtil', function () {
3726
})
3827

3928
it('no filter provided as argument, should return all files opened', async function () {
40-
if (!shouldRunTheTest()) {
41-
this.skip()
42-
}
43-
4429
await openATextEditorWithText('content-1', 'file-1.java', tempFolder, { preview: false })
4530
await openATextEditorWithText('content-2', 'file-2.java', tempFolder, { preview: false })
4631
await openATextEditorWithText('content-3', 'file-3.java', tempFolder, { preview: false })
@@ -57,10 +42,6 @@ describe('supplementalContextUtil', function () {
5742
})
5843

5944
it('filter argument provided, should return only files matching the predicate', async function () {
60-
if (!shouldRunTheTest()) {
61-
this.skip()
62-
}
63-
6445
await openATextEditorWithText('content-1', 'file-1.java', tempFolder, { preview: false })
6546
await openATextEditorWithText('content-2', 'file-2.java', tempFolder, { preview: false })
6647
await openATextEditorWithText('content-3', 'file-3.txt', tempFolder, { preview: false })

src/testInteg/cloudformation/templateRegistry.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { CloudFormationTemplateRegistry } from '../../shared/fs/templateRegistry
1010
import { makeSampleSamTemplateYaml, strToYamlFile } from '../../test/shared/cloudformation/cloudformationTestUtils'
1111
import { getTestWorkspaceFolder } from '../integrationTestsUtilities'
1212
import { sleep, waitUntil } from '../../shared/utilities/timeoutUtils'
13-
import { isMinimumVersion } from '../../shared/vscode/env'
1413

1514
/**
1615
* Note: these tests are pretty shallow right now. They do not test the following:
@@ -49,10 +48,7 @@ describe('CloudFormation Template Registry', async function () {
4948
await registryHasTargetNumberOfFiles(registry, 2)
5049
})
5150

52-
it('adds dynamically-added template files with yaml and yml extensions at various nesting levels', async function () {
53-
if (!isMinimumVersion()) {
54-
this.skip()
55-
}
51+
it.skip('adds dynamically-added template files with yaml and yml extensions at various nesting levels', async function () {
5652
await registry.addWatchPattern('**/test.{yaml,yml}')
5753

5854
await strToYamlFile(makeSampleSamTemplateYaml(false), path.join(testDir, 'test.yml'))

src/testInteg/sam.test.ts

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,6 @@ const scenarios: TestScenario[] = [
8282
dependencyManager: 'npm',
8383
vscodeMinimum: '1.50.0',
8484
},
85-
// {
86-
// runtime: 'python3.7',
87-
// displayName: 'python3.7 (ZIP)',
88-
// path: 'hello_world/app.py',
89-
// debugSessionType: 'python',
90-
// language: 'python',
91-
// dependencyManager: 'pip',
92-
// vscodeMinimum: '1.50.0',
93-
// },
94-
// {
95-
// runtime: 'python3.8',
96-
// displayName: 'python3.8 (ZIP)',
97-
// path: 'hello_world/app.py',
98-
// debugSessionType: 'python',
99-
// language: 'python',
100-
// dependencyManager: 'pip',
101-
// vscodeMinimum: '1.50.0',
102-
// },
103-
// TODO: Add Python3.9 support to integration test hosts
104-
// {
105-
// runtime: 'python3.9',
106-
// displayName: 'python3.9 (ZIP)',
107-
// path: 'hello_world/app.py',
108-
// debugSessionType: 'python',
109-
// language: 'python',
110-
// dependencyManager: 'pip',
111-
// },
11285
{
11386
runtime: 'python3.10',
11487
displayName: 'python 3.10 (ZIP)',
@@ -117,7 +90,7 @@ const scenarios: TestScenario[] = [
11790
language: 'python',
11891
dependencyManager: 'pip',
11992
// https://github.com/microsoft/vscode-python/blob/main/package.json
120-
vscodeMinimum: '1.78.0',
93+
vscodeMinimum: '1.77.0',
12194
},
12295
{
12396
runtime: 'python3.11',
@@ -166,7 +139,6 @@ const scenarios: TestScenario[] = [
166139
// // https://github.com/golang/vscode-go/blob/master/package.json
167140
// vscodeMinimum: '1.67.0',
168141
// },
169-
// { runtime: 'dotnetcore3.1', path: 'src/HelloWorld/Function.cs', debugSessionType: 'coreclr', language: 'csharp' },
170142

171143
// images
172144
{
@@ -199,36 +171,6 @@ const scenarios: TestScenario[] = [
199171
dependencyManager: 'npm',
200172
vscodeMinimum: '1.50.0',
201173
},
202-
// {
203-
// runtime: 'python3.7',
204-
// displayName: 'python3.7 (Image)',
205-
// baseImage: `amazon/python3.7-base`,
206-
// path: 'hello_world/app.py',
207-
// debugSessionType: 'python',
208-
// language: 'python',
209-
// dependencyManager: 'pip',
210-
// vscodeMinimum: '1.50.0',
211-
// },
212-
// {
213-
// runtime: 'python3.8',
214-
// displayName: 'python3.8 (Image)',
215-
// baseImage: `amazon/python3.8-base`,
216-
// path: 'hello_world/app.py',
217-
// debugSessionType: 'python',
218-
// language: 'python',
219-
// dependencyManager: 'pip',
220-
// vscodeMinimum: '1.50.0',
221-
// },
222-
// TODO: Add Python3.9 support to integration test hosts
223-
// {
224-
// runtime: 'python3.9',
225-
// displayName: 'python3.9 (Image)',
226-
// baseImage: `amazon/python3.9-base`,
227-
// path: 'hello_world/app.py',
228-
// debugSessionType: 'python',
229-
// language: 'python',
230-
// dependencyManager: 'pip',
231-
// },
232174
{
233175
runtime: 'python3.10',
234176
displayName: 'python 3.10 (ZIP)',
@@ -238,7 +180,7 @@ const scenarios: TestScenario[] = [
238180
language: 'python',
239181
dependencyManager: 'pip',
240182
// https://github.com/microsoft/vscode-python/blob/main/package.json
241-
vscodeMinimum: '1.78.0',
183+
vscodeMinimum: '1.77.0',
242184
},
243185
{
244186
runtime: 'python3.11',
@@ -292,7 +234,6 @@ const scenarios: TestScenario[] = [
292234
dependencyManager: 'maven',
293235
vscodeMinimum: '1.50.0',
294236
},
295-
// { runtime: 'dotnetcore3.1', path: 'src/HelloWorld/Function.cs', debugSessionType: 'coreclr', language: 'csharp' },
296237
]
297238

298239
async function openSamAppFile(applicationPath: string): Promise<vscode.Uri> {

0 commit comments

Comments
 (0)