-
Notifications
You must be signed in to change notification settings - Fork 750
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
Adapter Name Case Insensitive: dealTier #3218
Conversation
if bidderNormalized, bidderFound := NormalizeBidderName(bidder); bidderFound { | ||
dealTiers[bidderNormalized] = *param.DealTier | ||
} |
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 deal tier map being created here from the original request has keys that are the normalized bidder names. This map is then used in applyDealSupport
but that function does not appear to alter the bidder name in winningBidsByBidder
topBidsPerImp
prior to checking if the bidder has any deal tiers in the deal tier map. Is a change needed in applyDealSupport
as well?
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.
Good catch. Modified.
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.
This looks good, just one test coverage comment.
|
||
bidderNormalized, bidderFound := openrtb_ext.NormalizeBidderName(bidder.String()) | ||
if !bidderFound { | ||
continue |
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.
This line isn't covered by tests, do you think you can add a test where the bidder is not found from the NormalizeBidderName
call?
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.
Done. Also refactored TestApplyDealSupport
a little bit.
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.
Local testing looks good, approved
While testing this PR I found that deals don't work with stored bid responses. This happens because impressions with stored bid response are removed from bidRequest and |
Function
ReadDealTiersFromImp
unmarshals theImp.Ext
and creates a map of bidder names to deal tier info. This pull request normalizes the keys of this entries in this map in order to compare to the normalized bidder names and apply deal tiers if needed.