microsoft / microsoft/FeatureManagement-Dotnet

Enable dynamic configuration values to be retrieved based on a feature.

Open
#5 2 comments 5 reactions 1 assignee View on GitHub

@amerjusupovic is already working on this.

Since Sep 28, 2023.

Dominant language
C#
Stars
1.2k
Forks
129
Avg merge
1d 1h
Merged PRs (30d)
5

Description

Sometimes the addition of a new feature within an application might require altered/new configuration. This configuration is scoped to the feature itself and should not pollute the overall configuration of the application. A method should be established to allow applications to pull settings from the configuration system that may be altered based on a specific feature and whether it is enabled/disabled.

E.g. something like


{
  "MaxRequests": "100",
  "MaxRetries": "10",
  "FeatureManagement": {
    "Beta": {
      "EnabledFor": [
        {
          "Name": "Percentage",
          "Parameters": {
            "Value": "50"
          }
        }
      ],
      "Configuration': {
        "MaxRequests:" 500
      }
    }
}

Getting configuration normally would yield expected results

IConfiguration config;
config["MaxRequests"] // 100
config["MaxRetries"] // 10

Getting configuration with respect to the Beta feature would yield something like
IConfiguration betaAwareConfig
config["Maxrequests"] // 500
config["MaxRetries"] // 10

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.