-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Description
Hi, the StatusOverride doesn't work for me. May I get some help?
Here is my feature flag
{
"id": "Greeting",
"description": "",
"enabled": true,
"variants": [
{
"name": "Off",
"configuration_value": "false",
"StatusOverride": "Disabled"
},
{
"name": "On",
"configuration_value": "true",
"StatusOverride": "Enabled"
}
],
"allocation": {
"percentile": [
{
"variant": "Off",
"from": 0,
"to": 80
},
{
"variant": "On",
"from": 80,
"to": 100
}
],
"default_when_enabled": "Off",
"default_when_disabled": "Off"
},
"telemetry": {
"enabled": true
}
}Here is my code for a razor page
public async void OnGet()
{
Variant variant = await _featureManager.GetVariantAsync("Greeting", default);
ShowGreeting = variant.Configuration.Get<bool>();
// BUG: StatusOverride in the feature flag doesn't work. The following code will
// always return true even when the "Off" variant is assigned.
bool showGreeting2 = await _featureManager.IsEnabledAsync("Greeting", default);
}When "Off" variant is assigned, the IsEnabledAsync is expected to return false, but I always got true from it. This is their values under the debugger

Here are my project dependencies
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="8.0.0-preview" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="4.0.0-preview2" />
<PackageReference Include="Microsoft.FeatureManagement.Telemetry.ApplicationInsights" Version="4.0.0-preview2" />
<PackageReference Include="Microsoft.FeatureManagement.Telemetry.ApplicationInsights.AspNetCore" Version="4.0.0-preview2" />
</ItemGroup>Do I miss anything?
Metadata
Metadata
Assignees
Labels
No labels