-
Notifications
You must be signed in to change notification settings - Fork 44
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
Changes from 23 commits
a168104
92e5014
d701f5b
29510c3
7104361
7313d1a
51b4524
4613c73
1452121
3978016
f07fb76
900a8e6
3346b64
c6465d2
1db6823
7502ec6
b8a2b15
95f1cce
4826959
a345921
63dc59c
aaf5764
3e67315
19d144b
1fe22a5
798a63d
1ac4033
461e993
e2bc751
0fabebb
cd19b2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -557,6 +557,11 @@ private async Task<Dictionary<string, string>> PrepareData(Dictionary<string, Co | |
| // Reset old filter tracing in order to track the filter types present in the current response from server. | ||
| _options.FeatureFilterTracing.ResetFeatureFilterTracing(); | ||
|
|
||
| foreach (IKeyValueAdapter adapter in _options.Adapters) | ||
| { | ||
| adapter.ResetState(); | ||
| } | ||
|
|
||
| foreach (KeyValuePair<string, ConfigurationSetting> kvp in data) | ||
| { | ||
| IEnumerable<KeyValuePair<string, string>> keyValuePairs = null; | ||
|
|
@@ -1210,9 +1215,23 @@ private void EnsureFeatureManagementVersionInspected() | |
|
|
||
| if (_requestTracingEnabled && _requestTracingOptions != null) | ||
| { | ||
| _requestTracingOptions.FeatureManagementVersion = TracingUtils.GetAssemblyVersion(RequestTracingConstants.FeatureManagementAssemblyName); | ||
| Version featureManagementVersion = TracingUtils.GetAssemblyVersion(RequestTracingConstants.FeatureManagementAssemblyName); | ||
|
|
||
| Version featureManagementAspNetCoreVersion = TracingUtils.GetAssemblyVersion(RequestTracingConstants.FeatureManagementAspNetCoreAssemblyName); | ||
|
|
||
| if (featureManagementVersion != null) | ||
| { | ||
| // If the version is less than 3.2.0, log the schema version warning | ||
| if (featureManagementVersion < new Version(3, 2, 0)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Min version could be a constant variable.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't actually make it a constant because the value is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was imagining a const string "3.2.0" which is local to this method. And we use Version.Parse to compare versions. |
||
| { | ||
| _logger.LogWarning(LogHelper.BuildFeatureManagementMicrosoftSchemaVersionWarningMessage()); | ||
| } | ||
| } | ||
|
|
||
| // Return the version using only the first 3 fields and remove additional characters | ||
| _requestTracingOptions.FeatureManagementVersion = featureManagementVersion?.ToString(3).Trim('{', '}'); | ||
|
|
||
| _requestTracingOptions.FeatureManagementAspNetCoreVersion = TracingUtils.GetAssemblyVersion(RequestTracingConstants.FeatureManagementAspNetCoreAssemblyName); | ||
| _requestTracingOptions.FeatureManagementAspNetCoreVersion = featureManagementAspNetCoreVersion?.ToString(3).Trim('{', '}'); | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.