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

AdbreakId support for smaato bidder #986

Open
wants to merge 3 commits into
base: ci
Choose a base branch
from

Conversation

Pubmatic-Supriya-Patil
Copy link
Collaborator

Description

Please add change description or link to ticket, docs, etc.

Checklist:

  • PR commit list is unique (rebase/pull with the origin branch to keep master clean).
  • JIRA number is added in the PR title and the commit message.
  • Updated the header-bidding repo with appropiate commit id.
  • Documented the new changes.

For Prebid upgrade, refer: https://inside.pubmatic.com:8443/confluence/display/Products/Prebid-server+upgrade

Copy link
Collaborator

@ShriprasadM ShriprasadM left a comment

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil added review comments

Comment on lines 396 to 399
if adbreakID, ok := getString(params.FieldMap["adbreakId"]); ok {
fmt.Fprintf(&jsonStr, `,"adbreakId":"%s"`, adbreakID)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil : Have we checked on impact if both adbreakid and adspaceid are passed on to Smaato adapter in adapter code? Whether both are passed to bidder?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As discussed , only one field will be used based on type of request.

@@ -2045,7 +2045,7 @@ func TestPrepareBidParamJSONForPartnerSmaato(t *testing.T) {
want: nil,
},
{
name: "All params are present",
name: "publisherId_adspaceId_both_are_present",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil : What is the change in this test case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Previously all params means publisher Id and adspace Id. now we added adbreakId as new field so just renamed test case name accordingly.

@@ -2060,6 +2060,66 @@ func TestPrepareBidParamJSONForPartnerSmaato(t *testing.T) {
},
want: json.RawMessage(`{"publisherId": "1234","adspaceId": "3456"}`),
},
{
name: "All_params_are_present",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil : why have we introduced new test case. The test case with this name was present before, as per last review comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This new test case is for publisherId, adspaceId and adbreakId. Previous one was only for publisherId and adspaceId

Comment on lines -390 to -393
if adspaceID, ok := getString(params.FieldMap["adspaceId"]); !ok {
return nil, fmt.Errorf(errMandatoryParameterMissingFormat, params.AdapterName, "adspaceId")
} else {
fmt.Fprintf(&jsonStr, `"adspaceId":"%s"`, adspaceID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil : I think we should stick to any of rule here. It means, ensure either adspaceid or adbreakid is present , instead o removing the validation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

API will handle this validation while uploading mapping so no need to have same logic here

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.

2 participants