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: Relevant Digital #3216

Merged

Conversation

hugolm84
Copy link
Contributor

Greetings Prebid team, I have the pleasure of submitting this adapter on relevantdigitals behalf.

This adapter is consistent with the .js adapter so please see previous documentation for relevantdigital js adapter here: https://docs.prebid.org/dev-docs/bidders/relevantdigital.html

This PR is also dependant on the following PRs:

s2s support for .js adapter: prebid/Prebid.js#10610
s2s documentation: prebid/prebid.github.io#4931

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 58adafe

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:31:		Builder			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:43:		PatchBidRequestExt	90.9%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:66:		PatchBidImpExt		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:82:		SetTMax			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:91:		CloneBidRequest		83.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:101:	createBidRequest	80.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:122:	getImpressionExt	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:138:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:147:	buildAdapterRequest	70.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:172:	MakeRequests		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:189:	getImpressionsInfo	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:201:	getHeaders		50.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:221:	getMediaTypeForBid	33.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:236:	MakeBids		81.2%
total:											(statements)		74.6%

@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from 58adafe to ba3630e Compare October 13, 2023 15:57
@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, ba3630e

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:31:		Builder			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:42:		PatchBidRequestExt	90.9%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:65:		PatchBidImpExt		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:81:		SetTMax			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:90:		CloneBidRequest		83.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:100:	createBidRequest	80.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:121:	getImpressionExt	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:146:	buildAdapterRequest	70.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:171:	MakeRequests		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:188:	getImpressionsInfo	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:200:	getHeaders		50.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:220:	getMediaTypeForBid	33.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:235:	MakeBids		81.2%
total:											(statements)		74.4%

@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from ba3630e to 7f1ed2a Compare October 16, 2023 07:44
@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 7f1ed2a

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:31:		Builder			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:42:		patchBidRequestExt	90.9%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:65:		patchBidImpExt		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:81:		setTMax			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:90:		cloneBidRequest		83.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:100:	createBidRequest	80.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:121:	getImpressionExt	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:146:	buildAdapterRequest	70.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:171:	MakeRequests		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:188:	getImpressionsInfo	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:200:	getHeaders		50.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:220:	getMediaTypeForBid	33.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:235:	MakeBids		81.2%
total:											(statements)		74.4%

@onkarvhanumante onkarvhanumante changed the title relevantBidAdapter: add new bid adapter New adapter: relevantBidAdapter Oct 16, 2023
@onkarvhanumante
Copy link
Contributor

@hugolm84, Validate PR tests are failing. Seems like formatting issue. Run gofmt to fix them

Run ./validate.sh --nofmt --cov --race 10
gofmt needs to be run, 3 files have issues.  Below is a list of files to review:
adapters/relevantdigital/params_test.go
adapters/relevantdigital/relevantdigital.go
openrtb_ext/imp_relevantdigital.go

@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from 7f1ed2a to 429745b Compare October 16, 2023 12:34
@hugolm84
Copy link
Contributor Author

@hugolm84, Validate PR tests are failing. Seems like formatting issue. Run gofmt to fix them

Run ./validate.sh --nofmt --cov --race 10
gofmt needs to be run, 3 files have issues.  Below is a list of files to review:
adapters/relevantdigital/params_test.go
adapters/relevantdigital/relevantdigital.go
openrtb_ext/imp_relevantdigital.go

Thanks! Fixed.

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 429745b

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:31:		Builder			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:42:		patchBidRequestExt	90.9%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:65:		patchBidImpExt		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:81:		setTMax			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:90:		cloneBidRequest		83.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:100:	createBidRequest	80.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:121:	getImpressionExt	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:146:	buildAdapterRequest	70.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:171:	MakeRequests		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:188:	getImpressionsInfo	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:200:	getHeaders		50.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:220:	getMediaTypeForBid	33.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:235:	MakeBids		81.2%
total:											(statements)		74.4%

@Sonali-More-Xandr
Copy link
Contributor

@hugolm84 Please resolve the merge conflicts.

@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from 429745b to aa81755 Compare October 19, 2023 12:57
@hugolm84
Copy link
Contributor Author

@hugolm84 Please resolve the merge conflicts.

Fixed :)

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, aa81755

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:31:		Builder			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:42:		patchBidRequestExt	90.9%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:65:		patchBidImpExt		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:81:		setTMax			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:90:		cloneBidRequest		83.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:100:	createBidRequest	80.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:121:	getImpressionExt	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:146:	buildAdapterRequest	70.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:171:	MakeRequests		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:188:	getImpressionsInfo	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:200:	getHeaders		50.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:220:	getMediaTypeForBid	33.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:235:	MakeBids		81.2%
total:											(statements)		74.4%

@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from aa81755 to 82302e8 Compare October 19, 2023 15:26
@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 82302e8

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:31:		Builder			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:42:		patchBidRequestExt	90.9%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:65:		patchBidImpExt		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:81:		setTMax			100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:90:		cloneBidRequest		83.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:100:	createBidRequest	80.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:121:	getImpressionExt	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:146:	buildAdapterRequest	70.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:171:	MakeRequests		66.7%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:188:	getImpressionsInfo	71.4%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:200:	getHeaders		50.0%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:220:	getMediaTypeForBid	33.3%
github.com/prebid/prebid-server/adapters/relevantdigital/relevantdigital.go:235:	MakeBids		81.2%
total:											(statements)		74.4%

Copy link
Contributor

@gargcreation1992 gargcreation1992 left a comment

Choose a reason for hiding this comment

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

There are lots of test cases missing. For example - should add test cases for video and native as well and few supplemental test cases. Refer to other adapter codes for reference.

@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from 82302e8 to fc29c07 Compare October 20, 2023 07:50
@hugolm84 hugolm84 force-pushed the hlindstrom/relevantDigitalBidAdapter branch from d826904 to ed8005b Compare November 28, 2023 19:20
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, ed8005b

relevantdigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:45:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:56:	patchBidRequestExt		68.2%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:101:	patchBidImpExt			100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:105:	setTMax				100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:114:	createBidRequest		100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:133:	createJSONRequest		91.7%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:159:	getImpressionExt		100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:175:	buildEndpointURL		100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:184:	buildAdapterRequest		85.7%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:204:	MakeRequests			100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:221:	getImpressionsInfo		100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:233:	getHeaders			100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:253:	getMediaTypeForBidFromExt	100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:264:	getMediaTypeForBid		100.0%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:279:	isSupportedMediaType		83.3%
github.com/prebid/prebid-server/v2/adapters/relevantdigital/relevantdigital.go:293:	MakeBids			81.0%
total:											(statements)			89.9%

@hugolm84
Copy link
Contributor Author

Hi @hugolm84, I see that the test suite failed and that is due to a flakey test in unrelated code that was recently fixed on master. If you merge with master the issue should be resolved.

Thanks, this seems to be fixed now :)

@@ -0,0 +1,17 @@
endpoint: "https://{{.Host}}.relevant-digital.com/openrtb2/auction"
maintainer:
email: "[email protected]"
Copy link
Contributor

Choose a reason for hiding this comment

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

I have sent an email to the above address again. Please reply with received.

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 have replied.

@bretg
Copy link
Contributor

bretg commented Nov 30, 2023

Host looks like an optional param to me. Removing myself from the reviewer list.

@bretg bretg removed their request for review November 30, 2023 14:31
@hugolm84
Copy link
Contributor Author

Host looks like an optional param to me. Removing myself from the reviewer list.

Hm, I might be missing something but doesnt the bidder-params specify what is required or not?

Edit: Oh, I see now, the Host is the name of the param but its acquired like so:

Host        string `json:"pbsHost"`

and bidder-params defines:

    "required": [
        "accountId",
        "placementId",
        "pbsHost"
    ] 

@bretg
Copy link
Contributor

bretg commented Nov 30, 2023

@onkarvhanumante - please ensure that host is optional. Thanks!

@onkarvhanumante
Copy link
Contributor

@hugolm84 ptal at #3216 (comment) comment

@bretg
Copy link
Contributor

bretg commented Dec 4, 2023

@hugolm84 - I'm only involved in this because of the semi-dynamic host thing. That's resolved. Am removing myself from the reviewers list.

@bretg bretg removed their request for review December 4, 2023 14:46
@onkarvhanumante onkarvhanumante merged commit 005a2d1 into prebid:master Dec 5, 2023
5 checks passed
SuprPhatAnon pushed a commit to GiftConnect/prebid-server that referenced this pull request Dec 7, 2023
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.

7 participants