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

ref: More compact repr of projectkey #1076

Merged
merged 2 commits into from
Sep 7, 2021
Merged

Conversation

untitaker
Copy link
Member

@untitaker untitaker commented Sep 6, 2021

We should be able to represent all DSNs with half the bytes. I validated
that we don't have non-hex DSNs in prod, this returns 0:

select count(*) from sentry_projectkey where encode(decode(public_key, 'hex'), 'hex') != public_key

This should solve the concern voiced by Jan in #795

#skip-changelog

We should be able to represent all DSNs with half the bytes. I validated
that we don't have non-hex DSNs in prod, this returns 0:

select count(*) from sentry_projectkey where encode(decode(public_key, 'hex'), 'hex') != public_key

This should solve the concern voiced by Jan in #795
@untitaker untitaker requested a review from a team September 6, 2021 16:10
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

Looks good. Tests are failing because as_str() is now missing, I wonder if we should expose the u128 value so we can do something like

assert_eq!(meta.public_key().0, 0xe12d836b15bb49d7bbf99e64295d995b);

in tests.

@untitaker untitaker merged commit 4ae17d6 into master Sep 7, 2021
@untitaker untitaker deleted the ref/project-key-compact branch September 7, 2021 09:24
untitaker added a commit that referenced this pull request Sep 8, 2021
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.

2 participants