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: implement provider status #288

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

federicobond
Copy link
Member

@federicobond federicobond commented Mar 4, 2024

This self-contained change introduces the functionality required to properly implement provider status events later. It has no user-visible changes at this point.

I wanted to split this out of the events pull request because it had the potential to snowball the size of the diff and lower the quality of the review in general.

I've introduced several seams that will make it easy to attach event handlers that respond to status changes later on.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 89.28571% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 94.06%. Comparing base (7ba7d61) to head (81cf99c).

Files Patch % Lines
openfeature/provider/registry.py 80.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
- Coverage   94.71%   94.06%   -0.66%     
==========================================
  Files          18       18              
  Lines         492      539      +47     
==========================================
+ Hits          466      507      +41     
- Misses         26       32       +6     
Flag Coverage Δ
unittests 94.06% <89.28%> (-0.66%) ⬇️

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.

Signed-off-by: Federico Bond <federicobond@gmail.com>
@toddbaert
Copy link
Member

The "short circuiting" behavior mentioned in 1.7.6 and 1.7.7 might be relevant enough to implement here as well: https://github.com/open-feature/spec/blob/37cf68b0d68b6814514bcded521b9e199efcead3/specification/sections/01-flag-evaluation.md?plain=1#L485-L502

@toddbaert toddbaert self-requested a review March 6, 2024 20:22
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.

Nothing looks wrong here to me, but there's a few related things that might be worth adding.

…L error

Signed-off-by: Federico Bond <federicobond@gmail.com>
Signed-off-by: Federico Bond <federicobond@gmail.com>
Signed-off-by: Federico Bond <federicobond@gmail.com>
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.

This looks fully spec compliant to me, as far as provider status stuff goes.

Copy link
Member

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

nice work 🏅

@federicobond federicobond merged commit 789e6e0 into open-feature:main Mar 7, 2024
10 of 12 checks passed
@federicobond federicobond deleted the provider-status branch March 7, 2024 22:02
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