Skip to content

Conversation

stephenmcconkey
Copy link
Contributor

What
A bug where MV flags with prerequisite flags are always returning an off state, I also suspect there might have been issues if there are multiple prereq flags set

FFM-3625

Why
This was impacting customers using the JS SDK which in turn uses the GO SDK to evaluate flags.
Currently - the behaviour was comparing the value of a pre requisite flag against the value of a MV flag i.e. true == blue
Now - We check the prerequisites of a flag, and the status of the prereq flag to make sure they match up

Testing
Unit tests written for scenarios for single/multiple bools, mv flags with and without targets
Manual testing to ensure the expected behaviour occurred

… are always returning off when there is a pre req
@swarmia
Copy link

swarmia bot commented Jun 21, 2022

if pre.Feature == prereqFlag.Feature {
for _, x := range pre.Variations {
if x == variationToMatch.Value {
satisfiedCount++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we break outer loop and return false, instead of introducing new local var

Copy link
Contributor

@Andrew-Hayes Andrew-Hayes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stephenmcconkey stephenmcconkey merged commit 82779d3 into main Jun 22, 2022
@erdirowlands erdirowlands deleted the FFM-3625 branch November 3, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants