Skip to content

Commit d51abfe

Browse files
authored
fix(amazonq): update text for STV2 feature (#5837)
Some text about how we do transformations is confusing to users.
1 parent b56813a commit d51abfe

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ fun buildTransformResumingChatContent() = CodeTransformChatMessageContent(
554554
type = CodeTransformChatMessageType.PendingAnswer,
555555
)
556556

557-
fun buildTransformResultChatContent(result: CodeModernizerJobCompletedResult, targetJdkVersion: String = ""): CodeTransformChatMessageContent {
557+
fun buildTransformResultChatContent(result: CodeModernizerJobCompletedResult): CodeTransformChatMessageContent {
558558
val resultMessage = when (result) {
559559
is CodeModernizerJobCompletedResult.JobAbortedZipTooLarge -> {
560560
"${message(
@@ -568,7 +568,7 @@ fun buildTransformResultChatContent(result: CodeModernizerJobCompletedResult, ta
568568
buildZipUploadFailedChatMessage(result.failureReason)
569569
}
570570
is CodeModernizerJobCompletedResult.JobCompletedSuccessfully -> {
571-
message("codemodernizer.chat.message.result.success", targetJdkVersion)
571+
message("codemodernizer.chat.message.result.success")
572572
}
573573
is CodeModernizerJobCompletedResult.JobPartiallySucceeded -> {
574574
message("codemodernizer.chat.message.result.partially_success")

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,7 @@ dependencyManagement:
795795
is DownloadArtifactResult.Success -> {
796796
if (downloadResult.artifact !is CodeModernizerArtifact) return artifactHandler.notifyUnableToApplyPatch("")
797797
codeTransformChatHelper.updateLastPendingMessage(
798-
buildTransformResultChatContent(
799-
result,
800-
codeModernizerManager.codeTransformationSession?.sessionContext?.targetJavaVersion.toString()
801-
)
798+
buildTransformResultChatContent(result)
802799
)
803800
}
804801
is DownloadArtifactResult.DownloadFailure -> artifactHandler.notifyUnableToDownload(downloadResult.failureReason)

plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,8 @@ codemodernizer.chat.message.result.fail=Sorry, I ran into an issue during the tr
680680
codemodernizer.chat.message.result.fail_initial_build=I am having trouble building your project in the secure build environment and couldn't complete the transformation.
681681
codemodernizer.chat.message.result.fail_initial_build_no_build_log=I am having trouble building your project in the secure build environment: {0}.
682682
codemodernizer.chat.message.result.fail_with_known_reason=Sorry, I couldn''t complete the transformation. {0}
683-
codemodernizer.chat.message.result.partially_success=I transformed part of your code. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
684-
codemodernizer.chat.message.result.success=I successfully completed your transformation. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the changes I am proposing. If you want to upgrade additional libraries and other dependencies, run /transform with the transformed code and specify {0} as the source and target version.
683+
codemodernizer.chat.message.result.partially_success=I transformed part of your code. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated and the errors that prevented a complete transformation. After successfully building in Java 17 or 21, an additional transformation is required to upgrade your libraries and dependencies. Choose the same source code version and target code version (for example, 17 to 17) to do this.
684+
codemodernizer.chat.message.result.success=I successfully completed your transformation. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the changes I am proposing. After successfully building in Java 17 or 21, an additional transformation is required to upgrade your libraries and dependencies. Choose the same source code version and target code version (for example, 17 to 17) to do this.
685685
codemodernizer.chat.message.result.zip_too_large=Sorry, your project size exceeds the Amazon Q Code Transformation upload limit of 2GB.
686686
codemodernizer.chat.message.resume_ongoing=I'm still transforming your code. It can take 10 to 30 minutes to upgrade your code, depending on the size of your module. To monitor progress, go to the Transformation Hub.
687687
codemodernizer.chat.message.skip_tests=I will build your project using `mvn clean test` by default. If you would like me to build your project without running unit tests, I will use `mvn clean test-compile`.
@@ -702,7 +702,7 @@ codemodernizer.chat.message.upload_failed_other=Sorry, I was unable to upload yo
702702
codemodernizer.chat.message.upload_failed_ssl_error=Sorry, I was unable to upload your project. This might have been caused by your IDE not trusting the certificate of your HTTP proxy. Ensure all certificates for your proxy client have been configured in your IDE, and then retry transformation.
703703
codemodernizer.chat.message.upload_failed_url_expired=Sorry, I couldn't upload your project to begin the transformation. The Amazon S3 pre-signed URL used to upload your code expired after 30 minutes. This might have been caused by delays introduced by intermediate services in your network infrastructure.\n\nCheck your network configuration for services that might be causing delays. If the issue persists, you might need to allow list the following Amazon S3 bucket: 'amazonq-code-transformation-us-east-1-c6160f047e0.s3.amazonaws.com'.
704704
codemodernizer.chat.message.validation.check_eligible_modules=Checking for eligible modules...
705-
codemodernizer.chat.message.validation.check_passed=I can upgrade your Java module. To start the transformation, I need some information from you. Choose the module you want to upgrade and the target code version to upgrade to. Then, choose **Confirm**.\n\nIf you do not see the module you want to transform, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and language level. In the Modules tab, set the correct module JDK and language level.
705+
codemodernizer.chat.message.validation.check_passed=I can upgrade your Java module. To start the transformation, I need some information from you. Choose the module you want to upgrade and the target code version to upgrade to. Then, choose **Confirm**.\n\nIf you do not see the module you want to transform, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and language level. In the Modules tab, set the correct module JDK and language level.\n\nAfter successfully building in Java 17 or 21, an additional transformation is required to upgrade your libraries and dependencies. Choose the same source code version and target code version (for example, 17 to 17) to do this.
706706
codemodernizer.chat.message.validation.error.downgrade_attempt=I can't transform a project from Java 21 to Java 17, but I can upgrade Java 21 code with up-to-date libraries and other dependencies. Try again with a supported language upgrade.
707707
codemodernizer.chat.message.validation.error.invalid_sct=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.
708708
codemodernizer.chat.message.validation.error.invalid_source_db=I can only convert SQL for migrations from an Oracle source database. The provided .sct file indicates another source database for this migration.

0 commit comments

Comments
 (0)