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

fix: consistent method chainability #913

Merged
merged 5 commits into from
May 2, 2024
Merged

Conversation

DBlanchard88
Copy link
Contributor

@DBlanchard88 DBlanchard88 commented Apr 30, 2024

-Client Interface: Modified setEvaluationContext and addHooks to return Client instances, enabling chaining.
-MutableContext: Updated setTargetingKey to return a MutableContext instance.
-OpenFeatureAPI: Altered setEvaluationContext to return OpenFeatureAPI instances.
-OpenFeatureClient: Updated both addHooks and setEvaluationContext to return OpenFeatureClient instances.
-Added unit tests to verify chainability for each updated method.

Fixes: #906

Signed-off-by: DBlanchard88 <davidblanchard88@gmail.com>
Signed-off-by: DBlanchard88 <davidblanchard88@gmail.com>
Signed-off-by: DBlanchard88 <davidblanchard88@gmail.com>
@DBlanchard88 DBlanchard88 requested a review from a team as a code owner April 30, 2024 13:35
Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (f364ca5) to head (c31eb8d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #913      +/-   ##
============================================
+ Coverage     94.98%   95.21%   +0.22%     
- Complexity      383      384       +1     
============================================
  Files            36       36              
  Lines           877      877              
  Branches         53       53              
============================================
+ Hits            833      835       +2     
+ Misses           24       23       -1     
+ Partials         20       19       -1     
Flag Coverage Δ
unittests 95.21% <100.00%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

I can't see any issues with this, and I can't see how any of these could be considered breaking.

Anyone else concerned about this?

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

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

LGTM

@toddbaert
Copy link
Member

I'll merge this tomorrow at the latest unless anyone has objections.

Copy link

sonarcloud bot commented May 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@toddbaert toddbaert changed the title fix: added Method Chainability fix: consistent method chainability May 2, 2024
@toddbaert toddbaert merged commit d69cf5d into open-feature:main May 2, 2024
9 checks passed
@DBlanchard88 DBlanchard88 deleted the recon branch May 2, 2024 19:14
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.

Audit and fix method chain-ability in all POJOs
5 participants