-
Notifications
You must be signed in to change notification settings - Fork 274
feat(amazonq): UTG build and execute for internal users. #5436
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
Conversation
…& add telemetry for build&execute
* fix(amazonq):fix cross-tab data interference * fix(amazonq):fix cross-tab data interference Co-authored-by: Kevin Ding <[email protected]> Co-authored-by: aws-toolkit-automation <[email protected]>
.../src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt
Fixed
Show fixed
Hide fixed
| jobId = session.testGenerationJob, | ||
| result = if (e.message == message("testgen.message.cancelled")) MetricResult.Cancelled else MetricResult.Failed, | ||
| reason = (e as CodeTestException).code ?: "DefaultError", | ||
| reasonDesc = if (e.message == message("testgen.message.cancelled")) "${e.code}: ${e.message}" else e.message, |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Dismissed
Show dismissed
Hide dismissed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Dismissed
Show dismissed
Hide dismissed
.../software/aws/toolkits/jetbrains/services/amazonqCodeTest/model/BuildAndExecuteStatusIcon.kt
Fixed
Show fixed
Hide fixed
...-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/utils/UTGChatUtil.kt
Fixed
Show fixed
Hide fixed
.../src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt
Fixed
Show fixed
Hide fixed
.../src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Dismissed
Show dismissed
Hide dismissed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...ns-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/session/Session.kt
Fixed
Show fixed
Hide fixed
...-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/utils/UTGChatUtil.kt
Fixed
Show fixed
Hide fixed
...-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeTestChatItems.kt
Dismissed
Show dismissed
Hide dismissed
.../src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
.../software/aws/toolkits/jetbrains/services/amazonqCodeTest/model/BuildAndExecuteStatusIcon.kt
Fixed
Show fixed
Hide fixed
|
/retryBuilds |
464233b to
3dcde41
Compare
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt
Fixed
Show fixed
Hide fixed
…s for V1 version of build and execute
… and UTGChatUtil files
| session.charsOfCodeGenerated, | ||
| session.charsOfCodeGenerated | ||
|
|
||
| UiTelemetry.click( |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
| ) | ||
| codeTestChatHelper.updateUI( | ||
| promptInputDisabledState = true, | ||
| promptInputPlaceholder = message("testgen.placeholder.select_an_action_to_proceed"), |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
| ) | ||
| delay(1000) | ||
| codeTestChatHelper.sendUpdatePromptProgress(session.tabId, null) | ||
| AmazonqTelemetry.unitTestGeneration( |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
| return | ||
| } | ||
| "stop_test_gen_build_and_execution" -> { | ||
| UiTelemetry.click(context.project, "unitTestGeneration_cancelBuildProgress") |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
| UiTelemetry.click(context.project, "unitTestGeneration_cancelBuildProgress") | ||
| session.buildStatus = BuildStatus.CANCELLED | ||
| session.isGeneratingTests = false | ||
| AmazonqTelemetry.unitTestGeneration( |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
| delay(1000) | ||
| codeTestChatHelper.addAnswer( | ||
| CodeTestChatMessageContent( | ||
| message = message("testgen.message.cancelled"), |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
| progressMessages.add("${BuildAndExecuteStatusIcon.DONE.icon} ${"Project compiled"}") | ||
| progressMessages.add("${BuildAndExecuteStatusIcon.DONE.icon} ${"All tests passed\n"}") | ||
| } | ||
| // TODO: Commenting out this code to do a better UX in the V2 version after science support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a TODO message makes sense but don't include the commented out code block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed comment!
Types of changes
Description
This PR is an extension implementation for this #5396.
This PR introduces a build-exec loop for internal Amazon users, allowing them to run a customized build command after Amazon Q generates unit tests. The goal is to ensure that the newly generated unit tests do not break the initial build.
Solution
Adding back build and execute logic for internal amazon users to fix the errors when generating unit tests. Allow users to run 3 iterations to fix the codes if there are any issues cause build failure.

Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.