Skip to content

Commit bb6e1de

Browse files
author
David Hasani
committed
update test
1 parent ed2763d commit bb6e1de

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export class GumbyController {
373373
break
374374
case ButtonActions.CONTINUE_TRANSFORMATION_FORM:
375375
this.messenger.sendMessage(
376-
CodeWhispererConstants.continueWithoutYamlMessage,
376+
CodeWhispererConstants.continueWithoutConfigFileMessage,
377377
message.tabID,
378378
'ai-prompt'
379379
)
@@ -543,7 +543,7 @@ export class GumbyController {
543543
canSelectMany: false,
544544
openLabel: 'Select',
545545
filters: {
546-
'YAML file': ['yaml'], // restrict user to only pick a .yaml file
546+
File: ['yaml', 'json'], // restrict user to only pick a .yaml or .json file
547547
},
548548
})
549549
if (!fileUri || fileUri.length === 0) {
@@ -556,7 +556,7 @@ export class GumbyController {
556556
this.messenger.sendUnrecoverableErrorResponse('invalid-custom-versions-file', message.tabID)
557557
return
558558
}
559-
this.messenger.sendMessage('Received custom dependency version YAML file.', message.tabID, 'ai-prompt')
559+
this.messenger.sendMessage(CodeWhispererConstants.receivedValidConfigFileMessage, message.tabID, 'ai-prompt')
560560
transformByQState.setCustomDependencyVersionFilePath(fileUri[0].fsPath)
561561
this.promptJavaHome('source', message.tabID)
562562
}
@@ -640,17 +640,13 @@ export class GumbyController {
640640
const pathToJavaHome = extractPath(data.message)
641641
if (pathToJavaHome) {
642642
transformByQState.setSourceJavaHome(pathToJavaHome)
643-
// TO-DO: delete line below and uncomment the block below when releasing CSB
644-
await this.prepareLanguageUpgradeProject(data.tabID)
645643
// if source and target JDK versions are the same, just re-use the source JAVA_HOME and start the build
646-
/*
647644
if (transformByQState.getTargetJDKVersion() === transformByQState.getSourceJDKVersion()) {
648645
transformByQState.setTargetJavaHome(pathToJavaHome)
649646
await this.prepareLanguageUpgradeProject(data.tabID)
650647
} else {
651648
this.promptJavaHome('target', data.tabID)
652649
}
653-
*/
654650
} else {
655651
this.messenger.sendUnrecoverableErrorResponse('invalid-java-home', data.tabID)
656652
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ ${codeSnippet}
704704
}
705705

706706
public async sendCustomDependencyVersionMessage(tabID: string) {
707-
const message = CodeWhispererConstants.chooseYamlMessage
707+
const message = CodeWhispererConstants.chooseConfigFileMessage
708708
const buttons: ChatItemButton[] = []
709709

710710
buttons.push({

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ export const invalidMetadataFileUnsupportedTargetDB =
586586
'I can only convert SQL for migrations to Aurora PostgreSQL or Amazon RDS for PostgreSQL target databases. The provided .sct file indicates another target database for this migration.'
587587

588588
export const invalidCustomVersionsFileMessage =
589-
'Your .YAML file is not formatted correctly. Make sure that the .YAML file you upload follows the format of the sample file provided.'
589+
"I wasn't able to parse the dependency upgrade file. Check that it's configured properly and try again. For an example of the required dependency upgrade file format, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file)."
590590

591591
export const invalidMetadataFileErrorParsing =
592592
"It looks like the .sct file you provided isn't valid. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS."
@@ -646,10 +646,14 @@ export const jobCancelledNotification = 'You cancelled the transformation.'
646646

647647
export const continueWithoutHilMessage = 'I will continue transforming your code without upgrading this dependency.'
648648

649-
export const continueWithoutYamlMessage = 'Ok, I will continue without this information.'
649+
export const continueWithoutConfigFileMessage =
650+
'Ok, I will continue the transformation without additional dependency upgrade information.'
650651

651-
export const chooseYamlMessage =
652-
'You can optionally upload a YAML file to specify which dependency versions to upgrade to.'
652+
export const receivedValidConfigFileMessage =
653+
'The dependency upgrade file looks good. I will use this information to upgrade the dependencies you specified.'
654+
655+
export const chooseConfigFileMessage =
656+
'Would you like to provide a dependency upgrade file? You can specify first and third party dependencies and their versions in a YAML or JSON file, and I will upgrade them during the transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).'
653657

654658
export const enterJavaHomePlaceholder = 'Enter the path to your Java installation'
655659

0 commit comments

Comments
 (0)