New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reject experiment contexts with variantIds
#29
fix: reject experiment contexts with variantIds
#29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think validate context should be in context creation and updation, not in experiments
fd1550e
to
deee03f
Compare
deee03f
to
98ff2ff
Compare
ee3a6a3
to
74fe771
Compare
74fe771
to
91b1940
Compare
91b1940
to
e73f08c
Compare
- validating experiment contexts to not have `variantIds` as dimensions - excluded `variantIds` in experiment and context form
e73f08c
to
df9be71
Compare
df9be71
to
321cca9
Compare
@@ -109,7 +109,7 @@ fn get_functions_map( | |||
} | |||
|
|||
pub fn validate_value_with_function( | |||
fun_name: &str, | |||
_fun_name: &str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the name is not used, we could just remove it? This is beyond the scope of the PR, but a suggestion. If the warning isn't present, will we remember to remove this?
@@ -9,6 +9,7 @@ use service_utils::service::types::ExperimentationFlags; | |||
enum Dimensions { | |||
OS(String), | |||
CLIENT(String), | |||
VARIANTIDS(String), | |||
} | |||
|
|||
fn single_dimension_ctx_gen(value: Dimensions) -> serde_json::Value { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove this from OS superposition. Out of the scope of this PR
@@ -105,6 +105,7 @@ pub fn get_tenants() -> Vec<String> { | |||
.unwrap_or(vec![]) | |||
} | |||
|
|||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the a fix for the clippy warning? Can we let the warning persist and find the root cause?
Problem
variantIds
dimension, which is specific for experimentation-platform use, can be passed in the context when creating experiments.Solution
variantIds
as dimensionsvariantIds
from the dropdown in create experiment and create context form