Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Fix(Amazon Q Code Transformation): show correct diff when running consecutive transformations"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just about to make this change so thanks for catching

Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class QuickActionGenerator {
? [
{
command: '/transform',
description: 'Transform your Java 8, 11, or 17 Maven projects',
description: 'Transform your Java project',
icon: MynahIcons.TRANSFORM,
},
]
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/codewhisperer/models/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export const absolutePathDetectedMessage = (numPaths: number, buildFile: string,
`I detected ${numPaths} potential absolute file path(s) in your ${buildFile} file: **${listOfPaths}**. Absolute file paths might cause issues when I build your code. Any errors will show up in the build log.`

export const selectSQLMetadataFileHelpMessage =
'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).'
'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. Once you complete the conversion, close the project and go to the S3 bucket where your project is stored.\n4. Open the folder and find the project folder ("sct-project").\n5. Download the object inside the project folder. This will be a zip file.\n\nFor more info, refer to the [documentation](https://docs.aws.amazon.com/dms/latest/userguide/schema-conversion-save-apply.html#schema-conversion-save).'

export const invalidMetadataFileUnsupportedSourceDB =
'I can only convert SQL for migrations from an Oracle source database. The provided .sct file indicates another source database for this migration.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class ProposedTransformationExplorer {
treeDataProvider: transformDataProvider,
})

const patchFiles: string[] = []
let patchFiles: string[] = []
let singlePatchFile: string = ''
let patchFilesDescriptions: DescriptionContent | undefined = undefined

Expand Down Expand Up @@ -430,6 +430,7 @@ export class ProposedTransformationExplorer {

let deserializeErrorMessage = undefined
let pathContainingArchive = ''
patchFiles = [] // reset patchFiles if there was a previous transformation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun js trick: you can clear an array by setting its length to zero (so the variable could stay const, above)

patchFiles.length = 0

try {
// Download and deserialize the zip
pathContainingArchive = path.dirname(pathToArchive)
Expand Down
Loading