Skip to content

Fix protocol selection behavior in ClientProtocolLoader #4165

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
merged 4 commits into from
Jun 10, 2025

Conversation

ysaito1001
Copy link
Contributor

@ysaito1001 ysaito1001 commented Jun 5, 2025

Description

The bugs include

  • The default SDK-supported protocols (DefaultProtocols) were listed in an incorrect priority order.
  • Protocol resolution logic incorrectly iterated over service-applied protocols, which is returned by getProtocols() whose result may not reflect the intended priority.

This PR addresses these issues.

Testing

  • Existing CI
  • ClientProtocolLoaderTest.kt

Checklist

  • For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "client," "server," or both in the applies_to key.
  • For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "aws-sdk-rust" in the applies_to key.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ysaito1001 ysaito1001 marked this pull request as ready for review June 5, 2025 20:50
@ysaito1001 ysaito1001 requested review from a team as code owners June 5, 2025 20:50
Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

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

Good catch on this bug!

Copy link

github-actions bot commented Jun 5, 2025

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001 ysaito1001 merged commit fd8b4f6 into main Jun 10, 2025
44 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/protocol-selection-tests branch June 10, 2025 19:46
ysaito1001 added a commit that referenced this pull request Jun 12, 2025
## Description
The bugs include
- The default SDK-supported protocols (`DefaultProtocols`) were listed
in an incorrect priority order.
- Protocol resolution logic incorrectly iterated over service-applied
protocols, which is returned by `getProtocols()` whose result may not
reflect the intended priority.

This PR addresses these issues.

## Testing
- Existing CI
- `ClientProtocolLoaderTest.kt`

## Checklist
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants