Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Release/verup 0.146.0 #8

Open
wants to merge 88 commits into
base: flux
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5258ef3
Add metrics to capture stored data fetch all/delta durations with fet…
bsardo Oct 19, 2020
dd7a5fc
Adds preferDeals support (#1528)
hhhjort Oct 20, 2020
21a9076
Emxd 3336 add app video ctv (#1529)
EMXDigital Oct 21, 2020
b0f8d71
Add http api for fetching accounts (#1545)
laurb9 Oct 22, 2020
445c207
Add missing postgres cache init config validation
bsardo Oct 22, 2020
3f31429
Acuity ads adapter (#1537)
AcuityAdsIntegrations Oct 22, 2020
6a997b2
Yieldmo app support in yaml file (#1542)
ym-winston Oct 22, 2020
7b50f96
Add metrics for account cache (#1543)
laurb9 Oct 22, 2020
0742c81
[Invibes] remove user sync for invibes (#1550)
invibes Oct 28, 2020
5a718e7
Add Support For imp.ext.prebid For DealTiers (#1539)
SyntaxNode Oct 28, 2020
e53bf0f
Add Accounts to http cache events (#1553)
laurb9 Oct 29, 2020
f141c49
Fix JSON tests ignore expected message field (#1450)
guscarreon Nov 3, 2020
75f71f5
NoBid version 1.0. Initial commit. (#1547)
redaguermas Nov 3, 2020
d821b3b
Added dealTierSatisfied parameters in exchange.pbsOrtbBid and openrtb…
ShriprasadM Nov 4, 2020
d044a93
Add client/AccountID support into Adoppler adapter. (#1535)
vchimishuk Nov 5, 2020
aeeeba8
Optionally read IFA value and add it the the request url (Adhese) (#1…
sander-adhese Nov 5, 2020
7db8fe0
Add AMX RTB adapter (#1549)
nickjacob Nov 5, 2020
63f5bcf
update Datablocks usersync.go (#1572)
htang555 Nov 10, 2020
6d37afc
33Across: Add video support in adapter (#1557)
curlyblueeagle Nov 11, 2020
c481f56
SilverMob adapter (#1561)
Nov 11, 2020
9a3f2a0
Updated ePlanning GVL ID (#1574)
sebaperez Nov 11, 2020
aaecdfa
update adpone google vendor id (#1577)
seergiioo6 Nov 11, 2020
7060022
ADtelligent gvlid (#1581)
GeneGenie Nov 12, 2020
12d96a6
Add account/ host GDPR enabled flags & account per request type GDPR …
bsardo Nov 12, 2020
ada88b4
DMX Bidfloor fix (#1579)
stevealliance Nov 16, 2020
acf889e
adform bidder video bid response support (#1573)
braizhas Nov 17, 2020
17f5020
Fix Beachfront JSON tests (#1578)
mansinahar Nov 17, 2020
1c31e06
Add account CCPA enabled and per-request-type enabled flags (#1566)
bsardo Nov 18, 2020
ab26a90
Refactored HoldAuction Arguments (#1570)
SyntaxNode Nov 18, 2020
47efd7c
Fix bug in request.imp.ext Validation (#1575)
guscarreon Nov 19, 2020
5c20af0
Bugfix: default admin port is 6060 (#1595)
peterfroehlich Nov 20, 2020
7c7097a
Add timestamp to analytics and response.ext.prebid.auctiontimestamp l…
laurb9 Nov 25, 2020
32a96f0
Added app capabilities to VerizonMedia adapter (#1596)
oath-jac Nov 30, 2020
d0bfd5d
New Adapter Initialization Framework (#1532)
SyntaxNode Dec 1, 2020
36c497f
Fix 33Across App Handling (#1602)
SyntaxNode Dec 2, 2020
a195f5c
Fix adapter JSON tests to have the right test structure (#1589)
mansinahar Dec 2, 2020
bd4e292
Added usersync support to Between SSP adapter; Major fixes and refact…
egsk Dec 3, 2020
840c15d
Removed Safari Metric (#1571)
SyntaxNode Dec 3, 2020
0f76d20
Deepintent adapter (#1524)
sourabhg Dec 3, 2020
c021bf0
update mobilefuse endpoint (#1606)
dtbarne Dec 3, 2020
bcdcf55
Fix Missing Consumable Clock (#1610)
SyntaxNode Dec 4, 2020
7872712
Remove Hook Scripts (#1614)
SyntaxNode Dec 8, 2020
ea32f0a
Add config gdpr.amp_exception deprecation warning (#1612)
bsardo Dec 9, 2020
b63f0e8
Refactor Adapter Config To Its Own File (#1608)
SyntaxNode Dec 9, 2020
03b41ff
RP adapter: use video placement parameter to set size ID (#1607)
SerhiiNahornyi Dec 10, 2020
354d23b
Add a BidderRequest struct to hold bidder specific request info (#1611)
mansinahar Dec 10, 2020
991b06c
Add warning that gdpr checks will be skipped when gdpr.host_vendor_id…
bsardo Dec 10, 2020
be93ee0
Add TLS Handshake connection metrics (#1613)
mansinahar Dec 10, 2020
5032eca
Improve GitHub Actions Validation (#1590)
SyntaxNode Dec 14, 2020
1c6f261
Move SSL to Server directory (#1625)
mansinahar Dec 14, 2020
0ba7f73
Rename currencies to currency (#1626)
mansinahar Dec 16, 2020
0986f76
Deepintent: Params normalization (#1617)
sourabhg Dec 16, 2020
8fdefd9
Set Kubient email to prebid@kubient.com (#1629)
Dec 17, 2020
518e27f
Rename pbsmetrics to metrics (#1624)
mansinahar Dec 17, 2020
1aeecb0
33Across: Add support for multi-imp requests (#1609)
curlyblueeagle Dec 17, 2020
2d4a03a
changed usersync endpoint (#1631)
sourabhg Dec 22, 2020
277762b
Remove legacy GDPR AMP config flag used to prevent buyer ID scrub on …
bsardo Jan 5, 2021
ef967ef
Updating contact info for adprime (#1640)
bretg Jan 5, 2021
1dda07d
ucfunnel adapter update end point (#1639)
Jan 5, 2021
0284a70
New Adapter: Mobfox (#1585)
mobfxoHB Jan 5, 2021
a709baa
IX: Implement Bidder interface, update endpoint. (#1569)
ix-prebid-support Jan 6, 2021
601a746
Fix GDPR consent assumption when gdpr req signal is unambiguous and s…
bsardo Jan 7, 2021
2d76926
Fix appnexus adapter not setting currency in the bid response (#1642)
SyntaxNode Jan 7, 2021
be4aa73
Add Adot adapter (#1605)
Giudici-a Jan 11, 2021
f3fbc8c
Refactor AMP Param Parsing (#1627)
SyntaxNode Jan 12, 2021
b111b6d
Enforce GDPR privacy if there's an error parsing consent (#1593)
bsardo Jan 12, 2021
2336b64
MediaFuse adapter (#1635)
GeneGenie Jan 12, 2021
b6b64e7
New Adapter: Revcontent (#1622)
jcamp-revc Jan 12, 2021
4b7323c
Fix Unruly Bidder Parmaters (#1616)
SyntaxNode Jan 12, 2021
9c2e630
Implement EID Permissions (#1633)
SyntaxNode Jan 14, 2021
fca9f3a
Idsync removal (#1644)
stevealliance Jan 14, 2021
6e32168
Audit beachfront tests and change some videoResponseType details (#1638)
muncha Jan 20, 2021
994d0f0
Adding Events support in bid responses (#1597)
laurb9 Jan 20, 2021
f5f0b03
Fix Shared Memory Corruption In EMX_Digital (#1646)
SyntaxNode Jan 20, 2021
50b49a0
Add gdpr.tcf1.fetch_gvl deprecation warning and update GVL subdomain …
bsardo Jan 20, 2021
e2c9289
Bubble up GDPR signal/consent errors while applying privacy policies …
bsardo Jan 20, 2021
56672f8
Always sync when GDPR globally enabled and allow host cookie sync … (…
bsardo Jan 21, 2021
d61f2d5
Eplanning: new prioritization metric for adunit sizes (#1648)
Jan 26, 2021
c3e305f
removing IX's usersync default URL (#1670)
ix-prebid-support Jan 26, 2021
54f22b2
AMX Bid Adapter: Loop Variable Bug (#1675)
nickjacob Jan 28, 2021
3793d4c
requestheaders: new parameter inside debug.httpcalls.<BIDDER> to log …
ShriprasadM Jan 28, 2021
c276b58
Updating pulsepoint adapter (#1663)
anand-venkatraman Jan 28, 2021
01645db
Debug disable feature implementation: (#1677)
VeronikaSolovei9 Jan 28, 2021
ef06fac
Always use fallback GVL for TCF1 (#1657)
bsardo Jan 28, 2021
27d1b8f
Adform adapter: digitrust cleanup (#1690)
braizhas Feb 3, 2021
3b93511
New Adapter: DecenterAds (#1669)
vlaktion Feb 4, 2021
3b9f61a
Handle empty consent string during cookie sync and setuid (#1671)
bsardo Feb 4, 2021
03ea9ad
Merge branch 'master' into release/verup-0.146.0
katsuo5 Feb 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .github/workflows/validate-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Validate Merge

on:
pull_request:
branches: [master]

jobs:
validate-merge:
runs-on: ubuntu-18.04

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.14.2

- name: Checkout Merged Branch
uses: actions/checkout@v2

- name: Validate
run: |
./validate.sh --nofmt --cov --race 10
env:
GO111MODULE: "on"
23 changes: 14 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
name: Validate

on:
push:
branches:
- master
branches: [master]
pull_request:
release:
types:
- created
name: Validate
branches: [master]

jobs:
Go:
validate:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x]
go-version: [1.14.x, 1.15.x]
os: [ubuntu-18.04]
runs-on: ${{ matrix.os }}

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code

- name: Checkout Branch
uses: actions/checkout@v2
with:
# Resolves to empty string for push events and falls back to HEAD.
ref: ${{ github.event.pull_request.head.sha }}

- name: Validate
run: |
./validate.sh --nofmt --cov --race 10
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: go

go:
- '1.13'
- '1.14.2'
- '1.15'

go_import_path: github.com/prebid/prebid-server

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For more information, see:

## Installation

First install [Go](https://golang.org/doc/install) version 1.13 or newer.
First install [Go](https://golang.org/doc/install) version 1.14 or newer.

Note that prebid-server is using [Go modules](https://blog.golang.org/using-go-modules).
We officially support the most recent two major versions of the Go runtime. However, if you'd like to use a version <1.13 and are inside GOPATH `GO111MODULE` needs to be set to `GO111MODULE=on`.
Expand Down
4 changes: 2 additions & 2 deletions account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
jsonpatch "github.com/evanphx/json-patch"
"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/errortypes"
"github.com/prebid/prebid-server/pbsmetrics"
"github.com/prebid/prebid-server/metrics"
"github.com/prebid/prebid-server/stored_requests"
)

Expand All @@ -20,7 +20,7 @@ func GetAccount(ctx context.Context, cfg *config.Configuration, fetcher stored_r
Message: fmt.Sprintf("Prebid-server has disabled Account ID: %s, please reach out to the prebid server host.", accountID),
}}
}
if cfg.AccountRequired && accountID == pbsmetrics.PublisherUnknown {
if cfg.AccountRequired && accountID == metrics.PublisherUnknown {
return nil, []error{&errortypes.AcctRequired{
Message: fmt.Sprintf("Prebid-server has been configured to discard requests without a valid Account ID. Please reach out to the prebid server host."),
}}
Expand Down
4 changes: 2 additions & 2 deletions account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/errortypes"
"github.com/prebid/prebid-server/pbsmetrics"
"github.com/prebid/prebid-server/metrics"
"github.com/prebid/prebid-server/stored_requests"
"github.com/stretchr/testify/assert"
)
Expand All @@ -29,7 +29,7 @@ func (af mockAccountFetcher) FetchAccount(ctx context.Context, accountID string)
}

func TestGetAccount(t *testing.T) {
unknown := pbsmetrics.PublisherUnknown
unknown := metrics.PublisherUnknown
testCases := []struct {
accountID string
// account_required
Expand Down
188 changes: 154 additions & 34 deletions adapters/33across/33across.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/mxmCherry/openrtb"
"github.com/prebid/prebid-server/adapters"
"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/errortypes"
"github.com/prebid/prebid-server/openrtb_ext"
)
Expand All @@ -16,44 +17,79 @@ type TtxAdapter struct {
}

type Ext struct {
Ttx ext `json:"ttx"`
Ttx impTtxExt `json:"ttx"`
}

type ext struct {
type impTtxExt struct {
Prod string `json:"prod"`
Zoneid string `json:"zoneid,omitempty"`
}

type reqExt struct {
Ttx *reqTtxExt `json:"ttx,omitempty"`
}

type reqTtxExt struct {
Caller []TtxCaller `json:"caller,omitempty"`
}

type TtxCaller struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
}

// CALLER Info used to track Prebid Server
// as one of the hops in the request to exchange
var CALLER = TtxCaller{"Prebid-Server", "n/a"}

type bidExt struct {
Ttx bidTtxExt `json:"ttx,omitempty"`
}

type bidTtxExt struct {
MediaType string `json:mediaType,omitempty`
}

// MakeRequests create the object for TTX Reqeust.
func (a *TtxAdapter) MakeRequests(request *openrtb.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
var errs []error
var adapterRequests []*adapters.RequestData

adapterReq, errors := a.makeRequest(request)
if adapterReq != nil {
adapterRequests = append(adapterRequests, adapterReq)
// Construct request extension common to all imps
// NOTE: not blocking adapter requests on errors
// since request extension is optional.
reqExt, err := makeReqExt(request)
if err != nil {
errs = append(errs, err)
}
request.Ext = reqExt

// Break up multi-imp request into multiple external requests since we don't
// support SRA in our exchange server
for i := 0; i < len(request.Imp); i++ {
if adapterReq, err := a.makeRequest(*request, request.Imp[i]); err == nil {
adapterRequests = append(adapterRequests, adapterReq)
} else {
errs = append(errs, err)
}
}
errs = append(errs, errors...)

return adapterRequests, errors
return adapterRequests, errs
}

// Update the request object to include custom value
// site.id
func (a *TtxAdapter) makeRequest(request *openrtb.BidRequest) (*adapters.RequestData, []error) {
var errs []error
func (a *TtxAdapter) makeRequest(request openrtb.BidRequest, imp openrtb.Imp) (*adapters.RequestData, error) {
impCopy, err := makeImps(imp)

// Make a copy as we don't want to change the original request
reqCopy := *request
if err := preprocess(&reqCopy); err != nil {
errs = append(errs, err)
if err != nil {
return nil, err
}

request.Imp = []openrtb.Imp{*impCopy}

// Last Step
reqJSON, err := json.Marshal(reqCopy)
reqJSON, err := json.Marshal(request)
if err != nil {
errs = append(errs, err)
return nil, errs
return nil, err
}

headers := http.Header{}
Expand All @@ -64,47 +100,84 @@ func (a *TtxAdapter) makeRequest(request *openrtb.BidRequest) (*adapters.Request
Uri: a.endpoint,
Body: reqJSON,
Headers: headers,
}, errs
}, nil
}

// Mutate the request to get it ready to send to ttx.
func preprocess(request *openrtb.BidRequest) error {
var imp = &request.Imp[0]
func makeImps(imp openrtb.Imp) (*openrtb.Imp, error) {
if imp.Banner == nil && imp.Video == nil {
return nil, &errortypes.BadInput{
Message: fmt.Sprintf("Imp ID %s must have at least one of [Banner, Video] defined", imp.ID),
}
}

var bidderExt adapters.ExtImpBidder
if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil {
return &errortypes.BadInput{
return nil, &errortypes.BadInput{
Message: err.Error(),
}
}

var ttxExt openrtb_ext.ExtImp33across
if err := json.Unmarshal(bidderExt.Bidder, &ttxExt); err != nil {
return &errortypes.BadInput{
return nil, &errortypes.BadInput{
Message: err.Error(),
}
}

var impExt Ext
impExt.Ttx.Prod = ttxExt.ProductId

// Add zoneid if it's defined
impExt.Ttx.Zoneid = ttxExt.SiteId

if len(ttxExt.ZoneId) > 0 {
impExt.Ttx.Zoneid = ttxExt.ZoneId
}

impExtJSON, err := json.Marshal(impExt)
if err != nil {
return &errortypes.BadInput{
return nil, &errortypes.BadInput{
Message: err.Error(),
}
}

imp.Ext = impExtJSON
siteCopy := *request.Site
siteCopy.ID = ttxExt.SiteId
request.Site = &siteCopy

return nil
// Validate Video if it exists
if imp.Video != nil {
videoCopy, err := validateVideoParams(imp.Video, impExt.Ttx.Prod)

imp.Video = videoCopy

if err != nil {
return nil, &errortypes.BadInput{
Message: err.Error(),
}
}
}

return &imp, nil
}

func makeReqExt(request *openrtb.BidRequest) ([]byte, error) {
var reqExt reqExt

if len(request.Ext) > 0 {
if err := json.Unmarshal(request.Ext, &reqExt); err != nil {
return nil, err
}
}

if reqExt.Ttx == nil {
reqExt.Ttx = &reqTtxExt{}
}

if reqExt.Ttx.Caller == nil {
reqExt.Ttx.Caller = make([]TtxCaller, 0)
}

reqExt.Ttx.Caller = append(reqExt.Ttx.Caller, CALLER)

return json.Marshal(reqExt)
}

// MakeBids make the bids for the bid response.
Expand Down Expand Up @@ -135,18 +208,65 @@ func (a *TtxAdapter) MakeBids(internalRequest *openrtb.BidRequest, externalReque

for _, sb := range bidResp.SeatBid {
for i := range sb.Bid {
var bidExt bidExt
var bidType openrtb_ext.BidType

if err := json.Unmarshal(sb.Bid[i].Ext, &bidExt); err != nil {
bidType = openrtb_ext.BidTypeBanner
} else {
bidType = getBidType(bidExt)
}

bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
Bid: &sb.Bid[i],
BidType: "banner",
BidType: bidType,
})
}
}
return bidResponse, nil

}

func New33AcrossBidder(endpoint string) *TtxAdapter {
return &TtxAdapter{
endpoint: endpoint,
func validateVideoParams(video *openrtb.Video, prod string) (*openrtb.Video, error) {
videoCopy := video
if videoCopy.W == 0 ||
videoCopy.H == 0 ||
videoCopy.Protocols == nil ||
videoCopy.MIMEs == nil ||
videoCopy.PlaybackMethod == nil {

return nil, &errortypes.BadInput{
Message: "One or more invalid or missing video field(s) w, h, protocols, mimes, playbackmethod",
}
}

if videoCopy.Placement == 0 {
videoCopy.Placement = 2
}

if prod == "instream" {
videoCopy.Placement = 1

if videoCopy.StartDelay == nil {
videoCopy.StartDelay = openrtb.StartDelay.Ptr(0)
}
}

return videoCopy, nil
}

func getBidType(ext bidExt) openrtb_ext.BidType {
if ext.Ttx.MediaType == "video" {
return openrtb_ext.BidTypeVideo
}

return openrtb_ext.BidTypeBanner
}

// Builder builds a new instance of the 33Across adapter for the given bidder with the given config.
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters.Bidder, error) {
bidder := &TtxAdapter{
endpoint: config.Endpoint,
}
return bidder, nil
}
Loading