Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid Upgrade v2.32.0 #985

Open
wants to merge 114 commits into
base: ci
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
72d040b
Yeahmobi: Fix video bug (#3680)
lxj15398019970 May 23, 2024
9133d2c
Medianet: Adds mtype support to be used as BidType (#3658)
amanpatniajmer May 27, 2024
ff9aed5
Move imp validation into ortb package (#3685)
bsardo May 29, 2024
c528d18
new alias tredio (#3707)
SmartHubSolutions May 31, 2024
2b8e8cd
Yieldmo: Add bid floor currency conversion (#3697)
ym-winston Jun 2, 2024
37bcf01
Bidder-specific imp FPD (#3704)
bsardo Jun 4, 2024
c4fde39
FPD: Don't Merge Arrays (#3708)
SyntaxNode Jun 4, 2024
ecf3171
Fix: Expect Array Overwrites in Imp FPD Tests (#3725)
bsardo Jun 4, 2024
32fdbc4
Imp FPD: Skip bidder params and native validation (#3720)
bsardo Jun 5, 2024
7702a78
Smaato: Add ORTB2.6 tests (#3646)
Jun 5, 2024
e13d786
Upgrade To Go 1.22 (#3686)
SyntaxNode Jun 7, 2024
2d2bf71
Vungle: Rename from liftoff (#3727)
Vungle-GordonTian Jun 11, 2024
1979036
Fix golangci-lint issues (#3679)
dmitris Jun 11, 2024
a812221
Fix semgrep issue with dgryski Go ruleset (#3719)
dmitris Jun 11, 2024
2aa6aea
Boldwin: update maintainer email (#3701)
Wls-demo Jun 17, 2024
fb15da3
New Adapter: Concert (#3651)
BrettBlox Jun 17, 2024
4dc4005
New Adapter: Driftpixel (#3684)
driftpixelai Jun 17, 2024
8500d56
New Adapter : MediaGo (#3705)
SylviaF Jun 24, 2024
817afeb
Gitignore changes (#3752)
Jun 24, 2024
fe55575
OwnAdx: Add cookie sync (#3713)
ownAdx-prebid Jun 25, 2024
9f2caf9
add support for setting seat (bidderCode) override + demand source in…
nickjacob Jun 25, 2024
3295c41
AppNexus: Forward GPID (#3767)
SyntaxNode Jun 26, 2024
2a8483b
IX: save/restore global var in test (#3638)
dmitris Jun 26, 2024
07f3ee2
Nobid: Add iframe sync support (#3732)
redaguermas Jun 27, 2024
057e25d
New Adapter: Сointraffic (#3647)
sergeykcointraffic Jun 28, 2024
09a3dd4
New Adapter: Vidazoo (#3698)
saar120 Jul 1, 2024
8784615
InMobi: include iframe & native for M-Web (#3682)
SiddhantAgrawal Jul 1, 2024
80a90dd
OpenWeb: Adapter Refactor + New Endpoint (#3670)
IgorKulemzin Jul 1, 2024
a907ecb
PulsePoint: Marking cp/ct params to be either String or Int (#3677)
anand-venkatraman Jul 1, 2024
670e1d4
Bizzclick: rename bizzclick to blasto (#3688)
BizzClick Jul 1, 2024
99431ad
New Adapter: Admatic (#3654)
bakicam Jul 3, 2024
a1b4451
Criteo: Add support for native (#3709)
MarinaZhuravlevaCriteo Jul 18, 2024
5fefeaa
Smaato: Add DSA support tests (#3749)
tetianaatsmaato Jul 18, 2024
0a3271d
New Adapter: Displayio (#3691)
xdevel Jul 22, 2024
da658e7
CPMStar: add gvlVendorID (#3779)
JoshuaMGoldstein Jul 22, 2024
0f5a1fe
Adprime: add userSync (#3770)
Adprime Jul 22, 2024
f087eea
OpenX: accept incoming string fields to support Prebid.js 9 (#3668)
laurb9 Jul 24, 2024
115f773
New Adapter: bigoad (#3711)
BIGOAds Jul 24, 2024
d1596c8
Smaato: Change server response type (#3734)
Jul 24, 2024
536821f
Triplelift Native: Mapping tag_code (#3745)
patrickloughrey Jul 24, 2024
382f793
ConenctAd Adapter Update (#3715)
rtuschkany Jul 25, 2024
83bce5a
PBS Go: 2024 Doc updates including endpoint and ortb support version …
AaronColbyPrice Jul 25, 2024
55094fe
Fix: Triplelift Native add site.publisher nil check (#3824)
bsardo Jul 29, 2024
466ff83
Smaato: Add DOOH support (#3751)
Jul 29, 2024
ed3e4a1
Gracefully shutdown analytics module/runner (#3335)
zhongshixi Jul 29, 2024
843a81c
Criteo: Add support for paapi (#3759)
vraybaud Jul 30, 2024
7c92e10
New Adapter: QT (#3696)
qt-io Aug 1, 2024
8b13ebc
consumable adapter - use configured endpoint instead of hardcoded val…
edandavi Aug 5, 2024
c50e264
OpenX: return cat/dur for video bids (#3834)
laurb9 Aug 6, 2024
c3d8379
Adtelligent: ext aid type (#3676)
dkornet-ad Aug 6, 2024
efc1e8b
New Adapter: TheTradeDesk (#3738)
andre-gielow-ttd Aug 6, 2024
e8e2848
SmartHub: add alias FelixAds (#3837)
SmartHubSolutions Aug 6, 2024
804334a
New Adapter: MetaX (#3712)
metax-kehan Aug 6, 2024
dabc386
Playdigo: Add user sync (#3797)
Yanivplaydigo Aug 7, 2024
cba6221
SmartHub: add alias VimayX (#3760)
SmartHubSolutions Aug 8, 2024
211f13a
New Adapter: Filmzie (#3758)
imedvedko Aug 8, 2024
ce331a7
Fix: Aliases Of Bidders With UserSync Supports Declared Only (#3850)
SyntaxNode Aug 8, 2024
4f177ca
New Adapter: MeloZen (#3784)
benben2001 Aug 12, 2024
2a19924
taboola-support-app-in-prebid-server (#3795)
ahmadlob Aug 12, 2024
4d64623
OwnAdx: Bidder param and URL updates (#3813)
ownAdx-prebid Aug 12, 2024
0e9b234
Use format=prebid on adserver requests. (#3846)
antosarho Aug 13, 2024
2606e75
New Module: 51Degrees (#3650)
jwrosewell Aug 16, 2024
e4bd6d3
ADTS-455 remove video validations (#3842)
gg-natalia Aug 18, 2024
6be7244
Update Vidazoo bidder info for GPP support (#3869)
saar120 Aug 21, 2024
e8509e6
declare support for ORTB 2.6 (#3872)
bretg Aug 21, 2024
d161712
new adapter (#3833)
Pubrise Aug 21, 2024
a556e2d
Fix currency conversion bug. (#3867)
CTMBNara Aug 21, 2024
59a5b07
freewheel-adapter: support 2.6 (#3873)
mwang-sticky Aug 21, 2024
54f8759
Update mobilefuse.yaml to indicate support for OpenRTB 2.6 and GPP (#…
dtbarne Aug 21, 2024
bd85ba4
specifies ortb 2.6 support (#3) (#3876)
nickllerandi Aug 22, 2024
84a8162
PulsePoint: ortb 2.6 version and gpp support (#3874)
anand-venkatraman Aug 22, 2024
8d7117d
Revert "New Module: 51Degrees (#3650)" (#3888)
bsardo Aug 27, 2024
4ea0e33
New Adapter: Copper6SSP (#3755)
Copper6SSP Aug 30, 2024
2e2b49f
New Adapter: Escalax (#3798)
escalax Aug 30, 2024
e825553
New Adapter: Oraki (#3839)
BenOraki Aug 30, 2024
f7caea5
OpenX: indicate support for OpenRTB 2.6 (#3879)
bwschmidt Aug 30, 2024
8237f7f
Refactor Bid Splitter Privacy Functions (#3645)
SyntaxNode Sep 3, 2024
ec6a45d
Agma: Allow app.bundle to be used as selector for apps (#3780)
steffenmllr Sep 4, 2024
6a011ed
Update github.com/rs/cors to v1.11.0 (#3884)
ccorbo Sep 11, 2024
b920cca
Playdigo: Add tcfeu support (#3890)
Yanivplaydigo Sep 11, 2024
e0a21d0
QT: Add tcfeu support (#3892)
qt-io Sep 11, 2024
6cbedf0
Smartx: Declare OpenRTB 2.6 support (#3896)
schubert-sc Sep 11, 2024
7613ff5
Update adapter json test framework to validate BidVideo (#3835)
laurb9 Sep 12, 2024
c02ee8c
Update exchange json tests with correct hb_pb_cat_dur (#3836)
laurb9 Sep 12, 2024
ffdd75f
New Adapter: AdTonos (#3853)
rkaw92 Sep 12, 2024
3e24be7
New Adapter: TGM (#3848)
apykhteyev Sep 13, 2024
640b97c
LemmaDigital: change endpoint (#3862)
lm-ved Sep 16, 2024
3c4527e
Adnuntius: Return DSA in bid response (#3777)
mikael-lundin Sep 18, 2024
905b3a5
Log non bid reasons in bidder framework (#2891)
ShriprasadM Sep 19, 2024
93368cc
ConnectAd: String/int fix (#3925)
rtuschkany Sep 19, 2024
11b6546
Rubicon: Pass PBS host info to XAPI (#3903)
And1sS Sep 23, 2024
4462fce
51degrees module (#3893)
justadreamer Sep 25, 2024
8b1b96e
Add docs build readme (#3930)
bsardo Sep 25, 2024
c42fe53
InMobi: mtype support (#3921)
bkaneyama Sep 25, 2024
53f51a6
GPC: Set extension based on header (#3895)
przemkaczmarek Sep 25, 2024
6c154e0
New Adapter: Streamlyn (#3900)
apykhteyev Sep 25, 2024
f27bcef
New Adapter: Bidmatic (#3731)
dkornet-ad Oct 3, 2024
8689e0d
Sonobi: native and currency conversion support (#3889)
bansawbanchee Oct 7, 2024
d54c3ed
New Adapter: Missena (#3761)
ysfbsf Oct 8, 2024
64584f6
Refactor: Remove getAuctionBidderRequests (#3957)
bsardo Oct 8, 2024
87d4412
Refactor: Move privacy init up (#3958)
bsardo Oct 9, 2024
9bb9b3d
Unruly: Indicate Support for OpenRTB 2.6 (#3984)
bhainesnexxen Oct 15, 2024
c37951a
update yieldmo.yaml to indicate support for ortb 2.6 (#3968)
ym-winston Oct 15, 2024
5fcbbbf
Triplelift: Adding flag for 2.6 support (#3966)
patrickloughrey Oct 15, 2024
cbe9876
enable gzip (#3946)
ikagotso Oct 15, 2024
b56923c
RTB House: Resolve AUCTION_PRICE macro (#3901)
piotrj-rtbh Oct 15, 2024
8134328
Displayio: Make imp.bidfloor optional (#3959)
xdevel Oct 16, 2024
451bc44
BlueSea: Add site capability (#3910)
blueseasx Oct 16, 2024
bcf6491
GumGum: Declare ORTB 2.6 support (#3985)
sindhuja-sridharan Oct 17, 2024
a549d11
prebid-upgrade to 2.32
pm-priyanka-bagade Dec 24, 2024
2a34b4f
added builder for ow bidders
pm-priyanka-bagade Dec 30, 2024
87f3e3b
fixed failure
pm-priyanka-bagade Dec 30, 2024
d508c58
fixed UTs
pm-priyanka-bagade Dec 30, 2024
7f6147c
Merge branch 'ci' into prebid_v2.32.0-1
pm-priyanka-bagade Dec 31, 2024
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
  •  
  •  
  •  
21 changes: 12 additions & 9 deletions .github/workflows/adapter-code-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
name: Adapter code coverage
name: Adapter Code Coverage

on:
pull_request_target:
paths: ["adapters/*/*.go"]

permissions:
pull-requests: write
contents: write

jobs:
run-coverage:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.5
go-version: 1.22.3

- name: Checkout pull request branch
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Get adapter directories
- name: Discover Adapter Directories
id: get_directories
uses: actions/github-script@v7
with:
Expand All @@ -40,7 +43,7 @@ jobs:
// run coverage for maximum of 2 directories
return (directories.length == 0 || directories.length > 2) ? "" : JSON.stringify(directories)

- name: Run coverage tests
- name: Run Coverage Tests
id: run_coverage
if: steps.get_directories.outputs.result != ''
run: |
Expand Down Expand Up @@ -74,14 +77,14 @@ jobs:
TOKEN: ${{ secrets.PM_OPENWRAP_CICD_PASSWORD }}
USERNAME: ${{ secrets.PM_OPENWRAP_CICD_USERNAME }}

- name: Checkout coverage-preview branch
- name: Checkout Coverage Preview Branch
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: coverage-preview
repository: PubMatic-OpenWrap/prebid-server

- name: Commit coverage files to coverage-preview branch
- name: Upload Coverage Results
if: steps.run_coverage.outputs.coverage_dir != ''
id: commit_coverage
run: |
Expand All @@ -95,11 +98,11 @@ jobs:
git push origin coverage-preview
echo "remote_coverage_preview_dir=${directory}" >> $GITHUB_OUTPUT

- name: Checkout master branch
- name: Checkout Master Branch
if: steps.get_directories.outputs.result != ''
run: git checkout master

- name: Add coverage summary to pull request
- name: Add Coverage Summary To Pull Request
if: steps.run_coverage.outputs.coverage_dir != '' && steps.commit_coverage.outputs.remote_coverage_preview_dir != ''
uses: actions/github-script@v7
with:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: Adapter semgrep checks
name: Adapter Semgrep Check

on:
pull_request_target:
paths: ["adapters/*/*.go"]

permissions:
pull-requests: write

jobs:
semgrep-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Calculate diff
- name: Calculate Code Diff
id: calculate_diff
uses: actions/github-script@v7
with:
Expand All @@ -29,7 +32,7 @@ jobs:
const helper = utils.diffHelper({github, context, fileNameFilter, event: "${{github.event.action}}", testName: "${{github.job}}"})
return await helper.buildDiff()

- name: Should run semgrep
- name: Check For Changes
id: should_run_semgrep
run: |
hasChanges=$(echo '${{ steps.calculate_diff.outputs.result }}' | jq .pullRequest.hasChanges)
Expand All @@ -41,15 +44,15 @@ jobs:
pip3 install semgrep==1.22.0
semgrep --version

- name: Run semgrep tests
- name: Run Semgrep
id: run_semgrep_tests
if: contains(steps.should_run_semgrep.outputs.hasChanges, 'true')
run: |
unqouted_string=$(echo '${{ steps.calculate_diff.outputs.result }}' | jq .pullRequest.files | tr -d '"')
outputs=$(semgrep --gitlab-sast --config=.semgrep/adapter $unqouted_string | jq '[.vulnerabilities[] | {"file": .location.file, "severity": .severity, "start": .location.start_line, "end": .location.end_line, "message": (.message | gsub("\\n"; "\n"))}]' | jq -c | jq -R)
echo "semgrep_result=${outputs}" >> "$GITHUB_OUTPUT"

- name: Add pull request comment
- name: Add Pull Request Comment
id: add_pull_request_comment
if: contains(steps.should_run_semgrep.outputs.hasChanges, 'true')
uses: actions/github-script@v7
Expand All @@ -66,7 +69,7 @@ jobs:
const { previousScan, currentScan } = await helper.addReviewComments()
return previousScan.unAddressedComments + currentScan.newComments

- name: Adapter semgrep checks result
- name: Check Results
if: contains(steps.should_run_semgrep.outputs.hasChanges, 'true')
run: |
if [ "${{steps.add_pull_request_comment.outputs.result}}" -ne "0" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.5
go-version: 1.22.3

- name: Checkout Merged Branch
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
validate:
strategy:
matrix:
go-version: [1.20.x]
go-version: [1.21.x, 1.22.x]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}

Expand Down
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ _obj
_test
.cover/
.idea/
.vscode/

# Architecture specific extensions/prefixes
*.[568vq]
Expand Down Expand Up @@ -44,11 +45,8 @@ analytics/config/xyz*
analytics/build/xyz*
analytics/filesystem/testFiles/

# autogenerated version file
# static/version.txt

.idea/
.vscode/
# autogenerated files
prebid-server.iml

# autogenerated mac file

Expand Down
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y wget
WORKDIR /tmp
RUN wget https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz && \
tar -xf go1.20.5.linux-amd64.tar.gz && \
RUN wget https://dl.google.com/go/go1.22.3.linux-amd64.tar.gz && \
tar -xf go1.22.3.linux-amd64.tar.gz && \
mv go /usr/local
RUN mkdir -p /app/prebid-server/
WORKDIR /app/prebid-server/
ENV GOROOT=/usr/local/go
ENV PATH=$GOROOT/bin:$PATH
ENV GOPROXY="https://proxy.golang.org"

# Installing gcc as cgo uses it to build native code of some modules
RUN apt-get update && \
apt-get install -y git && \
apt-get install -y git gcc && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV CGO_ENABLED 0

# CGO must be enabled because some modules depend on native C code
ENV CGO_ENABLED 1
COPY ./ ./
RUN go mod tidy
RUN go mod vendor
Expand All @@ -30,8 +34,10 @@ RUN chmod a+xr prebid-server
COPY static static/
COPY stored_requests/data stored_requests/data
RUN chmod -R a+r static/ stored_requests/data

# Installing libatomic1 as it is a runtime dependency for some modules
RUN apt-get update && \
apt-get install -y ca-certificates mtr && \
apt-get install -y ca-certificates mtr libatomic1 && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN adduser prebid_user
USER prebid_user
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ or compile a standalone binary using the command:
``` bash
go build .
```
**Note:** if building from source there are a couple dependencies to be aware of:
1. *Compile-time*. Some modules ship native code that requires `cgo` (comes with the `go` compiler) being enabled - by default it is and environment variable `CGO_ENABLED=1` do NOT set it to `0`.
2. *Compile-time*. `cgo` depends on the C-compiler, which usually is `gcc`, but can be changed by setting the value of `CC` env var, f.e. `CC=clang`. On ubuntu `gcc` can be installed via `sudo apt-get install gcc`.
3. *Runtime*. Some modules require `libatomic`. On ubuntu it is installed by running `sudo apt-get install libatomic1`. `libatomic1` is a dependency of `gcc`, so if you are building with `gcc` and running on the same machine, it is likely that `libatomic1` is already installed.

Ensure that you deploy the `/static` directory, as Prebid Server requires those files at startup.

## Developing

Prebid Server requires [Go](https://go.dev) version 1.19 or newer. You can develop on any operating system that Go supports; however, please note that our helper scripts are written in bash.
Prebid Server requires [Go](https://go.dev) version 1.21 or newer. You can develop on any operating system that Go supports; however, please note that our helper scripts are written in bash.

```bash
cd YOUR_DIRECTORY
Expand Down
19 changes: 16 additions & 3 deletions adapters/adapterstest/test_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ type expectedBidResponse struct {
}

type expectedBid struct {
Bid json.RawMessage `json:"bid"`
Type string `json:"type"`
Seat string `json:"seat"`
Bid json.RawMessage `json:"bid"`
Type string `json:"type"`
Seat string `json:"seat"`
Video json.RawMessage `json:"video,omitempty"`
}

// ---------------------------------------
Expand Down Expand Up @@ -342,6 +343,9 @@ func diffBids(t *testing.T, description string, actual *adapters.TypedBid, expec
assert.Equal(t, string(expected.Seat), string(actual.Seat), fmt.Sprintf(`%s.seat "%s" does not match expected "%s."`, description, string(actual.Seat), string(expected.Seat)))
assert.Equal(t, string(expected.Type), string(actual.BidType), fmt.Sprintf(`%s.type "%s" does not match expected "%s."`, description, string(actual.BidType), string(expected.Type)))
assert.NoError(t, diffOrtbBids(fmt.Sprintf("%s.bid", description), actual.Bid, expected.Bid))
if expected.Video != nil {
assert.NoError(t, diffBidVideo(fmt.Sprintf("%s.video", description), actual.BidVideo, expected.Video))
}
}

// diffOrtbBids compares the actual Bid made by the adapter to the expectation from the JSON file.
Expand All @@ -358,6 +362,15 @@ func diffOrtbBids(description string, actual *openrtb2.Bid, expected json.RawMes
return diffJson(description, actualJson, expected)
}

func diffBidVideo(description string, actual *openrtb_ext.ExtBidPrebidVideo, expected json.RawMessage) error {
actualJson, err := json.Marshal(actual)
if err != nil {
return fmt.Errorf("%s failed to marshal actual Bid Video into JSON. %v", description, err)
}

return diffJson(description, actualJson, []byte(expected))
}

// diffJson compares two JSON byte arrays for structural equality. It will produce an error if either
// byte array is not actually JSON.
func diffJson(description string, actual []byte, expected []byte) error {
Expand Down
1 change: 1 addition & 0 deletions adapters/adgeneration/adgeneration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ func checkBidResponse(t *testing.T, bidderResponse *adapters.BidderResponse, exp
var expectedCrID string = "Dummy_supership.jp"
var extectedDealID string = "test-deal-id"

//nolint: staticcheck // false positive SA5011: possible nil pointer dereference
assert.Equal(t, expectedCurrency, bidderResponse.Currency)
assert.Equal(t, 1, len(bidderResponse.Bids))
assert.Equal(t, expectedID, bidderResponse.Bids[0].Bid.ID)
Expand Down
Loading
Loading