-
Notifications
You must be signed in to change notification settings - Fork 41
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
Use IConfiguration to setup Unleash #183
Comments
Hey, @thompson-tomo! Thanks for the feature request 😄 This sounds like a sensible feature, but we unfortunately do not have the capacity to implement it ourselves at the moment. Would you be willing to implement it yourself and send us a PR that we could have a look at? This goes for your other two requests too (#184, #185). If not, I'd be happy to capture your ideas in our idea board and we'll revisit them for our next quarterly planning session. |
@thomasheartm sure I have no problem working on the issues I am raising and submitting them via PR'S. Based on the scope and increased flexibility I think one of the first issues to tackle should be #192 as it would simplify this issue & others. |
Hey, @thompson-tomo. Thanks for getting back to me (and also for the new feature requests). We've had a look through them on our end, and we're not sure we want to tackle all of them. Some of them sound relevant however, so we'll take a bit of time and respond to each on of them separately, if you don't mind. Please hold tight in the meantime. But with all the feature requests you've opened, could you outline for me the end goal? There appears to be a red thread binding them together; what is your use case for all these things? |
The end goal which I am looking for is flexibility in use cases:
In my use case feature flags will be transported to distributed servers via Rabbitmq and cached locally Hence the ICONFIGURATION. The usage should be visible in ELK with the upload also occurring via Rabbitmq. Feature flags should easily control ui aspects. Hope that provides further info. I would suggest looking at the ELK libs as a sample of what I am thinking. |
Hello @thompson-tomo! We were working on proper replies for individual issues, but I'll address your concerns here instead.
Unleash has support for a concept we call Bootstrapping. In short you can configure Unleash with one of two existing bootstrappers during startup, or write your own bootstrapper. The provided bootstrappers support loading from static file or URL
The strategies we provide are available in the NuGet package as public classes and the SDK is open source, so you are free to configure these with anything you like but you will have to write some plumbing code yourself. And implementing a wrapper around the usage of Unleash is also a good idea.
Logging and serialization is on our radar to fix
All metrics are sent to Unleash through an implementation of In short I think you should be able to achieve most of your goals here by implementing/configuring/connecting some of our interfaces/apis. We're looking at improving the host-setup parts of Unleash to cater to both .NET Framework and .NET Core environments, and we're also looking at improving logging/serialization. Overall this SDK exists to serve users of the Unleash platform and we have quite a few of these SDKs. They all need to conform to the same spec/feature set with a few platform specific needs having to differ between them. So larger reorganizations, splitting out parts of it, and maintaining SDK level integrations are currently not a priority |
Hi @daveleek I am perfectly fine with the functionality being offered in a consistent across platforms but the big thing I like to see is consistency in the stack & simplicity in integrating a new library. At the same I also appreciate reducing maintenance effort across the board rather simply transferring the responsibility to others which in the end results in overall more effort. I know what I want to do could be done by building a lot of extensions but fear impact on performance & bloat caused by doing so. I think the logical first step would be to facilitate the DI registration then move on to loading config from application Config. This would then enable devs to do the core functionality like they do with other libraries. Then work other aspects This is part of the reason why I created small focused issues as othwise it wouldn't be managable. I lam happy to be contributing on this journey. |
Hello @thompson-tomo. I've closed a few of the issues you posted as they don't align with what this SDK is trying to achieve. The hosting/setup aspect of this library is something we're discussing improving, we are also looking at improving logging, and we're in the process of evaluating which framework versions we should support moving forwards. |
I agree with @thompson-tomo , we had to do some custom effort to integrate this in our DI container eco system. Once we got to this point the entrypoint of our project was able to set context to unleash if needed, and then the application or infra layer was able by just requesting a context via an interface in the constructor unaware of using unleash. They just requested if a toggle was on or of via an interface. In fact I think if you would make the toggles available as a custom configuration provider you would even be able to use it with the FeatureGate functionality in webapi controllers. But I guess this approach is surrounded by a niche on its own. |
Summary of pain point
I wish to have the settings for unleash to be configured just like my other services which use the builtin configuration Interface.
The solution I'd like
To have unleash in the scenario where no settings is provided to use the values in IConfiguration. Alternatively a custom section can be passed in.
Describe alternatives you've considered
Make local extension methodd
Additional context
Wanting to bring a consistent dotnet experience to unleash
The text was updated successfully, but these errors were encountered: