Skip to content
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

#3084: use factories for client utility classes initialization, better shutdown #3087

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

SergeyRyabinin
Copy link
Contributor

@SergeyRyabinin SergeyRyabinin commented Aug 26, 2024

Issue #, if available:
#3084
Description of changes:
Use factories in the client config instead of pointers to the actual objects
Minor changes
Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

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

m_signerProvider(Aws::MakeUnique<Aws::Auth::DefaultAuthSignerProvider>(AWS_CLIENT_LOG_TAG, signer)),
m_httpClient(CreateHttpClient(configuration)),
m_httpClient(CreateHttpClient(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is wild, I know...

*/
std::shared_ptr<RetryStrategy> retryStrategy;
std::shared_ptr<RetryStrategy> retryStrategy = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we make a ClientConfiguration constructor that takes a ProviderFactories instead of push the logic to the client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can do it later.
Additionally, I see no much extra harm in default-initing to default factories and then allowing users to over-write.

@SergeyRyabinin SergeyRyabinin merged commit c81ebfa into main Aug 27, 2024
4 checks passed
@SergeyRyabinin SergeyRyabinin deleted the sr/execEpPtrs branch August 27, 2024 17:12
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.

AWSClient segfaults after a data race
2 participants