Skip to content

Conversation

@chengoramazon
Copy link
Contributor

Problem

Missing user agent in Amazon Q feature development requests.
Observed errors with proxy settings.

2024-10-07 15:23:33.084 [error] Amazon Q Developer Agent for software development: failed to start get code generation results: Client network socket disconnected before secure TLS connection was established RequestId: undefined

Solution

  • set customUserAgent in the Amazon Q feature development client.

refers to #5158


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

@github-actions
Copy link

This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@github-actions
Copy link

This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions.

region: cwsprConfig.region,
endpoint: cwsprConfig.endpoint,
token: new Token({ token: bearerToken }),
customUserAgent: getUserAgent(),
Copy link
Contributor

Choose a reason for hiding this comment

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

this is already done by createAwsService(), which is called on line 42 above.

Copy link
Contributor

Choose a reason for hiding this comment

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

is a caller to createFeatureDevProxyClient perhaps passing customUserAgent and overriding this?

Copy link
Contributor Author

@chengoramazon chengoramazon Oct 15, 2024

Choose a reason for hiding this comment

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

I can not see where customUserAgent predefined in createAwsService. Can you point me to the right place?

I have verified there are not callers override the customUserAgent.

Copy link
Contributor

Choose a reason for hiding this comment

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

if (userAgent && !opt.customUserAgent) {
opt.customUserAgent = getUserAgent({ includePlatform: true, includeClientId: true })
}

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, I am going to cancel this PR then.

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