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

Colossus bid adapter #1472

Closed
wants to merge 32 commits into from
Closed

Conversation

HuddledMasses
Copy link
Contributor

New adapter

@SyntaxNode
Copy link
Contributor

Thank you for your contribution. We'll review this PR early next week.

For now, could you please open a PR in https://github.com/prebid/prebid.github.io to add a doc for this new adapter. More information is found in our new adapter guide: https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#document-your-adapter

@SyntaxNode SyntaxNode added the needs docs Docs are required for this PR or Issue label Sep 3, 2020
@HuddledMasses
Copy link
Contributor Author

HuddledMasses commented Sep 4, 2020

Waiting for merge prebid/prebid.github.io#2306

@SyntaxNode SyntaxNode removed the needs docs Docs are required for this PR or Issue label Sep 4, 2020
"github.com/prebid/prebid-server/openrtb_ext"
)

// ColossusAdapter struct
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment isn't very useful. Please consider either removing or expanding.

)

func TestJsonSamples(t *testing.T) {
colossusAdapter := NewColossusBidder("http://colossusssp.com/?c=o&m=rtb")
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using an obviously fake url for testing.

@@ -0,0 +1,39 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider renaming the tests from ext-1 and ext-2 to more descriptive names like ext-emptystring and ext-emptyobject.

syncInfo, err := syncer.GetUsersyncInfo(privacy.Policies{
GDPR: gdpr.Policy{
Signal: "0",
Consent: "ANDFJDS",
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using an obviously fake consent, like A or anyConsent.

@@ -0,0 +1,11 @@
maintainer:
email: "aigolkin1991@gmail.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a personal email address. Do you have a mailing list or work email from colossus to use instead?

}

if response.StatusCode != http.StatusOK {
return nil, []error{&errortypes.BadServerResponse{
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice test coverage. This looks to be the only excluded branch. Could you please add a test here to round out the lot?

@HuddledMasses
Copy link
Contributor Author

All requested changes are done

Copy link
Contributor

@SyntaxNode SyntaxNode left a comment

Choose a reason for hiding this comment

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

One further comment about contact information. Otherwise looks great.

@@ -0,0 +1,12 @@
maintainer:
email: "huddled.masses1650@gmail.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious why you are using a gmail account as a contact here instead of an email with @huddledmasses.com or @colossusssp.com.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SyntaxNode Because maintanace is beeing done by outsource, so for any questions related to adapters github register email address is used

Copy link
Contributor

Choose a reason for hiding this comment

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

@HuddledMasses Gotcha. Our concern over the gmail account is that it does't have good optics as being officially provided by HuddledMasses and if the contractor changes in the future, this support email address may be forgotten about. It's important to us because we rely on these contacts long term for support.

Would you consider creating a @huddledmasses.com and forward it to the this gmail address? That leaves HuddledMasses in control of the contact flow and can change it in the future if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added support@huddledmasses.com email


"expectedBidResponses": [
{
"bids":[
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SyntaxNode should this also have the top-level key"currency": "USD",? It looks like the JSON test infrastructure does not verify that bid response field.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The adapters.NewBidderResponseWithBidsCapacity(1) will fill the currency field with USD. If there is any chance of bidding in some other currency, you should add some code to overwrite it. Would also be nice to test bidding in other currencies if that is a thing.

"ifa": "sdjfksdf-dfsds-dsdg-dsgg"
}
},
"httpCalls": [{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick: can we fix the indentation in this section?

},
"device": {}
},
"httpCalls": [{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick: can we fix the indentation in this section?

@@ -117,7 +118,8 @@ func newAdapterMap(client *http.Client, cfg *config.Configuration, infos adapter
openrtb_ext.BidderAvocet: avocet.NewAvocetAdapter(cfg.Adapters[string(openrtb_ext.BidderAvocet)].Endpoint),
openrtb_ext.BidderBeachfront: beachfront.NewBeachfrontBidder(cfg.Adapters[string(openrtb_ext.BidderBeachfront)].Endpoint, cfg.Adapters[string(openrtb_ext.BidderBeachfront)].ExtraAdapterInfo),
openrtb_ext.BidderBeintoo: beintoo.NewBeintooBidder(cfg.Adapters[string(openrtb_ext.BidderBeintoo)].Endpoint),
openrtb_ext.BidderBrightroll: brightroll.NewBrightrollBidder(cfg.Adapters[string(openrtb_ext.BidderBrightroll)].Endpoint, cfg.Adapters[string(openrtb_ext.BidderBrightroll)].ExtraAdapterInfo),
openrtb_ext.BidderBrightroll: brightroll.NewBrightrollBidder(cfg.Adapters[string(openrtb_ext.BidderBrightroll)].Endpoint),
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a merge conflict (and is causing the validation check errors). Brightroll recently changed their adapter. Please revert their adapter registration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've reverted those commit, now it should be able to merge without conflict

Copy link
Contributor

@SyntaxNode SyntaxNode Sep 11, 2020

Choose a reason for hiding this comment

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

It actually looks like you reverted their entire adapter commit. I'll take responsibility for that as I see my message of "Please revert their adapter registration." may have been confusing. I intended to express that you should revert the change made in your merge, not their entire adatper.

To fix this from here, I think you'll need to revert the revert and ensure to take their change in this method. The end goal is for there to be no green or red lines in this PR with brightroll in them.

@HuddledMasses
Copy link
Contributor Author

HuddledMasses commented Sep 14, 2020

@SyntaxNode Finaly, i think we have reached the goal

@SyntaxNode
Copy link
Contributor

@SyntaxNode Finaly, i think we have reached the goal

Yay! It seems that you added in the recent account PRs now too. My gif-foo isn't strong enough to provide better guidance. It may be easier to start fresh from a new branch and copy/paste in the colossus adapter work?

@HuddledMasses
Copy link
Contributor Author

@SyntaxNode I've created new PR from branch updated to latest prebid-server master branch and with copied changes for colossus adapter #1495 . And will close this one

@SyntaxNode SyntaxNode closed this Sep 14, 2020
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.

5 participants