Skip to content

fix: return correct type object in OpenFeatureClient._create_provider_evaluation - #136

Merged
toddbaert merged 2 commits into
open-feature:mainfrom
federicobond:fix-provider-evaluation
Jul 6, 2023
Merged

fix: return correct type object in OpenFeatureClient._create_provider_evaluation#136
toddbaert merged 2 commits into
open-feature:mainfrom
federicobond:fix-provider-evaluation

Conversation

@federicobond

@federicobondfedericobond commented Jul 6, 2023

Copy link
Copy Markdown
Member

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
federicobondforce-pushed the fix-provider-evaluation branch 3 times, most recently from 1872238 to a4b0f17CompareJuly 6, 2023 14:30
…_evaluation
Signed-off-by: Federico Bond <federicobond@gmail.com>
@federicobond
federicobondforce-pushed the fix-provider-evaluation branch from a4b0f17 to c9367cbCompareJuly 6, 2023 14:31
@federicobondfedericobond changed the title Return correct type object in OpenFeatureClient._create_provider_evaluationfix: return correct type object in OpenFeatureClient._create_provider_evaluationJul 6, 2023
@codecov

codecovBot commented Jul 6, 2023

Copy link
Copy Markdown

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 
FlagCoverage Δ
unittests93.11% <100.00%> (+0.01%)⬆️

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

Impacted FilesCoverage Δ
open_feature/open_feature_client.py96.51% <100.00%> (+0.04%)⬆️

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

@toddbaerttoddbaert left a comment

Copy link
Copy Markdown
Member

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:mainJul 6, 2023
@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2023
@federicobond
federicobond deleted the fix-provider-evaluation branch July 6, 2023 17:36
Sign up for freeto 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

@federicobond@thomaspoignant@toddbaert