Skip to content

[BUG] FeatureManager should refresh when feature flag is removed #24041

@HM-A

Description

@HM-A

Describe the bug
Deleting a Feature Flag in the Azure Web Feature Manage does not create a RefreshEvent, so the connected Feature Manager in a service still uses the deleted Feature Flag.

To Reproduce
Steps to reproduce the behavior:

  1. Create/Add a new Feature Flag
  2. Output all Feature Flags (see Code Snippet) -> all previously existing Feature Flags + the newly created one
  3. Delete The newly created Feature Flag
  4. wait a bit to rule out a Delay
  5. Output all Feature Flags (see Code Snippet) -> still all previously existing Feature Flags + the newly created one

At any point after this, if an existing Feature Flag gets changed or a new one added, the deleted Feature Flag will no longer be found by the Feature Manager.

Code Snippet
The result of this call does not change when a Feature Flag is deleted.
final Set<String> allFlags = featureManager.getAllFeatureNames();

Expected behavior
When deleting a feature flag in the Azure Web Feature Manager, the connected feature Manager in a service should receive a RefreshEvent. Currently only adding a new Feature Flag or changing the state (e.g. enabled -> disabled, disabled -> enabled) creates a RefreshEvent and leads to an update of the feature Flags in the service.

Screenshots

Setup (please complete the following information):

  • OS: Ubuntu 21.04 (ubuntu-latest)
  • IDE: IntelliJ IDEA 2021.1.3 Ultimate
  • Library/Libraries: com.microsoft.azure:spring-cloud-azure-feature-management-web:1.3.0
  • Java version: 11
  • App Server/Environment: Docker Pod in Azure environment, Azure Feature manager
  • Frameworks: Spring Boot

Additional context
A Spring Boot Application in a Docker container that is hosted on Azure. The application uses com.microsoft.azure dependencies to connect to different Azure Services (relevant for this Bug -> App Configuration Feature Manager).

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.azure-springAll azure-spring related issuesazure-spring-app-configurationSpring app configuration related issues.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions