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

New Adapter: IQZone #1964

Merged
merged 2 commits into from
Aug 19, 2021
Merged

New Adapter: IQZone #1964

merged 2 commits into from
Aug 19, 2021

Conversation

IQZoneAdx
Copy link
Contributor

Copy link
Contributor

@guscarreon guscarreon left a comment

Choose a reason for hiding this comment

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

Left a few comments. Also, there is already a pull request to remove the old race condition test framework and an additional PR is under development to update the documents. We apologize for not having the documentation up to date yet. In the meantime, can we please remove the following files?

iqzone/iqzonetest/params/race/banner.json
iqzone/iqzonetest/params/race/native.json
iqzone/iqzonetest/params/race/video.json

These were required under the old data race tests and are no longer necessary. In regards of test case coverage your adapter looks file. It only seems to be missing the following scenarios inside MakeBids:
image
Can we please add a couple more JSON tests under iqzone/iqzonetest/supplemental/ to cover them?

@@ -0,0 +1,5 @@
package openrtb_ext

type ImpExtFoo struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if it's not being used, please rename to something less generic, ImpExtIqzone maybe

Copy link
Contributor

Choose a reason for hiding this comment

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

This just looks like a copy/paste error from the docs. Easy fix. Thank you @IQZoneAdx for faithfully following our new bid adapter guide. :)

}
},

"required": ["placementId"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to double-check: Are we sure every request will come with a "placementId" parameter? If it's set as "required", an incoming request with a missing "placementId" will get rejected and Prebid Server won't send a bid request to any bidder. So adding a required field can break the entire setup of a publisher.

}

var invalidParams = []string{
`{"placementId": 42}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

If you decide to keep the "placementId" listed in the "required" array inside static/bidder-params/iqzone.json, can we please add a couple more test cases in order to assert the request will be invalid when "placementId" isn't found in the Ext?

40   var invalidParams = []string{
41       `{"placementId": 42}`,
   +     `{}`,
   +     `{"someOtherParam": "value"}`,
42   }
adapters/iqzone/params_test.go

bidResponse.Currency = response.Cur
for _, seatBid := range response.SeatBid {
for _, bid := range seatBid.Bid {
bid := bid // pin https://github.com/kyoh86/scopelint#whats-this
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, we can remove the comment if you want

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a copy/paste from the docs. A clearer way of writing this loop could be:

for i := range seatBid.Bid {
  b := &adapters.TypedBid{
    Bid:     &seatBid.Bid[i],
    BidType: getMediaTypeForImp(bid.ImpID, request.Imp),
  }
  bidResponse.Bids = append(bidResponse.Bids, b)
}

This does look better IMHO and doesn't require extra explanation via the pin link. I'll update the docs soon with this approach.

}
if imp.Banner == nil && imp.Video == nil && imp.Native != nil {
mediaType = openrtb_ext.BidTypeNative
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the imp.Banner == nil && imp.Video == nil && imp.Native == nil scenario possible? If so, should getMediaTypeForImp return an error instead?

@IQZoneAdx
Copy link
Contributor Author

@guscarreon @SyntaxNode thanks for the review. We fixed all the problems

@IQZoneAdx IQZoneAdx requested a review from guscarreon August 18, 2021 23:07
Copy link
Contributor

@guscarreon guscarreon left a comment

Choose a reason for hiding this comment

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

Looks good to me. @IQZoneAdx thank you for addressing the feedback and following the documentation steps so thoroughly.

@SyntaxNode SyntaxNode merged commit a35b0d0 into prebid:master Aug 19, 2021
wwwyyy pushed a commit to wwwyyy/prebid-server that referenced this pull request Aug 20, 2021
… prebid-master

* 'master' of https://github.com/prebid/prebid-server:
  Update Viper (prebid#1969)
  /cookie_sync Endpoint Rewrite (prebid#1879)
  New Adapter: IQZone (prebid#1964)
  Remove old race conidtion tests (prebid#1958)
  Remove time.Now() as the first parameter of NewRates() (prebid#1953)

# Conflicts:
#	config/config.go
#	usersync/usersyncers/syncer_test.go
jizeyopera pushed a commit to operaads/prebid-server that referenced this pull request Oct 13, 2021
shunj-nb pushed a commit to ParticleMedia/prebid-server that referenced this pull request Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants