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
8 changes: 6 additions & 2 deletions packages/core/src/codewhisperer/commands/startTransformByQ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,12 @@ export async function finalizeTransformationJob(status: string) {
if (!(status === 'COMPLETED' || status === 'PARTIALLY_COMPLETED')) {
getLogger().error(`CodeTransformation: ${CodeWhispererConstants.failedToCompleteJobNotification}`)
jobPlanProgress['transformCode'] = StepProgress.Failed
transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.failedToCompleteJobNotification)
transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.failedToCompleteJobChatMessage)
if (!transformByQState.getJobFailureErrorNotification()) {
transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.failedToCompleteJobNotification)
}
if (!transformByQState.getJobFailureErrorChatMessage()) {
transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.failedToCompleteJobChatMessage)
}
throw new Error('Job was not successful nor partially successful')
}
transformByQState.setToSucceeded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ export class ProposedTransformationExplorer {
programmingLanguage: {
languageName:
transformByQState.getTransformationType() === TransformationType.LANGUAGE_UPGRADE
? 'JAVA'
: 'SQL',
? 'java'
Copy link
Contributor

Choose a reason for hiding this comment

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

If there is potential that these values will be used in other telemetry events this may be worth putting in to a function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, post-re:Invent planning on adding a separate utils file for these kinds of things

: 'sql',
},
linesOfCodeChanged: metricsData.linesOfCodeChanged,
charsOfCodeChanged: metricsData.charactersOfCodeChanged,
Expand Down
Loading