Open
Conversation
targeting.site as arraytargeting.site as array
Collaborator
Author
|
Corresponding issue prebid/prebid-server#4079 |
osulzhenko
requested changes
Mar 10, 2026
| def "PBS amp shouldn't emit error for targeting when site is array"() { | ||
| given: "Create targeting with array of site" | ||
| def anyRandomValue = PBSUtils.randomString | ||
| def targeting = ["site": [PBSUtils.randomString], "any" : anyRandomValue] |
Collaborator
There was a problem hiding this comment.
work only for for site object(s) "site": [Site.defaultSite] , and what if empty, or >1?
osulzhenko
requested changes
Mar 11, 2026
Comment on lines
+1940
to
+1943
|
|
||
| where: | ||
| siteValue << [null, [], [PBSUtils.randomString], [Site.defaultSite], [Site.defaultSite, PBSUtils.randomString], | ||
| [PBSUtils.randomString, Site.defaultSite], [App.defaultApp, Site.defaultSite]] |
Collaborator
There was a problem hiding this comment.
No, this implementation isn't correct based on the existing code. If you look at OrtbTypesResolver.normalizeBidRequest, it should throw an error for non-site objects.
We also need to cover:
- cases where site.size >= 2 it it okay.
- What are the side effects on bidderRequest and bidRequest?
Please investigate this further
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🔧 Type of changes
✨ What's the context?
What's the context for the changes?
🧠 Rationale behind the change
Why did you choose to make these changes? Were there any trade-offs you had to consider?
🔎 New Bid Adapter Checklist
🧪 Test plan
How do you know the changes are safe to ship to production?
🏎 Quality check