Yahoo Ads: Migrate to OpenRTB 2.6#4521
Draft
MananRPatel wants to merge 2 commits into
Draft
Conversation
added 2 commits
May 29, 2026 14:32
Bump the x-openrtb-version header from 2.5 to 2.6 and stop down-converting the auction request inside the bidder. The bidder now passes the 2.6 request through, relying on the PBS-Java up-converter to normalize gdpr, us_privacy, consent, eids, schain and rwdd to their 2.6 top-level slots. For the three privacy/regulatory fields that neither converter handles (gpp, gpp_sid, coppa), add ext->top promotion in modifyRegs: read the 2.6 top-level value, falling back to the legacy 2.5 regs.ext property, and strip the promoted keys from ext. Typed ext-only fields (gpc, dsa) and any other ext properties are preserved. No cattax default is synthesized. Remove the now-unused BidRequestOrtbVersionConversionManager dependency from the bidder and its Spring configuration. Update unit tests for the 2.6 wire shape and add coverage for the ext->top promotion, mixed publisher shapes, wrong-type ext guards, and the no-ext short-circuit. Update the integration fixture to the 2.6 wire shape.
Make stripPromotedFromExt remove a regs.ext key only when its value was actually promoted to top-level (resolved value non-null). A malformed, non-promotable value (e.g. a non-textual gpp) is now left untouched in regs.ext instead of being dropped when a sibling field triggers the rebuild. Add a test covering the mixed case (valid coppa promoted, malformed gpp kept in ext) and trim redundant comments.
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
Migrates the Yahoo Ads bidder (and its
yahoossp/yahooAdvertisingaliases)from OpenRTB 2.5 to OpenRTB 2.6 on the wire. Three changes, all in the bidder:
x-openrtb-version: 2.5→2.6insrc/main/java/org/prebid/server/bidder/yahooads/YahooAdsBidder.java.request back to 2.5 before serializing it
(
conversionManager.convertFromAuctionSupportedVersion(bidRequest, OrtbVersion.ORTB_2_5)).That call is removed, along with the now-unused
BidRequestOrtbVersionConversionManagerdependency in the bidder and itsYahooAdsConfiguration.regs.{gpp, gpp_sid, coppa}. The oldmodifyRegs/resolveExtRegsblock re-buried these (and gdpr/us_privacy)into
regs.ext. It is replaced with amodifyRegsthat, when a publishersends the legacy 2.5-ext shape (
regs.ext.gpp/regs.ext.gpp_sid/regs.ext.coppa) and the 2.6 top-level field is empty, copies the value toits 2.6 top-level slot and removes it from
regs.ext. Typed ext-only fields(
gpc,dsa), unknownregs.extproperties, and any of the three thatcould not be promoted (e.g. a malformed, non-textual
gpp) are left inregs.extuntouched, so no value is silently dropped.No publisher-facing config change is required bidder params (
dcn,pos) areunchanged, and
bidder-config/yahooAds.yamlalready declaredortb-version: "2.6".Why
PBS-Java core up-converts every incoming request to its canonical 2.6 form
(
BidRequestOrtb25To26Converter) before bidders run. The Yahoo bidder thenexplicitly down-converted that back to 2.5 and re-buried
gpp/gpp_sid/coppaintoregs.ext, and sentx-openrtb-version: 2.5.Net effect: even fully 2.6-aware publishers had privacy/addressability fields
buried in
.exton the wire.Removing the in-bidder down-conversion lets core's existing promotion reach the
wire. The new
modifyRegsadditionally promotes the three regulatory fieldsthat neither converter handles.
regs.gdpr,regs.us_privacyregs.ext.*Regsuser.consent,user.eidsuser.ext.*Usersource.schainsource.ext.schainSourceimp.rwddimp.ext.prebid.is_rewarded_inventoryImpregs.gpp,regs.gpp_sidregs.ext.*Regsregs.copparegs.ext.coppa(legacy)RegsWhat this means for publishers
regs.gpptop-level).ext; header was2.52.6.exton the wiregdpr,us_privacy,consent,eids,schain,rwdd; the bidder additionally promotesgpp,gpp_sid,coppa; everything else passes through in.extNon-regulatory 2.6 fields the bidder does not transform (e.g.
device.sua,user.kwarray,site/app.inventorypartnerdomain,content.network,content.channel) pass through in whatever shape the publisher sent.What changed
src/main/java/org/prebid/server/bidder/yahooads/YahooAdsBidder.javasrc/main/java/org/prebid/server/spring/config/bidder/YahooAdsConfiguration.javasrc/test/java/org/prebid/server/bidder/yahooads/YahooAdsBidderTest.javasrc/test/resources/org/prebid/server/it/openrtb2/yahooads/test-yahooads-bid-request.jsonYahooAdsBidder.javabumps the header literal, removes the down-converter calland dependency, and replaces the regs re-bury logic with
modifyRegs+resolveGpp/resolveGppSid/resolveCoppahelpers. The helpers operate ona
toBuilder()copy ofRegs(the bidder already rebuilds the requestper-impression), so they cannot affect the request other bidders see.
Test plan
Automated
mvn test -Dtest=YahooAdsBidderTest27 unit tests pass. New cases cover:ext→top promotion, mixed publisher shapes (some fields top-level, some in
ext), wrong-typed
regs.extvalues (no promotion), a malformed value left inext while a sibling field promotes, and the no-
extshort-circuit.mvn test -Dtest=YahooAdsTestintegration test passes against theupdated 2.6 wire fixture.
End-to-end against the Yahoo Ads SSP
A build of this branch was run as a local PBS-Java process (not Docker) and
pointed at the Yahoo Ads SSP endpoint. For each scenario a request was POSTed to
/openrtb2/auctionwithext.prebid.debug: 1, and the exact bytes the bidderput on the wire were read back from
ext.debug.httpcalls.yahooAds[*](requestbody + headers). Every outbound carried
x-openrtb-version: 2.6and the SSPreturned HTTP 200. Bid presence varies with demand and is not asserted here.
regs.gpp/regs.gpp_sid/regs.coppapromoted to top-level and removed fromregs.ext; core-promoted fields (gdpr,us_privacy) at top-level; unrelatedregs.extkeys (gpc,dsa) left inregs.extplcmt=2andplcmt=4podid,podseq,slotinpod,maxseq,poddur,mincpmpersec,rqddurs) intactapp.idoverride applied (same mechanism assite.id); 2.6 wireHow to verify locally
Test fixture changes
test-yahooads-bid-request.json(integration): expected outbound now carriesregs.gpp/regs.gpp_sid/regs.gdprat top-level (previously underregs.ext).YahooAdsBidderTest.java: header assertion2.5→2.6; the"remove/overwrite regs ext" tests are replaced with promotion + passthrough
tests described above.
Backward compatibility
No breaking changes.
dcn,pos) unchanged.makeBids) unchanged.gpp/gpp_sid/coppaat top-level; all other fields pass through unchanged in.ext.Aliases
yssp,yahoosspandyahooAdvertisingare declared as aliases ofyahooAdsin
bidder-config/yahooAds.yamland share the sameYahooAdsBidderinstance,so all alias codes send the 2.6 wire after this PR.
For contact: prebid-tech-team@yahooinc.com
🤖 Drafted with assistance from Claude Code.