-
Notifications
You must be signed in to change notification settings - Fork 79
Release notes for 4.0.0-preview2 #886
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 6 commits
e01c3f4
55c0c64
d50d9de
27e926b
b3c99aa
cfdc69f
84ccf78
2f1f4d4
63148fb
0b2fbc0
1609034
12bc72d
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 |
|---|---|---|
|
|
@@ -4,6 +4,90 @@ | |
| # Microsoft.FeatureManagement.AspNetCore | ||
| [Source code ][source_code_web] | [Package (NuGet)][package_web] | [Samples][samples_web] | [Product documentation][docs] | ||
|
|
||
| ## 4.0.0-preview2 - March 7, 2024 | ||
|
|
||
| ### Feature Service Injector | ||
|
rossgrambo marked this conversation as resolved.
Outdated
|
||
|
|
||
| Dependency injection can be wired up with a variant feature flag. Different implementations of a service interface can be considered as variant services. Using the newly provided `IVariantServiceProvider<TService>`, the appropriate service can be injected. | ||
|
rossgrambo marked this conversation as resolved.
Outdated
|
||
|
|
||
| To use it, a variant service needs to be declared | ||
|
|
||
| ``` C# | ||
| services.AddFeatureManagement() | ||
| .WithVariantService<IAlgorithm>("ForecastAlgorithm"); | ||
| ``` | ||
|
|
||
| The different options of the service need to extend a shared interface | ||
|
|
||
| ``` C# | ||
| public class AlgorithmAlpha : IAlgorithm | ||
| { | ||
| ... | ||
| } | ||
|
|
||
| public class AlgorithmBeta : IAlgorithm | ||
| { | ||
| ... | ||
| } | ||
| ``` | ||
|
|
||
| And the appropriate variant flag needs to exist | ||
|
|
||
| ```json | ||
| "ForecastAlgorithm": { | ||
| "Variants": [ | ||
| { | ||
| "Name": "AlgorithmAlpha" | ||
| }, | ||
| { | ||
| "Name": "AlgorithmBeta" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Lastly, the provider is ready to be used and grab the appropriate service for the variant. | ||
|
|
||
| ``` C# | ||
| IVariantServiceProvider<IAlgorithm> algorithmServiceProvider; | ||
| ... | ||
| IAlgorithm forecastAlgorithm = await algorithmServiceProvider.GetServiceAsync(cancellationToken); | ||
| ``` | ||
|
|
||
| The readme will be updated to fully describe the new functionality. | ||
|
rossgrambo marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Telemetry & Targeting | ||
|
|
||
| This preview release includes some additional mechanisms to track targeting within telemetry. There's been some changes to the telemetry publisher fields, and a couple classes are now offered/have been updated: `TargetingTelemetryInitializer` in `Microsoft.FeatureManagement.Telemetry.AspNetCore` and `TargetingHttpContextMiddleware` in `Microsoft.FeatureManagement.Telemetry.AspNetCore`. | ||
|
rossgrambo marked this conversation as resolved.
Outdated
|
||
|
|
||
| These changes introduce the field `TargetingId`, which tracks the id used by TargetingFilters and Allocation. This allows telemetry to connect events by the target to the evaluation events for the target, rather than relying on built in app insights fields that may or may not exist in a project. | ||
|
rossgrambo marked this conversation as resolved.
Outdated
|
||
|
|
||
| Currently the classes need to be explicitly added: | ||
|
|
||
| ``` C# | ||
| builder.Service.AddSingleton<ITelemetryInitializer, TargetingTelemetryInitializer>(); | ||
|
|
||
| app.UseMiddleware<TargetingHttpContextMiddleware>(); | ||
| ``` | ||
|
|
||
| ### Additional Changes | ||
|
|
||
| #### BlazorServerApp | ||
|
|
||
|
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. That's not part of the released packages.
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. These release notes are limited exclusively to the functionality of the released packages. |
||
| An example for Blazor has been added named `BlazorServerApp`. This app demonstrates how to handle FeatureMangement setup, use, and targeting context accessors in Blazor. | ||
|
|
||
| #### Schema | ||
|
|
||
| A schema file has been introduced to explicitly declare [the Feature Flag schema](https://github.com/microsoft/FeatureManagement-Dotnet/blob/release/v4/schemas/FeatureManagement.Dotnet.v1.0.0.schema.json). | ||
|
rossgrambo marked this conversation as resolved.
Outdated
|
||
|
|
||
| #### Net8 build target | ||
|
|
||
| Net8 was added as a build target. | ||
|
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. This should be presented as a feature - we added support for .NET 8. (Reminder of the release notes guidelines - talk about the feature in customer perspective, not how we implement it.)
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. Hard to find the correct thing to say- seeing as the only change was adding it was a build target- which means we're less likely to break Net8, but there's no immediate customer benefit. I went with:
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. microsoft/FeatureManagement-Dotnet#365 Maybe we should not mention this in the release note, since the user will not notice this change. |
||
|
|
||
| ### Breaking Changes | ||
|
|
||
| There are no breaking changes in this release. | ||
|
|
||
| ## 3.2.0 - February 29, 2024 | ||
|
|
||
| ### Enhancements | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.