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

OpenWrap_Release_23rd_May_2024 #795

Merged
merged 6 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ analytics/filesystem/testFiles/
*.swp
*.swo
pbsimage
manual_build
manual_build
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all: deps test build-modules build
# deps will clean out the vendor directory and use go mod for a fresh install
deps:
GOPROXY="https://proxy.golang.org" go mod vendor -v && go mod tidy -v

# test will ensure that all of our dependencies are available and run validate.sh
test: deps
# If there is no indentation, Make will treat it as a directive for itself; otherwise, it's regarded as a shell script.
Expand Down Expand Up @@ -37,10 +37,10 @@ format:
# formatcheck runs format for diagnostics, without modifying the code
formatcheck:
./scripts/format.sh -f false

mockgen: mockgeninstall mockgendb mockgencache mockgenmetrics mockgenlogger mockgenpublisherfeature

# export GOPATH=~/go ; GOBIN=~/go/bin; export PATH=$PATH:$GOBIN
# export GOPATH=~/go ; GOBIN=~/go/bin; export PATH=$PATH:$GOBIN
mockgeninstall:
go install github.com/golang/mock/[email protected]

Expand Down
15 changes: 15 additions & 0 deletions analytics/pubmatic/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func GetLogAuctionObjectAsURL(ao analytics.AuctionObject, rCtx *models.RequestCt
if ao.RequestWrapper == nil || ao.RequestWrapper.BidRequest == nil || rCtx == nil || rCtx.PubID == 0 || rCtx.LoggerDisabled {
return "", nil
}
// Get Updated Floor values using floor rules from updated request
getFloorValueFromUpdatedRequest(ao.RequestWrapper, rCtx)

wlog := WloggerRecord{
record: record{
Expand Down Expand Up @@ -191,6 +193,19 @@ func GetRequestCtx(hookExecutionOutcome []hookexecution.StageOutcome) *models.Re
return nil
}

// getFloorValueFromUpdatedRequest gets updated floor values by floor module
func getFloorValueFromUpdatedRequest(reqWrapper *openrtb_ext.RequestWrapper, rCtx *models.RequestCtx) {
for _, imp := range reqWrapper.BidRequest.Imp {
if impCtx, ok := rCtx.ImpBidCtx[imp.ID]; ok {
if imp.BidFloor > 0 && impCtx.BidFloor != imp.BidFloor {
impCtx.BidFloor = imp.BidFloor
impCtx.BidFloorCur = imp.BidFloorCur
rCtx.ImpBidCtx[imp.ID] = impCtx
}
}
}
}

func convertNonBidToBidWrapper(nonBid *openrtb_ext.NonBid) (bid bidWrapper) {
bid.Bid = &openrtb2.Bid{
Price: nonBid.Ext.Prebid.Bid.Price,
Expand Down
Loading
Loading