Skip to content

Commit 5dbbf63

Browse files
author
David Hasani
committed
skip test since we get throttled
1 parent 533d55f commit 5dbbf63

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

packages/amazonq/test/e2e/amazonq/transformByQ.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ describe('Amazon Q Code Transformation', function () {
279279
})
280280
})
281281

282-
describe('Running a Java upgrade from start to finish', async function () {
282+
// TODO: enable when we no longer get throttled on CreateUploadUrl and other APIs
283+
describe.skip('Running a Java upgrade from start to finish', async function () {
283284
let tempDir = ''
284285
let tempFileName = ''
285286
let tempFilePath = ''

packages/core/src/codewhisperer/commands/startTransformByQ.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,9 @@ export async function startTransformByQ() {
235235
// step 1: CreateUploadUrl and upload code
236236
const uploadId = await preTransformationUploadCode()
237237

238-
console.log('upload ID = ' + uploadId)
239-
240238
// step 2: StartJob and store the returned jobId in TransformByQState
241239
const jobId = await startTransformationJob(uploadId, transformStartTime)
242240

243-
console.log('jobId =' + jobId)
244-
245241
// step 3 (intermediate step): show transformation-plan.md file
246242
await pollTransformationStatusUntilPlanReady(jobId)
247243

@@ -250,7 +246,6 @@ export async function startTransformByQ() {
250246
} catch (error: any) {
251247
await transformationJobErrorHandler(error)
252248
} finally {
253-
console.log('QCT: in finally block')
254249
await postTransformationJob()
255250
await cleanupTransformationJob()
256251
}
@@ -346,14 +341,12 @@ export async function preTransformationUploadCode() {
346341
const transformZipManifest = new ZipManifest()
347342
// if the user chose to skip unit tests, add the custom build command here
348343
transformZipManifest.customBuildCommand = transformByQState.getCustomBuildCommand()
349-
console.log('QCT: about to zipCode')
350344
const zipCodeResult = await zipCode({
351345
// dependenciesFolder will be undefined for SQL conversions since we don't compileProject
352346
dependenciesFolder: transformByQState.getDependencyFolderInfo(),
353347
projectPath: transformByQState.getProjectPath(),
354348
zipManifest: transformZipManifest,
355349
})
356-
console.log('QCT: done zipping')
357350

358351
const payloadFilePath = zipCodeResult.tempFilePath
359352
const zipSize = zipCodeResult.fileSize

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ export async function uploadPayload(payloadFileName: string, uploadContext?: Upl
175175
throwIfCancelled()
176176
let response = undefined
177177
try {
178-
console.log('QCT: about to create upload URL')
179178
response = await codeWhisperer.codeWhispererClient.createUploadUrl({
180179
contentChecksum: sha256,
181180
contentChecksumType: CodeWhispererConstants.contentChecksumType,
@@ -186,17 +185,14 @@ export async function uploadPayload(payloadFileName: string, uploadContext?: Upl
186185
transformByQState.setJobFailureMetadata(` (request ID: ${response.$response.requestId})`)
187186
}
188187
} catch (e: any) {
189-
console.log('QCT: error creating upload URL ' + e)
190188
const errorMessage = `The upload failed due to: ${(e as Error).message}`
191189
getLogger().error(`CodeTransformation: CreateUploadUrl error: = ${e}`)
192190
throw new Error(errorMessage)
193191
}
194192

195193
try {
196-
console.log('QCT: about to upload artifact')
197194
await uploadArtifactToS3(payloadFileName, response, sha256, buffer)
198195
} catch (e: any) {
199-
console.log('QCT: error uploading artifact ' + e)
200196
const errorMessage = (e as Error).message
201197
getLogger().error(`CodeTransformation: UploadArtifactToS3 error: = ${errorMessage}`)
202198
throw new Error(errorMessage)
@@ -385,7 +381,6 @@ export async function zipCode(
385381
}
386382
} catch (e: any) {
387383
getLogger().error(`CodeTransformation: zipCode error = ${e}`)
388-
console.log('QCT: error zipping: ' + e)
389384
throw Error('Failed to zip project')
390385
} finally {
391386
if (logFilePath) {
@@ -414,7 +409,6 @@ export async function startJob(uploadId: string) {
414409
const sourceLanguageVersion = `JAVA_${transformByQState.getSourceJDKVersion()}`
415410
const targetLanguageVersion = `JAVA_${transformByQState.getTargetJDKVersion()}`
416411
try {
417-
console.log('QCT: about to start Job')
418412
const response = await codeWhisperer.codeWhispererClient.codeModernizerStartCodeTransformation({
419413
workspaceState: {
420414
uploadId: uploadId,
@@ -433,7 +427,6 @@ export async function startJob(uploadId: string) {
433427
} catch (e: any) {
434428
const errorMessage = `Starting the job failed due to: ${(e as Error).message}`
435429
getLogger().error(`CodeTransformation: StartTransformation error = ${errorMessage}`)
436-
console.log('QCT: startJob failed: ' + e)
437430
throw new Error(errorMessage)
438431
}
439432
}
@@ -631,7 +624,6 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
631624
transformationJobId: jobId,
632625
})
633626
status = response.transformationJob.status!
634-
console.log('QCT: status = ' + status)
635627
if (CodeWhispererConstants.validStatesForBuildSucceeded.includes(status)) {
636628
jobPlanProgress['buildCode'] = StepProgress.Succeeded
637629
}

0 commit comments

Comments
 (0)