Skip to content

Targeted Feature does not honor zero percent #210

Closed
@kevink369

Description

@kevink369

We ran into an issue with the size limit of how many records we could include in a feature (10kb). This helped us realize that we should build an exclude list which would be much smaller and easier to manage. I switched our default rollout percentage to 100% and set the smaller list of records to 0%. We ran into issues when customers that were not supposed to see the new feature were submitting records through the feature.

From the Azure Portal interface:
A Targeting filter is a built-in filter which allows dynamic enabling or disabling of features for specific users or groups. For example, you can use a targeting filter to enable a feature for only a specific user during a demo. You could also use it to progressively roll out new features to users in custom groups or "rings", or to set a default rollout percentage to release features to all users.

We were not able to disable the feature flag in a targeted manor.

Referencing the tests I was able to reproduce the issue with the following scenario (and subsequently tracked down a fix).

"TargetingTestFeatureZeroPercent": {
     "EnabledFor": [
       {
         "Name": "Targeting",
         "Parameters": {
           "Audience": {
             "Users": [
               "Jeff",
               "Alicia"
             ],
             "Groups": [
               {
                 "Name": "Ring0",
                 "RolloutPercentage": 100
               },
               {
                 "Name": "Ring1",
                 "RolloutPercentage": 0
               }
             ],
             "DefaultRolloutPercentage": 100
           }
         }
       }
     ]
   },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions