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.
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
gptPreAuction: pass publisher provided signals to GPT #11946
gptPreAuction: pass publisher provided signals to GPT #11946
Changes from 3 commits
cf9697c
afc58a3
9e14c13
116c3ab
23af08e
42aefd7
fb9a5a1
f99dbf7
9b390f8
0635c61
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
(regarding the test failure) my preferred method of stubbing is dependency injection. E.g. if this did something like
getSignalsArrayByAuctionIds(auctionIds, index = auctionManager.index)
, tests can swap in a mock version ofindex
, and I find it a bit easier to reason about compared to sinon's stubs. To do the same with sinon I think you need an extra layer of indirection, basically instead of makingindex
a parameter make it a property of some global object pointing toauctionManager.index
, which you can then stub.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 can be extracted to be reused with
getSignals
aboveThere 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 think this should be
entry[0] === TARGETING_KEYS.AD_ID || entry[0].startsWith(TARGETING_KEYS.AD_ID + '_')
That's because
''
hb_adid
orhb_adid_${bidder}
(reference). It's unlikely, but possible, to define custom targeting keys likecustom_hb_adid
that would be a false positive for this.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.
note that these are ad ids, not auction IDs. they should be passed through
findBidByAdId
.