You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue seems to stem from confusion around the difference between thedefault_percentage_allocation value and the percentage_allocation value. The default_percentage_allocation value should only be set once, on creation, similar
to the default_enabled value of a feature state.
From what I can tell, the FE is using the default_percentage_allocation value to display the current percentage
allocation for a variant in a given environment which is incorrect. It is also updating this value whenever the user
updates the value in a given environment.
Here is an example journey with some of these key points highlighted:
Step 1. User creates a new feature with a multivariate option.
POST request made to /projects/:id/features/ with the following request body:
Note the value of results.0.multivariate_feature_state_values.0.percentage_allocation is 5.0 as expected. As I
understand it, however, this is not the value that the FE is using to display to the user, it's using the value of default_percentage_allocation that it retrieves using the response from /api/v1/projects/:id/features/.
Step 3. User updates the percentage weighting in a given environment
At this point, 2 PUT requests are made
One to /api/v1/environments/:id/featurestates/:id/ with the following request body
The default_percentage_allocation value on the multivariate options should not be updated in this request, this value
should only be set when creating a multivariate option.
So, in summary, 2 issues:
FE is displaying the default_percentage_allocation instead of percentage_allocation.
FE is updating the default_percentage_allocation value of already existing multivariate options.
The text was updated successfully, but these errors were encountered:
The issue seems to stem from confusion around the difference between the
default_percentage_allocation
value and thepercentage_allocation
value. Thedefault_percentage_allocation
value should only be set once, on creation, similarto the
default_enabled
value of a feature state.From what I can tell, the FE is using the
default_percentage_allocation
value to display the current percentageallocation for a variant in a given environment which is incorrect. It is also updating this value whenever the user
updates the value in a given environment.
Here is an example journey with some of these key points highlighted:
Step 1. User creates a new feature with a multivariate option.
POST request made to
/projects/:id/features/
with the following request body:Step 2. User reviews features in an environment
GET request made to
/api/v1/features/featurestates/?environment=:id&feature=:id
with the following response bodyNote the value of
results.0.multivariate_feature_state_values.0.percentage_allocation
is 5.0 as expected. As Iunderstand it, however, this is not the value that the FE is using to display to the user, it's using the value of
default_percentage_allocation
that it retrieves using the response from/api/v1/projects/:id/features/
.Step 3. User updates the percentage weighting in a given environment
At this point, 2 PUT requests are made
One to
/api/v1/environments/:id/featurestates/:id/
with the following request bodyThis is correct.
The FE also makes another PUT request to
/api/v1/projects/:id/features/:id/
with the following body:The
default_percentage_allocation
value on the multivariate options should not be updated in this request, this valueshould only be set when creating a multivariate option.
So, in summary, 2 issues:
default_percentage_allocation
instead ofpercentage_allocation
.default_percentage_allocation
value of already existing multivariate options.The text was updated successfully, but these errors were encountered: