feat: Feature Provider Enhancement - #321#324
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
==========================================
+ Coverage 85.91% 86.66% +0.75%
==========================================
Files 34 34
Lines 1377 1387 +10
Branches 148 147 -1
==========================================
+ Hits 1183 1202 +19
+ Misses 162 153 -9
Partials 32 32 ☔ View full report in Codecov by Sentry. |
|
@toddbaert @askpt @beeme1mr Hi guys, I hope you are doing well! 🖐 |
askpt
left a comment
There was a problem hiding this comment.
LGTM! It seems that some of the DI extension classes are missing coverage. I wonder if it is worth excluding them from code coverage for the build to pass.
beeme1mr
left a comment
There was a problem hiding this comment.
Hey @arttonoyan, sorry for the delay. Last week was a holiday in the US.
The change looks good to me. Should the examples in the readme also be updated?
Oh, no problem! I forgot about that. 😊 Yes, of course, I’ll update the documentation as well. I just wanted to get your feedback first, and I’ll make sure to update it before merging. |
|
@ghelyar does this solve the issues you mentioned? |
|
yes |
toddbaert
left a comment
There was a problem hiding this comment.
This looks good to me and addresses the outside feedback.
My only blocker is updated documentation. Once you have that I can squash down the commits to one for you to sign off on if you want, @arttonoyan .
Thanks, @toddbaert ! I’ve updated the document, and I think this version is much more flexible - I’m really happy with how it’s shaping up. It’s great to see external feedback coming in; it’s been super helpful. |
…erience Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
…e#323) When provider resolutions with error code set other than `None` are returned, the provider acts as if an error was thrown. Signed-off-by: christian.lutnik <christian.lutnik@dynatrace.com> Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com>
acd5c50 to
e383697
Compare
|
Hey @toddbaert, it looks like this PR is ready! Could you please take a look when you have a moment? |
Hey @toddbaert, just a friendly reminder to take a look when you have a moment. 😊 |
🤖 I have created a release *beep* *boop* --- ## [2.2.0](v2.1.0...v2.2.0) (2024-12-12) ### ✨ New Features * Feature Provider Enhancements- [#321](#321) ([#324](#324)) ([70f847b](70f847b)) * Implement Tracking in .NET [#309](#309) ([#327](#327)) ([cbf4f25](cbf4f25)) * Support Returning Error Resolutions from Providers ([#323](#323)) ([bf9de4e](bf9de4e)) ### 🧹 Chore * **deps:** update dependency fluentassertions to v7 ([#325](#325)) ([35cd77b](35cd77b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This update focuses on enhancing the feature provider integration and testing framework, incorporating improvements to flexibility, usability, and testing capabilities. This update addresses [GitHub Issue open-feature#321](open-feature#321) in the OpenFeature .NET SDK repository. --- ### Key Enhancements 1. **Dependency Injection (DI) Enhancements:** - Improved lifecycle management for better resource handling. - Streamlined registration for feature providers, reducing configuration complexity. - Introduced the `AddProvider` extension method to simplify and adapt feature provider integration during service setup. 2. **Simplified Codebase:** - Removed `FeatureProviderFactory` logic, eliminating unnecessary complexity and improving usability. 3. **Improved InMemoryProvider:** - Enhanced the registration process for the `InMemoryProvider`, enabling smoother and more intuitive usage. 4. **Testing Improvements:** - Established a dedicated integration test project for comprehensive validation. - Improved overall test coverage, ensuring the reliability and robustness of the framework. --------- Signed-off-by: Artyom Tonoyan <arttonoyan@gmail.com> Co-authored-by: chrfwow <christian.lutnik@dynatrace.com> Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [2.2.0](open-feature/dotnet-sdk@v2.1.0...v2.2.0) (2024-12-12) ### ✨ New Features * Feature Provider Enhancements- [open-feature#321](open-feature#321) ([open-feature#324](open-feature#324)) ([70f847b](open-feature@70f847b)) * Implement Tracking in .NET [open-feature#309](open-feature#309) ([open-feature#327](open-feature#327)) ([cbf4f25](open-feature@cbf4f25)) * Support Returning Error Resolutions from Providers ([open-feature#323](open-feature#323)) ([bf9de4e](open-feature@bf9de4e)) ### 🧹 Chore * **deps:** update dependency fluentassertions to v7 ([open-feature#325](open-feature#325)) ([35cd77b](open-feature@35cd77b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
This update focuses on enhancing the feature provider integration and testing framework, incorporating improvements to flexibility, usability, and testing capabilities.
This update addresses GitHub Issue #321 in the OpenFeature .NET SDK repository.
Key Enhancements
Dependency Injection (DI) Enhancements:
AddProviderextension method to simplify and adapt feature provider integration during service setup.Simplified Codebase:
FeatureProviderFactorylogic, eliminating unnecessary complexity and improving usability.Improved InMemoryProvider:
InMemoryProvider, enabling smoother and more intuitive usage.Testing Improvements:
Example: Service Registration and Usage
Service Registration
FlagConfigurationService Implementation