-
Notifications
You must be signed in to change notification settings - Fork 2k
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
PBS adapter: add tmaxmax #11540
Merged
Merged
PBS adapter: add tmaxmax #11540
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1659209
Merge pull request #1586 from prebid/master
jefftmahoney a49852a
Merge branch 'master' of https://github.com/sharethrough/Prebid.js-in…
jefftmahoney bc2e207
Merge branch 'master' of https://github.com/sharethrough/Prebid.js-in…
jefftmahoney 25e0e24
Merge branch 'master' of https://github.com/sharethrough/Prebid.js-in…
jefftmahoney c5495ba
Merge branch 'master' of https://github.com/sharethrough/Prebid.js-in…
jefftmahoney 18c8328
Merge branch 'master' of https://github.com/sharethrough/Prebid.js-in…
jefftmahoney 6a2a7cd
Update logic to determine tmax
jefftmahoney b3b3ca4
Update tmaxmax logic and test
jefftmahoney 4bb1b47
Use requestBidsTimeout for tmaxmax alternative
jefftmahoney f20d821
Update prebidServerBidAdapter_spec.js
jefftmahoney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
my reading of the issue:
is that this should be a new field,
request.ext.tmaxmax
, which by default should be the client timeout, optionally overridable withortb2.ext.tmaxmax
which I think in code translates to
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.
Hmmm ... yes, I think I agree with you @dgirardi.
Belated question: do we think that
tmaxmax
is something that a SSP endpoint (the place a bid request will get POST-ed to) needs to worry about? Or is this just to help the server-side make a smart decision abouttmax
? I'm assuming sincetmaxmax
is not part of oRTB the answer is "no", but thought I'd ask.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.
My understanding is that this is of interest to prebid server specifically because it has a separate timeout configuration that doesn't necessarily match the client timeout. Client adapters typically already have
tmax
set to the client timeout, and if not they can choose to do as they wish, so I don't think it makes sense to generalize it.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.
@dgirardi I'm having trouble writing a test to verify that this works.
Where would
ortbConverter.js
look to find out if a publisher had made this call:Would it be in
proxyBidderRequest
? That object is undefined right now in the test I'm running, but if that is where a publisher-specifiedtmaxmax
value would go I could mock one up.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.
roughly,
ortb2
comes in ass2sBidRequest.ortb2Fragments.global
here:Prebid.js/modules/prebidServerBidAdapter/index.js
Line 454 in e074512
passed down here:
Prebid.js/modules/prebidServerBidAdapter/ortbConverter.js
Line 262 in e074512
and finally here:
Prebid.js/modules/prebidServerBidAdapter/ortbConverter.js
Line 172 in e074512
which is how, in the code at the top of this thread, it ends up filling
request.ext.tmaxmax
after you runbuildRequest
."roughly" because there's more than one way to configure
ortb2
- and the PBS adapter is peculiar in that it also has to deal with bidder-specific configuration separately from global configuration (hence the.global
)in practice for testing that means manipulating
ortb2Fragments.global
in the first argument tocallBids
- here's an example:Prebid.js/test/spec/modules/prebidServerBidAdapter_spec.js
Lines 2614 to 2621 in e074512
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 is great - thank you so much! I'll try some of this out later this afternoon and let you know.
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.
Addressed with commit
b3b3ca4