Hi team, Facing a small issue with Growthbook forc...
# ask-questions
Hi team, Facing a small issue with Growthbook forced values for groups in Golang. I've setup a feature which uses Forced value. The runtime group with the identifier
is set to receive the value as 'ON'. I was able to test that it works correctly using the simulation. However, when I try to get the value in code using EvalFeature, it still seems to return it as False. Have I missed something here? Attaching the code snippet.
Copy code
var grp []string
    grp = append(grp, "awesome-engineers")
        "id":      "test123",
        "$groups": grp,

Val := growthbookCtx.EvalFeature("group-test").Value // Somehow returns False
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
Are you using v1 or v2 of the hashing algorithm?
You may want to set the experiment to v1 to ensure consistent hashing - there is a little caution triangle you can read more about it
👀 1
We are using the Go SDK version v0.1.9, so V2 hashing. Do i need to change anything in this case?
Hrmm, no, if it supports v2 it should give the same results
you have an extra 1 in the tester
test1123 vs test123
It's using the "groups = awesome-engineers" condition, so the Id value shouldn't matter I'm guessing? (it's giving the expected output via the tester though 🙂 just the SDK code that is somehow not evaluating it)
Do I need an 'Experiment ref rule' while having a 'Forced rule' in place for the sdk to be able to get the correct forced value?
the conditions you have there don’t effect assignment bucketing, but it does filter who the rule applies to
The rules are processed in order
and the first matching rule is used
Thanks Graham !