open-feature / dotnet-sdk

.NET implementation of the OpenFeature SDK
https://openfeature.dev
Apache License 2.0
69 stars 19 forks source link

feat: add support for eventing #166

Closed bacherfl closed 9 months ago

bacherfl commented 10 months ago

This PR adds support for Eventing and thus solves a part of #126

Note: I had to add some Thread.Sleeps in the unit tests to verify the event handlers, which are called by a separate thread, are called eventually. Coming from a Golang background, I would have liked to have something like require.Eventually, but I did not find anything similar for dotnet. If anyone with more dotnet experience knows how to do this in a better way, I appreciate any suggestions :)

codecov[bot] commented 10 months ago

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (24c3441) 94.30% compared to head (2494599) 94.73%. Report is 6 commits behind head on main.

Files Patch % Lines
src/OpenFeature/EventExecutor.cs 95.29% 6 Missing and 6 partials :warning:
src/OpenFeature/Api.cs 84.61% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #166 +/- ## ========================================== + Coverage 94.30% 94.73% +0.42% ========================================== Files 21 23 +2 Lines 650 931 +281 Branches 54 93 +39 ========================================== + Hits 613 882 +269 - Misses 23 29 +6 - Partials 14 20 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bacherfl commented 10 months ago

@Kavindu-Dodan @kinyoklion thank you for your feedback suggestions so far! I have adapted the PR accordingly. Looking at the spec I found some additional requirements that I would like to explicitly cover with some additional unit tests, so I will put this PR back into draft mode for now and will let you know when it's ready for another round of reviews

toddbaert commented 10 months ago

I'm a bit late to this party (had some days off last week) but I will make this a priority tomorrow.

bacherfl commented 10 months ago

This one should now be ready for review again

Kavindu-Dodan commented 9 months ago

Approved the PR. Feel free to resolve my comments and merge. Nice work @bacherfl 🎉

toddbaert commented 9 months ago

I'll merge this EOD Tuesday next week unless I hear objections!

I think we can then consider our pending 2.0 release.