Skip to content

Feature - Update aws-toolkit-commons package #4159

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

Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should delete this since its non user facing?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I'd say so. Also would suggest using "telemetry" as the commit-message prefix (aka topic)

"type": "Bug Fix",
"description": "Fix telemetry logging for new Amazon Q Code Transform telemetry updates"
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4263,7 +4263,7 @@
},
"devDependencies": {
"@aws-sdk/types": "^3.13.1",
"@aws-toolkits/telemetry": "^1.0.169",
"@aws-toolkits/telemetry": "^1.0.171",
"@aws/fully-qualified-names": "^2.1.1",
"@cspotcode/source-map-support": "^0.8.1",
"@sinonjs/fake-timers": "^10.0.2",
Expand Down
9 changes: 4 additions & 5 deletions src/codewhisperer/service/transformByQHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function validateProjectSelection(project: vscode.QuickPickItem) {
vscode.window.showErrorMessage(CodeWhispererConstants.noSupportedJavaProjectsFoundMessage, { modal: true })
telemetry.codeTransform_isDoubleClickedToTriggerInvalidProject.emit({
codeTransformSessionId: codeTransformTelemetryState.getSessionId(),
codeTransformPreValidationError: 'No Java project found' as CodeTransformPreValidationError,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typecast with as is unnecessary.

codeTransformPreValidationError: 'NoJavaProject',
result: MetadataResult.Fail,
})
throw new TransformByQJavaProjectNotFound()
Expand All @@ -107,7 +107,7 @@ export async function validateProjectSelection(project: vscode.QuickPickItem) {
vscode.window.showErrorMessage(CodeWhispererConstants.noSupportedJavaProjectsFoundMessage, { modal: true })
telemetry.codeTransform_isDoubleClickedToTriggerInvalidProject.emit({
codeTransformSessionId: codeTransformTelemetryState.getSessionId(),
codeTransformPreValidationError: 'No Java project found' as CodeTransformPreValidationError,
codeTransformPreValidationError: 'NoJavaProject',
result: MetadataResult.Fail,
})
throw new ToolkitError('Unable to determine Java version', {
Expand All @@ -125,8 +125,7 @@ export async function validateProjectSelection(project: vscode.QuickPickItem) {
vscode.window.showErrorMessage(CodeWhispererConstants.noSupportedJavaProjectsFoundMessage, { modal: true })
telemetry.codeTransform_isDoubleClickedToTriggerInvalidProject.emit({
codeTransformSessionId: codeTransformTelemetryState.getSessionId(),
codeTransformPreValidationError:
'Project selected is not Java 8 or Java 11' as CodeTransformPreValidationError,
codeTransformPreValidationError: 'UnsupportedJavaVersion',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New values DO NOT have spaces.

result: MetadataResult.Fail,
reason: javaVersion,
})
Expand All @@ -142,7 +141,7 @@ export async function validateProjectSelection(project: vscode.QuickPickItem) {
vscode.window.showErrorMessage(CodeWhispererConstants.noPomXmlFoundMessage, { modal: true })
telemetry.codeTransform_isDoubleClickedToTriggerInvalidProject.emit({
codeTransformSessionId: codeTransformTelemetryState.getSessionId(),
codeTransformPreValidationError: 'Only Maven projects supported' as CodeTransformPreValidationError,
codeTransformPreValidationError: 'NonMavenProject',
result: MetadataResult.Fail,
reason: buildType,
})
Expand Down