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

YahooSSP rebranding to Yahoo Advertising. #2826

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package yahoossp
package yahooAdvertising

import (
"encoding/json"
Expand All @@ -7,33 +7,33 @@ import (
"github.com/prebid/prebid-server/openrtb_ext"
)

// This file actually intends to test static/bidder-params/yahoossp.json
// This file actually intends to test static/bidder-params/yahooAdvertising.json
//
// These also validate the format of the external API: request.imp[i].ext.yahoossp
// These also validate the format of the external API: request.imp[i].ext.yahooAdvertising

// TestValidParams makes sure that the yahoossp schema accepts all imp.ext fields which we intend to support.
// TestValidParams makes sure that the yahooAdvertising schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
if err != nil {
t.Fatalf("Failed to fetch the json-schemas. %v", err)
}

for _, validParam := range validParams {
if err := validator.Validate(openrtb_ext.BidderYahooSSP, json.RawMessage(validParam)); err != nil {
t.Errorf("Schema rejected yahoossp params: %s", validParam)
if err := validator.Validate(openrtb_ext.BidderYahooAdvertising, json.RawMessage(validParam)); err != nil {
t.Errorf("Schema rejected yahooAdvertising params: %s", validParam)
}
}
}

// TestInvalidParams makes sure that the yahoossp schema rejects all the imp.ext fields we don't support.
// TestInvalidParams makes sure that the yahooAdvertising schema rejects all the imp.ext fields we don't support.
func TestInvalidParams(t *testing.T) {
validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
if err != nil {
t.Fatalf("Failed to fetch the json-schemas. %v", err)
}

for _, invalidParam := range invalidParams {
if err := validator.Validate(openrtb_ext.BidderYahooSSP, json.RawMessage(invalidParam)); err == nil {
if err := validator.Validate(openrtb_ext.BidderYahooAdvertising, json.RawMessage(invalidParam)); err == nil {
t.Errorf("Schema allowed unexpected params: %s", invalidParam)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package yahoossp
package yahooAdvertising

import (
"encoding/json"
Expand Down Expand Up @@ -41,8 +41,8 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E
continue
}

var yahoosspExt openrtb_ext.ExtImpYahooSSP
err = json.Unmarshal(bidderExt.Bidder, &yahoosspExt)
var yahooAdvertisingExt openrtb_ext.ExtImpYahooAdvertising
err = json.Unmarshal(bidderExt.Bidder, &yahooAdvertisingExt)
if err != nil {
err = &errortypes.BadInput{
Message: fmt.Sprintf("imp #%d: %s", idx, err.Error()),
Expand All @@ -64,7 +64,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E
reqCopy.App = &appCopy
}

if err := changeRequestForBidService(&reqCopy, &yahoosspExt); err != nil {
if err := changeRequestForBidService(&reqCopy, &yahooAdvertisingExt); err != nil {
errors = append(errors, err)
continue
}
Expand Down Expand Up @@ -150,7 +150,7 @@ func getImpInfo(impId string, imps []openrtb2.Imp) (bool, openrtb_ext.BidType) {
return exists, mediaType
}

func changeRequestForBidService(request *openrtb2.BidRequest, extension *openrtb_ext.ExtImpYahooSSP) error {
func changeRequestForBidService(request *openrtb2.BidRequest, extension *openrtb_ext.ExtImpYahooAdvertising) error {
/* Always override the tag ID and (site ID or app ID) of the request */
request.Imp[0].TagID = extension.Pos
if request.Site != nil {
Expand Down Expand Up @@ -218,7 +218,7 @@ func validateBanner(banner *openrtb2.Banner) error {
return nil
}

// Builder builds a new instance of the YahooSSP adapter for the given bidder with the given config.
// Builder builds a new instance of the YahooAdvertising adapter for the given bidder with the given config.
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
bidder := &adapter{
URI: config.Endpoint,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package yahoossp
package yahooAdvertising

import (
"testing"
Expand All @@ -10,26 +10,26 @@ import (
"github.com/prebid/prebid-server/openrtb_ext"
)

func TestYahooSSPBidderEndpointConfig(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderYahooSSP, config.Adapter{
func TestYahooAdvertisingBidderEndpointConfig(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderYahooAdvertising, config.Adapter{
Endpoint: "http://localhost/bid",
}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})

if buildErr != nil {
t.Fatalf("Builder returned unexpected error %v", buildErr)
}

bidderYahooSSP := bidder.(*adapter)
bidderYahooAdvertising := bidder.(*adapter)

assert.Equal(t, "http://localhost/bid", bidderYahooSSP.URI)
assert.Equal(t, "http://localhost/bid", bidderYahooAdvertising.URI)
}

func TestJsonSamples(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderYahooSSP, config.Adapter{}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})
bidder, buildErr := Builder(openrtb_ext.BidderYahooAdvertising, config.Adapter{}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})

if buildErr != nil {
t.Fatalf("Builder returned unexpected error %v", buildErr)
}

adapterstest.RunJSONBidderTest(t, "yahoossptest", bidder)
adapterstest.RunJSONBidderTest(t, "yahooAdvertisingtest", bidder)
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "wrong",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"id": "test-request-id",
"seatbid": [
{
"seat": "yahoossp",
"seat": "yahooAdvertising",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id",
Expand Down
6 changes: 3 additions & 3 deletions exchange/adapter_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import (
"github.com/prebid/prebid-server/adapters/visx"
"github.com/prebid/prebid-server/adapters/vrtcal"
"github.com/prebid/prebid-server/adapters/xeworks"
"github.com/prebid/prebid-server/adapters/yahoossp"
"github.com/prebid/prebid-server/adapters/yahooAdvertising"
"github.com/prebid/prebid-server/adapters/yeahmobi"
"github.com/prebid/prebid-server/adapters/yieldlab"
"github.com/prebid/prebid-server/adapters/yieldmo"
Expand Down Expand Up @@ -352,7 +352,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
openrtb_ext.BidderUnicorn: unicorn.Builder,
openrtb_ext.BidderUnruly: unruly.Builder,
openrtb_ext.BidderValueImpression: apacdex.Builder,
openrtb_ext.BidderVerizonMedia: yahoossp.Builder,
Copy link
Contributor

@Sonali-More-Xandr Sonali-More-Xandr Jun 7, 2023

Choose a reason for hiding this comment

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

Can you please confirm if you want to remove this alias or update it to use yahooAdvertising.Builder? As in the PR description, it is mentioned that The yahoossp alias should be supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we also want to remove the very old verizonmedia alias.

openrtb_ext.BidderVideoByte: videobyte.Builder,
openrtb_ext.BidderVideoHeroes: videoheroes.Builder,
openrtb_ext.BidderVidoomy: vidoomy.Builder,
Expand All @@ -361,7 +360,8 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
openrtb_ext.BidderVisx: visx.Builder,
openrtb_ext.BidderVrtcal: vrtcal.Builder,
openrtb_ext.BidderXeworks: xeworks.Builder,
openrtb_ext.BidderYahooSSP: yahoossp.Builder,
openrtb_ext.BidderYahooAdvertising: yahooAdvertising.Builder,
openrtb_ext.BidderYahooSSP: yahooAdvertising.Builder,
openrtb_ext.BidderYeahmobi: yeahmobi.Builder,
openrtb_ext.BidderYieldlab: yieldlab.Builder,
openrtb_ext.BidderYieldmo: yieldmo.Builder,
Expand Down
2 changes: 1 addition & 1 deletion exchange/adapter_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func GetDisabledBiddersErrorMessages(infos config.BidderInfos) map[string]string
"lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
"adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`,
"andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`,
"oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`,
"groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`,
Expand Down
8 changes: 4 additions & 4 deletions exchange/adapter_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
"lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
"adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`,
"andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`,
"oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`,
"groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`,
Expand All @@ -223,7 +223,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
"lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
"adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`,
"andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`,
"oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`,
"groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`,
Expand All @@ -236,7 +236,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
"lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
"adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`,
"appnexus": `Bidder "appnexus" has been disabled on this instance of Prebid Server. Please work with the PBS host to enable this bidder again.`,
"andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`,
"oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`,
Expand All @@ -250,7 +250,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
"lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
"adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
"yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`,
"appnexus": `Bidder "appnexus" has been disabled on this instance of Prebid Server. Please work with the PBS host to enable this bidder again.`,
"andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`,
"oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`,
Expand Down
4 changes: 2 additions & 2 deletions openrtb_ext/bidders.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ const (
BidderUnicorn BidderName = "unicorn"
BidderUnruly BidderName = "unruly"
BidderValueImpression BidderName = "valueimpression"
BidderVerizonMedia BidderName = "verizonmedia"
BidderVideoByte BidderName = "videobyte"
BidderVideoHeroes BidderName = "videoheroes"
BidderVidoomy BidderName = "vidoomy"
Expand All @@ -266,6 +265,7 @@ const (
BidderVisx BidderName = "visx"
BidderVrtcal BidderName = "vrtcal"
BidderXeworks BidderName = "xeworks"
BidderYahooAdvertising BidderName = "yahooAdvertising"
BidderYahooSSP BidderName = "yahoossp"
BidderYeahmobi BidderName = "yeahmobi"
BidderYieldlab BidderName = "yieldlab"
Expand Down Expand Up @@ -449,7 +449,6 @@ func CoreBidderNames() []BidderName {
BidderUnicorn,
BidderUnruly,
BidderValueImpression,
BidderVerizonMedia,
BidderVideoByte,
BidderVideoHeroes,
BidderVidoomy,
Expand All @@ -458,6 +457,7 @@ func CoreBidderNames() []BidderName {
BidderVisx,
BidderVrtcal,
BidderXeworks,
BidderYahooAdvertising,
BidderYahooSSP,
BidderYeahmobi,
BidderYieldlab,
Expand Down
7 changes: 0 additions & 7 deletions openrtb_ext/imp_verizonmedia.go

This file was deleted.

7 changes: 7 additions & 0 deletions openrtb_ext/imp_yahooAdvertising.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package openrtb_ext

// ExtImpYahooAdvertising defines the contract for bidrequest.imp[i].ext.prebid.bidder.yahooAdvertising
type ExtImpYahooAdvertising struct {
Dcn string `json:"dcn"`
Pos string `json:"pos"`
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
disabled: true
endpoint: "https://s2shb.ssp.yahoo.com/admax/bid/partners/PBS"
maintainer:
email: "dsp-supply-prebid@verizonmedia.com"
email: "hb-fe-tech@yahooinc.com"
gvlVendorID: 25
capabilities:
app:
mediaTypes:
- banner
- video
site:
mediaTypes:
- banner
- video
userSync:
# verizonmedia supports user syncing, but requires configuration by the host. contact this
# yahooAdvertising supports user syncing, but requires configuration by the host. contact this
# bidder directly at the email address in this file to ask about enabling user sync.
supports:
- redirect
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "VerizonMedia Adapter Params",
"description": "A schema which validates params accepted by the VerizonMedia adapter",
"title": "YahooAdvertising Adapter Params",
"description": "A schema which validates params accepted by the YahooAdvertising adapter",
"type": "object",
"properties": {
"dcn": {
"type": "string",
"minLength": 1,
"description": "Site ID provided by One Mobile"
},
"pos": {
"type": "string",
"minLength": 1,
"description": "Placement ID"
}
},
Expand Down