Skip to content

Commit

Permalink
Merge main into feature/q-mega
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-toolkit-automation authored Nov 25, 2024
2 parents b239092 + 91d5a0c commit 5233625
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "feature",
"description" : "Feature(Amazon Q Code Transformation): allow users to view results in 5 smaller diffs"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ val patchDescriptions = mapOf(
"Popular Enterprise Specifications and Application Frameworks upgrade" to "This diff patch covers the set of upgrades for Jakarta EE 10, Hibernate 6.2, " +
"and Micronaut 3.",
"HTTP Client Utilities, Apache Commons Utilities, and Web Frameworks" to "This diff patch covers the set of upgrades for Apache HTTP Client 5, Apache " +
"Commons utilities (Collections, IO, Lang, Math), Struts 6.0.",
"Testing Tools and Frameworks upgrade" to "This diff patch covers the set of upgrades for ArchUnit, Mockito, TestContainers, Cucumber, and additionally, " +
"Jenkins plugins and the Maven Wrapper.",
"Commons utilities (Collections, IO, Lang, Math), and Struts 6.0.",
"Testing Tools and Frameworks upgrade" to "This diff patch covers the set of upgrades for ArchUnit, Mockito, TestContainers, and Cucumber, in addition " +
"to the Jenkins plugins and the Maven Wrapper.",
"Miscellaneous Processing Documentation upgrade" to "This diff patch covers a diverse set of upgrades spanning ORMs, XML processing, API documentation, " +
"and more.",
"Deprecated API replacement, dependency upgrades, and formatting" to "This diff patch replaces deprecated APIs, makes additional dependency version " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,20 +378,13 @@ class CodeTransformChatController(
message("codemodernizer.chat.message.skip_tests_form.skip") -> MAVEN_BUILD_SKIP_UNIT_TESTS

Check warning on line 378 in plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
else -> MAVEN_BUILD_RUN_UNIT_TESTS
}
// feature flag for Selective Transformation
val isSelectiveTransformationReady = false
codeTransformChatHelper.addNewMessage(buildUserSkipTestsFlagSelectionChatContent(message.skipTestsSelection))
codeModernizerManager.codeTransformationSession?.let {
it.sessionContext.customBuildCommand = customBuildCommand
if (!isSelectiveTransformationReady) {
codeModernizerManager.runLocalMavenBuild(context.project, it)
}
}
if (isSelectiveTransformationReady) {
codeTransformChatHelper.run {
addNewMessage(buildUserInputOneOrMultipleDiffsChatIntroContent())
addNewMessage(buildUserInputOneOrMultipleDiffsFlagChatContent())
}
codeTransformChatHelper.run {
addNewMessage(buildUserInputOneOrMultipleDiffsChatIntroContent())
addNewMessage(buildUserInputOneOrMultipleDiffsFlagChatContent())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ open class CodeModernizerArtifact(
return description.map { patchInfo ->
val patchFile = patchesDir.resolve(patchInfo.filename)
if (patchFile.toFile().exists()) {
fileSystem.findFileByNioFile(patchFile)
fileSystem.refreshAndFindFileByNioFile(patchFile)
?: error("Could not find patch: ${patchInfo.filename}")
} else {
error("Patch file not found: ${patchInfo.filename}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,18 +612,18 @@ codemodernizer.chat.message.hil.user_rejected=I'll continue upgrading your modul
codemodernizer.chat.message.local_build_begin=I'm building your module. This can take up to 10 minutes, depending on the size of your module.
codemodernizer.chat.message.local_build_failed=Sorry, I couldn't run the Maven clean install command to build your module.
codemodernizer.chat.message.local_build_success=I was able to build your module and will start uploading your code.
codemodernizer.chat.message.one_or_multiple_diffs=I can now divide the transformation results into diff patches (if applicable to the app) if you would like to review and accept each diff with fewer changes:\n\n\ - Minimal Compatible Library Upgrade to Java 17: Dependencies to the minimum compatible versions in Java 17, including Springboot, JUnit, and PowerMockito.\n\n\ - Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.\n\n\ - HTTP Client Utilities Web Frameworks: HTTP client libraries, Apache Commons utilities, and Struts frameworks.\n\n\ - Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper.\n\n\ - Miscellaneous Processing Documentation: Diverse set spanning ORMs, XML processing, and API documentation like Swagger to SpringDoc/OpenAPI.\n\n\ - Deprecated API replacement, dependency upgrades, and formatting: Replaces deprecated APIs, makes additional dependency version upgrades, and formats code changes.
codemodernizer.chat.message.one_or_multiple_diffs=If you'd like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:\n\n\ - Minimal Compatible Library Upgrade to Java 17: Dependencies to the minimum compatible versions in Java 17, including Springboot, JUnit, and PowerMockito.\n\n\ - Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.\n\n\ - HTTP Client Utilities Web Frameworks: HTTP client libraries, Apache Commons utilities, and Struts frameworks.\n\n\ - Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper.\n\n\ - Miscellaneous Processing Documentation: Diverse set spanning ORMs, XML processing, and API documentation like Swagger to SpringDoc/OpenAPI.\n\n\ - Deprecated API replacement, dependency upgrades, and formatting: Replaces deprecated APIs, makes additional dependency version upgrades, and formats code changes.
codemodernizer.chat.message.one_or_multiple_diffs_form.multiple_diffs=Multiple diffs
codemodernizer.chat.message.one_or_multiple_diffs_form.one_diff=One diff
codemodernizer.chat.message.one_or_multiple_diffs_form.response=Okay, I will create {0} when providing the proposed changes.
codemodernizer.chat.message.one_or_multiple_diffs_form.response=Okay, I will create {0} with my proposed changes.
codemodernizer.chat.message.result.fail=Sorry, I ran into an issue during the transformation. Please try again.
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.
codemodernizer.chat.message.result.fail_initial_build_no_build_log=I am having trouble building your project in the secure build environment: {0}.
codemodernizer.chat.message.result.fail_with_known_reason=Sorry, I couldn''t complete the transformation. {0}
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.
codemodernizer.chat.message.result.partially_success.multiple_diffs=I upgraded part of your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. If you reject the diff, you will not be able to see the diffs later. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
codemodernizer.chat.message.result.success=I successfully transformed 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.
codemodernizer.chat.message.result.success.multiple_diffs=I successfully upgraded your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. If you reject the diff, you will not be able to see the diffs later. The transformation summary has details about the files I updated.
codemodernizer.chat.message.result.partially_success.multiple_diffs=I transformed part of your code. You will be able to accept changes from one diff at a time. If you reject changes in one diff, you will not be able to view or accept changes in the other diffs. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
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'm proposing.
codemodernizer.chat.message.result.success.multiple_diffs=I successfully completed your transformation. You will be able to accept changes from one diff at a time. If you reject changes in one diff, you will not be able to view or accept changes in the other diffs. The transformation summary has details about the changes I'm proposing.
codemodernizer.chat.message.result.zip_too_large=Sorry, your project size exceeds the Amazon Q Code Transformation upload limit of 2GB.
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.
codemodernizer.chat.message.skip_tests=I will build your module using `mvn test` by default. If you would like me to build your module without running unit tests, I will use `mvn test-compile`.
Expand Down

0 comments on commit 5233625

Please sign in to comment.