Skip to content

Commit a61be6d

Browse files
author
David Hasani
committed
cleanup
1 parent f599272 commit a61be6d

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ describe('Amazon Q Code Transformation', function () {
163163

164164
transformByQState.setSummaryFilePath(path.join(tmpDir, 'summary.md'))
165165

166-
// TO-DO: make this `isPartiallySucceeded`
167-
transformByQState.setToSucceeded()
166+
transformByQState.setToPartiallySucceeded()
168167

169168
transformByQState
170169
.getChatMessenger()

packages/core/src/amazonqGumby/chat/controller/messenger/messenger.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,10 @@ export class Messenger {
542542
})
543543
}
544544

545-
// TO-DO: make this `isPartiallySucceeded`
546-
if (transformByQState.isSucceeded() && message == CodeWhispererConstants.viewProposedChangesChatMessage) {
545+
if (
546+
transformByQState.isPartiallySucceeded() &&
547+
message === CodeWhispererConstants.viewProposedChangesChatMessage
548+
) {
547549
// get permission to re-run job and view logs after partially successful job is downloaded
548550
this.sendFeedbackFormMessage(tabID)
549551
}

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,11 +513,7 @@ export async function startTransformationJob(uploadId: string, transformStartTim
513513
getLogger().error(`CodeTransformation: ${CodeWhispererConstants.failedToStartJobNotification}`, error)
514514
const errorMessage = (error as Error).message.toLowerCase()
515515
if (errorMessage.includes('too many active running jobs')) {
516-
transformByQState.setJobFailureErrorNotification(
517-
CodeWhispererConstants.tooManyJobsNotification
518-
// TO-DO: change this text (and the ones below) to link to the docs around limits
519-
// https://issues.amazon.com/issues/V1679684569
520-
)
516+
transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.tooManyJobsNotification)
521517
transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.tooManyJobsChatMessage)
522518
} else if (errorMessage.includes('lines of code limit breached')) {
523519
transformByQState.setJobFailureErrorNotification(

packages/core/src/codewhisperer/models/constants.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ export const amazonQFeedbackKey = 'Amazon Q'
469469

470470
export const amazonQFeedbackText = 'Submit feedback'
471471

472+
// TO-DO: update link
473+
export const codeTransformTroubleshootStartJobFailed = ''
474+
472475
export const codeTransformTroubleshootProjectSize =
473476
'https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/troubleshooting-code-transformation.html#reduce-project-size'
474477

@@ -611,17 +614,13 @@ export const failedToStartJobChatMessage =
611614
export const failedToStartJobNotification =
612615
'Amazon Q could not begin the transformation. Please try starting the transformation again.'
613616

614-
export const tooManyJobsChatMessage =
615-
"Sorry, I couldn't begin the transformation. You have too many active transformations running. Please try again after your other transformations have completed."
617+
export const tooManyJobsChatMessage = `Sorry, I couldn't begin the transformation. You have too many active transformations running. Please try again after your other transformations have completed. For more information, see the [Amazon Q documentation](${codeTransformTroubleshootStartJobFailed}).`
616618

617-
export const tooManyJobsNotification =
618-
'Amazon Q could not begin the transformation. You have too many active transformations running. Please try again after your other transformations have completed.'
619+
export const tooManyJobsNotification = `Amazon Q could not begin the transformation. You have too many active transformations running. Please try again after your other transformations have completed. For more information, see the [Amazon Q documentation](${codeTransformTroubleshootStartJobFailed}).`
619620

620-
export const linesOfCodeLimitBreachedChatMessage =
621-
"Sorry, I couldn't begin the transformation. You have exceeded the lines of code limit for your plan."
621+
export const linesOfCodeLimitBreachedChatMessage = `Sorry, I couldn't begin the transformation. You have exceeded the lines of code limit for your plan. For more information, see the [Amazon Q documentation](${codeTransformTroubleshootStartJobFailed}).`
622622

623-
export const linesOfCodeLimitBreachedNotification =
624-
'Amazon Q could not begin the transformation. You have exceeded the lines of code limit for your plan.'
623+
export const linesOfCodeLimitBreachedNotification = `Amazon Q could not begin the transformation. You have exceeded the lines of code limit for your plan. For more information, see the [Amazon Q documentation](${codeTransformTroubleshootStartJobFailed}).`
625624

626625
export const failedToUploadProjectChatMessage =
627626
"Sorry, I couldn't upload your project. Please try starting the transformation again."

0 commit comments

Comments
 (0)