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

feat: add flag metadata #459

Merged
merged 6 commits into from
Jun 7, 2023

Conversation

Kavindu-Dodan
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan commented May 31, 2023

This PR

Is connected to #437 & completes the implementation of flag metadata spec implementation [1]

The implementation is backed by immutable FlagMetadata. If present, metadata gets propagated from ProviderEvaluation to FlagEvaluationDetails

Tests were added to validate the construction as well as the propagation

[1] - open-feature/spec@74c373e

@Kavindu-Dodan Kavindu-Dodan requested a review from a team as a code owner May 31, 2023 18:38
@Kavindu-Dodan Kavindu-Dodan changed the title Feat/flag metadata feat: introduce flag metadata May 31, 2023
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #459 (207545b) into main (5f173ff) will decrease coverage by 0.45%.
The diff coverage is 100.00%.

❗ Current head 207545b differs from pull request most recent head e78fed7. Consider uploading reports for the commit e78fed7 to get more accurate results

@@             Coverage Diff              @@
##               main     #459      +/-   ##
============================================
- Coverage     94.09%   93.65%   -0.45%     
+ Complexity      257      231      -26     
============================================
  Files            24       24              
  Lines           576      536      -40     
  Branches         35       33       -2     
============================================
- Hits            542      502      -40     
  Misses           17       17              
  Partials         17       17              
Flag Coverage Δ
unittests 93.65% <100.00%> (-0.45%) ⬇️

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

Impacted Files Coverage Δ
...ava/dev/openfeature/sdk/FlagEvaluationDetails.java 100.00% <100.00%> (ø)
...rc/main/java/dev/openfeature/sdk/FlagMetadata.java 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

@toddbaert toddbaert changed the title feat: introduce flag metadata feat: add flag metadata May 31, 2023
@toddbaert
Copy link
Member

@Kavindu-Dodan this all looks good to me, except that I'm not sure about throwing on failed retrieval.

This seems like a typical eventuality, not an exceptional one.

@toddbaert toddbaert requested review from a team May 31, 2023 19:14
@Kavindu-Dodan
Copy link
Contributor Author

Kavindu-Dodan commented Jun 5, 2023

@Kavindu-Dodan this all looks good to me, except that I'm not sure about throwing on failed retrieval.

This seems like a typical eventuality, not an exceptional one.

Updated the implementation to avoid exceptions. Instead now we return null for missing key & value type differences , along with debug level log entry

cc - @thisthat

Copy link
Member

@thiyagu06 thiyagu06 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
@toddbaert
Copy link
Member

@Kavindu-Dodan I rebased on main and resolved conflicts with @lopitz 's recent PR. I hope you don't mind. This looks good to me, and we have lots of approvals so I'm merging.

@toddbaert toddbaert merged commit 3ed40a3 into open-feature:main Jun 7, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

5 participants