Skip to content

Comments

New adapter: BeOp#4660

Open
jeans11 wants to merge 18 commits intoprebid:masterfrom
BeOpinion:master
Open

New adapter: BeOp#4660
jeans11 wants to merge 18 commits intoprebid:masterfrom
BeOpinion:master

Conversation

@jeans11
Copy link

@jeans11 jeans11 commented Jan 14, 2026

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Updated bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes

Documention PR: prebid/prebid.github.io#6432

continue
}
bidResponseFinal.Bids = append(bidResponseFinal.Bids, &adapters.TypedBid{
Bid: &bid,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found incorrect assignment made to Bid. bid variable receives a new value in each iteration of range loop. Assigning the address of bid (&bid) to Bid will result in a pointer that always points to the same memory address with the value of the last iteration. This can lead to unexpected behavior or incorrect results. Refer https://go.dev/play/p/9ZS1f-5h4qS
Consider using an index variable in the seatBids.Bid loop as shown below

  for _, seatBid := range response.SeatBid {
    for i := range seatBids.Bid {
      ...
      responseBid := &adapters.TypedBid{
        Bid: &seatBids.Bid[i],
        ...
      }
      ...
      ...
    }
  }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at this comment

var bidExt openrtb_ext.ExtBid
err := jsonutil.Unmarshal(bid.Ext, &bidExt)
if err == nil && bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, d49baa1

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:54:	buildEndpointURL	91.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:75:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:113:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:127:	MakeBids		86.4%
total:								(statements)		83.6%

@bsardo bsardo added the adapter label Jan 20, 2026
@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 49abbe9

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:54:	buildEndpointURL	91.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:75:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:113:	getMediaTypeForBid	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:131:	MakeBids		87.0%
total:								(statements)		81.7%

@sebrobert
Copy link

Hello @bsardo, hope you are good 🙏
Can we have an update on that PR and have an approximative date of availability for our customers that are expecting it ?
In advance, thanks
Best

@karwaankit32
Copy link
Contributor

Can you please create a documentation PR and link it in the description?

@bsardo bsardo mentioned this pull request Feb 3, 2026
@@ -0,0 +1,33 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see tests related to the bidder params. Can you please add that under beop adapters folder with file name params_test.go?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want a test with missing param for example?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, what i meant was adding tests for valid and invalid params in a dedicated file adapters/beop/params_test.go

Please take a look at example - https://github.com/prebid/prebid-server/blob/master/adapters/adverxo/params_test.go

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Sorry for the misunderstanfing: ae27191

Message: "ext.bidder not provided",
}
}
if beopExt.BeopPublisherID == "" && beopExt.BeopNetworkID == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need this validation since if the param validation fails, it the adapter will never be called. In the bidder params configuration, we have already provided that either pid or nid, ntpnid needs to be provided

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't know that, so yeah we don't need extra validation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continue
}
bidResponseFinal.Bids = append(bidResponseFinal.Bids, &adapters.TypedBid{
Bid: &bid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at this comment

}
}
var beopExt openrtb_ext.ExtImpBeop
if err := jsonutil.Unmarshal(bidderExt.Bidder, &beopExt); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can add coverage for unmarshalling errors in this code path

url, err := url.Parse(a.endpoint)
if err != nil {
return "", &errortypes.Warning{
Message: "Failed to parse endpoint",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to do this validation since endpoint is supplanted from the config by Prebid ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case openrtb2.MarkupVideo:
bidType = openrtb_ext.BidTypeVideo
case openrtb2.MarkupAudio:
bidType = openrtb_ext.BidTypeAudio
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add coverage for BidType - Audio, MarkupNative and invalid type

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the beop.yaml allow only banner and video I will remove the extra cases.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 7908799

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:54:	buildEndpointURL	91.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:75:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:113:	getMediaTypeForBid	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:131:	MakeBids		87.0%
total:								(statements)		81.7%

@sebrobert
Copy link

Please find here the DOC PR : prebid/prebid.github.io#6432

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, a5cb34d

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	85.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:65:	MakeRequests		87.5%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:103:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:117:	MakeBids		96.0%
total:								(statements)		94.0%

responseData *adapters.ResponseData) (
*adapters.BidderResponse, []error,
) {
if responseData.StatusCode == http.StatusNoContent {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoint: "https://hb.collectiveaudience.co/rtb/bid"
endpointCompression: gzip
maintainer:
email: tech@collectiveaudience.co
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sent a verification mail on this mailbox. Please acknowledge over the mailbox with "received"

Thanks

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 963f154

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	85.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:65:	MakeRequests		87.5%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:103:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:117:	MakeBids		100.0%
total:								(statements)		95.5%

Copy link
Contributor

@karwaankit32 karwaankit32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledging that i received a reply over the mailbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants