Skip to content

Conversation

@Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Feb 6, 2025

Description

There is no need to store a client as a state within this class, AwsClientManager already handle the connection change

resolve comments #5290 (comment)

License

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

@Will-ShaoHua Will-ShaoHua changed the title cwsprClientAdaptor should use awsClientManager client directly cwsprClientAdaptor should be stateless and get client directly from AwsClientManager Feb 6, 2025
@Will-ShaoHua Will-ShaoHua marked this pull request as ready for review February 6, 2025 20:16
@Will-ShaoHua Will-ShaoHua requested a review from a team as a code owner February 6, 2025 20:16
@Will-ShaoHua Will-ShaoHua requested review from andrewyuq and rli February 6, 2025 20:16
@Will-ShaoHua Will-ShaoHua changed the title cwsprClientAdaptor should be stateless and get client directly from AwsClientManager make cwsprClientAdapr stateless and obtain sdk client directly from AwsClientManager Feb 6, 2025
@Will-ShaoHua Will-ShaoHua changed the title make cwsprClientAdapr stateless and obtain sdk client directly from AwsClientManager refactor(Q): make cwsprClientAdapr stateless and obtain sdk client directly from AwsClientManager Feb 10, 2025
myBearerClient = getBearerClient()
return myBearerClient as CodeWhispererRuntimeClient
}
private fun bearerClient(): CodeWhispererRuntimeClient = project.awsClient()
Copy link
Contributor

Choose a reason for hiding this comment

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

i think for safety this still needs to go through connection manager

Copy link
Contributor Author

@Will-ShaoHua Will-ShaoHua Feb 11, 2025

Choose a reason for hiding this comment

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

sgtm

@Will-ShaoHua Will-ShaoHua marked this pull request as draft February 11, 2025 18:35
@Will-ShaoHua Will-ShaoHua marked this pull request as ready for review February 12, 2025 17:36
@Will-ShaoHua
Copy link
Contributor Author

not needed for 2/13 release

@Will-ShaoHua Will-ShaoHua requested a review from rli February 12, 2025 18:19
@Will-ShaoHua Will-ShaoHua changed the title refactor(Q): make cwsprClientAdapr stateless and obtain sdk client directly from AwsClientManager refactor(Q tech debt): make cwsprClientAdapr stateless and obtain sdk client directly from AwsClientManager Feb 14, 2025
@Will-ShaoHua Will-ShaoHua changed the title refactor(Q tech debt): make cwsprClientAdapr stateless and obtain sdk client directly from AwsClientManager refactor(Q tech debt): make cwsprClientAdapr stateless and obtain sdk client from AwsClientManager Feb 14, 2025
@Will-ShaoHua Will-ShaoHua merged commit 4971993 into aws:main Feb 14, 2025
11 of 14 checks passed
@Will-ShaoHua Will-ShaoHua deleted the client branch February 14, 2025 19:33
Will-ShaoHua added a commit to Will-ShaoHua/aws-toolkit-jetbrains that referenced this pull request Feb 18, 2025
…tain sdk client from AwsClientManager (aws#5331)"

This reverts commit 4971993.
rli pushed a commit that referenced this pull request Feb 18, 2025
Will-ShaoHua added a commit to Will-ShaoHua/aws-toolkit-jetbrains that referenced this pull request Mar 18, 2025
Will-ShaoHua added a commit that referenced this pull request Mar 20, 2025
* Revert "revert(amazonq): pr #5331 broke tests by throwing NotAMock (#5383)"

This reverts commit fd7eb31.
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