-
Notifications
You must be signed in to change notification settings - Fork 40
Use Microsoft feature flag schema and remove use of reflection for json parsing #556
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
Merged
amerjusupovic
merged 31 commits into
preview
from
ajusupovic/use-microsoft-featureflag-schema
Jun 21, 2024
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
a168104
WIP change constants to microsoft version, edit properties in fmkvada…
amerjusupovic 92e5014
index feature flags within new microsoft section feature_flags
amerjusupovic d701f5b
fix all tests, use reset state
amerjusupovic 29510c3
add warning log for old feature management libraries with new provide…
amerjusupovic 7104361
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-D…
amerjusupovic 7313d1a
WIP adding deserialization changes, updating for variants/telemetry
amerjusupovic 51b4524
WIP adding exceptions for incorrect types within arrays, allocation p…
amerjusupovic 4613c73
WIP allocations mostly done
amerjusupovic 1452121
update remaining properties, fix tests
amerjusupovic 3978016
improve metadata error message
amerjusupovic f07fb76
update tests, add variant and telemetry testing
amerjusupovic 900a8e6
remove alwayson
amerjusupovic 3346b64
fix warning version check
amerjusupovic c6465d2
Add tests for invalid cases
amerjusupovic 1db6823
test boolean allows string
amerjusupovic 7502ec6
fix tests
amerjusupovic b8a2b15
remove unused using
amerjusupovic 95f1cce
add tests from original main PR for json parsing
amerjusupovic 4826959
revisions
amerjusupovic a345921
run dotnet format on tests file
amerjusupovic 63dc59c
Update src/Microsoft.Extensions.Configuration.AzureAppConfiguration/C…
amerjusupovic aaf5764
some PR comment revisions
amerjusupovic 3e67315
make from and to nullable in percentile to check if any values were set
amerjusupovic 19d144b
Update src/Microsoft.Extensions.Configuration.AzureAppConfiguration/C…
amerjusupovic 1fe22a5
Update src/Microsoft.Extensions.Configuration.AzureAppConfiguration/C…
amerjusupovic 798a63d
PR comment revisions
amerjusupovic 1ac4033
combine if statements
amerjusupovic 461e993
change feature flag index state method
amerjusupovic e2bc751
use on configuration refresh and updated as adapter events
amerjusupovic 0fabebb
change method names
amerjusupovic cd19b2d
removed unused methods
amerjusupovic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
62 changes: 34 additions & 28 deletions
62
...sions.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementConstants.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,48 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
| // | ||
|
|
||
| namespace Microsoft.Extensions.Configuration.AzureAppConfiguration.FeatureManagement | ||
| { | ||
| internal class FeatureManagementConstants | ||
| { | ||
| public const string FeatureFlagMarker = ".appconfig.featureflag/"; | ||
| public const string ContentType = "application/vnd.microsoft.appconfig.ff+json"; | ||
| public const string SectionName = "FeatureManagement"; | ||
| public const string EnabledFor = "EnabledFor"; | ||
| public const string Variants = "Variants"; | ||
| public const string Allocation = "Allocation"; | ||
| public const string User = "User"; | ||
| public const string Group = "Group"; | ||
| public const string Percentile = "Percentile"; | ||
| public const string Telemetry = "Telemetry"; | ||
| public const string Enabled = "Enabled"; | ||
| public const string Metadata = "Metadata"; | ||
| public const string RequirementType = "RequirementType"; | ||
| public const string Name = "Name"; | ||
| public const string Parameters = "Parameters"; | ||
| public const string Variant = "Variant"; | ||
| public const string ConfigurationValue = "ConfigurationValue"; | ||
| public const string ConfigurationReference = "ConfigurationReference"; | ||
| public const string StatusOverride = "StatusOverride"; | ||
| public const string DefaultWhenDisabled = "DefaultWhenDisabled"; | ||
| public const string DefaultWhenEnabled = "DefaultWhenEnabled"; | ||
| public const string Users = "Users"; | ||
| public const string Groups = "Groups"; | ||
| public const string From = "From"; | ||
| public const string To = "To"; | ||
| public const string Seed = "Seed"; | ||
|
|
||
| // Feature management section keys | ||
| public const string FeatureManagementSectionName = "feature_management"; | ||
| public const string FeatureFlagsSectionName = "feature_flags"; | ||
|
|
||
| // Feature flag properties | ||
| public const string Id = "id"; | ||
| public const string Enabled = "enabled"; | ||
| public const string Conditions = "conditions"; | ||
| public const string ClientFilters = "client_filters"; | ||
| public const string Variants = "variants"; | ||
| public const string Allocation = "allocation"; | ||
| public const string UserAllocation = "user"; | ||
| public const string GroupAllocation = "group"; | ||
| public const string PercentileAllocation = "percentile"; | ||
| public const string Telemetry = "telemetry"; | ||
| public const string Metadata = "metadata"; | ||
| public const string RequirementType = "requirement_type"; | ||
| public const string Name = "name"; | ||
| public const string Parameters = "parameters"; | ||
| public const string Variant = "variant"; | ||
| public const string ConfigurationValue = "configuration_value"; | ||
| public const string ConfigurationReference = "configuration_reference"; | ||
| public const string StatusOverride = "status_override"; | ||
| public const string DefaultWhenDisabled = "default_when_disabled"; | ||
| public const string DefaultWhenEnabled = "default_when_enabled"; | ||
| public const string Users = "users"; | ||
| public const string Groups = "groups"; | ||
| public const string From = "from"; | ||
| public const string To = "to"; | ||
| public const string Seed = "seed"; | ||
|
|
||
| // Telemetry metadata keys | ||
| public const string ETag = "ETag"; | ||
| public const string FeatureFlagId = "FeatureFlagId"; | ||
| public const string FeatureFlagReference = "FeatureFlagReference"; | ||
| public const string Status = "Status"; | ||
| public const string AlwaysOnFilter = "AlwaysOn"; | ||
| public const string Conditional = "Conditional"; | ||
| public const string Disabled = "Disabled"; | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.