Skip to content
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

Amazon Q Code Transformation maven telemetry changes #681

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1078,14 +1078,24 @@
]
},
{
"name": "codeTransformMavenBuildCommand",
"name": "codeTransformCommandExecutables",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename to codeTransformBuildToolExecutable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to get a more generic name as we might not only add build commands here. Could be other setup commands for other build tools and looking ahead other programs.

"type": "string",
"description": "Type of maven command",
"allowedValues": [
"mvn",
"mvnw",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially add mvn.cmd and mvnw.cmd? Or a boolean field for Windows?

"IDEBundledMaven"
]
},
{
"name": "codeTransformCommandNames",
"type": "string",
"description": "Type of maven, gradle and other command line arguments run in the IDE",
"allowedValues": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree that we need something like this for the shell commands

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets exhaust all the options we want in here offline.

"MavenInstall",
"MavenCopy",
"JavaP"
]
}
],
"metrics": [
Expand Down Expand Up @@ -3556,6 +3566,14 @@
"type": "codeTransformSessionId",
"required": true
},
{
"type": "codeTransformRuntimeError",
"required": true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be false because it's not always applicable. Either way this was merged recently in my PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted: should make sure this is updated to false during merge/rebase

},
{
"type": "codeTransformCommandNames",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this field here? I don't think it applies to this metric, besides for javap, but we already handle that: codeTransformPreValidationError: 'NoJavaProject'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought: There are sub groups within the preValidationError. For example 'NoJavaProject' can have two different paths to trigger in VSCode right?

"required": true
},
{ "type": "result", "required": true },
{ "type": "reason", "required": true }
]
Expand Down Expand Up @@ -3904,12 +3922,20 @@
"required": true
},
{
"type": "codeTransformMavenBuildCommand",
"type": "codeTransformCommandExecutables",
"required": true
},
{
"type": "codeTransformRuntimeError",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already put the failure reason under reason -- do we want this so that we can hard-code the reason field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thoughts: We will use the reason field to have MavenInstall or MavenCopy and the runtime error will be the output of the command.

"required": true
},
{
"type": "reason",
"required": false
"required": true
},
{
"type": "result",
"required": true
}
]
}
Expand Down
Loading