Giter Club home page Giter Club logo

Comments (5)

hansmbakker avatar hansmbakker commented on July 27, 2024

For now we decided to not use (cookie) overrides in our production environment. However it would be still a good thing to document I think.

from featuremanagement-dotnet.

jimmyca15 avatar jimmyca15 commented on July 27, 2024

ISessionManager provides a way to short circuit feature filter evaluation for a feature flag and provide the result of whether a feature should be enabled. If you're cookies contain the state of whether a feature should be enabled or disabled then using an ISessionManager implementation which pulls from the HTTP session (cookie) makes perfect sense. If the session manager can't provide the value the feature management system falls back to evaluating the state of the feature based off the configuration of the application. In your case that would mean falling back to Azure App Configuration. It's the behavior you're looking for.

You mentioned that a feature filter should also be able to do this and that is also correct. Either way of accomplishing this could be done. If you use a feature filter you could have a CookieCacheFilter feature filter.

"FeatureManagement":
{
  "Beta": {
    "EnabledFor": [
       "CookieCache": {
         "Parameters":" {
           "Default": false/true
         }
       }
    ]
  }
}

The intent of the filter that I mocked up above would be

  1. Check feature state from http session (cookie).
  2. If feature state not present, use "Default" parameter as the result of whether the feature should be on off. The default parameter would come from the configuration of the application (Azure App Configuration).

from featuremanagement-dotnet.

hansmbakker avatar hansmbakker commented on July 27, 2024

Thank you! That looks good.

I understand this repo is about the feature management NuGet and not the Azure App Configuration product, but it would be nice if the solution would integrate well in the Feature Manager screen of Azure App Configuration.

They have a screen with on/off switches but those switches won’t work as defaults if the value needs to end up in the filter parameters. So I believe the solution you proposed using the ISessionManager would be good!

from featuremanagement-dotnet.

jimmyca15 avatar jimmyca15 commented on July 27, 2024

The Azure App Configuration team is the team that owns this package and we appreciate the feedback. We do intend to keep them completely decoupled though. The ISessionManager should serve your purpose well.

The feature filter interface is being revamped, but it is possible to accomplish what you mentioned today. Set the feature flag state to conditional by adding a feature filter. If you were to use the one I mocked you would name it "CookieCache". This has to match the name of the filter in your application. Then you can set the Default parameter that I added.

Here's a pic of me setting it up.

image

from featuremanagement-dotnet.

hansmbakker avatar hansmbakker commented on July 27, 2024

Yes, I agree it can work by editing the filter parameters, I just liked the really clear on/off switches :)

Thank you for your explanation! It helps a lot!

from featuremanagement-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.