-
Notifications
You must be signed in to change notification settings - Fork 251
feat(amazonq): client-side build support #5587
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
@@ -375,6 +390,33 @@ | |||
type = CodeTransformChatMessageType.FinalizedAnswer, | |||
) | |||
|
|||
fun buildUserInputCustomDependencyVersionsChatContent() = CodeTransformChatMessageContent( |
Check warning
Code scanning / QDJVMC
Unused symbol Warning
...are/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt
Fixed
Show fixed
Hide fixed
...oftware/aws/toolkits/jetbrains/services/codemodernizer/model/CodeModernizerSessionContext.kt
Show resolved
Hide resolved
@@ -44,6 +64,8 @@ data class PollingResult( | |||
val transformationPlan: TransformationPlan?, | |||
) | |||
|
|||
private const val IS_CLIENT_SIDE_BUILD_ENABLED = false |
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.
You'll notice there are a good amount of TO-DOs in this PR — the intention is to merge this feature behind a feature flag (this one), and simply enable everything in a future PR, once we are ready to release. I'm tracking all TO-DOs to ensure when we release they are all addressed.
...ins-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt
Show resolved
Hide resolved
...s-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/ZipManifest.kt
Show resolved
Hide resolved
) | ||
|
||
fun buildInvalidTargetJdkNameChatContent(jdkName: String) = CodeTransformChatMessageContent( | ||
message = message("codemodernizer.chat.message.enter_jdk_name_error", jdkName), |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
} | ||
} | ||
|
||
// TODO: uncomment when releasing CSB |
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.
? isn't this the PR for the feature
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.
Yes but we have this feature broken down into 3 milestones. This PR is for milestones 1 and 2, to be merged behind a feature flag. My next PR will be for milestone 3 plus enabling the feature overall.
var exitCode: Int? = null | ||
private var output: String? = null | ||
|
||
fun setExitCode(i: Int) { |
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.
might as well delete the setter
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.
Will make it private
again and add a getter
} | ||
|
||
val (exitCode, buildOutput) = runClientSideBuild(targetDir, CodeModernizerManager.LOG, project) | ||
getLogger<CodeModernizerManager>().info { "Ran client-side build with an exit code of $exitCode" } |
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.
can you extract this a private val
getLogger<CodeModernizerManager>().info { "Ran client-side build with an exit code of $exitCode" } | |
getLogger<CodeModernizerManager>().info { "Ran client-side build with an exit code of $exitCode" } |
Types of changes
Description
Problem: We should perform builds client-side (rather than server-side) to handle customers’ unique / challenging local environments, which often cause our server-side build to fail.
Solution: Periodically download intermediate diff.patch files, apply them to a copy of the project, perform the local build, then upload the build logs and resume the transformation.
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.