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 Requirement 1.1.2 #78

Merged
merged 13 commits into from
Feb 22, 2024
Merged

feat: Implement Requirement 1.1.2 #78

merged 13 commits into from
Feb 22, 2024

Conversation

maxveldink
Copy link
Member

This PR

Note that this is built off of #77 and will not have that base commit if that commit is accepted.

  • Updates README to mention that Providers can invoke an init and shutdown method. I believe we want to leave the default initialize behavior alone in Ruby to satisfy this requirement. This means someone can initialize a Provider instance (and use whatever construction logic there is) and define an init method invoked when the provider is set.
  • For now, I'm choosing to overload the provider writer method on Configuration with the behavior required for this requirement. In the following Requirement, which introduced named providers, we should consider renaming this to set_provider or register_provider or something similar, as there will be an additional argument that would be an unexpected writer signature. That will be a breaking change and is not strictly required for this requirement, so I decided to defer that.

Follow-up Tasks

I plan on continuing to implement the flag evaluation API in subsequent PRs.

How to test

Ensure that providers can still be set while configuring OpenFeature. You can play around with a stub Provider that implements init and shutdown to verify those are also called as expected.

@maxveldink maxveldink requested a review from a team as a code owner September 17, 2023 00:44
@codecov
Copy link

codecov bot commented Sep 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2d89570) 99.22% compared to head (f65650d) 99.25%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   99.22%   99.25%   +0.02%     
==========================================
  Files          11       11              
  Lines         129      134       +5     
==========================================
+ Hits          128      133       +5     
  Misses          1        1              

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

beeme1mr
beeme1mr previously approved these changes Sep 21, 2023
josecolella
josecolella previously approved these changes Sep 22, 2023
Copy link
Collaborator

@technicalpickles technicalpickles left a comment

Choose a reason for hiding this comment

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

Thanks for continuing work on this 🙇🏻

lib/openfeature/sdk/configuration.rb Outdated Show resolved Hide resolved
lib/openfeature/sdk/configuration.rb Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@maxveldink
Copy link
Member Author

@technicalpickles Apologies for the multi-month delay here; just wrapped up paternity leave! Will review the comments and respond/push some fixes today or tomorrow.

Creates a new specification folder under specs that contains direct OpenFeature specification tests. Adds a test for Requirement 1.1.1.

Signed-off-by: Max VelDink <[email protected]>

Test name typo

Signed-off-by: Max VelDink <[email protected]>
Signed-off-by: Max VelDink <[email protected]>
move to Configuration instead of being directly on API.

Signed-off-by: Max VelDink <[email protected]>
beeme1mr
beeme1mr previously approved these changes Jan 26, 2024
@maxveldink
Copy link
Member Author

@technicalpickles @josecolella Bumping this PR to see if you all might have any time to review it this week 🙏🏻

@beeme1mr
Copy link
Member

beeme1mr commented Feb 6, 2024

Hey @toddbaert, could you please take a quick look at this pr to unblock @maxveldink?

@toddbaert toddbaert self-requested a review February 6, 2024 16:06
@toddbaert
Copy link
Member

@maxveldink @beeme1mr I'll review this today.

josecolella
josecolella previously approved these changes Feb 6, 2024
@maxveldink maxveldink enabled auto-merge (squash) February 6, 2024 17:23
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
toddbaert
toddbaert previously approved these changes Feb 6, 2024
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.

Seems spec compliant as far as I can tell. Could you verify this for me?

Co-authored-by: Todd Baert <[email protected]>
Signed-off-by: Max VelDink <[email protected]>
Copy link
Collaborator

@technicalpickles technicalpickles left a comment

Choose a reason for hiding this comment

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

I started this review after the first ping, but never submitted 😨

README.md Show resolved Hide resolved
lib/open_feature/sdk/configuration.rb Outdated Show resolved Hide resolved
Co-authored-by: Josh Nichols <[email protected]>
Signed-off-by: Max VelDink <[email protected]>
toddbaert
toddbaert previously approved these changes Feb 9, 2024
@maxveldink maxveldink merged commit 8cea7d0 into open-feature:main Feb 22, 2024
10 checks passed
This was referenced Feb 22, 2024
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