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

Conversation

damntrecky
Copy link
Contributor

Problem

Logging for maven build failures is a bit under thought. We want to introduce some slight changes that we think will help normalize logging these failures for Telemetry/BI.

Solution

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@damntrecky damntrecky changed the title Nardeck/maven telemetry changes Amazon Q Code Transformation maven telemetry changes Jan 30, 2024
@@ -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.

"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.

@@ -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

"required": true
},
{
"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?

"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.

@@ -1078,14 +1078,24 @@
]
},
{
"name": "codeTransformMavenBuildCommand",
"name": "codeTransformCommandExecutables",
"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?

@@ -3530,6 +3540,26 @@
}
]
},
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to add an event to trigger for when projects have not yet initiated transformation to get user details. This is a P0 requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants