From c973431dfa6ddab582eb9f5de3aed87fdfbb7821 Mon Sep 17 00:00:00 2001 From: Matthew Metcalf Date: Wed, 23 Oct 2024 16:32:24 -0700 Subject: [PATCH] App Config Allocation Id Update (#38065) * updated calc to sort keys * Update CHANGELOG.md --- .../azure-appconfiguration-provider/CHANGELOG.md | 2 ++ .../azure/appconfiguration/provider/_client_manager_base.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/CHANGELOG.md b/sdk/appconfiguration/azure-appconfiguration-provider/CHANGELOG.md index d49e4ac9f539..a4c8df026bbf 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/CHANGELOG.md +++ b/sdk/appconfiguration/azure-appconfiguration-provider/CHANGELOG.md @@ -6,6 +6,8 @@ ### Breaking Changes +* Allocation Id value changed so other providers can match the value. + ### Bugs Fixed ### Other Changes diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager_base.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager_base.py index 32d4c7aaf771..7ad64a1a21bf 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager_base.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager_base.py @@ -108,7 +108,9 @@ def _generate_allocation_id(feature_flag_value: Dict[str, JSON]) -> Optional[str for v in sorted_variants: allocation_id += f"{base64.b64encode(v.get('name', '').encode()).decode()}," if "configuration_value" in v: - allocation_id += f"{json.dumps(v.get('configuration_value', ''), separators=(',', ':'))}" + allocation_id += ( + f"{json.dumps(v.get('configuration_value', ''), separators=(',', ':'), sort_keys=True)}," + ) allocation_id += ";" if sorted_variants: allocation_id = allocation_id[:-1]