Skip to content

Commit d487d47

Browse files
authored
fix(amazonq): emit metric (#5864)
Modify text in some places, and modify the manifest to include the IDE field.
1 parent 02e1e02 commit d487d47

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ import software.aws.toolkits.jetbrains.services.codemodernizer.model.CustomerSel
102102
import software.aws.toolkits.jetbrains.services.codemodernizer.model.DownloadArtifactResult
103103
import software.aws.toolkits.jetbrains.services.codemodernizer.model.DownloadFailureReason
104104
import software.aws.toolkits.jetbrains.services.codemodernizer.model.EXPLAINABILITY_V1
105+
import software.aws.toolkits.jetbrains.services.codemodernizer.model.IDE
105106
import software.aws.toolkits.jetbrains.services.codemodernizer.model.InvalidTelemetryReason
106107
import software.aws.toolkits.jetbrains.services.codemodernizer.model.JobId
107108
import software.aws.toolkits.jetbrains.services.codemodernizer.model.MAVEN_BUILD_RUN_UNIT_TESTS
@@ -418,7 +419,7 @@ class CodeTransformChatController(
418419
codeModernizerManager.codeTransformationSession?.let {
419420
it.sessionContext.customBuildCommand = customBuildCommand
420421
}
421-
val transformCapabilities = listOf(EXPLAINABILITY_V1, CLIENT_SIDE_BUILD, SELECTIVE_TRANSFORMATION_V2)
422+
val transformCapabilities = listOf(EXPLAINABILITY_V1, CLIENT_SIDE_BUILD, SELECTIVE_TRANSFORMATION_V2, IDE)
422423
codeModernizerManager.codeTransformationSession?.let {
423424
it.sessionContext.transformCapabilities = transformCapabilities
424425
}

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/ZipManifest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ data class ZipManifest(
88
val dependenciesRoot: String = ZIP_DEPENDENCIES_PATH,
99
val version: String = UPLOAD_ZIP_MANIFEST_VERSION,
1010
val hilCapabilities: List<String> = listOf(HIL_1P_UPGRADE_CAPABILITY),
11-
val transformCapabilities: List<String> = listOf(EXPLAINABILITY_V1, CLIENT_SIDE_BUILD, SELECTIVE_TRANSFORMATION_V2),
11+
val transformCapabilities: List<String> = listOf(EXPLAINABILITY_V1, CLIENT_SIDE_BUILD, SELECTIVE_TRANSFORMATION_V2, IDE),
1212
val customBuildCommand: String = MAVEN_BUILD_RUN_UNIT_TESTS,
1313
val requestedConversions: RequestedConversions? = null, // only used for SQL conversions for now
1414
var dependencyUpgradeConfigFile: String? = null,

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/state/CodeModernizerState.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.intellij.util.xmlb.annotations.Property
1010
import software.aws.toolkits.jetbrains.services.codemodernizer.model.CLIENT_SIDE_BUILD
1111
import software.aws.toolkits.jetbrains.services.codemodernizer.model.CodeModernizerSessionContext
1212
import software.aws.toolkits.jetbrains.services.codemodernizer.model.EXPLAINABILITY_V1
13+
import software.aws.toolkits.jetbrains.services.codemodernizer.model.IDE
1314
import software.aws.toolkits.jetbrains.services.codemodernizer.model.JobId
1415
import software.aws.toolkits.jetbrains.services.codemodernizer.model.MAVEN_BUILD_RUN_UNIT_TESTS
1516
import software.aws.toolkits.jetbrains.services.codemodernizer.model.SELECTIVE_TRANSFORMATION_V2
@@ -69,7 +70,7 @@ class CodeModernizerState : BaseState() {
6970
configurationFile,
7071
sourceJavaSdkVersion,
7172
targetJavaSdkVersion,
72-
listOf(EXPLAINABILITY_V1, SELECTIVE_TRANSFORMATION_V2, CLIENT_SIDE_BUILD),
73+
listOf(EXPLAINABILITY_V1, SELECTIVE_TRANSFORMATION_V2, CLIENT_SIDE_BUILD, IDE),
7374
lastJobContext[JobDetails.CUSTOM_BUILD_COMMAND] ?: MAVEN_BUILD_RUN_UNIT_TESTS // default to running unit tests
7475
)
7576
}

plugins/amazonq/mynah-ui/src/mynah-ui/ui/tabs/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ What would you like to work on?`,
6767
],
6868
[
6969
'codetransform',
70-
`Welcome to Code Transformation! You can also run transformations from the command line. To install the tool, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/run-CLI-transformations.html).`,
70+
`Welcome to Code Transformation! **You can also run transformations from the command line. To install the tool, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/run-CLI-transformations.html).**`,
7171
],
7272
[
7373
'doc',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ codemodernizer.chat.message.upload_failed_other=Sorry, I was unable to upload yo
707707
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.
708708
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'.
709709
codemodernizer.chat.message.validation.check_eligible_modules=Checking for eligible modules...
710-
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 transforming to 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.\n\nI will perform the transformation based on your project's requests, descriptions, and content. To maintain security, avoid including external, unvetted artifacts in your project repository prior to starting the transformation and always validate transformed code for both functionality and security.
710+
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 transforming to 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.\n\nI will perform the transformation based on your project's requests, descriptions, and content. To maintain security, avoid including external, unvetted artifacts in your project repository prior to starting the transformation and always validate transformed code for both functionality and security. Do not turn off or close your machine during the transformation because a stable network connection is required.
711711
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.
712712
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.
713713
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.
@@ -831,7 +831,7 @@ codemodernizer.toolwindow.label=Transformation Hub - {0}
831831
codemodernizer.toolwindow.label_no_job=Transformation Hub
832832
codemodernizer.toolwindow.problems_mvn_window_not_found=Unable to display Code Transform results as the Maven window cannot be fetched.
833833
codemodernizer.toolwindow.problems_window_not_found=Unable to display Code Transform results as the Problems View tool window cannot be fetched.
834-
codemodernizer.toolwindow.progress.building=Build uploaded code in secure build environment
834+
codemodernizer.toolwindow.progress.building=Analyze uploaded code in secure environment
835835
codemodernizer.toolwindow.progress.parent=Transformation progress
836836
codemodernizer.toolwindow.progress.planning=Generate transformation plan
837837
codemodernizer.toolwindow.progress.transforming=Transform your code

0 commit comments

Comments
 (0)