Skip to content

Commit

Permalink
[App Config] az appconfig kv import\export: Fix bug when importing …
Browse files Browse the repository at this point in the history
…feature flag with percentile allocation property (Azure#30732)
  • Loading branch information
ChristineWanjau authored Feb 11, 2025
1 parent 1ee9981 commit e1a34cc
Show file tree
Hide file tree
Showing 25 changed files with 63,383 additions and 50,896 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,15 @@ class FeaturePercentileAllocation:
:ivar str variant:
The name of the variant to use if the calculated percentile for the current user falls in the provided range.
:ivar number from_:
:ivar number from:
The lower end of the percentage range for which this variant will be used.
:ivar number to:
The upper end of the percentage range for which this variant will be used.
"""

def __init__(self, variant, from_, to):
self.variant = variant
self.from_ = from_
setattr(self, "from", from_)
self.to = to

@classmethod
Expand Down Expand Up @@ -435,7 +435,7 @@ def convert_from_dict(cls, percentile_allocation_dict):
def __repr__(self):
feature_percentile_allocation = {
FeatureFlagConstants.VARIANT: self.variant,
FeatureFlagConstants.FROM: self.from_,
FeatureFlagConstants.FROM: getattr(self, "from"),
FeatureFlagConstants.TO: self.to,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"client_filters": []
},
"allocation": {
"percentile": [
{
"variant": "Off",
"to": 100,
"from": 0
}
],
"user": [
{
"variant": "Alpha",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit e1a34cc

Please sign in to comment.