-
Notifications
You must be signed in to change notification settings - Fork 22
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
Why does FlagdProvider.GetProviderName()
return No-op Provider
#125
Comments
This is certainly a bug, and just an oversight of some IDE autocomplete or something like that! Please feel free to open a PR with your described fix, and thanks for your close attention. One thing we've been wondering is if it's better to omit "provider" from provider names, since it's redundant (ie:
This has been suggested before, and I think it's a good idea. I would welcome such a PR, or at least an issue proposing it. |
Fixes: open-feature#125 Signed-off-by: Austin Drenski <[email protected]>
Awesome, just opened #126 with the minimal patch for now.
I would love to see these shortened to whitespace-free provider aliases, i.e.
I'll open a new issue to track this (see: open-feature/dotnet-sdk#264), and will see about getting a draft PR put together over the next couple of weeks. |
Fixes: open-feature#125 Signed-off-by: Austin Drenski <[email protected]>
As mentioned in #124, I'm reviewing/evaluating
FlagdProvider
for an upcoming project, and I ran across what initially looked like a bug, but then I found a unit test that pinned this behavior, so opening this issue to discuss whether:(A) this is a bug,
(B) the unit test was intended as a placeholder and just never got updated, or
(C) something in between.
Here's the ref sequence that has me stumped:
dotnet-sdk-contrib/src/OpenFeature.Contrib.Providers.Flagd/FlagdProvider.cs
Line 33 in 2386562
dotnet-sdk-contrib/src/OpenFeature.Contrib.Providers.Flagd/FlagdProvider.cs
Lines 119 to 125 in 2386562
dotnet-sdk-contrib/test/OpenFeature.Contrib.Providers.Flagd.Test/FlagdProviderTest.cs
Lines 65 to 69 in 2386562
Here's what I would have expected to see (and am happy to contribute a patch for if you're all in agreement):
Background
For context, the usage pattern that I'm trying to setup is to support registering multiple
FeatureProvider
services as keyed singletons in a dependency container, from which provider-specific clients could then be resolved by provider name:or callers could resolve a default client configurable based on some TBD criteria (currently just the first named client to be registered):
Note
I'm eventually planning to offer this upstream as part of a new
OpenFeature.Extensions.Hosting
package à laOpenTelemetry.Extensions.Hosting
, but still working through the realistic use cases and general ergonomics, but just mentioning that so this doesn't seem entirely irrelevant to the project at hand.At present, I have to hardcode
flagd Provider
in my code to achieve my desired/expected behavior:The text was updated successfully, but these errors were encountered: