-
Notifications
You must be signed in to change notification settings - Fork 196
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
Move default endpoint resolver into a runtime plugin #3072
Conversation
e228acc
to
149fc7a
Compare
c0b5d7e
to
88718ee
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
88718ee
to
92b0c9f
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
fun addServiceRuntimePlugin(writer: RustWriter, plugin: Writable) { | ||
writer.rustTemplate(".with_service_plugin(#{plugin})", "plugin" to plugin) | ||
fun addClientPlugin(writer: RustWriter, plugin: Writable) { | ||
writer.rustTemplate(".with_client_plugin(#{plugin})", "plugin" to plugin) | ||
} | ||
|
||
fun addOperationRuntimePlugin(writer: RustWriter, plugin: Writable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: rename this to be consistent with the client level function
A new generated diff is ready to view.
A new doc preview is ready to view. |
This commit also refactors idempotency tokens to be centralized in a decorator
61194a5
to
60e4ee8
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
…-specific trait (#3078) ## Motivation and Context - Fixes #3043 As a follow up to #3072 this removes the old endpoint resolver interfaces in favor of creating a per-service resolver trait. This trait defines a `into_shared_resolver()` method which converts the local trait into a global resolver that can be used with the orchestrator. ## Description <!--- Describe your changes in detail --> ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
…-specific trait (#3078) ## Motivation and Context - Fixes #3043 As a follow up to #3072 this removes the old endpoint resolver interfaces in favor of creating a per-service resolver trait. This trait defines a `into_shared_resolver()` method which converts the local trait into a global resolver that can be used with the orchestrator. ## Description <!--- Describe your changes in detail --> ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Motivation and Context
In preparation for inlining the old endpoint traits, I'm cleaning up the endpoint resolver behavior.
Description
Config
field ofservice_runtime_plugin
was unused to I deleted itRuntimeComponents
instead of in operation config. This allows a lot of complex logic aroundConfigOverride
to be removed.EndpointResolver
, allow final construction ofRuntimeComponents
to failServiceRuntimePlugin
has been changed toDefaults
so that it doesn't overwrite settings set by the service configTesting
Well covered by existing UT / IT
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.