Skip to content

Commit 112bd34

Browse files
author
David Hasani
committed
final comments addressed
1 parent 323f076 commit 112bd34

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
@@ -252,15 +252,15 @@ export class Messenger {
252252
formItems.push({
253253
id: 'GumbyTransformSQLConversionProjectForm',
254254
type: 'select',
255-
title: 'Choose a project to transform',
255+
title: CodeWhispererConstants.chooseProjectFormTitle,
256256
mandatory: true,
257257
options: projectFormOptions,
258258
})
259259

260260
formItems.push({
261261
id: 'GumbyTransformSQLSchemaForm',
262262
type: 'select',
263-
title: 'Choose the schema of the database',
263+
title: CodeWhispererConstants.chooseSchemaFormTitle,
264264
mandatory: true,
265265
options: Array.from(transformByQState.getSchemaOptions()).map((schema) => ({
266266
value: schema,
@@ -271,7 +271,7 @@ export class Messenger {
271271
this.dispatcher.sendAsyncEventProgress(
272272
new AsyncEventProgressMessage(tabID, {
273273
inProgress: true,
274-
message: 'I can convert your embedded SQL, but I need some more info from you first.',
274+
message: CodeWhispererConstants.chooseProjectSchemaFormMessage,
275275
})
276276
)
277277

@@ -707,13 +707,6 @@ ${codeSnippet}
707707
}
708708

709709
public async sendSelectSQLMetadataFileMessage(tabID: string) {
710-
this.dispatcher.sendAsyncEventProgress(
711-
new AsyncEventProgressMessage(tabID, {
712-
inProgress: true,
713-
message: 'I can convert the embedded Oracle SQL in your project to PostgreSQL.',
714-
})
715-
)
716-
717710
const message = CodeWhispererConstants.selectSQLMetadataFileHelpMessage
718711
const buttons: ChatItemButton[] = []
719712

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ export async function getValidSQLConversionCandidateProjects() {
768768
status will be non-zero and stdout / stderr / error will be empty when search string is not detected.
769769
*/
770770
getLogger().info(
771-
`CodeTransformation: searching for ${str} in ${project.path}, result = ${JSON.stringify(spawnResult)}`
771+
`CodeTransformation: searching for ${str} in ${project.path}, status = ${spawnResult.status} and output = ${spawnResult.output}`
772772
)
773773
if (spawnResult.status === 0) {
774774
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 = `Sorry, currently I can only upgrade Java 8 or Java 11 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.'
@@ -681,6 +681,10 @@ export const chooseSourceVersionFormTitle = 'Choose the source code version'
681681

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

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

686690
export const skipUnitTestsFormMessage =

0 commit comments

Comments
 (0)