prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
403 stars 698 forks source link

Stop hard-failing on unknown imp.ext values #3735

Open bretg opened 3 weeks ago

bretg commented 3 weeks ago

One of the RTD modules starting putting data on imp.ext, and PBS is choking on it.

This isn't right... imp.ext should be for everyone to use... PBS shouldn't assume that every value in that ext must be a bidder to the point where it hardfails.

Instead, if an unknown value in imp.ext is found, PBS should do the following:

  1. If imp.ext.prebid.bidder exists, then do nothing. The requestor has moved to the new syntax where bidders are in imp.ext.prebid and there's no need to check imp.ext anymore. Let it through.
  2. If imp.ext.prebid.bidder doesn't exist, then it's ok to warn about unknown values, but the request should otherwise proceed.

Note: we already make exceptions for many imp.ext values: ae, all, context, data, general, gpid, prebid, skadn, and tid. We can keep these special cases to reduce the number of warnings emitted.

Test cases:

  1. Add imp.ext.foo and imp.ext.prebid.bidder.appnexus to the request. There should be no warnings. imp.ext.foo should be passed to bidders.
  2. Add imp.ext.foo and imp.ext.appnexus to the request. There should be a warning about an unknown bidder "foo". imp.ext.foo should be passed to bidders.
  3. Add imp.ext.gpid and imp.ext.appnexus to the request. There should be no warnings. imp.ext.gpid should be passed to bidders.
Slind14 commented 3 weeks ago

One option might be adding it to the list of reserved keys but that is an inclusive list:

https://github.com/prebid/prebid-server/blob/7702a78118cf56ebf2a4e998f4757b01640ef404/openrtb_ext/bidders.go#L251

bretg commented 3 weeks ago

adding it to the list of reserved keys

I suppose that would be faster, but I'd like to fix this once and for all