Flagsmith / flagsmith

Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/
https://flagsmith.com/
BSD 3-Clause "New" or "Revised" License
4.76k stars 363 forks source link

Consistent Multivariate values for identities #1882

Open gagantrivedi opened 1 year ago

gagantrivedi commented 1 year ago

This should be identical across all the SDKs. Needs to be implemented for:

In order to avoid rolling v2 API's, For core, we will create a flag on environment named use_mv_v2_evaluation when turned on will use composite key else identifier if dynamodb_enabled else (id or uuid)), Edge will use that as flag as well to use composite_key if enabled instead of identifier. Release the Major version for Golang to use composite key.

gz#372

matthewelwell commented 1 year ago

@kyle-ssg this needs a small amount of FE work to expose the use_mv_v2_evaluation flag in the environment settings. We'll need to add some description around what it does to ensure people understand. The description should be something like:

Enabling this setting will ensure that multivariate evaluations made by the API are consistent with those made by local evaluation mode in our server side SDKs.

Warning: toggling this setting will mean that some users will start receiving different multivariate values via the API / remote evaluation for any existing multivariate features that you have. Values received in local evaluation mode will not change.

@dabeeeenster happy with that description / warning?

kyle-ssg commented 1 year ago

This was marked as closed, though the feature flag it's associated with is disabled in production (mv_v2_setting), not sure if this is ready to enable based on the issue description

matthewelwell commented 1 year ago

@gagantrivedi can you confirm here?

gagantrivedi commented 1 year ago

Yeah, we can enable it - it is done for edge and core PS: I think node still needs to implement this behaviour

matthewelwell commented 1 year ago

PS: I think node still needs to implement this behaviour

I don't think this is true since it currently uses: identityModel.djangoID || identityModel.compositeKey. Since the NodeJS SDK will never receive an identity that has a DjangoID, it will always use the compositeKey which is the desired behaviour.

@gagantrivedi can you confirm that Go and Edge Proxy were done? They are not marked off in the list above.