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

verizonmedia: override tag ID and site ID + split up multi-imp requests #1050

Merged

Conversation

Aadeshp
Copy link
Contributor

@Aadeshp Aadeshp commented Sep 27, 2019

No description provided.

Copy link
Contributor

@oath-jac oath-jac left a comment

Choose a reason for hiding this comment

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

We need tests to cover the new updates.

}
/* Always override the tag ID and site ID of the request */
request.Imp[0].TagID = extension.Pos
request.Site.ID = extension.Dcn
Copy link
Contributor

Choose a reason for hiding this comment

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

you are missing the banner size properties latest changes that we added.

err := json.Unmarshal(imp.Ext, &bidderExt)
if err != nil {
err = &errortypes.BadInput{
Message: "ext.bidder not provided",
Copy link
Contributor

Choose a reason for hiding this comment

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

the Imp range index can be added in the error message

Message: "Missing param dcn",
if verizonMediaExt.Dcn == "" {
err = &errortypes.BadInput{
Message: "Missing param dcn",
Copy link
Contributor

Choose a reason for hiding this comment

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

the Imp range index can be added in the error message

Message: "Missing param pos",
if verizonMediaExt.Pos == "" {
err = &errortypes.BadInput{
Message: "Missing param pos",
Copy link
Contributor

Choose a reason for hiding this comment

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

the same as above

@Aadeshp Aadeshp force-pushed the verizonmedia_populate_tag_and_site branch 2 times, most recently from 16c1ed4 to 90ea09b Compare September 30, 2019 14:34
@Aadeshp
Copy link
Contributor Author

Aadeshp commented Sep 30, 2019

@oath-jac addressed all the comments

@Aadeshp Aadeshp force-pushed the verizonmedia_populate_tag_and_site branch 2 times, most recently from dc73af9 to f0a1c4b Compare October 1, 2019 00:23
hhhjort
hhhjort previously approved these changes Oct 1, 2019
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.

Quick question

headers.Add("x-openrtb-version", "2.5")
if err := changeRequestForBidService(&reqCopy, &verizonMediaExt); err != nil {
errors = append(errors, err)
return nil, errors
Copy link
Contributor

Choose a reason for hiding this comment

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

@Aadeshp , are we sure we want to return because this particular Imp does not pass the checks found in changeRequestForBidService()? Don't we want to continue instead? The changeRequestForBidService() function pretty much makes sure this Imp is a banner and check for its dimensions. Are sure we want to exit at the first non banner or non-properly dimensioned banner we find?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes good find!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

@Aadeshp Aadeshp force-pushed the verizonmedia_populate_tag_and_site branch from f0a1c4b to df24e68 Compare October 1, 2019 19:15
guscarreon
guscarreon previously approved these changes Oct 1, 2019
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 pretty good

mansinahar
mansinahar previously approved these changes Oct 1, 2019
Copy link
Contributor

@mansinahar mansinahar left a comment

Choose a reason for hiding this comment

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

LGTM other than the one minor comment

headers.Add("x-openrtb-version", "2.5")

if request.Device != nil {
headers.Set("User-Agent", request.Device.UA)
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably wanna check the value of Device.UA before setting the header to make sure it's not empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

@Aadeshp Aadeshp dismissed stale reviews from mansinahar and guscarreon via c3643de October 1, 2019 19:28
@Aadeshp Aadeshp force-pushed the verizonmedia_populate_tag_and_site branch from df24e68 to c3643de Compare October 1, 2019 19:28
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.

LGTM

@mansinahar mansinahar merged commit 53e2aaf into prebid:master Oct 1, 2019
mansinahar pushed a commit to mansinahar/prebid-server that referenced this pull request Nov 1, 2019
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 1, 2020
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 2, 2020
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 4, 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