Skip to content

Commit

Permalink
UOE-6610: Upgrade prebid-server to 0.170.0 (#190)
Browse files Browse the repository at this point in the history
* Smaato: Add support for app (prebid#1767)

Co-authored-by: Bernhard Pickenbrock <bernhard.pickenbrock@smaato.com>

* Update sync types (prebid#1770)

* 33across: Fix Shared Memory Overwriting (prebid#1764)

This reverts commit f7df258.

* Fix race condition in Yeahmobi adapter (prebid#1761)

Co-authored-by: Gus Carreon <gcarreongutierrez@Guss-MacBook-Pro.local>

* Pubnative: Fix Shared Memory Overwriting (prebid#1760)

* Add request for registration (prebid#1780)

* Update OpenRTB Library (prebid#1733)

* Tappx changes - Backward compatible change of version (prebid#1777)

Co-authored-by: ubuntu <ahernandez@tappx.com>
Co-authored-by: Albert Grandes <agrandes@tappx.com>

* DMX: Enforcing w and h in imp (prebid#1778)

Co-authored-by: steve-a-districtm <steve@districtm.net>

* Remove Authorization Headers From Debug Response (prebid#1779)

* Hide Authorization Headers In Debug Response

* MakeExtHeaders Tests

* Add Empty Test

* Use http.Header Methods

* Updates From Code Review

* Fix Merge Conflict

* New Adapter: Bidmachine (prebid#1769)

* New Adapter: Criteo (prebid#1775)

* Fix shared memory issue when stripping authorization header from bid requests (prebid#1790)

* RTB House: update parameters (prebid#1785)

* update parameters required by RTB House adapter

* tabs to spaces

Co-authored-by: Przemyslaw Iwanczak <przemyslaw.iwanczak@rtbhouse.com>

* Generate seatbid[].bid[].ext.prebid.bidid (prebid#1772)

* Basic GDPR enforcement for specific publisher-vendors. (prebid#1782)

* New Adapter: Zemanta (prebid#1774)

* add zemanta adapter

* update openrtb package for zemanta

* fix loop iterator reference bug

* fix getMediaTypeForImp to match server behavior

* Zemanta: Rename Adapter To Outbrain (prebid#1797)

* Update openrtb library to v15 (prebid#1802)

* IX: Set bidVideo when category and duration is available (prebid#1794)

* Update IX defaults (prebid#1799)

Co-authored-by: Mike Burns <mike.burns@indexexchange.com>

* Update Adyoulike endpoint to hit production servers (prebid#1805)

* Openx: use bidfloor if set - prebid.js adapter behavior  (prebid#1795)

* [ORBIDDER] add gvlVendorID and set bid response currency (prebid#1798)

* New Adapter: ADXCG (prebid#1803)

* Update kidoz properties to type string (prebid#1808)

Remove definitions object from schema and define types and other parameters directly in properties objects to ensure compatibility with more downstream systems that use this schema.

* Update bidmachine properties to type string (prebid#1809)

Remove definitions object from schema and define types and other parameters directly in properties objects to ensure compatibility with more downstream systems that use this schema.

* transform native eventtrackers to imptrackers and jstracker (prebid#1811)

* TheMediaGrid: Added processing of imp[].ext.data (prebid#1807)

* New Adapter: adf (adformOpenRTB) (prebid#1815)

* initial adformOpenRTB adapter implementation

* do not make request copy

* rename adfromOpenRTB adapter to adf

* fix user sync url

* Set Adhese gvl id and vast modification flag (prebid#1821)

* Added gvlVendorID for mobilefuse (prebid#1822)

* AppNexus: reform bid floor handling (prebid#1814)

* PubNative: Add GVL Vendor ID (prebid#1824)

* InMobi: adding gvlVendorID to static yaml (prebid#1826)

* Epom Adapter: configure vendor id (GVL ID) (prebid#1828)

Co-authored-by: Vasyl Zarva <vasyan.z@gmail.com>

* Update Adtarget gvlid (prebid#1829)

* Adding site to static yaml, and exemplary tests (prebid#1827)

* AdOcean adapter - add support for mobile apps (prebid#1830)

* Allow Native Ad Exchange Specific Types (prebid#1810)

* PubMatic: Fix Banner Size Assignment When No AdSlot Provided (prebid#1825)

* New Adapter: Interactive Offers (prebid#1835)

* IX: Set category in bid.cat (prebid#1837)

* New Adapter: Madvertise (prebid#1834)

* Conversant bid floor handling (prebid#1840)

* Adf adapter: banner and video mediatype support (prebid#1841)

* Test for data race conditions in adapters (prebid#1756)

* Revcontent adapter: add vendor id (GVL ID) (prebid#1849)

* Refactor: Removed unused GDPR return value (prebid#1839)

* New Adapter : Kayzen (prebid#1838)

* Add Kayzen Adapter

* Beachfront: Add schain support (prebid#1844)

Co-authored-by: jim naumann <jim@beachfront.com>

* Pangle: add appid & placementid to bidder param (prebid#1842)

Co-authored-by: hcai <caihengsheng@bytedance.com>

* New Adapter: BidsCube (prebid#1843)

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

Co-authored-by: vlad <vlaktionov@decenterads.com>

* Add Viewdeos alias (prebid#1846)

* [Smaato] Adding TCF 2.0 vendor id (prebid#1852)

* Pass Global Privacy Control header to bidders (prebid#1789)

* Feature Request: Ability to pass Sec-GPC header to the bidder endpoints (prebid#1712)

* making Sec-GPC value check more strict

* minor syntax change

* gofmt fixes

* updates against draft-code-review:one, more to come soon.

* adding a unit test

* Adding a test and request header clone update

* modified one test and related logic

* modifying the last test added with slight more modification of the logic

* GDPR: Don't Call Bidder If It Lacks Purpose 2 Legal Basis (prebid#1851)

* Update go-gdpr package to v0.9.0 (prebid#1856)

* Marsmedia - add GVL ID to bidder config file (prebid#1864)

Co-authored-by: Vladi Izgayev <vladi@pay-per-leads.com>

* PubMatic: Added parameters dctr & pmzoneid (prebid#1865)

* Better Support For Go Modules (prebid#1862)

* IX: Update usersync default id (prebid#1873)

* AppNexus: Make Ad Pod Id Optional (prebid#1792)

* Bugfix for applyCategoryMapping (prebid#1857)

* Facebook: Drop consented providers (prebid#1867)

* Between: Fix for bid floor issue#1787 (prebid#1870)

Co-authored-by: Egor Skorokhodov <skorokhodov@betweenx.com>

* Beachfront: Fix for bid floor issue#1787 (prebid#1878)

Co-authored-by: jim naumann <jim@beachfront.com>

* Updating interactiveoffers contact info (prebid#1881)

* Docs metrics configuration (prebid#1850)

* Criteo: update maintainer email address (prebid#1884)

* New Adapter: BrightMountainMedia (prebid#1855)

New Adapter : BrightMountainMedia

* New Adapter: AlgoriX (prebid#1861)

* Remove LifeStreet + Legacy Cleanup (prebid#1883)

* New Adapter: E-Volution  (prebid#1868)

* [criteo] accept zoneId and networkId alternate case (prebid#1869)

* Unit test random map order fix (prebid#1887)

Co-authored-by: Veronika Solovei <veronika.solovei@xandr.com>

* Request Provided Currency Rates (prebid#1753)

* Debug override header (prebid#1853)

* Remove GDPR TCF1 (prebid#1854)

* Rename GDPR UserSyncIfAmbiguous to DefaultValue (prebid#1858)

* Accept bidfloor from impression to fix issue prebid#1787 for sovrn adapter (prebid#1886)

* GDPR: require host specify default value (prebid#1859)

* New Adapter: Smile Wanted (prebid#1877)

* New Adapter: Smile Wanted

* Implementations of changes requested by : prebid#1877 (review)

* Improvement of test coverage as requested.

* Implementations of changes requested by : prebid#1877 (review)

* Fix a weak vendor enforcement bug where vendor does not exist (prebid#1890)

* Pubmatic: Sending GPT slotname in impression extension (prebid#1880)

* Update To Go 1.16 (prebid#1888)

* Friendlier Startup Error Messages (prebid#1894)

* Second fix for weak vendor enforcement (prebid#1896)

* Rubicon: hardcode EUR to USD for floors (prebid#1899)

Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>

* Outbrain adapter: overwrite tagid only if it exists (prebid#1895)

* New Adapter: BidMyAdz (prebid#1882)

Co-authored-by: BidMyAdz <contact@bidmyadz.com>

* Currency Conversion Utility Function (prebid#1901)

* New Adapter: SA Lunamedia  (prebid#1891)

* Removed Digitrust From Prebid Server (prebid#1892)

Co-authored-by: avolcy <alex.volcy@xandr.com>

* IX: merge eventtrackers with imptrackers for native bid responses (prebid#1900)

* Inmobi: user sync (prebid#1911)

* Rubicon: Update segtax logic (prebid#1909)

Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>

* New Adapter: Axonix (prebid#1912)

* New Axonix adapter

* Changed endpoint

* Rename adapter type

* Leave in examplary only the basic test fixtures

* PR comments

* Rubicon: Fix Nil Reference Panic (prebid#1918)

* GDPR: host-level per-purpose vendor exceptions config (prebid#1893)

Co-authored-by: Scott Kay <noreply@syntaxnode.com>

* Criteo - Fix fields mapping error when building bid from bidder response (prebid#1917)

* Smaato: Rework multi imp support and add adpod support (prebid#1902)

* Allowed $0.00 price bids if there are deals (prebid#1910)

* GDPR: host-level per-purpose enforce vendor signals config (prebid#1921)

* Add GDPR host-level per-purpose enforce vendor signals config

* Update config defaults test with TCF2 object compare

* Fix for fetcher warning at server startup  (prebid#1914)

Co-authored-by: Veronika Solovei <veronika.solovei@xandr.com>

* Request Wrapper first pass (prebid#1784)

* Rubicon: Use currency conversion function (prebid#1924)

Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>

* New Adapter: operaads (prebid#1916)

* Fix Beachfront data race condition (prebid#1915)

Co-authored-by: Jim Naumann <naumdev@gmail.com>

* Sharethrough: Add support for GPID (prebid#1925)

* Admixer: Fix for bid floor issue#1787 (prebid#1872)

* InMobi: adding native support (prebid#1928)

* Tappx: new bidder params (prebid#1931)

Co-authored-by: Albert Grandes <agrandes@tappx.com>

* Fix CVE-2020-35381 (prebid#1942)

* Smaato: Split multiple media types (prebid#1930)

Co-authored-by: Bernhard Pickenbrock <bernhard.pickenbrock@smaato.com>

* New adapter: Adagio (prebid#1907)

* IX: update required site id field to be more flexible (prebid#1934)

Co-authored-by: Joshua Gross <joshua.gross@indexexchange.com>

* Add SmartRTB adapter (prebid#1071)

* Adds timeout notifications for Facebook (prebid#1182)

* Add Adoppler bidder support. (prebid#1186)

* Add Adoppler bidder support.

* Address code review comments. Use JSON-templates for testing.

* Fix misprint; Add url.PathEscape call for adunit URL parameter.

* Kidoz adapter (prebid#1210)

Co-authored-by: Ryan Haksi <ryan.haksi@freshgrade.com>

* AMP CCPA Fix (prebid#1187)

* Add kidoz bidder info (prebid#1257)

got this info from email communication with kidoz

* populate the app ID in the FAN timeout notif url with the publisher ID (prebid#1265)

and the auction with the request ID

Co-authored-by: Aadesh Patel <aadesh.patel@xandr.com>

* * Add PubMatic bidder doc file (prebid#1255)

* Add app video capability to PubMatic bidder info file

* Added OpenX Bidder adapter documentation (prebid#1291)

* Restore the AMP privacy exception as an option. (prebid#1311)

* Restore the AMP privacy exception as an option.

* Adds missing test case

* More PR feedback

* Remove unused constant

* Comment tweak

* Add Yieldlab Adapter (prebid#1287)

Co-authored-by: Mirko Feddern <mirkorean@users.noreply.github.com>
Signed-off-by: Alex Klinkert <alex@klinkert.io>

Co-authored-by: Alexander Pinnecke <alexander.pinnecke@googlemail.com>
Co-authored-by: Alex Klinkert <alex@klinkert.io>
Co-authored-by: Mirko Feddern <mirkorean@users.noreply.github.com>

* Add Pubnative bidder documentation (prebid#1340)

* Add Adtarget server adapter (prebid#1319)

* Add Adtarget server adapter

* Suggested changes for Adtarget

* Avoid overriding AMP request original size with mutli-size (prebid#1352)

* Adds Avocet adapter (prebid#1354)

* Adding Smartadserver adapter (prebid#1346)

Co-authored-by: tadam <tadam@smartadserver.com>

* Metrics for TCF 2 adoption (prebid#1360)

* Add support for multiple root schain nodes (prebid#1374)

* Facebook Only Supports App Impressions (prebid#1396)

* Add Outgoing Connection Metrics (prebid#1343)

* OpenX adapter: pass optional platform (PBID-598) (prebid#1421)

* Adds keyvalue hb_format support (prebid#1414)

* feat: Add new logger module - Pubstack Analytics Module (prebid#1331)

* Pubstack Analytics V1 (#11)

* V1 Pubstack (#7)

* feat: Add Pubstack Logger (#6)

* first version of pubstack analytics

* bypass viperconfig

* commit #1

* gofmt

* update configuration and make the tests pass

* add readme on how to configure the adapter and update the network calls

* update logging and fix intake url definition

* feat: Pubstack Analytics Connector

* fixing go mod

* fix: bad behaviour on appending path to auction url

* add buffering

* support bootstyrap like configuration

* implement route for all the objects

* supports termination signal handling for goroutines

* move readme to the correct location

* wording

* enable configuration reload + add tests

* fix logs messages

* fix tests

* fix log line

* conclude merge

* merge

* update go mod

Co-authored-by: Amaury Ravanel <amaury.ravanel@gmail.com>

* fix duplicated channel keys

Co-authored-by: Amaury Ravanel <amaury.ravanel@gmail.com>

* first pass - PR reviews

* rename channel* -> eventChannel

* dead code

* Review (#10)

* use json.Decoder

* update documentation

* use nil instead []byte("")

* clean code

* do not use http.DefaultClient

* fix race condition (need validation)

* separate the sender and buffer logics

* refactor the default configuration

* remove error counter

* Review GP + AR

* updating default config

* add more logs

* remove alias fields in json

* fix json serializer

* close event channels

Co-authored-by: Amaury Ravanel <amaury.ravanel@gmail.com>

* fix race condition

* first pass (pr reviews)

* refactor: store enabled modules into a dedicated struct

* stop goroutine

* test: improve coverage

* PR Review

* Revert "refactor: store enabled modules into a dedicated struct"

This reverts commit f57d9d6.

# Conflicts:
#	analytics/config/config_test.go

Co-authored-by: Amaury Ravanel <amaury.ravanel@gmail.com>

* New bid adapter for Smaato (prebid#1413)

Co-authored-by: vikram <vikram.chandel@smaato.com>
Co-authored-by: Stephan <s@brosinski.com>

* New Adprime adapter (prebid#1418)

Co-authored-by: Aiholkin <artem.iholkin@smartyads.com>

* Enable geo activation of GDPR flag (prebid#1427)

* moving docs to website repo (prebid#1443)

* Add support for Account configuration (PBID-727, prebid#1395) (prebid#1426)

* Pass Through First Party Context Data (prebid#1479)

* between adapter (prebid#1437)

Co-authored-by: Alexey Elymanov <elymanov@betweenx.com>

* Bidder Uniqueness Gatekeeping Test (prebid#1506)

* Smarty ads adapter (prebid#1500)

Co-authored-by: Kushneryk Pavlo <pavel.k@smartyads.com>
Co-authored-by: user <support@smartyads.com>

* Vtrack and event endpoints (prebid#1467)

* Add bidder name key support (prebid#1496)

* Add metrics to capture stored data fetch all/delta durations with fetch status (prebid#1515)

* Acuity ads adapter (prebid#1537)

Co-authored-by: Kushneryk Pavlo <pavel.k@smartyads.com>

* Yieldmo app support in yaml file (prebid#1542)

Co-authored-by: Winston <wiston@yieldmo.com>

* Add client/AccountID support into Adoppler adapter. (prebid#1535)

* 33Across: Add video support in adapter (prebid#1557)

* Fix bug in request.imp.ext Validation (prebid#1575)

* First draft

* Brian's reivew

* Removed leftover comments

Co-authored-by: Gus Carreon <gcarreongutierrez@vpn-10-75-10-44.nym2.appnexus.com>

* New Adapter Initialization Framework (prebid#1532)

* Fix 33Across App Handling (prebid#1602)

* Fix adapter JSON tests to have the right test structure (prebid#1589)

* Fix JSON EMX Digital

* Fix JSON Brightroll

* Fix JSON Beintoo

* Fix JSON Gamoshi

* Fix JSON Kubient

* Fix JSON Marsmedia

* Fix JSON Nanointeractive

* Fix JSON Telaria

* Fix JSON valueimpression

* Fix JSON smartyads

* Fix JSON rhythmone

* Fix JSON krushmedia

* Fix JSON cpmstar

* Fix JSON acuityads

* Fix JSON avocet

* Rename wrongly named acuity ads test file

* Fix JSON gamma

* Add expected no bid responses

* Fixed indentation and asesome-markup

* Added usersync support to Between SSP adapter; Major fixes and refactor (prebid#1587)

Co-authored-by: Egor Skorokhodov <skorokhodov@betweenx.com>

* 33Across: Add support for multi-imp requests (prebid#1609)

* Remove legacy GDPR AMP config flag used to prevent buyer ID scrub on AMP requests (prebid#1565)

* New Adapter: Mobfox (prebid#1585)

Co-authored-by: mobfox <artem.iholkin@smartyads.com>

* New Adapter: Revcontent (prebid#1622)

* Audit beachfront tests and change some videoResponseType details (prebid#1638)

* Tappx User Syncer + Site Update (prebid#1674)

Co-authored-by: ubuntu <ahernandez@tappx.com>
Co-authored-by: Albert Grandes <agrandes@tappx.com>

* Beachfront Additional tests (prebid#1679)

* added place holder files for all but a couple of the intended new tests. I need to grok what those couple mean before being able to name a file.

* This covers most of the suggested cases and a couple more that occured to me. I'll look at the couple that I held off on next.

* added the unmarshal tests and found a couple problems to address in the process.

* removed my __debug_bin. should be in gitignore.

* A bit of clean up and commenting. Bumped version number. Added __debug_bin to .gitignore. This is the debugging binary created by Visual Studio Code, or at least version 1.52.1.

* missed a bunch of version strings

* removed IP faker

* If IP is not included in an AdM request, an error is now thrown for the AdM imp instead of faking it. The AdM endpoint is the only one that requires an IP. Also, added several "no-ip" test cases.

* Whent back to the fake IP solution instead of the error. Removed most of the "no-ip" test cases, leaving one.

* changed ip in adm-video.json to not match the faker ip

* removed a debugging comment

* Mobfox: Add rout to adexcange (prebid#1702)

Co-authored-by: mobfox <artem.iholkin@smartyads.com>

* Add Support For SkAdN + Refactor Split Imps (prebid#1741)

* No Longer Move bid.ext To bid.ext.bidder (prebid#1742)

* No Longer Move bid.ext To bid.ext.bidder

* Remove Similar Behavior From seatbid.ext

* Avoid Second Bid Copy

* Removed Unused seatbid.ext

* Debug warnings (prebid#1724)

Co-authored-by: Veronika Solovei <veronika.solovei@xandr.com>

* FPD: Allow imp.ext.data To Passthrough To Adapters (prebid#1765)

* Basic GDPR enforcement for specific publisher-vendors. (prebid#1782)

* New Adapter: Zemanta (prebid#1774)

* add zemanta adapter

* update openrtb package for zemanta

* fix loop iterator reference bug

* fix getMediaTypeForImp to match server behavior

* Zemanta: Rename Adapter To Outbrain (prebid#1797)

* New Adapter: adf (adformOpenRTB) (prebid#1815)

* initial adformOpenRTB adapter implementation

* do not make request copy

* rename adfromOpenRTB adapter to adf

* fix user sync url

* Set Adhese gvl id and vast modification flag (prebid#1821)

* Added gvlVendorID for mobilefuse (prebid#1822)

* AppNexus: reform bid floor handling (prebid#1814)

* PubNative: Add GVL Vendor ID (prebid#1824)

* InMobi: adding gvlVendorID to static yaml (prebid#1826)

* Epom Adapter: configure vendor id (GVL ID) (prebid#1828)

Co-authored-by: Vasyl Zarva <vasyan.z@gmail.com>

* Update Adtarget gvlid (prebid#1829)

* Adding site to static yaml, and exemplary tests (prebid#1827)

* AdOcean adapter - add support for mobile apps (prebid#1830)

* Allow Native Ad Exchange Specific Types (prebid#1810)

* PubMatic: Fix Banner Size Assignment When No AdSlot Provided (prebid#1825)

* New Adapter: Interactive Offers (prebid#1835)

* IX: Set category in bid.cat (prebid#1837)

* New Adapter: Madvertise (prebid#1834)

* Conversant bid floor handling (prebid#1840)

* Adf adapter: banner and video mediatype support (prebid#1841)

* Test for data race conditions in adapters (prebid#1756)

* Revcontent adapter: add vendor id (GVL ID) (prebid#1849)

* Refactor: Removed unused GDPR return value (prebid#1839)

* New Adapter : Kayzen (prebid#1838)

* Add Kayzen Adapter

* Beachfront: Add schain support (prebid#1844)

Co-authored-by: jim naumann <jim@beachfront.com>

* Pangle: add appid & placementid to bidder param (prebid#1842)

Co-authored-by: hcai <caihengsheng@bytedance.com>

* New Adapter: BidsCube (prebid#1843)

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

* add BidsCube adapter

Co-authored-by: vlad <vlaktionov@decenterads.com>

* Add Viewdeos alias (prebid#1846)

* [Smaato] Adding TCF 2.0 vendor id (prebid#1852)

* Pass Global Privacy Control header to bidders (prebid#1789)

* Feature Request: Ability to pass Sec-GPC header to the bidder endpoints (prebid#1712)

* making Sec-GPC value check more strict

* minor syntax change

* gofmt fixes

* updates against draft-code-review:one, more to come soon.

* adding a unit test

* Adding a test and request header clone update

* modified one test and related logic

* modifying the last test added with slight more modification of the logic

* GDPR: Don't Call Bidder If It Lacks Purpose 2 Legal Basis (prebid#1851)

* Update go-gdpr package to v0.9.0 (prebid#1856)

* Marsmedia - add GVL ID to bidder config file (prebid#1864)

Co-authored-by: Vladi Izgayev <vladi@pay-per-leads.com>

* PubMatic: Added parameters dctr & pmzoneid (prebid#1865)

* Better Support For Go Modules (prebid#1862)

* AppNexus: Make Ad Pod Id Optional (prebid#1792)

* Facebook: Drop consented providers (prebid#1867)

* Between: Fix for bid floor issue#1787 (prebid#1870)

Co-authored-by: Egor Skorokhodov <skorokhodov@betweenx.com>

* Beachfront: Fix for bid floor issue#1787 (prebid#1878)

Co-authored-by: jim naumann <jim@beachfront.com>

* Updating interactiveoffers contact info (prebid#1881)

* Docs metrics configuration (prebid#1850)

* Criteo: update maintainer email address (prebid#1884)

* New Adapter: BrightMountainMedia (prebid#1855)

New Adapter : BrightMountainMedia

* New Adapter: AlgoriX (prebid#1861)

* Remove LifeStreet + Legacy Cleanup (prebid#1883)

* New Adapter: E-Volution  (prebid#1868)

* [criteo] accept zoneId and networkId alternate case (prebid#1869)

* Request Provided Currency Rates (prebid#1753)

* Debug override header (prebid#1853)

* Remove GDPR TCF1 (prebid#1854)

* Rename GDPR UserSyncIfAmbiguous to DefaultValue (prebid#1858)

* Accept bidfloor from impression to fix issue prebid#1787 for sovrn adapter (prebid#1886)

* GDPR: require host specify default value (prebid#1859)

* New Adapter: Smile Wanted (prebid#1877)

* New Adapter: Smile Wanted

* Implementations of changes requested by : prebid#1877 (review)

* Improvement of test coverage as requested.

* Implementations of changes requested by : prebid#1877 (review)

* Fix a weak vendor enforcement bug where vendor does not exist (prebid#1890)

* Update To Go 1.16 (prebid#1888)

* Friendlier Startup Error Messages (prebid#1894)

* Second fix for weak vendor enforcement (prebid#1896)

* Rubicon: hardcode EUR to USD for floors (prebid#1899)

Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>

* Outbrain adapter: overwrite tagid only if it exists (prebid#1895)

* New Adapter: BidMyAdz (prebid#1882)

Co-authored-by: BidMyAdz <contact@bidmyadz.com>

* Currency Conversion Utility Function (prebid#1901)

* New Adapter: SA Lunamedia  (prebid#1891)

* Removed Digitrust From Prebid Server (prebid#1892)

Co-authored-by: avolcy <alex.volcy@xandr.com>

* IX: merge eventtrackers with imptrackers for native bid responses (prebid#1900)

* Inmobi: user sync (prebid#1911)

* Rubicon: Update segtax logic (prebid#1909)

Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>

* New Adapter: Axonix (prebid#1912)

* New Axonix adapter

* Changed endpoint

* Rename adapter type

* Leave in examplary only the basic test fixtures

* PR comments

* Rubicon: Fix Nil Reference Panic (prebid#1918)

* git rebase

* Reverted some changes after prebid-server upgrade

* Fixed ctv_auction.go after merging prebid-0.170.0

* Added missing gdpr.default_value

* Updated usersync url for bidder Unruly

Co-authored-by: el-chuck <be.pickenbrock@gmail.com>
Co-authored-by: Bernhard Pickenbrock <bernhard.pickenbrock@smaato.com>
Co-authored-by: Gena <wertixvost@gmail.com>
Co-authored-by: guscarreon <guscarreon@gmail.com>
Co-authored-by: Gus Carreon <gcarreongutierrez@Guss-MacBook-Pro.local>
Co-authored-by: bretg <bgorsline@gmail.com>
Co-authored-by: Scott Kay <noreply@syntaxnode.com>
Co-authored-by: prebidtappx <77485538+prebidtappx@users.noreply.github.com>
Co-authored-by: ubuntu <ahernandez@tappx.com>
Co-authored-by: Albert Grandes <agrandes@tappx.com>
Co-authored-by: Steve Alliance <steve.alliance@gmail.com>
Co-authored-by: steve-a-districtm <steve@districtm.net>
Co-authored-by: Pavel Dunyashev <pasha.1992@mail.ru>
Co-authored-by: Benjamin <benjamin.chastanier@gmail.com>
Co-authored-by: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Co-authored-by: Przemysław Iwańczak <36727380+piwanczak@users.noreply.github.com>
Co-authored-by: Przemyslaw Iwanczak <przemyslaw.iwanczak@rtbhouse.com>
Co-authored-by: Veronika Solovei <kalypsonika@gmail.com>
Co-authored-by: hhhjort <31041505+hhhjort@users.noreply.github.com>
Co-authored-by: Rok Sušnik <rokostik@gmail.com>
Co-authored-by: Rok Sušnik <rsusnik@outbrain.com>
Co-authored-by: ixjohnny <75964135+ixjohnny@users.noreply.github.com>
Co-authored-by: Michael Burns <mlb7687@users.noreply.github.com>
Co-authored-by: Mike Burns <mike.burns@indexexchange.com>
Co-authored-by: guiann <guillaume.andouard@adyoulike.com>
Co-authored-by: Laurentiu Badea <laurb9@users.noreply.github.com>
Co-authored-by: Arne Schulz <arne.schulz@otto.de>
Co-authored-by: adxcgcom <31470944+adxcgcom@users.noreply.github.com>
Co-authored-by: agilfix <agilfix@appnexus.com>
Co-authored-by: TheMediaGrid <44166371+TheMediaGrid@users.noreply.github.com>
Co-authored-by: Jurij Sinickij <jurij.sinickij@adform.com>
Co-authored-by: mefjush <mefjush@gmail.com>
Co-authored-by: dtbarne <7635750+dtbarne@users.noreply.github.com>
Co-authored-by: Pillsoo Shin <ps@pubnative.net>
Co-authored-by: Daniel Lawrence <daniel.lawrence@inmobi.com>
Co-authored-by: epomrnd <epomrnd@users.noreply.github.com>
Co-authored-by: Vasyl Zarva <vasyan.z@gmail.com>
Co-authored-by: Marcin Muras <47107445+mmuras@users.noreply.github.com>
Co-authored-by: IOTiagoFaria <76956619+IOTiagoFaria@users.noreply.github.com>
Co-authored-by: notmani <nicolas.otmani@gmail.com>
Co-authored-by: johnwier <49074029+johnwier@users.noreply.github.com>
Co-authored-by: jcamp-revc <68560678+jcamp-revc@users.noreply.github.com>
Co-authored-by: Raghu Teja <2473294+raghuteja@users.noreply.github.com>
Co-authored-by: Jim Naumann <muncha@users.noreply.github.com>
Co-authored-by: jim naumann <jim@beachfront.com>
Co-authored-by: Hengsheng Cai <luke.hengshengcai@gmail.com>
Co-authored-by: hcai <caihengsheng@bytedance.com>
Co-authored-by: Vladyslav Laktionov <vlad.progers@gmail.com>
Co-authored-by: vlad <vlaktionov@decenterads.com>
Co-authored-by: Ruslan Sibgatullin <betterrus@gmail.com>
Co-authored-by: Vivek Narang <vivek.narang10@gmail.com>
Co-authored-by: vladi-mmg <vladi@m-m-g.com>
Co-authored-by: Vladi Izgayev <vladi@pay-per-leads.com>
Co-authored-by: egsk <funnyalters@gmail.com>
Co-authored-by: Egor Skorokhodov <skorokhodov@betweenx.com>
Co-authored-by: timoshas <semenenko.tim@yandex.ru>
Co-authored-by: Léonard Labat <leonard.labat@live.fr>
Co-authored-by: BrightMountainMedia <69471268+BrightMountainMediaInc@users.noreply.github.com>
Co-authored-by: Bugxyb <markxyb@gmail.com>
Co-authored-by: e-volution-tech <61746103+e-volution-tech@users.noreply.github.com>
Co-authored-by: Léonard Labat <le.labat@criteo.com>
Co-authored-by: Veronika Solovei <veronika.solovei@xandr.com>
Co-authored-by: Rachel Joyce <rachelrj@umich.edu>
Co-authored-by: Maxime DEYMÈS <47388595+MaxSmileWanted@users.noreply.github.com>
Co-authored-by: Serhii Nahornyi <sergiy3344@gmail.com>
Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>
Co-authored-by: bidmyadz <82382704+bidmyadz@users.noreply.github.com>
Co-authored-by: BidMyAdz <contact@bidmyadz.com>
Co-authored-by: lunamedia <73552749+lunamedia@users.noreply.github.com>
Co-authored-by: AlexBVolcy <74930484+AlexBVolcy@users.noreply.github.com>
Co-authored-by: avolcy <alex.volcy@xandr.com>
Co-authored-by: Mani Gandham <manigandham@gmail.com>
Co-authored-by: armon823 <86739148+armon823@users.noreply.github.com>
Co-authored-by: César Fernández <cfalonso@gmail.com>
Co-authored-by: jizeyopera <70930512+jizeyopera@users.noreply.github.com>
Co-authored-by: Mansi Nahar <mansinahar@users.noreply.github.com>
Co-authored-by: Jim Naumann <naumdev@gmail.com>
Co-authored-by: Eddy Pechuzal <46331062+epechuzal@users.noreply.github.com>
Co-authored-by: avolokha <84977155+avolokha@users.noreply.github.com>
Co-authored-by: Olivier <osazos@adagio.io>
Co-authored-by: Joshua Gross <820727+grossjo@users.noreply.github.com>
Co-authored-by: Joshua Gross <joshua.gross@indexexchange.com>
Co-authored-by: evanmsmrtb <evanm@smrtb.com>
Co-authored-by: Viacheslav Chimishuk <vchimishuk@yandex.ru>
Co-authored-by: rhaksi-kidoz <61601767+rhaksi-kidoz@users.noreply.github.com>
Co-authored-by: Ryan Haksi <ryan.haksi@freshgrade.com>
Co-authored-by: Aadesh <aadeshp95@gmail.com>
Co-authored-by: Aadesh Patel <aadesh.patel@xandr.com>
Co-authored-by: Mike Chowla <mchowla@gmail.com>
Co-authored-by: Jimmy Tu <jimee02@users.noreply.github.com>
Co-authored-by: Mirko Feddern <3244291+mirkorean@users.noreply.github.com>
Co-authored-by: Alexander Pinnecke <alexander.pinnecke@googlemail.com>
Co-authored-by: Alex Klinkert <alex@klinkert.io>
Co-authored-by: Mirko Feddern <mirkorean@users.noreply.github.com>
Co-authored-by: Artur Aleksanyan <artur.aleksanyan89@gmail.com>
Co-authored-by: Richard Lee <14349+dlackty@users.noreply.github.com>
Co-authored-by: Simon Critchley <sicritchley@gmail.com>
Co-authored-by: tadam75 <adam.thomas@live.fr>
Co-authored-by: tadam <tadam@smartadserver.com>
Co-authored-by: gpolaert <gpolaert@pubstack.io>
Co-authored-by: Amaury Ravanel <amaury.ravanel@gmail.com>
Co-authored-by: Vikram <vikramsinghchandel@users.noreply.github.com>
Co-authored-by: vikram <vikram.chandel@smaato.com>
Co-authored-by: Stephan <s@brosinski.com>
Co-authored-by: Adprime <64427228+Adprime@users.noreply.github.com>
Co-authored-by: Aiholkin <artem.iholkin@smartyads.com>
Co-authored-by: Alexey Elymanov <strangeqargo@gmail.com>
Co-authored-by: Alexey Elymanov <elymanov@betweenx.com>
Co-authored-by: Kushneryk Pavel <levelup.kpi@gmail.com>
Co-authored-by: Kushneryk Pavlo <pavel.k@smartyads.com>
Co-authored-by: user <support@smartyads.com>
Co-authored-by: Daniel Barrigas <danielgbarrigas@gmail.com>
Co-authored-by: Cameron Rice <37162584+camrice@users.noreply.github.com>
Co-authored-by: AcuityAdsIntegrations <72594990+AcuityAdsIntegrations@users.noreply.github.com>
Co-authored-by: Winston-Yieldmo <46379634+Winston-Yieldmo@users.noreply.github.com>
Co-authored-by: Winston <wiston@yieldmo.com>
Co-authored-by: Aparna Rao <pr.aparna@gmail.com>
Co-authored-by: Gus Carreon <gcarreongutierrez@vpn-10-75-10-44.nym2.appnexus.com>
Co-authored-by: mobfxoHB <74364234+mobfxoHB@users.noreply.github.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 32 changed files with 832 additions and 110 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ of exported types.

Want to [add an adapter](https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html)? Found a bug? Great!

Report bugs, request features, and suggest improvements [on Github](https://github.com/prebid/prebid-server/issues).

Or better yet, [open a pull request](https://github.com/prebid/prebid-server/compare) with the changes you'd like to see.
Or better yet, [open a pull request](https://github.com/PubMatic-OpenWrap/prebid-server/compare) with the changes you'd like to see.

## IDE Recommendations

Expand Down
4 changes: 3 additions & 1 deletion adapters/appnexus/appnexus.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,15 @@ func (a *AppNexusAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ad

imps := request.Imp

// Commenting out the following piece of code to avoid populating adpod_id in the Appnexus request (ref: https://inside.pubmatic.com:9443/jira/browse/UOE-6196)

// For long form requests if adpodId feature enabled, adpod_id must be sent downstream.
// Adpod id is a unique identifier for pod
// All impressions in the same pod must have the same pod id in request extension
// For this all impressions in request should belong to the same pod
// If impressions number per pod is more than maxImpsPerReq - divide those imps to several requests but keep pod id the same
// If adpodId feature disabled and impressions number per pod is more than maxImpsPerReq - divide those imps to several requests but do not include ad pod id
if isVIDEO == 1 && *adPodId {
/*if isVIDEO == 1 && *adPodId {
podImps := groupByPods(imps)
requests := make([]*adapters.RequestData, 0, len(podImps))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"id": "test-request-id",
"ext": {
"appnexus": {
"adpod_id": "5577006791947779410",
"hb_source": 6
},
"prebid": {}
Expand Down
1 change: 0 additions & 1 deletion adapters/beachfront/beachfronttest/exemplary/banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
}
]
},

"httpCalls": [
{
"expectedRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"bidfloor": 7,
"secure": 1,
"tagid": "mytag",
"displaymanager": "prebid-s2s",
"displaymanager": "pubmatic-openwrap",
"displaymanagerver": "2.0.0",
"video": {
"api": [1,2],
Expand All @@ -126,7 +126,7 @@
"bidfloor": 1,
"secure": 1,
"tagid": "mytag",
"displaymanager": "prebid-s2s",
"displaymanager": "pubmatic-openwrap",
"displaymanagerver": "2.0.0",
"video": {
"api": [1,2],
Expand Down Expand Up @@ -154,7 +154,7 @@
"bidfloor": 7,
"secure": 1,
"tagid": "mytag",
"displaymanager": "prebid-s2s",
"displaymanager": "pubmatic-openwrap",
"displaymanagerver": "2.0.0",
"video": {
"api": [1,2],
Expand Down Expand Up @@ -182,7 +182,7 @@
"bidfloor": -3,
"secure": 1,
"tagid": "mytag",
"displaymanager": "prebid-s2s",
"displaymanager": "pubmatic-openwrap",
"displaymanagerver": "2.0.0",
"video": {
"api": [1,2],
Expand Down
6 changes: 5 additions & 1 deletion adapters/pubmatic/pubmatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ func assignBannerSize(banner *openrtb2.Banner) (*openrtb2.Banner, error) {
return banner, nil
}

if len(banner.Format) == 0 {
return nil, errors.New(fmt.Sprintf("No sizes provided for Banner %v", banner.Format))
}

return assignBannerWidthAndHeight(banner, banner.Format[0].W, banner.Format[0].H), nil
}

Expand Down Expand Up @@ -545,7 +549,7 @@ func parseImpressionObject(imp *openrtb2.Imp, wrapExt *string, pubID *string) er
imp.Banner = bannerCopy
}

extMap := make(map[string]interface{}, 0)
impExtMap := make(map[string]interface{}, 0)
if pubmaticExt.Keywords != nil && len(pubmaticExt.Keywords) != 0 {
addKeywordsToExt(pubmaticExt.Keywords, extMap)
}
Expand Down
3 changes: 1 addition & 2 deletions analytics/config/config_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package config

import (
"github.com/stretchr/testify/assert"
"net/http"
"os"
"testing"

"github.com/mxmCherry/openrtb/v15/openrtb2"
"github.com/stretchr/testify/assert"

"github.com/prebid/prebid-server/analytics"
"github.com/prebid/prebid-server/config"
)
Expand Down
3 changes: 1 addition & 2 deletions analytics/filesystem/file_module_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package filesystem

import (
"github.com/prebid/prebid-server/config"
"net/http"
"os"
"strings"
"testing"

"github.com/mxmCherry/openrtb/v15/openrtb2"
"github.com/prebid/prebid-server/config"

"github.com/prebid/prebid-server/analytics"
"github.com/prebid/prebid-server/usersync"
)
Expand Down
12 changes: 10 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ func (cfg *Configuration) setDerivedDefaults() {
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGumGum, "https://rtb.gumgum.com/usync/prbds2s?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dgumgum%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderImprovedigital, "https://ad.360yield.com/server_match?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dimprovedigital%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%7BPUB_USER_ID%7D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderInMobi, "https://id5-sync.com/i/495/0.gif?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&callback="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dinmobi%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%7BID5UID%7D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderIx, "https://ssum.casalemedia.com/usermatchredir?s=194962&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dix%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderIx, "https://ssum.casalemedia.com/usermatchredir?s=186523&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dix%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D")
// openrtb_ext.BidderInvibes doesn't have a good default.
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderJixie, "https://id.jixie.io/api/sync?pid=&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Djixie%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%25%25JXUID%25%25")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderKrushmedia, "https://cs.krushmedia.com/4e4abdd5ecc661643458a730b1aa927d.gif?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redir="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dkrushmedia%26uid%3D%5BUID%5D")
Expand Down Expand Up @@ -753,6 +753,10 @@ func SetupViper(v *viper.Viper, filename string) {
v.SetDefault("http_client.max_idle_connections", 400)
v.SetDefault("http_client.max_idle_connections_per_host", 10)
v.SetDefault("http_client.idle_connection_timeout_seconds", 60)
v.SetDefault("http_client_cache.max_connections_per_host", 0) // unlimited
v.SetDefault("http_client_cache.max_idle_connections", 10)
v.SetDefault("http_client_cache.max_idle_connections_per_host", 2)
v.SetDefault("http_client_cache.idle_connection_timeout_seconds", 60)
v.SetDefault("http_client.tls_handshake_timeout", 0) //no timeout
v.SetDefault("http_client.response_header_timeout", 0) //unlimited
v.SetDefault("http_client.dial_timeout", 0) //no timeout
Expand All @@ -765,6 +769,7 @@ func SetupViper(v *viper.Viper, filename string) {
v.SetDefault("metrics.disabled_metrics.account_adapter_details", false)
v.SetDefault("metrics.disabled_metrics.adapter_connections_metrics", true)
v.SetDefault("metrics.disabled_metrics.adapter_gdpr_request_blocked", false)
v.SetDefault("metrics.disabled_metrics.adapter_connections_metrics", true)
v.SetDefault("metrics.influxdb.host", "")
v.SetDefault("metrics.influxdb.database", "")
v.SetDefault("metrics.influxdb.username", "")
Expand Down Expand Up @@ -916,7 +921,8 @@ func SetupViper(v *viper.Viper, filename string) {
v.SetDefault("adapters.improvedigital.endpoint", "http://ad.360yield.com/pbs")
v.SetDefault("adapters.inmobi.endpoint", "https://api.w.inmobi.com/showad/openrtb/bidder/prebid")
v.SetDefault("adapters.interactiveoffers.endpoint", "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04")
v.SetDefault("adapters.ix.disabled", true)
v.SetDefault("adapters.ix.disabled", false)
v.SetDefault("adapters.ix.endpoint", "http://exchange.indexww.com/pbs?p=192919")
v.SetDefault("adapters.jixie.endpoint", "https://hb.jixie.io/v2/hbsvrpost")
v.SetDefault("adapters.kayzen.endpoint", "https://bids-{{.ZoneID}}.bidder.kayzen.io/?exchange={{.AccountID}}")
v.SetDefault("adapters.krushmedia.endpoint", "http://ads4.krushmedia.com/?c=rtb&m=req&key={{.AccountID}}")
Expand Down Expand Up @@ -996,6 +1002,8 @@ func SetupViper(v *viper.Viper, filename string) {
v.BindEnv("gdpr.default_value")
v.SetDefault("gdpr.enabled", true)
v.SetDefault("gdpr.host_vendor_id", 0)
v.SetDefault("gdpr.default_value", "0")
v.SetDefault("gdpr.usersync_if_ambiguous", true)
v.SetDefault("gdpr.timeouts_ms.init_vendorlist_fetches", 0)
v.SetDefault("gdpr.timeouts_ms.active_vendorlist_fetch", 0)
v.SetDefault("gdpr.non_standard_publishers", []string{""})
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestExternalCacheURLValidate(t *testing.T) {
}
}

func TestDefaults(t *testing.T) {
func TestDefaults(t *testing.T) {
cfg, _ := newDefaultConfig(t)

cmpInts(t, "port", cfg.Port, 8000)
Expand Down
2 changes: 1 addition & 1 deletion endpoints/events/vtrack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ func TestGetVideoEventTracking(t *testing.T) {
name: "valid_scenario",
args: args{
trackerURL: "http://company.tracker.com?eventId=[EVENT_ID]&appbundle=[DOMAIN]",
bid: &openrtb2.Bid{
bid: &openrtb2.Bid{
// AdM: vastXMLWith2Creatives,
},
req: &openrtb2.BidRequest{
Expand Down
8 changes: 0 additions & 8 deletions endpoints/openrtb2/auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,6 @@ func (deps *endpointDeps) validateRequest(req *openrtb_ext.RequestWrapper) []err
if err := validateCustomRates(reqPrebid.CurrencyConversions); err != nil {
return []error{err}
}

if err := validateSChains(bidExt); err != nil {
return []error{err}
}

if err := deps.validateEidPermissions(bidExt, aliases); err != nil {
return []error{err}
}
}

if (req.Site == nil && req.App == nil) || (req.Site != nil && req.App != nil) {
Expand Down
8 changes: 5 additions & 3 deletions endpoints/openrtb2/ctv_auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ func NewCTVEndpoint(
func (deps *ctvEndpointDeps) CTVAuctionEndpoint(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
defer util.TimeTrack(time.Now(), "CTVAuctionEndpoint")

var request *openrtb.BidRequest
var response *openrtb.BidResponse
var reqWrapper *openrtb_ext.RequestWrapper
var request *openrtb2.BidRequest
var response *openrtb2.BidResponse
var err error
var errL []error

Expand Down Expand Up @@ -137,10 +138,11 @@ func (deps *ctvEndpointDeps) CTVAuctionEndpoint(w http.ResponseWriter, r *http.R
}()

//Parse ORTB Request and do Standard Validation
request, errL = deps.parseRequest(r)
reqWrapper, errL = deps.parseRequest(r)
if errortypes.ContainsFatalError(errL) && writeError(errL, w, &deps.labels) {
return
}
request = reqWrapper.BidRequest

util.JLogf("Original BidRequest", request) //TODO: REMOVE LOG

Expand Down
1 change: 1 addition & 0 deletions errortypes/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const (
BlacklistedAcctErrorCode
AcctRequiredErrorCode
NoConversionRateErrorCode
NoBidPriceErrorCode
)

// Defines numeric codes for well-known warnings.
Expand Down
2 changes: 2 additions & 0 deletions exchange/adapter_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
openrtb_ext.BidderSomoaudience: somoaudience.Builder,
openrtb_ext.BidderSonobi: sonobi.Builder,
openrtb_ext.BidderSovrn: sovrn.Builder,
openrtb_ext.BidderSpotX: spotx.Builder,
openrtb_ext.BidderSynacormedia: synacormedia.Builder,
openrtb_ext.BidderTappx: tappx.Builder,
openrtb_ext.BidderTelaria: telaria.Builder,
Expand All @@ -241,6 +242,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
openrtb_ext.BidderUnicorn: unicorn.Builder,
openrtb_ext.BidderUnruly: unruly.Builder,
openrtb_ext.BidderValueImpression: valueimpression.Builder,
openrtb_ext.BidderVASTBidder: vastbidder.Builder,
openrtb_ext.BidderVerizonMedia: verizonmedia.Builder,
openrtb_ext.BidderViewdeos: adtelligent.Builder,
openrtb_ext.BidderVisx: visx.Builder,
Expand Down
4 changes: 2 additions & 2 deletions exchange/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package exchange

import (
"encoding/json"
"github.com/mxmCherry/openrtb/v15/openrtb2"
"time"

jsonpatch "github.com/evanphx/json-patch"
"github.com/mxmCherry/openrtb/v15/openrtb2"
"github.com/evanphx/json-patch"
"github.com/prebid/prebid-server/analytics"
"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/endpoints/events"
Expand Down
54 changes: 31 additions & 23 deletions exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ type exchange struct {
privacyConfig config.Privacy
categoriesFetcher stored_requests.CategoryFetcher
bidIDGenerator BidIDGenerator
trakerURL string
}

// Container to pass out response ext data from the GetAllBids goroutines back into the main thread
Expand Down Expand Up @@ -228,7 +229,7 @@ func (e *exchange) HoldAuction(ctx context.Context, r AuctionRequest, debugLog *
//If includebrandcategory is present in ext then CE feature is on.
if requestExt.Prebid.Targeting != nil && requestExt.Prebid.Targeting.IncludeBrandCategory != nil {
var rejections []string
bidCategory, adapterBids, rejections, err = applyCategoryMapping(ctx, requestExt, adapterBids, e.categoriesFetcher, targData, &randomDeduplicateBidBooleanGenerator{})
bidCategory, adapterBids, rejections, err = applyCategoryMapping(ctx, r.BidRequest, requestExt, adapterBids, e.categoriesFetcher, targData, &randomDeduplicateBidBooleanGenerator{})
if err != nil {
return nil, fmt.Errorf("Error in category mapping : %s", err.Error())
}
Expand Down Expand Up @@ -517,7 +518,6 @@ func (e *exchange) getAllBids(
bidsFound = true
bidIDsCollision = recordAdaptorDuplicateBidIDs(e.me, adapterBids)
}

}
if bidIDsCollision {
// record this request count this request if bid collision is detected
Expand Down Expand Up @@ -662,7 +662,7 @@ func encodeBidResponseExt(bidResponseExt *openrtb_ext.ExtBidResponse) ([]byte, e
return buffer.Bytes(), err
}

func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtRequest, seatBids map[openrtb_ext.BidderName]*pbsOrtbSeatBid, categoriesFetcher stored_requests.CategoryFetcher, targData *targetData, booleanGenerator deduplicateChanceGenerator) (map[string]string, map[openrtb_ext.BidderName]*pbsOrtbSeatBid, []string, error) {
func applyCategoryMapping(ctx context.Context, bidRequest *openrtb2.BidRequest, requestExt *openrtb_ext.ExtRequest, seatBids map[openrtb_ext.BidderName]*pbsOrtbSeatBid, categoriesFetcher stored_requests.CategoryFetcher, targData *targetData, booleanGenerator deduplicateChanceGenerator) (map[string]string, map[openrtb_ext.BidderName]*pbsOrtbSeatBid, []string, error) {
res := make(map[string]string)

type bidDedupe struct {
Expand Down Expand Up @@ -796,19 +796,20 @@ func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtReques
if !brandCatExt.SkipDedup {
if dupe, ok := dedupe[dupeKey]; ok {

dupeBidPrice, err := strconv.ParseFloat(dupe.bidPrice, 64)
if err != nil {
dupeBidPrice = 0
}
currBidPrice, err := strconv.ParseFloat(pb, 64)
if err != nil {
currBidPrice = 0
}
if dupeBidPrice == currBidPrice {
if booleanGenerator.Generate() {
dupeBidPrice = -1
} else {
currBidPrice = -1
dupeBidPrice, err := strconv.ParseFloat(dupe.bidPrice, 64)
if err != nil {
dupeBidPrice = 0
}
currBidPrice, err := strconv.ParseFloat(pb, 64)
if err != nil {
currBidPrice = 0
}
if dupeBidPrice == currBidPrice {
if booleanGenerator.Generate() {
dupeBidPrice = -1
} else {
currBidPrice = -1
}
}

if dupeBidPrice < currBidPrice {
Expand All @@ -823,12 +824,19 @@ func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtReques
if len(oldSeatBid.bids) == 1 {
seatBidsToRemove = append(seatBidsToRemove, dupe.bidderName)
} else {
// This is a very rare, but still possible case where bid needs to be removed from already processed bidder
// This happens when current processing bidder has a bid that has same deduplication key as a bid from already processed bidder
// and already processed bid was selected to be removed
// See example of input data in unit test `TestCategoryMappingTwoBiddersManyBidsEachNoCategorySamePrice`
// Need to remove bid by name, not index in this case
removeBidById(oldSeatBid, dupe.bidID)
// An older bid from a different seatBid we've already finished with
oldSeatBid := (seatBids)[dupe.bidderName]
rejections = updateRejections(rejections, dupe.bidID, "Bid was deduplicated")
if len(oldSeatBid.bids) == 1 {
seatBidsToRemove = append(seatBidsToRemove, dupe.bidderName)
} else {
// This is a very rare, but still possible case where bid needs to be removed from already processed bidder
// This happens when current processing bidder has a bid that has same deduplication key as a bid from already processed bidder
// and already processed bid was selected to be removed
// See example of input data in unit test `TestCategoryMappingTwoBiddersManyBidsEachNoCategorySamePrice`
// Need to remove bid by name, not index in this case
removeBidById(oldSeatBid, dupe.bidID)
}
}
delete(res, dupe.bidID)
} else {
Expand All @@ -838,9 +846,9 @@ func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtReques
continue
}
}
dedupe[dupeKey] = bidDedupe{bidderName: bidderName, bidIndex: bidInd, bidID: bidID, bidPrice: pb}
}
res[bidID] = categoryDuration
dedupe[dupeKey] = bidDedupe{bidderName: bidderName, bidIndex: bidInd, bidID: bidID, bidPrice: pb}
}

if len(bidsToRemove) > 0 {
Expand Down
Loading

0 comments on commit 26d9a66

Please sign in to comment.