Skip to content
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

Stringify userId and anonymousId #102

Merged
merged 1 commit into from
Nov 28, 2017
Merged

Stringify userId and anonymousId #102

merged 1 commit into from
Nov 28, 2017

Conversation

f2prateek
Copy link
Contributor

Ref: https://segment.atlassian.net/browse/LIB-27

Our API truncates bignum values. This is problematic because this library has historically accepted Numbers as userIds and anonymousIds. TTo workaround the truncation, this library needs to stringify userId and anonymousId on the client.

The test cases are numbers that will be truncated in Node, e.g. node -e "console.log(157963456373623802 + 1)".

Ref: https://segment.atlassian.net/browse/LIB-27

Our API truncates bignum values. This is problematic because this library has historically accepted Numbers as userIds and anonymousIds. TTo workaround the truncation, this library needs to stringify userId and anonymousId on the client.

The test cases are numbers that will be truncated in Node, e.g. `node -e "console.log(157963456373623802 + 1)"`.
@f2prateek
Copy link
Contributor Author

(let me know if this can be written in a better way in python)

Copy link

@tejasmanohar tejasmanohar left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Let's get one more approval though!

Copy link
Contributor

@jgershen jgershen left a comment

Choose a reason for hiding this comment

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

LGTM!

@f2prateek f2prateek merged commit ace253b into master Nov 28, 2017
@f2prateek f2prateek deleted the stringify-ids branch November 29, 2017 00:02
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