-
Notifications
You must be signed in to change notification settings - Fork 187
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: move smithy config customization into the smithy code generator #1599
fix: move smithy config customization into the smithy code generator #1599
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
…g-customization-into-smithy-codegen
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
add: accessor docs
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default(); | ||
let timeout_config = conf.timeout_config.as_ref().cloned().unwrap_or_default(); | ||
let sleep_impl = conf.sleep_impl.clone(); | ||
let retry_config = conf.retry_config().cloned().unwrap_or_default(); |
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.
Not blocking since it was already doing this before: it seems like timeout_config
and retry_config
could both be pub(crate)
and then we could avoid the clones since we already have ownership of the Config
struct.
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.
We can't do that b/c we need to use the Config
struct to build the service client. Only part of it is used to create the inner smithy client.
Co-authored-by: John DiSanti <[email protected]>
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
#1598
Description
Previously, the config customizations that added functionality related to retry configs, timeout configs, and the async sleep impl were defined in the smithy codegen module but were being loaded in the AWS codegen module. They have now been updated to be loaded during smithy codegen. The affected classes are all defined in the
software.amazon.smithy.rust.codegen.smithy.customizations
module of smithy codegen. This change does not affect the generated code.These classes have been removed:
RetryConfigDecorator
SleepImplDecorator
TimeoutConfigDecorator
These classes have been renamed:
RetryConfigProviderConfig
is nowRetryConfigProviderCustomization
PubUseRetryConfig
is nowPubUseRetryConfigGenerator
SleepImplProviderConfig
is nowSleepImplProviderCustomization
TimeoutConfigProviderConfig
is nowTimeoutConfigProviderCustomization
Testing
Ran existing tests
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.