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
Expand Up @@ -347,8 +347,8 @@ fun buildUserInputSQLConversionMetadataChatContent() = CodeTransformChatMessageC
type = CodeTransformChatMessageType.FinalizedAnswer,
)

fun buildUserInputCustomDependencyVersionsChatContent() = CodeTransformChatMessageContent(
message = message("codemodernizer.chat.message.custom_dependency_upgrades_prompt"),
fun buildUserInputCustomDependencyVersionsChatContent(message: String) = CodeTransformChatMessageContent(
message = message,
buttons = listOf(
confirmCustomDependencyVersionsButton,
continueTransformationButton,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,13 @@ class CodeTransformChatController(
}

private suspend fun promptForCustomYamlFile() {
codeTransformChatHelper.addNewMessage(buildUserInputCustomDependencyVersionsChatContent())
val sourceJdk = codeModernizerManager.codeTransformationSession?.sessionContext?.sourceJavaVersion?.name
val targetJdk = codeModernizerManager.codeTransformationSession?.sessionContext?.targetJavaVersion?.name
var message = message("codemodernizer.chat.message.custom_dependency_upgrades_prompt_library_upgrade")
if (sourceJdk != targetJdk) {
message = message("codemodernizer.chat.message.custom_dependency_upgrades_prompt_jdk_upgrade")
}
codeTransformChatHelper.addNewMessage(buildUserInputCustomDependencyVersionsChatContent(message))
val sampleYAML = """
name: "dependency-upgrade"
description: "Custom dependency version management for Java migration from JDK 8/11/17 to JDK 17/21"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ codemodernizer.chat.message.choose_objective=I can help you with the following t
codemodernizer.chat.message.choose_objective_placeholder=Enter "language upgrade" or "sql conversion"
codemodernizer.chat.message.custom_dependency_upgrades_continue=Ok, I will continue the transformation without additional dependency upgrade information.
codemodernizer.chat.message.custom_dependency_upgrades_invalid=I wasn't able to parse the dependency upgrade file. Check that it's configured properly and try again. For an example of the required dependency upgrade file format, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).
codemodernizer.chat.message.custom_dependency_upgrades_prompt=Would you like to provide a dependency upgrade file? You can specify first-party dependencies to upgrade in a YAML file, and I will upgrade them during the JDK upgrade (for example, Java 8 to 17). You can initiate a separate transformation (17 to 17 or 21 to 21) after the initial JDK upgrade to transform third-party dependencies.\n\nWithout a YAML file, I can perform a minimum JDK upgrade, and then you can initiate a separate transformation to upgrade all third-party dependencies as part of a maximum transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).
codemodernizer.chat.message.custom_dependency_upgrades_prompt_jdk_upgrade=Would you like to provide a dependency upgrade file? You can specify first party dependencies and their versions in a YAML file, and I will upgrade them during the JDK upgrade transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).
codemodernizer.chat.message.custom_dependency_upgrades_prompt_library_upgrade=Would you like to provide a dependency upgrade file? You can specify third party dependencies and their versions in a YAML file, and I will only upgrade these dependencies during the library upgrade transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).
codemodernizer.chat.message.custom_dependency_upgrades_valid=The dependency upgrade file looks good. I will use this information to upgrade the dependencies you specified.
codemodernizer.chat.message.download_failed_client_instructions_expired=Your transformation is not available anymore. Your code and transformation summary are deleted 24 hours after the transformation completes. Please try starting the transformation again.
codemodernizer.chat.message.download_failed_invalid_artifact=Sorry, I was unable to find your {0}. Artifacts are deleted after 24 hours. Please try starting the transformation again.
Expand Down
Loading