-
Notifications
You must be signed in to change notification settings - Fork 751
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
New Adapter: ResetDigital #3766
base: master
Are you sure you want to change the base?
Conversation
no need to include `required` if its empty _Originally posted by @onkarvhanumante in prebid#3452 (comment)
} | ||
|
||
func getBidType(imp openrtb2.Imp) (openrtb_ext.BidType, error) { | ||
if imp.Banner != 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.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeBanner, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
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.
Implemented as suggested
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.
Implemented as suggested
could you point out or link where MType
changes are implemented?
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.
Sorry, it was addressed on the point that we support only single format bids, so we could assume the anti pattern. Anyway, it would be more advisable to change to the normal pattern?
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.
Anyway, it would be more advisable to change to the normal pattern?
Prebid team recommends using MType field. But if it's not doable then current change suffices single format bid. @bruno-siira should mention in Bidder docs that adapter expects only single format bids in the incoming request
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.
When we're talking about the Bidder Docs what is this file exacly @onkarvhanumante
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.
Code coverage summaryNote:
resetdigitalRefer here for heat map coverage report
|
Implementation of suggestions
Code coverage summaryNote:
resetdigitalRefer here for heat map coverage report
|
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.
We have now a Builder
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.
There is a schema now
Code coverage summaryNote:
resetdigitalRefer here for heat map coverage report
|
Code coverage summaryNote:
resetdigitalRefer here for heat map coverage report
|
Pr review comments 11 13 24
|
||
func GetMediaTypeForImp(reqImp openrtb2.Imp) (openrtb_ext.BidType, error) { | ||
|
||
if reqImp.Video != 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.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
Code coverage summaryNote:
resetdigitalRefer here for heat map coverage report
|
if reqImp.Video != nil { | ||
return openrtb_ext.BidTypeVideo, nil | ||
} | ||
if reqImp.Audio != 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.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeAudio, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
@BrunoJacinto, I think this PR is ready for another review, please. |
Ok Dirk, I'll review it from my part. |
Ugh, I tagged Bruno instead of Brian. I meant to let @bsardo know that the PR is ready for another review. |
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.
@dirk-rd I think we're close. Please see my latest comments.
@@ -399,6 +400,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { | |||
openrtb_ext.BidderReadpeak: readpeak.Builder, | |||
openrtb_ext.BidderRelevantDigital: relevantdigital.Builder, | |||
openrtb_ext.BidderRevcontent: revcontent.Builder, | |||
openrtb_ext.BidderResetDigital: resetdigital.Builder, |
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.
Nitpick: move this line up one so it is just before RevContent to keep the builders in alphabetical order.
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.
Please add a new file params_test.go
in your adapter directory to verify your bidder parameters. You can copy this file from another adapter and modify accordingly.
return "", fmt.Errorf("failed to find matching imp for bid %s", imp.ID) | ||
} | ||
|
||
func GetMediaTypeForImp(reqImp openrtb2.Imp) (openrtb_ext.BidType, error) { |
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.
Please remove the second return value of type error
because this function never returns an error after recent changes.
adapters/resetdigital/.gitignore
Outdated
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.
Please remove this file.
return nil, []error{err} | ||
} | ||
|
||
bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) |
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.
It looks like above you are only sending one imp per request ... so this seems incorrect. This function is being passed the response to one of your above generated requests, so will likely have just one bid. More if you often send more than one bid per imp of course. PBS core then merges all the bids gotten by calling this function for each request/response that was generated for the incoming request.
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.
You are right, but at the same time, doesn't the code still work fine?
PR Review Comments 12-16-24
|
||
if reqImp.Video != nil { | ||
return openrtb_ext.BidTypeVideo | ||
} |
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.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
} | ||
if reqImp.Audio != nil { | ||
return openrtb_ext.BidTypeAudio | ||
} |
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.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeAudio. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
Code coverage summaryNote:
resetdigitalRefer here for heat map coverage report
|
@bsardo, this PR is once again ready for review. |
This PR adds a new adapter for Reset Digital to the Prebid Server (Go version). The adapter enables Prebid Server to communicate with Reset Digital for real-time advertising auctions.
Changes:
Added the Reset Digital adapter in adapters/resetdigital/.
Implemented necessary methods for the adapter.
Added unit tests for the adapter in adapters/resetdigital/resetdigital_test.go.
Updated the documentation to include the configuration for the Reset Digital adapter.
Testing:
Unit tests have been written and verified to ensure the adapter works correctly.
Manual testing has been performed to verify the integration with Reset Digital.
Notes:
This system is based on single bid, so it's based on that premise.
Related Issues: