Skip to content

Conversation

@FopherC
Copy link
Contributor

@FopherC FopherC commented Jul 30, 2024

Follow up of: #19 (Closed)

Summary

This PR introduces a new option dynamodb_client to the DynamoDb integration, allowing developers to reuse an existing DynamoDbClient instance. This enhancement provides more flexibility and control over the DynamoDB client configuration.

Changes

  1. New Option Added:

    • dynamodb_client: Allows passing an already-configured DynamoDbClient instance. If specified, this will cause all other options except dynamodb_prefix and dynamodb_table to be ignored.
  2. Updated DynamoDbFeatureRequester Constructor:

    • Modified the constructor to accept the dynamodb_client option and use it if provided.
  3. Documentation:

    • Updated the PHPDoc comments in DynamoDb to reflect the new option and provide usage examples.

Usage

Developers can now configure the feature_requester with an existing DynamoDbClient instance as shown below:

$dynamoClient = new Aws\DynamoDb\DynamoDbClient($settings);
$fr = LaunchDarkly\Integrations\DynamoDb::featureRequester([ 'dynamo_client' => $dynamoClient ]);
$config = [ 'feature_requester' => $fr ];
$client = new LDClient('sdk_key', $config);

Copy link
Member

@keelerm84 keelerm84 left a comment

Choose a reason for hiding this comment

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

Looks good, just a minor point to discuss.

@FopherC FopherC requested a review from keelerm84 July 31, 2024 15:15
Co-authored-by: Matthew M. Keeler <[email protected]>
@FopherC FopherC requested a review from keelerm84 July 31, 2024 15:28
@keelerm84 keelerm84 merged commit ccb1380 into launchdarkly:main Jul 31, 2024
@keelerm84
Copy link
Member

Thank you so much for your contribution and patience as we worked through getting this merged.

@FopherC FopherC deleted the feat-add-dynamodb-client-as-option branch July 31, 2024 15:36
@FopherC
Copy link
Contributor Author

FopherC commented Jul 31, 2024

My pleasure @keelerm84! one last question… will there be a new tag so everyone can download this new feat as part of 1.X?

@FopherC
Copy link
Contributor Author

FopherC commented Jul 31, 2024

Oh, sorry. Just seen this is being part of the release: #21

Thank you so much @keelerm84!

keelerm84 pushed a commit that referenced this pull request Jul 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](1.2.0...1.3.0)
(2024-07-31)


### Features

* Support using fully configured DynamoDbClient via new
`dynamodb_client` option
([#20](#20))
([ccb1380](ccb1380))


### Miscellaneous Chores

* Add test covering direct DynamoDbClient injection
([#22](#22))
([4f43ee8](4f43ee8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@keelerm84
Copy link
Member

Sorry for the delay there. This has been released now as v1.3.0

Thanks again!

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