Skip to content

fix: Change experimentKey and variationKey to be null in rollout in decisionInfo payload #644

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

Merged
merged 2 commits into from
Jan 23, 2021

Conversation

yavorona
Copy link
Contributor

@yavorona yavorona commented Jan 15, 2021

Summary

  • This pr changes variationKey and ruleKey from empty string to null in a rollout decisionInfo payload in order to pass FSC tests.
  • Changed OptimizelyDecideOptions enums to OptimizelyDecideOption to be consistent with other SDKs.

Test plan

  • Unit tests
  • FSC tests with uzair/decide-api-endpoints testapp branch - all pass except for DECIDE WORLD tests, which will be addressed separately

@coveralls
Copy link

coveralls commented Jan 15, 2021

Coverage Status

Coverage increased (+0.01%) to 96.962% when pulling aaafbd5 on pnguen/run-fsc-tests into dc47f71 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 96.956% when pulling da09898 on pnguen/run-fsc-tests into dc47f71 on master.

@yavorona yavorona added WIP and removed WIP labels Jan 15, 2021
@yavorona yavorona closed this Jan 20, 2021
@yavorona yavorona reopened this Jan 20, 2021
@yavorona yavorona closed this Jan 22, 2021
@yavorona yavorona reopened this Jan 22, 2021
@yavorona yavorona changed the title fix: Change experimentKey and variationKey to be null in rollout fix: Change experimentKey and variationKey to be null in rollout in decisionInfo payload Jan 22, 2021
@yavorona yavorona removed their assignment Jan 22, 2021
Comment on lines -1499 to -1500
const experimentKey = decision.getExperimentKey(decisionObj);
const variationKey = decision.getVariationKey(decisionObj);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are getExperimentKey & getVariationKey methods no longer used, so should delete them?

Copy link
Contributor Author

@yavorona yavorona Jan 23, 2021

Choose a reason for hiding this comment

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

These methods are being used in buildImpressionEvent and emitNotificationCenterActivate methods (we are still sending rule_key and variation_key as empty strings inside metadata object in this case). I am not sure if they should be changed to null. @jaeopt maybe you have any thought on that?

Copy link
Contributor

Choose a reason for hiding this comment

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

@yavorona I think we should keep those. Event and notification will have different requirements (empty string instead of null) than optimizelyDecision (null).

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

LGTM

@yavorona yavorona force-pushed the pnguen/run-fsc-tests branch from aaafbd5 to 89bc241 Compare January 23, 2021 00:53
@yavorona yavorona merged commit e1bf59c into master Jan 23, 2021
@yavorona yavorona deleted the pnguen/run-fsc-tests branch January 23, 2021 04:19
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.

4 participants