Skip to content

Commit 51cdbc7

Browse files
author
David Hasani
committed
final comments addressed
1 parent 15e0c3c commit 51cdbc7

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ export class GumbyController {
209209
getLogger().error(`CodeTransformation: error validating Java upgrade projects: ${err}`)
210210
}
211211

212-
// TO-DO: in this case, should we say "I can't do a language upgrade, but I found embedded SQL I can convert..."
213-
// and vice-versa for the case above with handleLanguageUpgrade
214212
if (javaUpgradeProjects.length === 0) {
215213
await this.handleSQLConversion(message)
216214
return

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ export class Messenger {
256256
formItems.push({
257257
id: 'GumbyTransformSQLConversionProjectForm',
258258
type: 'select',
259-
title: 'Choose a project to transform',
259+
title: CodeWhispererConstants.chooseProjectFormTitle,
260260
mandatory: true,
261261
options: projectFormOptions,
262262
})
263263

264264
formItems.push({
265265
id: 'GumbyTransformSQLSchemaForm',
266266
type: 'select',
267-
title: 'Choose the schema of the database',
267+
title: CodeWhispererConstants.chooseSchemaFormTitle,
268268
mandatory: true,
269269
options: Array.from(transformByQState.getSchemaOptions()).map((schema) => ({
270270
value: schema,
@@ -275,7 +275,7 @@ export class Messenger {
275275
this.dispatcher.sendAsyncEventProgress(
276276
new AsyncEventProgressMessage(tabID, {
277277
inProgress: true,
278-
message: 'I can convert your embedded SQL, but I need some more info from you first.',
278+
message: CodeWhispererConstants.chooseProjectSchemaFormMessage,
279279
})
280280
)
281281

@@ -711,13 +711,6 @@ ${codeSnippet}
711711
}
712712

713713
public async sendSelectSQLMetadataFileMessage(tabID: string) {
714-
this.dispatcher.sendAsyncEventProgress(
715-
new AsyncEventProgressMessage(tabID, {
716-
inProgress: true,
717-
message: 'I can convert the embedded Oracle SQL in your project to PostgreSQL.',
718-
})
719-
)
720-
721714
const message = CodeWhispererConstants.selectSQLMetadataFileHelpMessage
722715
const buttons: ChatItemButton[] = []
723716

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ export async function getValidSQLConversionCandidateProjects() {
770770
status will be non-zero and stdout / stderr / error will be empty when search string is not detected.
771771
*/
772772
getLogger().info(
773-
`CodeTransformation: searching for ${str} in ${project.path}, result = ${JSON.stringify(spawnResult)}`
773+
`CodeTransformation: searching for ${str} in ${project.path}, status = ${spawnResult.status} and output = ${spawnResult.output}`
774774
)
775775
if (spawnResult.status === 0) {
776776
embeddedSQLProjects.push(project)

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ export const absolutePathDetectedMessage = (numPaths: number, buildFile: string,
514514
export const unsupportedJavaVersionChatMessage = `I can only upgrade Java 8, Java 11, or Java 17 projects. For more information, see the [Amazon Q documentation](${codeTransformPrereqDoc}).`
515515

516516
export const selectSQLMetadataFileHelpMessage =
517-
'Next, I need the zipped metadata file from your schema conversion. You can download the metadata by going to your migration project in the AWS DMS console. Open the schema conversion and choose **Convert the embedded SQL in your application**. You can downloaded the metadata from Amazon S3 in the {schema-conversion-project}/ directory.'
517+
'Okay, I can convert the embedded SQL code for your Oracle to PostgreSQL transformation. To get started, upload the zipped metadata file from your schema conversion in AWS Data Migration Service (DMS). To retrieve the metadata file:\n1. Open your database migration project in the AWS DMS console.\n2. Open the schema conversion and choose **Convert the embedded SQL in your application**.\n3. Choose the link to Amazon S3 console.\n\nYou can download the metadata file from the {schema-conversion-project}/ directory. For more info, refer to the [documentation](https://docs.aws.amazon.com/dms/latest/userguide/schema-conversion-save-apply.html#schema-conversion-save).'
518518

519519
export const invalidMetadataFileUnsupportedSourceDB =
520520
'I can only convert SQL for migrations from an Oracle source database. The provided .sct file indicates another source database for this migration.'
@@ -680,6 +680,10 @@ export const chooseSourceVersionFormTitle = 'Choose the source code version'
680680

681681
export const chooseTargetVersionFormTitle = 'Choose the target code version'
682682

683+
export const chooseSchemaFormTitle = 'Choose the schema of the database'
684+
685+
export const chooseProjectSchemaFormMessage = 'To continue, choose the project and schema for this transformation.'
686+
683687
export const skipUnitTestsFormTitle = 'Choose to skip unit tests'
684688

685689
export const skipUnitTestsFormMessage =

0 commit comments

Comments
 (0)