Skip to content

Commit 6f26948

Browse files
test: use latest version of python extension in CI (#4437)
* test: use latest version of python extension in CI In PR #4170 we locked the python extension to a specific version since a newer version of the extension broke CI. The fix should be available now, so we are removing the code that locked us to a specific version and will now use whatever the latest version is. Signed-off-by: nkomonen <[email protected]> * test: disable gumby test The line this commit comments out was breaking e2e tests. It shouldn't have been running in the first place due to skipTestIfNoValidConn() but it still runs since it is in the before() statement. Solution, comment it out for now and enable once the tests should start working Signed-off-by: nkomonen <[email protected]> --------- Signed-off-by: nkomonen <[email protected]>
1 parent 9b89bcb commit 6f26948

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

packages/toolkit/scripts/test/launchTestUtilities.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,6 @@ async function invokeVSCodeCli(vsCodeExecutablePath: string, args: string[]): Pr
168168
}
169169

170170
async function installVSCodeExtension(vsCodeExecutablePath: string, extensionIdentifier: string): Promise<void> {
171-
// HACK: `sam.test.ts` Codelens test was failing for python due to bug in newer version, so lock to last working version.
172-
// Edge Case: This specific python version does not work with the "minimum" vscode version, so we do not override it as it
173-
// will choose its own python extension version that works.
174-
if (extensionIdentifier === VSCODE_EXTENSION_ID.python && process.env[envvarVscodeTestVersion] !== minimum) {
175-
extensionIdentifier = `${VSCODE_EXTENSION_ID.python}@2023.20.0`
176-
}
177-
178171
console.log(`Installing VS Code Extension: ${extensionIdentifier}`)
179172
console.log(await invokeVSCodeCli(vsCodeExecutablePath, ['--install-extension', extensionIdentifier]))
180173
}

packages/toolkit/src/test/techdebt.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,4 @@ describe('tech debt', function () {
4242
'with node16+, we can use crypto.randomUUID and remove the "uuid" dependency'
4343
)
4444
})
45-
46-
it('stop not using latest python extension version in integration CI tests', function () {
47-
/**
48-
* The explicitly set version is done in launchTestUtilities.ts#installVSCodeExtension
49-
* The parent ticket for SAM test issues: IDE-12295
50-
* Python Extension Bug Issue (if this is fixed, then this should be too): https://github.com/microsoft/vscode-python/issues/22659
51-
*/
52-
assert(
53-
new Date() < new Date(2024, 1, 15),
54-
'Re-evaluate if we can use the latest python extension version in CI integration tests'
55-
)
56-
})
5745
})

packages/toolkit/src/testE2E/amazonqGumby/transformByQ.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as os from 'os'
1212
import * as path from 'path'
1313
import * as fs from 'fs-extra'
1414
import AdmZip from 'adm-zip'
15-
import { setValidConnection, skipTestIfNoValidConn } from '../util/amazonQUtil'
15+
import { setValidConnection } from '../util/amazonQUtil'
1616
import { transformByQState } from '../../codewhisperer/models/model'
1717

1818
describe('transformByQ', async function () {
@@ -24,6 +24,9 @@ describe('transformByQ', async function () {
2424

2525
before(async function () {
2626
validConnection = await setValidConnection()
27+
if (!validConnection) {
28+
this.skip()
29+
}
2730
tempDir = path.join(os.tmpdir(), 'gumby-test')
2831
fs.mkdirSync(tempDir)
2932
tempFileName = `testfile-${Date.now()}.txt`
@@ -33,10 +36,6 @@ describe('transformByQ', async function () {
3336
zippedCodePath = await zipCode()
3437
})
3538

36-
beforeEach(function () {
37-
skipTestIfNoValidConn(validConnection, this) // need valid IdC connection
38-
})
39-
4039
after(async function () {
4140
if (tempDir !== '') {
4241
await fs.remove(tempDir)

0 commit comments

Comments
 (0)