Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amazonq): show correct error message #5335

Merged
merged 4 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
Expand Up @@ -279,12 +279,11 @@ fun buildLanguageUpgradeProjectValidChatContent() = CodeTransformChatMessageCont

fun buildProjectInvalidChatContent(validationResult: ValidationResult): CodeTransformChatMessageContent {
val errorMessage = when (validationResult.invalidTelemetryReason.category) {
CodeTransformPreValidationError.NoPom -> message("codemodernizer.chat.message.validation.error.no_pom", CODE_TRANSFORM_PREREQUISITES)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused

CodeTransformPreValidationError.UnsupportedJavaVersion -> message("codemodernizer.chat.message.validation.error.unsupported_java_version")
CodeTransformPreValidationError.UnsupportedJavaVersion, CodeTransformPreValidationError.UnsupportedBuildSystem ->
message("codemodernizer.chat.message.validation.error.unsupported_module")
CodeTransformPreValidationError.RemoteRunProject -> message("codemodernizer.notification.warn.invalid_project.description.reason.remote_backend")
CodeTransformPreValidationError.NonSsoLogin -> message("codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in")
CodeTransformPreValidationError.EmptyProject -> message("codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots")
CodeTransformPreValidationError.UnsupportedBuildSystem -> message("codemodernizer.chat.message.validation.error.no_pom")
CodeTransformPreValidationError.NoJavaProject -> message("codemodernizer.chat.message.validation.error.no_java_project")
else -> message("codemodernizer.chat.message.validation.error.other")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,8 @@ codemodernizer.chat.message.validation.error.invalid_target_db=I can only conver
codemodernizer.chat.message.validation.error.missing_sct_file=An .sct file is required for transformation. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS.
codemodernizer.chat.message.validation.error.more_info=For more information, see the [Amazon Q documentation]({0}).
codemodernizer.chat.message.validation.error.no_java_project=Sorry, I could not find an open Java module with embedded Oracle SQL statements. Make sure you have a Java module open that has at least 1 content root.
codemodernizer.chat.message.validation.error.no_pom=I couldn't find a module that I can upgrade. Your Java module must be built on Maven and contain a pom.xml file. For more information, see the [Amazon Q documentation]({0}).
codemodernizer.chat.message.validation.error.other=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 modules built on Maven. Make sure your module is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level.
codemodernizer.chat.message.validation.error.unsupported_java_version=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level.
codemodernizer.chat.message.validation.error.unsupported_module=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level.
codemodernizer.chat.message.validation.no_jdk=I couldn't build your module with your current JDK configuration. To update your JDK, go to File and choose Project Structure. In the Projects tab, set the correct project JDK in the SDK field. In the Modules tab, set the correct module JDK in the SDK field. In Maven Runner settings, set the correct JDK in the JRE field.
codemodernizer.chat.prompt.label.dependency_current_version=Current version
codemodernizer.chat.prompt.label.dependency_name=Dependency name
Expand Down
Loading