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

ttd bid adapter: configurable endpoint #12004

Merged

Conversation

tongwu-sh
Copy link
Contributor

@tongwu-sh tongwu-sh commented Jul 19, 2024

Type of change

  • Feature

Description of change

We want to allow users to specify their preferred TTD endpoint instead of the default endpoint for bidding.

Be sure to test the integration with your adserver using the Hello World sample page. -->

Other information

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@patmmccann
Copy link
Collaborator

patmmccann commented Jul 19, 2024

Hi @tongwu-sh ? It seems your adapter needs a tiny bit of additional maintenance: please move the common get connection logic in your adapter and prisma into a file in /libraries

It seems you also have a bug in your battr support; I think it is on imp.banner instead of imp

Please also document this endpoint change on the docs repo

@patmmccann patmmccann changed the title support endpoint params for ttd adapter ttd bid adapter: configurable endpoint Jul 19, 2024
@patmmccann patmmccann self-assigned this Jul 19, 2024
@patmmccann patmmccann self-requested a review July 19, 2024 11:25
Copy link
Collaborator

@patmmccann patmmccann left a comment

Choose a reason for hiding this comment

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

Couple of minor requests

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Tread carefully! This PR adds 2 linter errors (possibly disabled through directives):

  • modules/prismaBidAdapter.js (+1 error)
  • modules/ttdBidAdapter.js (+1 error)

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Tread carefully! This PR adds 26 linter errors and 1 linter warning (possibly disabled through directives):

  • libraries/connectionInfo/connectionUtils.js (+26 errors, +1 warning)

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Tread carefully! This PR adds 26 linter errors and 1 linter warning (possibly disabled through directives):

  • libraries/connectionInfo/connectionUtils.js (+26 errors, +1 warning)

@tongwu-sh
Copy link
Contributor Author

Hi @tongwu-sh ? It seems your adapter needs a tiny bit of additional maintenance: please move the common get connection logic in your adapter and prisma into a file in /libraries

It seems you also have a bug in your battr support; I think it is on imp.banner instead of imp

Please also document this endpoint change on the docs repo

Thanks for the comments; I've made the updates. How should we test this part? Be sure to test the integration with your ad server using the [Hello World](https://github.com/integrationExamples/gpt/hello_world.html) sample page. It seems the URL is not working.

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@tongwu-sh tongwu-sh marked this pull request as draft July 22, 2024 09:51
@patmmccann
Copy link
Collaborator

This looks good to me, if you pull in master you'll pass that viant test. I noticed you marked as draft so holding off on merge

Thanks!

switch (connection.type) {
case 'ethernet':
return 1;
case 'wifi':

Choose a reason for hiding this comment

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

Do we want to include "wimax" with this case?

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, added. And checked for chrome/edge looks like connection.type is not always there but connection.effectiveType has value. Updated to handle that case.

@patmmccann
Copy link
Collaborator

Hi @tongwu-sh ? It seems your adapter needs a tiny bit of additional maintenance: please move the common get connection logic in your adapter and prisma into a file in /libraries
It seems you also have a bug in your battr support; I think it is on imp.banner instead of imp
Please also document this endpoint change on the docs repo

Thanks for the comments; I've made the updates. How should we test this part? Be sure to test the integration with your ad server using the [Hello World](https://github.com/integrationExamples/gpt/hello_world.html) sample page. It seems the URL is not working.

Fixed, #12011

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@tongwu-sh tongwu-sh marked this pull request as ready for review July 24, 2024 02:34
@tongwu-sh
Copy link
Contributor Author

@patmmccann , we finished the test for this change, could you help merge it? Thanks!

@tongwu-sh
Copy link
Contributor Author

Hello @patmmccann , we finished tests for this change and ready to merge, could you help take another look at this PR? Thanks!

@patmmccann patmmccann merged commit d6a58ae into prebid:master Jul 26, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants