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

Bug 1789615 - Always store a UUID hyphenated #2182

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

badboy
Copy link
Member

@badboy badboy commented Sep 7, 2022

This fixes a regression in the Glean Python SDK.
We used to do this, but failed to correctly encode UUIDs since v50.

The Glean ping schema expects UUIDs in a hyphenated form a la 060f830d-3bcc-4a6a-b4b1-7336271a2b34. However we passed the user data through without re-encoding, thus leading to non-hyphenated strings landing in the JSON payload of a ping and then getting rejected by the pipeline.

This is only an issue for Python, because for Kotlin and Swift we don't accept plain strings, but only UUID types, which serialize to hyphenated strings.

@badboy badboy requested a review from a team as a code owner September 7, 2022 11:47
@badboy badboy requested review from perrymcmanis144 and removed request for a team September 7, 2022 11:47
This fixes a regression in the Glean Python SDK.
We used to do this, but failed to correctly encode UUIDs since v50.

The Glean ping schema expects UUIDs in a hyphenated form a la `060f830d-3bcc-4a6a-b4b1-7336271a2b34`.
However we passed the user data through without re-encoding, thus
leading to non-hyphenated strings landing in the JSON payload of a ping
and then getting rejected by the pipeline.

This is only an issue for Python, because for Kotlin and Swift we don't
accept plain strings, but only `UUID` types, which serialize to
hyphenated strings.
@badboy badboy force-pushed the python-handle-non-hyphenated-uuid branch from c7cac3c to f9d58a9 Compare September 7, 2022 11:47
Copy link
Contributor

@perrymcmanis144 perrymcmanis144 left a comment

Choose a reason for hiding this comment

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

👍 code matches my expectation from description; lgtm

@badboy badboy merged commit 7b3d4e9 into main Sep 7, 2022
@badboy badboy deleted the python-handle-non-hyphenated-uuid branch September 7, 2022 13:40
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