-
Notifications
You must be signed in to change notification settings - Fork 748
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
Use bidder name instead of syncer key #2948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. The change is surprisingly small.
syncersByKey := make(map[string]usersync.Syncer, len(syncersByBidder)) | ||
for _, v := range syncersByBidder { | ||
syncersByKey[v.Key()] = v | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assumption is still generally true, but the bidder name is now important for activity control so this approach is no longer valid.
endpoints/setuid.go
Outdated
key := query.Get("bidder") | ||
|
||
if key == "" { | ||
return nil, errors.New(`"bidder" query param is required`) | ||
} | ||
|
||
syncer, syncerExists := syncersByKey[key] | ||
syncer, syncerExists := syncersByBidder[key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should key
within the brackets [key]
now be called bidder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this change is already present in this PR: #2897 (comment)
But yes, it will be simpler to have it here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
c6a9bd5
Redirect urls for bidders user sync now have
bidder={bidderName}
notbidder={syncerKey}
.user_sync
endpoint now returns urls with redirect urls with bidder name instead of syncer key.setuid
endpoint now accepts bidder name, not syncer key:setuid?bidder=appnexus
notsetuid?bidder=adnxs
getuids
endpoint returns ids by syncer key.