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: return correct type object in OpenFeatureClient._create_provider_evaluation #136

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

federicobond
Copy link
Member

@federicobond federicobond commented Jul 6, 2023

The _create_provider_evaluation method is declared as returning a FlagEvaluationDetails but actually returned the FlagResolutionDetails directly from the provider.

With this change, a FlagEvaluationDetails object is created from the resolution details aligning the implementation with the spec and the declared types.

Similar code can found in the Java SDK:

https://github.com/open-feature/java-sdk/blob/9ddc9f1cb2c85c2d096a493342e429120ff36e92/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java#L134

@federicobond federicobond force-pushed the fix-provider-evaluation branch 3 times, most recently from 1872238 to a4b0f17 Compare July 6, 2023 14:30
…_evaluation

Signed-off-by: Federico Bond <federicobond@gmail.com>
@federicobond federicobond force-pushed the fix-provider-evaluation branch from a4b0f17 to c9367cb Compare July 6, 2023 14:31
@federicobond federicobond changed the title Return correct type object in OpenFeatureClient._create_provider_evaluation fix: return correct type object in OpenFeatureClient._create_provider_evaluation Jul 6, 2023
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #136 (7d9909a) into main (291581f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
+ Coverage   93.09%   93.11%   +0.01%     
==========================================
  Files          20       20              
  Lines         362      363       +1     
==========================================
+ Hits          337      338       +1     
  Misses         25       25              
Flag Coverage Δ
unittests 93.11% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
open_feature/open_feature_client.py 96.51% <100.00%> (+0.04%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

Yep, looks like this was missed when we addressed this.

@toddbaert toddbaert merged commit 052e149 into open-feature:main Jul 6, 2023
@federicobond federicobond deleted the fix-provider-evaluation branch July 6, 2023 17:36
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.

3 participants