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

LemmaDigital: add host parameter #3750

Closed
wants to merge 6 commits into from

Conversation

lm-ved
Copy link
Contributor

@lm-ved lm-ved commented Jun 13, 2024

  • update bid adapter

📋 Checklist

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, b583eb4

lemmadigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:23:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:35:	MakeRequests		87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:74:	MakeBids		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:110:	buildEndpointURL	100.0%
total:										(statements)		92.7%

@bsardo bsardo changed the title [LemmaDigital] host parameter introduced LemmaDigital: add host parameter Jun 13, 2024
"host": {
"type": "string",
"description": "Network Host to request from",
"enum": ["uses", "usws", "usct", "emea", "sg", "doohsg", "doohus"]
Copy link
Contributor

Choose a reason for hiding this comment

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

In the case of region specific routing, we recommend the solution of documenting the different endpoints supported by your adapter and hosts can configure their data centers to match. PBS already allows endpoints to be configured via application settings (environment variable or pbs.yaml).

We prefer not asking publishers to enter the region in each one of their placement configs. This is really a server level configuration.

@bsardo @bretg

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch @SyntaxNode . @lm-ved , please see https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#consider-your-geography and the example . Basically, pubs can't reasonably determine the geography.

# We have the following regional endpoint domains: "uses" (us-east), "usws" (us-west), "usct" (us-central), "emea" (europe middle east africa), "sg" (where's this?)
# Please deploy this config in each of your datacenters with the appropriate regional subdomain
endpoint: "http://REGION.example.com/openrtb2"
geoscope:
  - USA
  - CAN

As for separate endpoints for DOOH vs display, I think that's a problem. @SyntaxNode - can we allow them to create a bidder-specific "regioncode" YAML entry that's filled in by the host company and is available to their runtime code? If so, then the adapter can look at regioncode along with site/app/dooh and determine the endpoint.

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 / @bretg ,
Would I be correct in assuming the following change would suffice in this adapter's case?

# We have the following regional endpoint domains: "uses" (us-east), "usws" (us-west), "usct" (us-central), "emea" (europe middle east africa), "sg" (singapore)
# Please deploy this config in each of your datacenters with the appropriate regional subdomain
endpoint: "https://REGION.ads.lemmatechnologies.com/lemma/servad?src=prebid&pid={{.PublisherID}}&aid={{.AdUnit}}"
geoscope:
  - global

instead of the current:

endpoint: "https://{{.Host}}.ads.lemmatechnologies.com/lemma/servad?src=prebid&pid={{.PublisherID}}&aid={{.AdUnit}}"

It also would depend on the decision regarding how to handle the different endpoints for DOOH.

Copy link
Contributor

@SyntaxNode SyntaxNode Jun 27, 2024

Choose a reason for hiding this comment

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

@SyntaxNode - can we allow them to create a bidder-specific "regioncode" YAML entry that's filled in by the host company and is available to their runtime code?

Yup. This is a good use for the extra_info field. Hosts can override this value in the appropriate data centers just as they would the endpoint. For details, please visit https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html and search for "extra_info" and "ExtraAdapterInfo".

Would I be correct in assuming the following change would suffice in this adapter's case?

Yes, but please disable this adapter by default (hosts can enable it) since the endpoint is not valid by default. This is the same approach used by the Rubicon/Magnite adapter.

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 , thank you for the details.
I've added the host option as an extra_info field. I have also kept a default value and removed host from the required array of bidder-params. This would allow for both - a server-level config and a publisher to provide it if needed, with a default(set to the current adapter's host ) in case it is neither.

Copy link
Contributor

Choose a reason for hiding this comment

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

This would allow for both - a server-level config and a publisher to provide it if needed, with a default(set to the current adapter's host ) in case it is neither.

@bretg Are you good with giving publishers an option to set it per-request?

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose. Don't expect anyone to get it right.

@SyntaxNode SyntaxNode self-assigned this Jun 26, 2024
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, 84b7018

lemmadigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:55:	Builder			87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:73:	MakeRequests		87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:112:	MakeBids		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:148:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:155:	parseExtraInfo		92.3%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:181:	defaultHost		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:185:	assignDoohHost		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:196:	resolveHost		83.3%
total:										(statements)		92.9%

adapters/lemmadigital/lemmadigital.go Outdated Show resolved Hide resolved
adapters/lemmadigital/lemmadigital.go Outdated Show resolved Hide resolved
"host": {
"type": "string",
"description": "Network Host to request from",
"enum": ["uses", "usws", "usct", "emea", "sg", "doohsg", "doohus"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This would allow for both - a server-level config and a publisher to provide it if needed, with a default(set to the current adapter's host ) in case it is neither.

@bretg Are you good with giving publishers an option to set it per-request?

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, a26ae59

lemmadigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:55:	Builder			87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:73:	MakeRequests		87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:112:	MakeBids		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:148:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:155:	parseExtraInfo		92.3%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:181:	defaultHost		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:185:	assignDoohHost		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:196:	resolveHost		83.3%
total:										(statements)		92.9%

@lm-ved lm-ved requested review from SyntaxNode and bretg June 29, 2024 07:05
bretg
bretg previously approved these changes Jul 2, 2024
Copy link
Contributor

@bretg bretg left a comment

Choose a reason for hiding this comment

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

My review is for approach only. Did not look at the code.

@lm-ved
Copy link
Contributor Author

lm-ved commented Jul 9, 2024

Hi @SyntaxNode / @bretg / @bsardo ,
Are there any other changes required before this can be approved/merged?

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, 2e1cb18

lemmadigital

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:55:	Builder			87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:73:	MakeRequests		87.5%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:112:	MakeBids		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:148:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:155:	parseExtraInfo		92.3%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:181:	defaultHost		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:185:	assignDoohHost		100.0%
github.com/prebid/prebid-server/v2/adapters/lemmadigital/lemmadigital.go:196:	resolveHost		83.3%
total:										(statements)		92.9%

@lm-ved
Copy link
Contributor Author

lm-ved commented Jul 30, 2024

Hi @SyntaxNode / @bretg / @bsardo ,
We've also added commit: 2e1cb18 to support usersync. Let us know please if there are any further steps for this to be approved/merged.

@bsardo
Copy link
Collaborator

bsardo commented Jul 31, 2024

@lm-ved, I will give this a look shortly.

@bsardo bsardo self-assigned this Jul 31, 2024
@lm-pramod-jadhav
Copy link

@bsardo Could you please review this? It is a very important and business-impacting change for us. Let us know if there are any outstanding action items for approval.

Thank you.

@lm-ved lm-ved mentioned this pull request Aug 16, 2024
2 tasks
@lm-ved
Copy link
Contributor Author

lm-ved commented Aug 16, 2024

Hi @bsardo / @SyntaxNode / @bretg,
I've created another PR that has fewer changes to help expedite the review process: #3862 .
Please review it instead of this one for the time being.
Moving this one to draft until the linked PR is merged.

@lm-ved lm-ved marked this pull request as draft August 16, 2024 06:49
@bsardo
Copy link
Collaborator

bsardo commented Sep 16, 2024

@lm-ved your other PR has been merged. Let me know when this is ready for review again.

@SyntaxNode
Copy link
Contributor

SyntaxNode commented Nov 5, 2024

@lm-ved The prerequisite PR has been merged. You are clear to proceed with this one. If you're unable to revisit this PR at this time, we will close it next week due to inactivity. You are welcome to reopen it anytime after when you're ready.

@lm-ved
Copy link
Contributor Author

lm-ved commented Nov 6, 2024

@SyntaxNode , thanks for informing. I would like to revisit this PR in the near future so I will re-open it later. Closing it out until then.

@lm-ved lm-ved closed this Nov 6, 2024
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