Repository navigation
ConfigWay 2.1: feature flags - #10
Merged
Merged
Conversation
added 4 commits
October 21, 2026 21:25
- StoreConfigurationProvider and ConfigurationBuilder.AddProvider: a package can expose values kept in the store under keys of its own. ConfigWay reads the store once for every provider and reloads them together after a save. - ConfigurationBuilder.ReloadInterval: each replica checks the store and reloads when a setting was added, changed or removed, so a save reaches the other replicas. - AddUiExtension and GetCapabilities: the requests of an extension are mapped under the editor's API with its authorization, and the UI learns which extensions are there. - Way.Shell 2.1.1.
A new package, set up with x.AddFeatureFlags(). Flags saved in the editor are kept in the store, one setting per flag with the flag in the Microsoft feature management schema, and take the place of the flags with the same id in the application's configuration. Feature management merges the flags by id; the flags of the store also come after the app's own ones should it merge by index. - GetFeatureFlags: the flags of both schemas with their source, override and registered filters. - SaveFeatureFlag: checks the built-in filters' parameters, refuses filters the app has not registered (checking such a flag throws) and keeps what the editor does not edit, e.g. variants. - ResetFeatureFlag: back to the configured flag, or deletes a flag only ConfigWay has. - EvaluateFeatureFlag: the app's feature manager for a given user and groups. The package is built, tested and published with the others.
The editor shows a Feature flags view, at the top of the menu, when the app added Kododo.ConfigWay.FeatureManagement. - The list: a switch per flag that saves at once, with an undo; what the conditions do; badges for overrides, flags only ConfigWay has, the .NET schema and variants; search. - The editor: forms for the percentage, time window (local time, stored in UTC) and targeting filters, JSON for other filters, any or all of the conditions, reset or delete, and a check of the saved flag for a user and groups. The API's errors are shown on their condition. - English and Polish. @kododo-dev/way-shell 2.1.1. The demo uses real flags from appsettings instead of an options class, and its home page shows them for a visitor picked with ?user=. Browser scenarios: e2e/check.mjs and e2e/flags.mjs.
The README describes the feature flags package and the screenshots show the editor in Way.Shell, with the Feature flags view. docs/feature-flags.md is the plan of the work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Kododo.ConfigWay.FeatureManagement: the editor manages Microsoft.FeatureManagement flags without redeploying. Set up with
x.AddFeatureFlags()next tobuilder.Services.AddFeatureManagement(); the app's code does not change.ReloadIntervalfor every ConfigWay app: replicas sharing a store pick up each other's changes.StoreConfigurationProvider/AddProvider,AddUiExtension,GetCapabilities.Tests: 192 core, 104 feature flags (net8/9/10), 26 PostgreSQL, 26 SQL Server. Browser scenarios against the demo: e2e/check.mjs 32/32 and e2e/flags.mjs 53/53 in Chrome, Edge, Firefox and WebKit. The demo image was built and checked locally.