Skip to content

Conversation

@guicamest
Copy link
Contributor

@guicamest guicamest commented Oct 31, 2023

Description of changes:

The generateClient (and generateAsyncClient) method was quite complex, had several nested blocks (if/try/if/try/if). Some new methods have been extracted in order to make the code more readable and maintainable.

Both generateClient and generateAsyncClient shared the same logic - except for the underlying client that was generated. A new method getClientForBucket has been extracted that receives a function to construct the client for the given bucket location. The old generateClient has been renamed to generateSyncClient.

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

@guicamest guicamest force-pushed the generateClientRefactor branch from 3be97b7 to 13d1e3d Compare November 1, 2023 13:14
Copy link
Contributor

@markjschreiber markjschreiber left a comment

Choose a reason for hiding this comment

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

Thanks for tidying up this code

@markjschreiber markjschreiber merged commit f552fd6 into awslabs:main Nov 1, 2023
@guicamest guicamest deleted the generateClientRefactor branch November 1, 2023 13:25
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.

2 participants