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

Release OpenWrap_Q4-28-Nov-2023 #632

Merged
merged 28 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c2a0176
run validate-merge.yml for ci branch
pm-nilesh-chate Oct 24, 2023
c0b01e3
OTT-1319: add prometheus stats to count number of bids with vast unwr…
Pubmatic-Supriya-Patil Oct 26, 2023
0aa7a35
OTT-1327: Support for passing custom key-values in VAST Bidder using …
Ankit-Pinge Oct 26, 2023
fd2a55e
OTT-1410: TEMPORARY: removed warning message when module is not enabl…
Pubmatic-Supriya-Patil Oct 27, 2023
4f0f731
OTT-1402 :: Make BidId unique for auction in auctionresponsehook (#611)
pm-nikhil-vaidya Oct 27, 2023
c82ca49
make case insensitive comparison in auction request (#3113) (#614)
AvinashKapre Oct 27, 2023
a5dbd5e
OTT-1402: refactor apply OpenWrap targeting (#617)
pm-nikhil-vaidya Oct 30, 2023
9b80acb
UOE-9673: OpenWrap module minor improvements (#579)
pm-nilesh-chate Oct 30, 2023
629553d
fix github actions: adapter code coverage (#622)
Ankit-Pinge Oct 30, 2023
06f8d1b
Fix: Single colon in BidId causing inconsistent split (#625)
pm-nikhil-vaidya Nov 1, 2023
78a7b57
OTT-1387: use OpenWrap.Stats.Endpoint for stats config in vast un-wra…
Pubmatic-Supriya-Patil Nov 2, 2023
9f38f2f
UOE-9673: revert dbcache rename (#630)
pm-nilesh-chate Nov 2, 2023
dcaa2a6
OTT-1277: remove Prometheus stats for req.Device.Geo.Country (#624)
Pubmatic-Supriya-Patil Nov 2, 2023
aa2cb85
OTT-1402: fix winner targeting (#635)
pm-nilesh-chate Nov 3, 2023
ac44bb5
OTT-1418: use 6xx error code for openwrap NBR (#636)
pm-nilesh-chate Nov 3, 2023
2a2d2db
OTT-1360: As OpenWrap user, disable dynamic fetch if floors module di…
pm-jaydeep-mohite Nov 6, 2023
9540de8
OTT-1349 : Pass schain object to VAST bidder via schain macro (#633)
Ankit-Pinge Nov 7, 2023
f46d88f
OTT-1412(Bug Fix) : Retain the encoded query parameter (#639)
Ankit-Pinge Nov 7, 2023
f357d5f
OTT-1418: fix NBR code sequence (#640)
pm-nilesh-chate Nov 7, 2023
32c62e1
UOE-9681,UOE-9670: Add OWS hosted PBS vanilla endpoint, for prebid.js…
AvinashKapre Nov 7, 2023
7afb162
UOE-9681: fix pubmatic2 params (#641)
pm-nilesh-chate Nov 9, 2023
7cffa2e
UOE-9681: mapping not uploaded nbr (#643)
pm-nilesh-chate Nov 10, 2023
3eb9b5c
UOE-9681: fix eg, en multicurrency case (#644)
pm-nilesh-chate Nov 10, 2023
c49251a
Revert "UOE-9681: mapping not uploaded nbr (#643)" (#645)
pm-nilesh-chate Nov 20, 2023
f275b8f
OTT-1390,UOE-9175: add missing fields in owlogger & tracker so that O…
pm-nilesh-chate Nov 20, 2023
c6c9682
OTT-1431: Added publisher level stats for vast-wrapper count and resp…
pm-jaydeep-mohite Nov 21, 2023
92b46a6
UOE-9681: fix prebid validation in ow module (#650)
pm-nilesh-chate Nov 21, 2023
6ca13ee
Revert "OTT-1431: Added publisher level stats for vast-wrapper count …
pm-jaydeep-mohite Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/adapter-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
id: run_coverage
if: ${{ steps.get_directories.outputs.result }} != ""
run: |
git config --global url."https://${USERNAME}:${TOKEN}@git.pubmatic.com".insteadOf "https://git.pubmatic.com"

directories=$(echo '${{ steps.get_directories.outputs.result }}' | jq -r '.[]')
go mod download

Expand All @@ -65,13 +67,18 @@ jobs:
# remove pull request branch files
cd ..
rm -f -r ./*
env:
GO111MODULE: "on"
GOPRIVATE: "git.pubmatic.com/PubMatic/*"
TOKEN: ${{ secrets.PM_OPENWRAP_CICD_PASSWORD }}
USERNAME: ${{ secrets.PM_OPENWRAP_CICD_USERNAME }}

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

- name: Commit coverage files to coverage-preview branch
if: ${{ steps.run_coverage.outputs.coverage_dir }} != ""
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross-repo-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request_target:
types: [closed]
branches:
- "master"
- "master-disable"

jobs:
cross-repo:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/validate-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Validate Merge

on:
pull_request:
branches: [master]
branches:
- master
- main
- ci

jobs:
validate-merge:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ mockgencache:
mockgenmetrics:
mkdir -p modules/pubmatic/openwrap/metrics/mock
mockgen github.com/PubMatic-OpenWrap/prebid-server/modules/pubmatic/openwrap/metrics MetricsEngine > modules/pubmatic/openwrap/metrics/mock/mock.go

mockgenlogger:
mkdir -p analytics/pubmatic/mhttp/mock
mockgen github.com/PubMatic-OpenWrap/prebid-server/analytics/pubmatic/mhttp HttpCallInterface,MultiHttpContextInterface > analytics/pubmatic/mhttp/mock/mock.go
79 changes: 57 additions & 22 deletions adapters/vastbidder/bidder_macro.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -177,16 +176,35 @@ func (tag *BidderMacro) GetHeaders() http.Header {
return http.Header{}
}

// GetValueFromKV returns the value from KV map wrt key
func (tag *BidderMacro) GetValueFromKV(key string) string {
if tag.KV == nil {
return ""
}
key = strings.TrimPrefix(key, kvPrefix)
if value, found := tag.KV[key]; found {
return fmt.Sprintf("%v", value)
// GetValue returns the value for given key
// isKeyFound will check the key is present or not
func (tag *BidderMacro) GetValue(key string) (string, bool) {
macroKeys := strings.Split(key, ".")
isKeyFound := false

// This will check if key has prefix kv/kvm
// if prefix present it will always return isKeyFound as true as it will help to replace the key with empty string in VAST TAG
if (macroKeys[0] == MacroKV || macroKeys[0] == MacroKVM) && len(macroKeys) > 1 {
isKeyFound = true
if tag.KV == nil {
return "", isKeyFound
}
switch macroKeys[0] {
case MacroKV:
val := getValueFromMap(macroKeys[1:], tag.KV)
if dataMap, ok := val.(map[string]interface{}); ok {
return mapToQuery(dataMap), isKeyFound
}
return fmt.Sprintf("%v", val), isKeyFound
case MacroKVM:
val := getValueFromMap(macroKeys[1:], tag.KV)
if isMap(val) {
return getJSONString(val), isKeyFound
}
return fmt.Sprintf("%v", val), isKeyFound
}
}
return ""
return "", isKeyFound
}

/********************* Request *********************/
Expand Down Expand Up @@ -268,6 +286,33 @@ func (tag *BidderMacro) MacroPaymentIDChain(key string) string {
return ""
}

// MacroSchain contains definition for Schain Parameter
func (tag *BidderMacro) MacroSchain(key string) string {
if tag.Request.Source == nil {
return ""
}

if tag.Request.Source.SChain != nil {
return openrtb_ext.SerializeSupplyChain(tag.Request.Source.SChain)
}

if tag.Request.Source.Ext != nil {
schain, _, _, err := jsonparser.Get(tag.Request.Source.Ext, MacroSchain)

if err != nil {
return ""
}
var schainObj openrtb2.SupplyChain
err = json.Unmarshal(schain, &schainObj)

if err != nil {
return ""
}
return openrtb_ext.SerializeSupplyChain(&schainObj)
}
return ""
}

/********************* Regs *********************/

// MacroCoppa contains definition for Coppa Parameter
Expand Down Expand Up @@ -1209,25 +1254,15 @@ func (tag *BidderMacro) MacroKV(key string) string {
if tag.KV == nil {
return ""
}

values := url.Values{}
for key, val := range tag.KV {
values.Add(key, fmt.Sprintf("%v", val))
}
return values.Encode()

return mapToQuery(tag.KV)
}

// MacroKVM replace the kvm macro
func (tag *BidderMacro) MacroKVM(key string) string {
if tag.KV == nil {
return ""
}
jsonBytes, err := json.Marshal(tag.KV)
if err != nil {
return ""
}
return string(jsonBytes)
return getJSONString(tag.KV)
}

/********************* Request Headers *********************/
Expand Down
Loading
Loading