-
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
IX: add privacy sandbox support #3252
Conversation
Code coverage summaryNote:
ixRefer here for heat map coverage report
|
adapters/ix/ix.go
Outdated
@@ -19,7 +19,8 @@ import ( | |||
) | |||
|
|||
type IxAdapter struct { | |||
URI string | |||
URI string | |||
bidderName string |
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.
@ccorbo could you help to understand how adding bidderName
facilates privacy sandbox support
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.
Removed bidderName - not needed
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.
Removed bidderName - not needed
@ccorbo could you link commit where bidderName
is removed. PR diff still has bidderName
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.
whoops sorry - updated now
adapters/ix/ix.go
Outdated
@@ -273,6 +283,23 @@ func (a *IxAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalReque | |||
} | |||
} | |||
|
|||
if bidResponse.Ext != nil { | |||
var bidRespExt ixRespExt | |||
if err := json.Unmarshal(bidResponse.Ext, &bidRespExt); err == nil && bidRespExt.AuctionConfig != nil { |
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 not ignore unMarshal
error. This could be a potential bad bidder server issue
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.
added error check
@ccorbo Please take a look at the above comments/questions. |
b9d0090
to
14e5e72
Compare
Code coverage summaryNote:
ixRefer here for heat map coverage report
|
adapters/ix/ix.go
Outdated
if err := json.Unmarshal(bidResponse.Ext, &bidRespExt); err == nil && bidRespExt.AuctionConfig != nil { | ||
bidderResponse.FledgeAuctionConfigs = make([]*openrtb_ext.FledgeAuctionConfig, 0, len(bidRespExt.AuctionConfig)) | ||
for _, config := range bidRespExt.AuctionConfig { | ||
if config.Config != nil { | ||
fledgeAuctionConfig := &openrtb_ext.FledgeAuctionConfig{ | ||
ImpId: config.BidId, | ||
Config: config.Config, | ||
} | ||
bidderResponse.FledgeAuctionConfigs = append(bidderResponse.FledgeAuctionConfigs, fledgeAuctionConfig) | ||
} | ||
} | ||
} else { | ||
if err != nil { | ||
errs = append(errs, err) | ||
} | ||
} |
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.
above block can be rewritten as below for better readability
if bidResponse.Ext != nil {
var bidRespExt ixRespExt
if err := json.Unmarshal(bidResponse.Ext, &bidRespExt); err != nil {
return nil, append(errs, err)
}
if bidRespExt.AuctionConfig != nil {
bidderResponse.FledgeAuctionConfigs = make([]*openrtb_ext.FledgeAuctionConfig, 0, len(bidRespExt.AuctionConfig))
for _, config := range bidRespExt.AuctionConfig {
if config.Config != nil {
fledgeAuctionConfig := &openrtb_ext.FledgeAuctionConfig{
ImpId: config.BidId,
Config: config.Config,
}
bidderResponse.FledgeAuctionConfigs = append(bidderResponse.FledgeAuctionConfigs, fledgeAuctionConfig)
}
}
}
}
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.
Thanks updated
Code coverage summaryNote:
ixRefer here for heat map coverage report
|
Co-authored-by: Chris Corbo <[email protected]>
This MR adds privacy sandbox support to the IX Bid Adapter