Skip to content

[FSSDK-9069] fix: odp event validation #423

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 3 commits into from
Apr 10, 2023

Conversation

andrewleap-optimizely
Copy link
Contributor

@andrewleap-optimizely andrewleap-optimizely commented Apr 7, 2023

Summary

Add validation to send_odp_events:

  • log error when action == None or ""
  • use default when type == None or ""
  • fix case and/or "-" for fs_user_id identifier key

Test plan

added tests to:
test_odp_event_manager.py
test_optimizely.py

Ticket

FSSDK-9069

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

Copy link
Contributor

@Mat001 Mat001 left a comment

Choose a reason for hiding this comment

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

LGTM - one question: we decided to not check for a mix of dash and underscore, correct? i.e. FS-USER_ID
Most common mistake is probably all dashes and all uppercases. The mx of dash/underscore or a mix of upper and lower case would be a diff kind of category, quite unlikely I think
@jaeopt @andrewleap-optimizely

@andrewleap-optimizely
Copy link
Contributor Author

LGTM - one question: we decided to not check for a mix of dash and underscore, correct? i.e. FS-USER_ID Most common mistake is probably all dashes and all uppercases. The mx of dash/underscore or a mix of upper and lower case would be a diff kind of category, quite unlikely I think @jaeopt @andrewleap-optimizely

Mixed case is covered by this implementation. We could add support for mixed underscore/dash but seems an unlikely scenario in my opinion.

@jaeopt
Copy link
Contributor

jaeopt commented Apr 10, 2023

LGTM - one question: we decided to not check for a mix of dash and underscore, correct? i.e. FS-USER_ID Most common mistake is probably all dashes and all uppercases. The mx of dash/underscore or a mix of upper and lower case would be a diff kind of category, quite unlikely I think @jaeopt @andrewleap-optimizely

Mixed case is covered by this implementation. We could add support for mixed underscore/dash but seems an unlikely scenario in my opinion.

Agreed. Mixed underscore/dash looks like obvious user errors, not from our ambiguity :)

@andrewleap-optimizely andrewleap-optimizely changed the title fix: odp event validation [FSSDK-9069] fix: odp event validation Apr 10, 2023
@andrewleap-optimizely andrewleap-optimizely merged commit a2dba60 into master Apr 10, 2023
@andrewleap-optimizely andrewleap-optimizely deleted the aleap/fix_odp_event_validation branch April 10, 2023 18:48
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.

3 participants