Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#49,109 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@s-aleshin đang làm issue này rồi.

Từ ngày 27/9/2026.

  • #49216 của @s-aleshin — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
azure, python
Lĩnh vực
backend, cloud

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
5.6k
Fork
3.4k
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
181

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-sdk-for-python

Tất cả issue của Azure/azure-sdk-for-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.