1

I am currently having a problem with the Azure feature manager. I used the following tutorial to add a feature toggle to my application: Link

This is working fine as long as we are talking about a manually set feature flag. As soon as the type of the feature is set to "Targeting" in Azure, the following code will result in an error.

featureManager.isEnabledAsync(FeatureToggle.OUR_FEATURE_TARGETING.key).block()

Specifically we will get No bean named 'Microsoft.Targeting' available in the spring error log. A client trying to acces an endpoint containing the above code will get a 500 with the error message Fail fast is set and a Filter was unable to be found: Microsoft.Targeting


Additional info

I am using Kotlin and Spring.

Setting the feature to "Time Based" will result in an error aswell.

The service calling the feature manager looks like this

@Autowired
private lateinit var featureManager: FeatureManager

fun feature(): String {
        if (featureManager.isEnabledAsync(FeatureToggle.OUR_FEATURE_TARGETING.key).block() == true) {
            return "feature A!"
        } else {
            return "feature B!"
        }

And the FeatureToggle Enum looks like this

enum class FeatureToggle(val key: String) {
    OUR_FEATURE_TARGETING("feature")
}
Junge
  • 437
  • 6
  • 14

1 Answers1

0

It doesn't go over it in that guide, but the built in Feature Flags are not configured to be on by default, then need to be built in an @Configuration file. More info can be found here https://microsoft.github.io/spring-cloud-azure/docs/azure-app-configuration/2.3.0/reference/html/index.html#built-in-feature-filters

mrm9084
  • 430
  • 1
  • 3
  • 12