fix: detect multivariate differences between environments - #7635
Conversation
|
@10done is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Code Review
This pull request introduces a utility function hasMultivariateChange to detect differences in multivariate feature allocations when comparing environments and features, along with corresponding unit tests. The feedback suggests defensively converting multivariate_feature_option to a number during normalization to prevent potential NaN values from causing unstable sorting.
|
@Holmus Can I have review please whenever you have time. happy to make any further changes required. |
|
@matthewelwell Can I have a review please or is this low priority? |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Zaimwa9
left a comment
There was a problem hiding this comment.
Thanks for the contribution, this will help a lot. I just have a couple of clean-housing comments and it should be good to go after that
Zaimwa9
left a comment
There was a problem hiding this comment.
Thanks a lot for the contribution!
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Fixes #7619
hasMultivariateChange()to comparemultivariate_feature_option+percentage_allocationper environmentCompareEnvironmentsfor changed/unchanged classification and row fade behaviorCompareFeaturesso MV-only differences are not shown as identicalcompare-multivariate-utils.test.tsHow did you test this code?
I have tested the code manually and added screenshots below and also added unit tests for the same.
Before
No flag differences / rollout_test in Unchanged (Dev 0% vs Prod 100%).
After
rollout_test under Changed Flags.