Skip to content

Comments

New Adapter: BeOp (WIP)#4566

Closed
jeans11 wants to merge 6 commits intoprebid:masterfrom
BeOpinion:adapter
Closed

New Adapter: BeOp (WIP)#4566
jeans11 wants to merge 6 commits intoprebid:masterfrom
BeOpinion:adapter

Conversation

@jeans11
Copy link

@jeans11 jeans11 commented Oct 13, 2025

No description provided.

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],
        ...
      }
      ...
      ...
    }
  }

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, cfa5880

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:23:	Builder			0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:40:	getRequestExtImpBeop	0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:56:	buildEndpointURL	0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:61:	MakeRequests		0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:98:	getMediaTypeForBid	0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:112:	MakeBids		0.0%
total:								(statements)		0.0%

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],
        ...
      }
      ...
      ...
    }
  }

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, eb5d9fa

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:23:	Builder			0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:40:	getRequestExtImpBeop	0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:56:	buildEndpointURL	0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:61:	MakeRequests		0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:98:	getMediaTypeForBid	0.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:112:	MakeBids		0.0%
total:								(statements)		0.0%

@SyntaxNode SyntaxNode changed the title WIP New Adapter: BeOp (WIP) Oct 18, 2025
@bsardo bsardo added the adapter label Oct 20, 2025
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],
        ...
      }
      ...
      ...
    }
  }

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, 55c6dc4

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	80.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:72:	MakeRequests		82.4%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:112:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:126:	MakeBids		61.5%
total:								(statements)		72.9%

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],
        ...
      }
      ...
      ...
    }
  }

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, 7fef69b

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	80.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:72:	MakeRequests		82.4%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:112:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:126:	MakeBids		61.5%
total:								(statements)		72.9%

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

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],
        ...
      }
      ...
      ...
    }
  }

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))
Copy link

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

github-actions bot commented Dec 9, 2025

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, a031a2d

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	80.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:72:	MakeRequests		82.4%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:112:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:126:	MakeBids		60.0%
total:								(statements)		72.5%

@jeans11 jeans11 force-pushed the adapter branch 2 times, most recently from 01c5ff6 to 7f08f47 Compare December 9, 2025 15:27
continue
}
bidResponseFinal.Bids = append(bidResponseFinal.Bids, &adapters.TypedBid{
Bid: &bid,
Copy link

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],
        ...
      }
      ...
      ...
    }
  }

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))
Copy link

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

github-actions bot commented Dec 9, 2025

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, 01c5ff6

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	80.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:72:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:110:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:124:	MakeBids		63.6%
total:								(statements)		73.8%

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

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],
        ...
      }
      ...
      ...
    }
  }

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))
Copy link

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

github-actions bot commented Dec 9, 2025

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, 7f08f47

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	80.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:72:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:110:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:124:	MakeBids		86.4%
total:								(statements)		81.5%

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],
        ...
      }
      ...
      ...
    }
  }

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, 8cd25c7

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	75.0%
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)		80.6%

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],
        ...
      }
      ...
      ...
    }
  }

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, 68f08c5

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
Copy link
Collaborator

bsardo commented Feb 3, 2026

I'm closing this PR as I see you recently opened #4660.

@bsardo bsardo closed this Feb 3, 2026
@jeans11
Copy link
Author

jeans11 commented Feb 4, 2026

Wooo I don't understand why this PR was open. I have only open the #4660.
Sorry for that.
Thanks @bsardo for closing this.

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.

2 participants