Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug] `on_refresh_success` is not called after the last matching feature flag is deleted

Abierto
#49,109 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
azure, python
Área
backend, cloud

Línea de trabajo

Start with the AzureAppConfigurationProvider.refresh() flow and the load() configuration shown in the report, then review related issue #49108 first. Reproduce the two-deletion sequence with feature_flag_refresh_enabled and on_refresh_success enabled. Done means the callback is invoked after the final matching feature flag is deleted without leaving stale provider state.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

App Configuration Provider Service Attention
  • Package Name: azure-appconfiguration-provider
  • Package Version: 2.5.0, 2.5.1
  • Operating System: macOS
  • Python Version: 3.14

Describe the bug
When feature flag refresh is enabled, AzureAppConfigurationProvider.refresh() does not invoke on_refresh_success after the last feature flag matching the configured selector is deleted from Azure.

To Reproduce
Steps to reproduce the behavior:

  1. Create two feature flags: test_1 and test_2.
  2. Load configuration with feature_flag_enabled=True,feature_flag_refresh_enabled=True and on_refresh_success=callback set.
  3. Delete test_1.
  4. Wait for the refresh interval and call refresh().
  5. Verify the callback is invoked.
  6. Delete the remaining test_2.
  7. Wait again and call refresh().
  8. Observe that the callback is not invoked.

Actual behavior

  • Deleting test_1: refresh detects the change and calls the callback.
  • Deleting the last flag test_2: refresh does not call the callback.

Expected behavior
refresh() should invoke on_refresh_success after the last matching feature flag is deleted.

Screenshots

Image

Additional context

from azure.appconfiguration.provider import load
from azure.appconfiguration.provider._models import SettingSelector

CONNECTION_STRING = "..."
REFRESH_INTERVAL = 5

def callback():
    print("callback called")


config = load(
    connection_string=CONNECTION_STRING,
    feature_flag_enabled=True,
    feature_flag_refresh_enabled=True,
    feature_flag_selectors=[SettingSelector(key_filter="*", label_filter="my_custom_label")],
    on_refresh_success=callback,
    refresh_interval=REFRESH_INTERVAL,
)

print(config["feature_management"]["feature_flags"])
# [
#     {'conditions': {'client_filters': []},
#      'description': None,
#      'display_name': None,
#      'enabled': False,
#      'id': 'test_1',
#      'telemetry': {'metadata': {'ETag': 'hgRX_0yhNXOSl1vtyakBlTrNeEmL2GIBoxnnsw5gsmA'}}},
#     {'conditions': {'client_filters': []},
#      'description': None,
#      'display_name': None,
#      'enabled': False,
#      'id': 'test_2',
#      'telemetry': {'metadata': {'ETag': 'uIOfSyJmWUw2XL5_AQf9eX0RS-MILlR6Xev59r_fdao'}}}
# ]

# Delete the "test_1" feature flag from Azure. After REFRESH_INTERVAL has elapsed, call refresh().
config.refresh()
# Expected and actual:
# The callback is called and "callback called" is printed.

# Delete the last remaining feature flag, "test_2", from Azure. After REFRESH_INTERVAL has elapsed, call refresh().
config.refresh()
# Expected:
# The callback is called and "callback called" is printed.
# Actual:
# The callback is not called and "callback called" is not printed.

This issue is related to #49108 .
I think #49108 should be fixed first. Calling the refresh callback after the last feature flag is deleted is not very useful while the provider itself still keeps the stale feature flag in its state.

Lenguaje dominante
Python
Estrellas
5.6k
Forks
3.4k
Merge medio
2 d 1 min
PR fusionados (30 d)
218

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/azure-sdk-for-python

Todos los issues de Azure/azure-sdk-for-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.