-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: More robust shutdown/cleanup/reset #188
fix: More robust shutdown/cleanup/reset #188
Conversation
4c5d79f
to
2f17a64
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
=========================================
+ Coverage 0 93.86% +93.86%
=========================================
Files 0 23 +23
Lines 0 946 +946
Branches 0 105 +105
=========================================
+ Hits 0 888 +888
- Misses 0 34 +34
- Partials 0 24 +24 ☔ View full report in Codecov by Sentry. |
2f17a64
to
66bf351
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a small suggestion concerning the package installation.
66bf351
to
2c197d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Coverage is lower so it is failing at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to find something to nitpick, but I couldn't! 😅
Let's do this after this upcoming release, maybe? |
Yeah, that's sounds fair. Plus, it'll dovetail nicely with #189 which also shouldn't land until after the upcoming release is finalized. |
Previously, we shutdown the consumer thread causing any reuse of the Api to block on the second event emitted to the event executor. Fixes: open-feature#186 Signed-off-by: Austin Drenski <austin@austindrenski.io>
14aacac
to
f8ada7d
Compare
This PR updates `OpenFeature` to use the latest MELA source generators to produce compile-time logging delegates. The most obvious critique of this PR is likely to be that, much like #188, this PR changes the dependency graph by bumping our MELA dependency from `[2.0.0,) => [8.0.0,)`. To that^ critique, I continue to contend that depending on an ancient version of MELA is unlikely to aid many real-world consumers of this SDK, since new versions of MELA provide robust TFM coverage, as well as my personal disbelief that anyone looking to consume this library in 2024 is deploying an app that won't already have transitively referenced MELA `8.0.0` somewhere in its package graph. _(If you are a user or potential user of this SDK and have a real-world use case of a legacy app that __does not and cannot__ reference MELA `>= 8.0.0`, please ping back here! Would love to hear from you and adjust my disbelief accordingly!)_ _(Note: if this PR lands before #188, then I'll update #188 to remove its added dependency on `Microsoft.Bcl.AsyncInterfaces`, since it flows transitively from MELA `8.0.0`.)_ Upon request, I am happy to provide a soapbox diatribe on why I think we should care about source generators, hook perf, and incidental logging allocations, especially as an SDK that wants to be trusted and baked into all kinds of consumer apps, but eliding that for now in favor of some docs refs: - https://learn.microsoft.com/dotnet/core/extensions/high-performance-logging - https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator Signed-off-by: Austin Drenski <austin@austindrenski.io> Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
This PR updates `OpenFeature` to use the latest MELA source generators to produce compile-time logging delegates. The most obvious critique of this PR is likely to be that, much like #188, this PR changes the dependency graph by bumping our MELA dependency from `[2.0.0,) => [8.0.0,)`. To that^ critique, I continue to contend that depending on an ancient version of MELA is unlikely to aid many real-world consumers of this SDK, since new versions of MELA provide robust TFM coverage, as well as my personal disbelief that anyone looking to consume this library in 2024 is deploying an app that won't already have transitively referenced MELA `8.0.0` somewhere in its package graph. _(If you are a user or potential user of this SDK and have a real-world use case of a legacy app that __does not and cannot__ reference MELA `>= 8.0.0`, please ping back here! Would love to hear from you and adjust my disbelief accordingly!)_ _(Note: if this PR lands before #188, then I'll update #188 to remove its added dependency on `Microsoft.Bcl.AsyncInterfaces`, since it flows transitively from MELA `8.0.0`.)_ Upon request, I am happy to provide a soapbox diatribe on why I think we should care about source generators, hook perf, and incidental logging allocations, especially as an SDK that wants to be trusted and baked into all kinds of consumer apps, but eliding that for now in favor of some docs refs: - https://learn.microsoft.com/dotnet/core/extensions/high-performance-logging - https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator Signed-off-by: Austin Drenski <austin@austindrenski.io> Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com> Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Austin Drenski <austin@austindrenski.io> Signed-off-by: Artyom Tonoyan <artonoyan@servicetitan.com>
This PR updates `OpenFeature` to use the latest MELA source generators to produce compile-time logging delegates. The most obvious critique of this PR is likely to be that, much like open-feature#188, this PR changes the dependency graph by bumping our MELA dependency from `[2.0.0,) => [8.0.0,)`. To that^ critique, I continue to contend that depending on an ancient version of MELA is unlikely to aid many real-world consumers of this SDK, since new versions of MELA provide robust TFM coverage, as well as my personal disbelief that anyone looking to consume this library in 2024 is deploying an app that won't already have transitively referenced MELA `8.0.0` somewhere in its package graph. _(If you are a user or potential user of this SDK and have a real-world use case of a legacy app that __does not and cannot__ reference MELA `>= 8.0.0`, please ping back here! Would love to hear from you and adjust my disbelief accordingly!)_ _(Note: if this PR lands before open-feature#188, then I'll update open-feature#188 to remove its added dependency on `Microsoft.Bcl.AsyncInterfaces`, since it flows transitively from MELA `8.0.0`.)_ Upon request, I am happy to provide a soapbox diatribe on why I think we should care about source generators, hook perf, and incidental logging allocations, especially as an SDK that wants to be trusted and baked into all kinds of consumer apps, but eliding that for now in favor of some docs refs: - https://learn.microsoft.com/dotnet/core/extensions/high-performance-logging - https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator Signed-off-by: Austin Drenski <austin@austindrenski.io> Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com> Signed-off-by: Artyom Tonoyan <artonoyan@servicetitan.com>
Previously, we shutdown the consumer thread causing any reuse of the Api to block on the second event emitted to the event executor.
Fixes: #186
Stumbled into this one while working on #181 in which I've added unit tests that each setup their own independent
IHost
and then dispose of it at the conclusion of each test case.But since the
Api.Instance
is inherently static/shared, subsequent test cases were observed blocking until CI timeout occurred.This PR could reasonably be criticized for going a step too far by introducing a new dependency on
Microsoft.Bcl.AsyncInterfaces
, but I decided to propose it anyways on the basis thatMicrosoft.Bcl.AsyncInterfaces
is a transitive dependency ofMicrosoft.Extensions.DependencyInjection.Abstractions
which itself is a transitive dependency ofMicrosoft.Extensions.Logging.Abstractions >= 8.0.0
, and only applies to TFMs that do not shipIAsyncDisposable
and friends in-the-box, i.e.,net462
andnetstandard2.0
.An even cleaner solution would be to just bump our minimum required version of
Microsoft.Extensions.Logging.Abstractions
to8.0.0
at which pointMicrosoft.Bcl.AsyncInterfaces
comes transitively for free. I would prefer to do this, but figured that might be too controversial right before a release. (That said, if you like this idea too, please chime in because I have a strong belief that exceedingly few consumers in the wild actually need us to keep our MELA dependency pinned back in 2017. The newer versions of MELA are available for all of the relevant TFMs, which ought to mean there's no dependency hell argument at play on this one.)