-
Notifications
You must be signed in to change notification settings - Fork 735
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
33Across: Add video support in adapter #1557
Conversation
@curlyblueeagle Are you looking to also add support for Long Form Video / Instream Video with this PR? |
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.
Looks pretty good, just a question in regards of the JSON files. Also, just for consistency in respect of other adapters, can we rename adapters/33across/33across/
folder to adapters/33across/33acrosstest/
please?
"ext": { | ||
"ttx": { | ||
"mediaType": "video" | ||
} |
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.
Do we only expect the 33Across server to respond with an "ext"
field to video requests? Because in the banner example found in adapters/33across/33across/exemplary/simple-banner.json
the "mockResponse"
doesn't have that. If they do, should we expect a "banner"
value?
45 "mockResponse": {
46 "status": 200,
47 "body": {
48 "id": "test-request-id",
49 "seatbid": [
50 {
51 "seat": "ttx",
52 "bid": [{
53 "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
54 "impid": "test-imp-id",
55 "price": 0.500000,
56 "adm": "some-test-ad",
57 "crid": "crid_10",
58 "h": 90,
59 "w": 728
+ "ext": {
+ "ttx": {
+ "mediaType": "video"
+ }
+ }
60 }]
61 }
62 ],
63 "cur": "USD"
64 }
65 }
66 }
67 ],
adapters/33across/33across/exemplary/simple-banner.json
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.
Correct, the ext
field if present will specify the mediaType. If not present assume banner, which is what the adapter will do in such a case.
didn't mean to approve, I meant to request changes
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.
Looks pretty good, just a question in regards of the JSON files. Also, just for consistency in respect of other adapters, can we rename adapters/33across/33across/
folder to adapters/33across/33acrosstest/
please?
@SyntaxNode Yes we are looking to support |
Gotcha. Sounds good. The |
Oh interesting. We were assuming that Long Form was Ad Pods which is distinct from |
Ah, ok. You're fine. I was wrongfully assuming all instream video was ad pod based. I'll update our docs to make that clearer. |
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 looks good. I commented on a few areas where we'd like to see increased test coverage.
videoCopy.Placement = 1 | ||
|
||
if videoCopy.StartDelay == nil { | ||
videoCopy.StartDelay = openrtb.StartDelay.Ptr(0) |
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 test coverage for this default to 0 branch.
return openrtb_ext.BidTypeVideo | ||
} | ||
|
||
return openrtb_ext.BidTypeBanner |
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 test coverage for this assume banner if not a video mediatype branch.
I asked this question earlier to the Prebid team :). This was the answer I received #1487 (comment) So yes, we will be doing on only "Short form" instream and not Ad Pod (aka Long form) |
Added more unit tests
@SyntaxNode I have added more tests to pass the threshold of 90% (sorry only just came to know about this requirement). Please let me know if you need anything more. |
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.
I believe you forgot to get rid of the adapters/33across/33across
and the adapters/33across/33across/supplemental
directories that now seem to be empty
╰─➤ tree adapters/33across
adapters/33across
├── 33across
│ └── supplemental
├── 33across.go
├── 33across_test.go
├── 33acrosstest
│ ├── exemplary
│ │ ├── bidresponse-defaults.json
│ │ ├── instream-video-defaults.json
│ │ ├── multi-format.json
│ │ ├── optional-params.json
│ │ ├── outstream-video-defaults.json
│ │ ├── simple-banner.json
│ │ └── simple-video.json
│ ├── params
│ │ └── race
│ │ ├── banner.json
│ │ └── video.json
│ └── supplemental
│ ├── status-not-ok.json
│ └── video-validation-fail.json
├── params_test.go
├── usersync.go
└── usersync_test.go
@guscarreon I just pulled down a fresh copy and cannot see the empty directories. That might be a sync status issue on your machine. |
You are right, those must have been left-overs in my local folder |
@@ -49,6 +56,14 @@ func (a *TtxAdapter) makeRequest(request *openrtb.BidRequest) (*adapters.Request | |||
errs = append(errs, err) | |||
} | |||
|
|||
if reqCopy.Imp[0].Banner == nil && reqCopy.Imp[0].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.
reqCopy.Imp[0]
It's unexpected for an adapter to only forward the first impression and throw out the rest. I recognize this is existing behavior which predates me by quite a bit. I don't wish for this to hold up this PR.
At the very least, please document this behavior here: https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/33across.md
As a future improvement, you may wish to consider sending multiple requests to your bidding server for each impression provided by the publisher.
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 for the suggestion, will incorporate this in follow up PR. I will also file a Docs PR shortly.
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.
@SyntaxNode a follow up question about your suggestion to send multiple requests-- how would Prebid Server handle responses? Wait for all responses for each request to return or send them upstream as they come one-by-one?
No description provided.