-
Notifications
You must be signed in to change notification settings - Fork 754
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
I1503: Added dealTierSatisfied parameters in exchange.pbsOrtbBid and openrtb_ext.ExtBidPrebid and dealPriority in openrtb_ext.ExtBidPrebid #1558
Conversation
…].bid[j].ext.prebid.dealpriority and response.seatbid[i].bid[j].ext.prebid.dealTierSatisfied respectively.
exchange/exchange.go
Outdated
@@ -303,6 +303,7 @@ func validateAndNormalizeDealTier(impDeal *DealTier) bool { | |||
func updateHbPbCatDur(bid *pbsOrtbBid, dealTierInfo *DealTierInfo, bidCategory map[string]string) { | |||
if bid.dealPriority >= dealTierInfo.MinDealTier { |
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.
Looking at function name - updateHbPbCatDur
, Can we move the following condition outside of this function
if bid.dealPriority >= dealTierInfo.MinDealTier {
after the change, It will look like
if validateDealTier(impDeal[bidder]) && topBidPerBidder.dealPriority >= impDeal[bidder].MinDealTier {
topBidPerBidder.dealTierSatisfied = true
updateHbPbCatDur(topBidPerBidder, impDeal[bidder], bidCategory)
}
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
@@ -1351,7 +1351,7 @@ func (m *mockExchangeVideo) HoldAuction(ctx context.Context, bidRequest *openrtb | |||
if debugLog != nil && debugLog.Enabled { | |||
m.cache.called = true | |||
} | |||
ext := []byte(`{"prebid":{"targeting":{"hb_bidder_appnexus":"appnexus","hb_pb_appnexus":"20.00","hb_pb_cat_dur_appnex":"20.00_395_30s","hb_size":"1x1", "hb_uuid_appnexus":"837ea3b7-5598-4958-8c45-8e9ef2bf7cc1"},"type":"video"},"bidder":{"appnexus":{"brand_id":1,"auction_id":7840037870526938650,"bidder_id":2,"bid_ad_type":1,"creative_info":{"video":{"duration":30,"mimes":["video\/mp4"]}}}}}`) | |||
ext := []byte(`{"prebid":{"targeting":{"hb_bidder_appnexus":"appnexus","hb_pb_appnexus":"20.00","hb_pb_cat_dur_appnex":"20.00_395_30s","hb_size":"1x1", "hb_uuid_appnexus":"837ea3b7-5598-4958-8c45-8e9ef2bf7cc1"},"type":"video","dealpriority":0,"dealtiersatisfied":false},"bidder":{"appnexus":{"brand_id":1,"auction_id":7840037870526938650,"bidder_id":2,"bid_ad_type":1,"creative_info":{"video":{"duration":30,"mimes":["video\/mp4"]}}}}}`) |
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 modification is not needed because, when ommited, both missing JSON int
and boolean
fields default to 0
and false
respectively. Anyway, not a big deal if included.
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
Added