-
Notifications
You must be signed in to change notification settings - Fork 36
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
Duplicate experiment Key issue with multi feature flag #347
Conversation
…D instead of key to resolve bug
…than the other way around.
@@ -41,6 +41,7 @@ def test_init(self): | |||
self.config_dict['groups'][0]['trafficAllocation'], | |||
) | |||
} | |||
|
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.
?
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.
Only curious because it was by itself.
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 need a new line to satisfy Flake8
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.
formatter...
Flake8 needs to be fixed... has both best practice and anti-pattern flagged so no winning: ./optimizely/project_config.py:577:17: W504 line break after binary operator |
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.
LGTM. Good that FSC passes
@msohailhussain If you can give the final OK, I can then merge to Master. |
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.
lgtm. please address comments before merge and add an FSC link passing this PR.
@@ -1,5 +1,5 @@ | |||
[flake8] | |||
# E722 - do not use bare 'except' | |||
ignore = E722 | |||
ignore = E722, W504 |
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.
can you please explain in the comments, why W504 added.
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.
comment added explaining the reason for W504.
optimizely/project_config.py
Outdated
@@ -557,3 +566,35 @@ def is_feature_experiment(self, experiment_id): | |||
""" | |||
|
|||
return experiment_id in self.experiment_feature_map | |||
|
|||
def get_variation_from_id_by_experiment_id(self, experiment_id, variation_id): | |||
""" Gets experiment id and variation id |
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.
Gets only variation by variation id under specific experiment id.
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.
please rephrase
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.
comments changed to better describe what is happening.
optimizely/project_config.py
Outdated
return {} | ||
|
||
def get_variation_from_key_by_experiment_id(self, experiment_id, variation_key): | ||
""" Gets experiment id and variation key |
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.
please rephrase and have more clear explanation.
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.
comments changed to better describe what is happening.
FSC Link for passing new cases: https://travis-ci.com/github/optimizely/fullstack-sdk-compatibility-suite/builds/232344687 |
* Changing lookup of experiment in decision service to use experiment ID instead of key to resolve bug * [BUGFIX] - Update to bucketer and added proper ID map to project_config. * Switch to generate experiments_key_map from experiment_id_map rather than the other way around. * Updated with unit tests. * Change line break before operator to avoid W504 Flake8 issue. * Flake8 changes to follow best practice and ignore the W504
* Changing lookup of experiment in decision service to use experiment ID instead of key to resolve bug * [BUGFIX] - Update to bucketer and added proper ID map to project_config. * Switch to generate experiments_key_map from experiment_id_map rather than the other way around. * Updated with unit tests. * Change line break before operator to avoid W504 Flake8 issue. * Flake8 changes to follow best practice and ignore the W504
Summary
Test plan
Issues