Add server-issued oa_uid issuance for first app_open#237
Open
sqsge wants to merge 3 commits intoOpenAttribution:mainfrom
Open
Add server-issued oa_uid issuance for first app_open#237sqsge wants to merge 3 commits intoOpenAttribution:mainfrom
sqsge wants to merge 3 commits intoOpenAttribution:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the server-side
oa_uidissuance slice for the firstapp_open.PR #166 already introduced
oa_uidinto downstream storage and attribution paths, but the server still had no way to issue anoa_uidwhen a client did not already have one. This PR fills that gap for #233.What Changes
app_openrequests to omitoa_uidoa_uidserver-side for that firstapp_openoa_uidbehavioroa_uidissuance keyed byevent_uidoa_uidon retried first-open requestsoa_uidvalues to strings before they flow back into the event payload / Kafka serializationapp_openflowWhy
event_uidThe first-open issuance path needs to be idempotent for retries.
Using
event_uidas the issuance key keeps the scope narrow and matches the existing contract whereevent_uidis already used as the event deduplication key. That lets retried first-open requests reuse the same issuedoa_uidinstead of generating a new one.Scope
This PR intentionally stays within the narrower server-side issuance slice from #233.
It does not attempt to solve the broader identity lifecycle questions from #232, such as cross-install or reinstall semantics.
Testing
Passed:
HOME=/tmp/oa-home PYTHONPATH=apps/postback-api python -m unittest apps/postback-api/tests/test_issue_233.py apps/postback-api/tests/test_oa_uid.pyCovered by tests:
app_openwithoutoa_uidreturns a server-issued identifieroa_uidbehavior still worksapp_openevents still requireoa_uidoa_uidoa_uid