-
Notifications
You must be signed in to change notification settings - Fork 436
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
feat(amazonq): enable SQL conversions feature #5925
base: master
Are you sure you want to change the base?
Conversation
|
|
TODO: add changelog entry |
c5a5a14
to
112bd34
Compare
@@ -80,6 +81,7 @@ import { setContext } from '../../shared/vscode/setContext' | |||
import { makeTemporaryToolkitFolder } from '../../shared' | |||
import globals from '../../shared/extensionGlobals' | |||
import { convertDateToTimestamp } from '../../shared/datetime' | |||
import { spawnSync } from 'child_process' |
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.
use our ChildProcess wrapper unless there is a technical reason why it can't be used.
export class ChildProcess { |
It has logging, and will eventually gain some performance-tracking and telemetry features.
// as long as at least one of these strings is found, project contains embedded SQL statements | ||
const searchStrings = ['oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@//', 'jdbc:oracle:oci:@//'] | ||
for (const str of searchStrings) { | ||
const command = process.platform === 'win32' ? 'findstr' : 'grep' |
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.
there is a isWin
util function
63322df
to
09de871
Compare
@@ -624,6 +639,14 @@ export class GumbyController { | |||
|
|||
case ConversationState.WAITING_FOR_TRANSFORMATION_OBJECTIVE: { | |||
const objective = data.message.trim().toLowerCase() | |||
// since we're prompting the user, their project(s) must be eligible for both types of transformations, so track how often this happens here | |||
if (objective === 'language upgrade' || objective === 'sql conversion') { | |||
telemetry.codeTransform_submitSelection.emit({ |
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.
Best practice to use a run
block, but I don't have anything to do here, just want to emit a metric to track how often the user gets to this point because it's meaningful for us. Furthermore, handleLanguageUpgrade
and handleSQLConversion
below already emit a validateProject
metric.
Problem
Enable the SQL conversion feature for
/transform
.Solution
Enable feature, intended for 11/21 release.
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.