New Adapter: Adagio#4300
Conversation
| } | ||
|
|
||
| typedBid := &adapters.TypedBid{ | ||
| Bid: &bid, |
There was a problem hiding this comment.
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],
...
}
...
...
}
}
Code coverage summaryNote:
adagioRefer here for heat map coverage report |
Code coverage summaryNote:
adagioRefer here for heat map coverage report |
| endpointCompression: gzip | ||
| maintainer: | ||
| email: dev@adagio.io | ||
| gvlVendorID: 617 |
| endpoint: "https://mp-REGION.4dex.io/pbserver" | ||
| endpointCompression: gzip | ||
| maintainer: | ||
| email: dev@adagio.io |
| # - For AMER: las => (https://mp-las.4dex.io/pbserver) | ||
| # - For EMEA: ams => (https://mp-ams.4dex.io/pbserver) | ||
| # - For APAC: tyo => (https://mp-tyo.4dex.io/pbserver) | ||
| endpoint: "https://mp-REGION.4dex.io/pbserver" |
There was a problem hiding this comment.
Our server is expecting our POST requests to have at least a Content-length header set (even if this value is 0).
You can update your command by using :
-H "Content-Length: 0"- or by using
--data ''(curl will set by default a content-length by default to 0)
There was a problem hiding this comment.
it would become:
curl -i --location -H "Content-Length: 0" --request POST https://mp-ams.4dex.io/pbserver
or
curl -i --location --data '' --request POST https://mp-ams.4dex.io/pbserver
| @@ -0,0 +1,9 @@ | |||
| package openrtb_ext | |||
|
|
|||
| // ExtImpAdagio defines the contract for bidrequest.imp[i].ext.prebid.bidder for Adagio | |||
There was a problem hiding this comment.
Unnecessary comment, please remove
| // This file actually intends to test static/bidder-params/pubmatic.json | ||
| // | ||
| // These also validate the format of the external API: request.imp[i].ext.prebid.bidder.pubmatic | ||
|
|
||
| // TestValidParams makes sure that the adagio schema accepts all imp.ext fields which we intend to support. |
There was a problem hiding this comment.
please remove all unnecessary comments
| `{"placement":"some-placement"}`, | ||
| `{"category":"some-category"}`, | ||
| `{"pagetype":"some-pagetype"}`, | ||
| `{"organizationId":"1000"}`, |
There was a problem hiding this comment.
same case as in line 58, maybe You wanted to use 1000 as int
There was a problem hiding this comment.
Indeed that's what I wanted to test. Thanks for noticing it. Fixed in: c55b565
| return bidder, nil | ||
| } | ||
|
|
||
| func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { |
There was a problem hiding this comment.
In the positive scenarios, you have tests for banner, video, and native. I don't see a multi-imp case.
Similarly, in the MakeRequests function, you are not iterating over the Imp array.
Why did you decide to do it this way? Was this intentional?
https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#makerequests
There was a problem hiding this comment.
In the positive scenarios, you have tests for banner, video, and native. I don't see a multi-imp case.
You are right, the multi-imp & multi-format case in now available in commit: e79c185 .
Similarly, in the MakeRequests function, you are not iterating over the Imp array.
Why did you decide to do it this way? Was this intentional?
For now, we want the adapter to act solely as a pass-through, so we don't need to perform any operations on the request (and iterate over the imp array) and this was intentional.
Code coverage summaryNote:
adagioRefer here for heat map coverage report |
| } | ||
|
|
||
| func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) { | ||
| // determinate media type by bid response field mtype |
There was a problem hiding this comment.
unnecessary comment
| t.Errorf("Schema allowed unexpected params: %s", invalidParam) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
- TestValidParams
- TestInvalidParams
- validParams
- invalidParams
this is the right order
| if err := checkNBRCode(bidResponse.NBR); err != nil { | ||
| return nil, []error{err} | ||
| } |
There was a problem hiding this comment.
I think this is unnecessary because in the buildBidResponse function we check the NBR.
|
@bsardo except endpoint in yaml LGTH. For rest I left comments |
Code coverage summaryNote:
adagioRefer here for heat map coverage report |
| # - For AMER: las => (https://mp-las.4dex.io/pbserver) | ||
| # - For EMEA: ams => (https://mp-ams.4dex.io/pbserver) | ||
| # - For APAC: tyo => (https://mp-tyo.4dex.io/pbserver) | ||
| endpoint: "https://mp-REGION.4dex.io/pbserver" |
There was a problem hiding this comment.
Hi @GodefroiRoussel. Your adapter looks good. I have just one change that needs to be made. Your adapter needs to work out-of-the-box and since you haven't set endpoint to a working URL, you either need to disable your adapter by adding a disabled: true annotation here similar to what Rubicon and mgidx have done, or you can keep it enabled and set endpoint to a valid URL.
12feaf4
Code coverage summaryNote:
adagioRefer here for heat map coverage report |
Code coverage summaryNote:
adagioRefer here for heat map coverage report |





Here is the documentation: prebid/prebid.github.io#5993