You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Call the correct API to determine if a user is in treatment or control group #20183
We seem to be using isInExperimentSync but that returns whether a user is in treatment or control, but we should probably be using getTreatmentVariable? This issue is so we can figure this out.
changed the title [-]Spike - what is the right API to call for retrieving experiments [/-][+]Use getTreatmentVariable instead of isInExperiment for running experiments [/+]on Feb 3, 2023
changed the title [-]Use getTreatmentVariable instead of isInExperiment for running experiments [/-][+]Spike - what is the right API to call for retrieving experiments[/+]on Feb 8, 2023
I think you were the one who observed this right? So as I understand the problem here is that how do we distinguish between control groups and treatment groups.
Digging a little bit:
call getTreatmentVariable(configId: string, name: string) to get the value of a treatment variable. configId is always vscode and name is the name of the treatment variable that you defined in control tower when you set up your experiment.
The doc says getTreatmentVariable returns the value of the treatment variable. And when we create an exp on control tower:
We generally set the value of treatment as true for experiment group, and false for control group. Given we always follow this convention, I think we should be checking if treatmentVariable === true instead. Does it make sense?
changed the title [-]Spike - what is the right API to call for retrieving experiments[/-][+]Call the correct API to determine if a user is in treatment or control group[/+]on Feb 13, 2023
Activity
luabud commentedon Jan 27, 2023
It really should be getExperimentValue: https://github.com/microsoft/tas-client/tree/main/vscode-tas-client#use
karrtikr commentedon Jan 31, 2023
Great, we don't have an issue tracking implementing this though, so can we reopen this?
[-]Spike - what is the right API to call for retrieving experiments [/-][+]Use getTreatmentVariable instead of isInExperiment for running experiments [/+]luabud commentedon Feb 3, 2023
Oops, good point :) thank you!
karrtikr commentedon Feb 8, 2023
Luciana Abud (@luabud) Thing is
inExperimentalready usesgetTreatmentVariable🤷♂️:vscode-python/src/client/common/experiments/service.ts
Line 143 in e92c124
So back to square one, not sure what is to be used here.
[-]Use getTreatmentVariable instead of isInExperiment for running experiments [/-][+]Spike - what is the right API to call for retrieving experiments[/+]luabud commentedon Feb 10, 2023
Kartik Raj (@karrtikr) but it returns
treatmentVariable !== undefined;, which is true whether user is in treatment or control, no?karrtikr commentedon Feb 13, 2023
I think you were the one who observed this right? So as I understand the problem here is that how do we distinguish between control groups and treatment groups.
Digging a little bit:
The doc says
getTreatmentVariablereturns the value of the treatment variable. And when we create an exp on control tower:We generally set the value of treatment as
truefor experiment group, andfalsefor control group. Given we always follow this convention, I think we should be checking iftreatmentVariable === trueinstead. Does it make sense?Call the correct API to determine if a user is in treatment or contro…
[-]Spike - what is the right API to call for retrieving experiments[/-][+]Call the correct API to determine if a user is in treatment or control group[/+]Merge latest upstream python extension
Merge latest upstream python extension