Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour creating identity overrides for control value of MV features #4599

Open
matthewelwell opened this issue Sep 9, 2024 · 1 comment
Labels
api Issue related to the REST API front-end Issue related to the React Front End Dashboard

Comments

@matthewelwell
Copy link
Contributor

To reproduce:

  1. Create an MV feature
  2. Create an identity override for the MV feature which selects the control value

Note that when testing, we should also validate the behaviour when updating an override for an MV feature.

Expected behaviour:

Retrieving the features for the identity always returns the control value

Actual behaviour:

I haven't quite worked out the full behaviour yet. It seems like, because the override still exists, and has a "feature_state_value" it is using that but what I can't work out is at which point(s) the FE is sending the "feature_state_value" - this might be on creation of the override or update perhaps, but it seems inconsistent.

Possible solutions:

  1. When creating an override for an MV feature, the FE should always send a full complement of "multivariate_feature_state_values". When creating an override for the control value, the "percent_allocation" should be set to 0 for all values.

Other solutions considered:

  1. When creating an override for an MV feature, the FE should always send the value of the MV option as the "feature_state_value". Having considered this, this would be a very bad idea since, if the values of those options change, the override would still be returning an old value.
@matthewelwell matthewelwell added front-end Issue related to the React Front End Dashboard api Issue related to the REST API labels Sep 9, 2024
@matthewelwell
Copy link
Contributor Author

Having tested the possible solution given above, this doesn't seem to work and it looks like the API uses the value from feature_state_value. This is likely because of the fact that the 'control' value is just the feature_state_value on a multivariate feature state.

Based on this, I think we likely need to look at this from an API perspective before looking at it from the FE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

No branches or pull requests

1 participant