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

Feature - Update aws-toolkit-commons package #4051

Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix telemetry logging for new Amazon Q Code Transform telemetry updates"
Copy link
Contributor

Choose a reason for hiding this comment

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

non-userfacing so does not need a changelog

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for letting me know. Should I delete?

Copy link
Contributor

Choose a reason for hiding this comment

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

happy to keep, doesn't hurt

}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ kotlinCoroutines = "1.6.4"
mockito = "5.8.0"
mockitoKotlin = "5.2.1"
mockk = "1.13.8"
telemetryGenerator = "1.0.169"
telemetryGenerator = "1.0.171"
testLogger = "3.1.0"
testRetry = "1.5.2"
slf4j = "1.7.36"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
false,
message("codemodernizer.notification.warn.invalid_project.description.reason.remote_backend"),
InvalidTelemetryReason(
CodeTransformPreValidationError.ProjectRunningOnBackend
CodeTransformPreValidationError.RemoteRunProject
)
)
}
Expand All @@ -126,7 +126,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
false,
message("codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in"),
InvalidTelemetryReason(
CodeTransformPreValidationError.NonSSOLogin
CodeTransformPreValidationError.NonSsoLogin
)
)
}
Expand All @@ -136,7 +136,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
false,
message("codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots"),
InvalidTelemetryReason(
CodeTransformPreValidationError.EmptyProject
CodeTransformPreValidationError.NoPom
Copy link
Contributor

@tincheng tincheng Dec 12, 2023

Choose a reason for hiding this comment

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

Is it possible to keep the reason more generic, such as NoBuildFile? Q Transform will support other build tools like Gradle and a generic reason "missing_content_roots" is applicable to these other build tools as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now its not clear what we are going to support. And right now specifics around maven/gradle are useful metrics to have to determine how many projects we have or do not have with our specific requirements.

)
)
}
Expand All @@ -147,7 +147,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
false,
message("codemodernizer.notification.warn.invalid_project.description.reason.invalid_jdk_versions", supportedJavaMappings.keys.joinToString()),
InvalidTelemetryReason(
CodeTransformPreValidationError.ProjectSelectedIsNotJava8OrJava11,
CodeTransformPreValidationError.UnsupportedJavaVersion,
project.tryGetJdk().toString()
)
)
Expand All @@ -160,7 +160,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
false,
message("codemodernizer.notification.warn.invalid_project.description.reason.no_valid_files", supportedBuildFileNames.joinToString()),
InvalidTelemetryReason(
CodeTransformPreValidationError.ProjectSelectedIsNotJava8OrJava11,
CodeTransformPreValidationError.NonMavenProject,
Copy link
Contributor

Choose a reason for hiding this comment

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

Once we started supporting other build tools like Gradle, this telemetry would likely become something more generic like NoSupportedProjectType if project is neither Maven or Gradle. Would it be better to start using that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now specifics around maven/gradle are useful metrics to have to determine how many projects we have or do not have with our specific requirements.

if (isGradleProject(project)) "Gradle build" else "other build"
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class CodeWhispererCodeModernizerTest : CodeWhispererCodeModernizerTestBase() {
false,
message("codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in"),
InvalidTelemetryReason(
CodeTransformPreValidationError.NonSSOLogin
CodeTransformPreValidationError.NonSsoLogin
)
)
assertEquals(expectedResult, result)
Expand Down
Loading