Skip to content

Commit c973431

Browse files
authored
App Config Allocation Id Update (#38065)
* updated calc to sort keys * Update CHANGELOG.md
1 parent 561dc06 commit c973431

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sdk/appconfiguration/azure-appconfiguration-provider/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### Breaking Changes
88

9+
* Allocation Id value changed so other providers can match the value.
10+
911
### Bugs Fixed
1012

1113
### Other Changes

sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def _generate_allocation_id(feature_flag_value: Dict[str, JSON]) -> Optional[str
108108
for v in sorted_variants:
109109
allocation_id += f"{base64.b64encode(v.get('name', '').encode()).decode()},"
110110
if "configuration_value" in v:
111-
allocation_id += f"{json.dumps(v.get('configuration_value', ''), separators=(',', ':'))}"
111+
allocation_id += (
112+
f"{json.dumps(v.get('configuration_value', ''), separators=(',', ':'), sort_keys=True)},"
113+
)
112114
allocation_id += ";"
113115
if sorted_variants:
114116
allocation_id = allocation_id[:-1]

0 commit comments

Comments
 (0)