Skip to content

Commit

Permalink
Merge pull request #795 from PubMatic-OpenWrap/ci
Browse files Browse the repository at this point in the history
OpenWrap_Release_23rd_May_2024
  • Loading branch information
pm-viral-vala authored May 20, 2024
2 parents f2256b9 + d812366 commit 273ce7d
Show file tree
Hide file tree
Showing 73 changed files with 4,028 additions and 1,462 deletions.
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

0 comments on commit 273ce7d

Please sign in to comment.