Skip to content

Potentially unrequired breaking changes in v3 #160

@brental

Description

@brental

I have been looking at the changes being made in v3 to support dynamic features as I was interested in the concept. While looking at the changes I saw that there have been breaking changes made to several existing interfaces and classes as part of adding dynamic features. However, the changes don't look like they are actually required to support dynamic features and also the updated code does not seem to keep consistency with other existing code or with new code added for dynamic features. The changes I refer to are around changing various parts of code to use FeatureFlag instead of just Feature, such as (it may not be a complete list):

  • IFeatureDefinitionProvider - Renamed to IFeatureFlagDefinitionProvider as well as some members renamed:
    • GetFeatureDefinitionAsync - Renamed to GetFeatureFlagDefinitionAsync
    • GetAllFeatureDefinitionsAsync - Renamed to GetAllFeatureFlagDefinitionsAsync
  • IFeatureManager / IFeatureManagerSnapshot - Some members renamed:
    • GetFeatureNamesAsync - Renamed to GetFeatureFlagNamesAsync
  • FeatureDefinition - Renamed to FeatureFlagDefinition

Are these changes required to support the addition of dynamic features? If not, perhaps consideration should be given to reverting the changes as they will make upgrading to v3 more difficult if people have implemented a custom feature definition provider or are using the GetFeatureNamesAsync method of IFeatureManager / FeatureManagerSnapshot within application code.

As mentioned above, it is also not consistent with other existing code or the new dynamic feature code in terms of naming as there are several cases where the word Flag is not used, some examples being (again, maybe not a complete list):

  • FeatureFilterEvaluationContext - Has the following property:
    • FeatureName
  • FeatureGatedAsyncActionFilter - Has the following property:
    • FeatureName
  • IDynamicFeatureDefinitionProvider - Has the following methods:
    • GetDynamicFeatureDefinitionAsync
    • GetAllDynamicFeatureDefinitionsAsync
  • IDynamicFeatureManager / IDynamicFeatureManagerSnapshot - Has the following method:
    • GetDynamicFeatureNamesAsync
  • DynamicFeatureDefinition

PR #157 introduced the changes.

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