-
Notifications
You must be signed in to change notification settings - Fork 853
New Bidder: Scalibur #4640
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
base: master
Are you sure you want to change the base?
New Bidder: Scalibur #4640
Conversation
Code coverage summaryNote:
scaliburRefer here for heat map coverage report |
Code coverage summaryNote:
scaliburRefer here for heat map coverage report |
Code coverage summaryNote:
scaliburRefer here for heat map coverage report |
Code coverage summaryNote:
scaliburRefer here for heat map coverage report |
|
I've updated the media type logic to follow the recommended pattern and resolved the bot feedback. Ready for review and workflow approval. |
| @@ -0,0 +1,54 @@ | |||
| { | |||
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.
These test files are not actually being executed, they need to be in a exemplary directory under scaliburtest.
Docs under Adapter Code Tests
https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html
| // Try to extract custom fields vastXml and vastUrl from bid response | ||
| var bidExtData map[string]interface{} | ||
| if bidBytes, err := json.Marshal(bid); err == nil { | ||
| if err := json.Unmarshal(bidBytes, &bidExtData); err == 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.
issue: you are looking at top level bid fields here but the default vasturl field is in ext.vasturl. This needs to be aligned and pass the bid.ext instead.
| impCopy.BidFloorCur = scaliburExt.BidFloorCur | ||
| } | ||
| if impCopy.BidFloorCur == "" { | ||
| impCopy.BidFloorCur = "USD" |
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.
question: could there be currency conversion issues if the bid floor isn't usd but you are stamping as usd bid floor?
ExtraRequestInfo has currency converter functionality
| func getBidMediaType(bid openrtb2.Bid, imp *openrtb2.Imp) (openrtb_ext.BidType, error) { | ||
| // 1 = Banner, 2 = Video, 3 = Audio, 4 = Native | ||
| switch bid.MType { | ||
| case 1: |
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.
avoid magic numbers and use constants from openrtb2 package
MarkupBanner MarkupType = 1
MarkupVideo MarkupType = 2
MarkupAudio MarkupType = 3
MarkupNative MarkupType = 4
| - banner | ||
| - video | ||
|
|
||
| gvlVendorID: 1471 |
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.
| @@ -0,0 +1,22 @@ | |||
| { | |||
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.
add params test file to cover this. Example: https://github.com/prebid/prebid-server/blob/master/adapters/appnexus/params_test.go
|
|
||
| // Preserve GPID if present | ||
| var rawExt map[string]json.RawMessage | ||
| if err := json.Unmarshal(imp.Ext, &rawExt); err == 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.
utilize jsonutil unmarshal/marshal functions instead of standard lib json unmarshaler. eg. jsonutil.Unmarshal()

Type of change
Description
This PR adds the Scalibur bidder adapter to Prebid Server.
Features:
Verification:
uidscookie touser.buyeruidin outgoing requests.adapters/scaliburpassed../validate.shpassed (ignoring unrelated global config/hook test timeouts).Checklist