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

fix(amazonq): add field for builderId vs IdC #4249

Merged
merged 6 commits into from
Apr 8, 2024
Merged

fix(amazonq): add field for builderId vs IdC #4249

merged 6 commits into from
Apr 8, 2024

Conversation

dhasani23
Copy link
Contributor

@dhasani23 dhasani23 commented Apr 8, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Need to track if users using builderId or IdC for /transform. Had some redundant telemetry/logging. Deleted dead code too.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dhasani23 dhasani23 requested review from a team as code owners April 8, 2024 20:05
@@ -143,19 +143,13 @@ class CodeModernizerSession(
LOG.warn { "Job was cancelled by user before start job was called" }
CodeModernizerStartJobResult.Cancelled
} else {
val errorMessage = "Failed to start job"
LOG.error(e) { errorMessage }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was already being logged and emitted elsewhere

@dhasani23 dhasani23 changed the title fix(amazonq): improve telemetry fix(amazonq): add field for builderId vs IdC Apr 8, 2024
Copy link

sonarqubecloud bot commented Apr 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

fun jobIsStartedFromChatPrompt() {
val connection = checkBearerConnectionValidity(project, BearerTokenFeatureSet.Q)
var authType: CredentialSourceId? = null
if (connection.connectionType == ActiveConnectionType.IAM_IDC && connection is ActiveConnection.ValidBearer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can probably check connection is ActiveConnection.ValidBearer as an outer if.

@dhasani23 dhasani23 merged commit 804dca8 into aws:main Apr 8, 2024
10 of 11 checks passed
kumsmrit pushed a commit to kumsmrit/aws-toolkit-jetbrains that referenced this pull request Apr 16, 2024
* fix(amazonq): improve telemetry

* remove unused import

* address comments

* fix detekt issue

---------

Co-authored-by: David Hasani <[email protected]>
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.

3 participants