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: RichAudience #2001

Merged
merged 16 commits into from
Oct 22, 2021
Merged

New Adapter: RichAudience #2001

merged 16 commits into from
Oct 22, 2021

Conversation

richaudience
Copy link
Contributor

New Adapter: RichAudience

adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
exchange/adapter_builders.go Outdated Show resolved Hide resolved
static/bidder-info/richaudience.yaml Outdated Show resolved Hide resolved
openrtb_ext/imp_richaudience.go Outdated Show resolved Hide resolved
Copy link
Contributor

@VeronikaSolovei9 VeronikaSolovei9 left a comment

Choose a reason for hiding this comment

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

@richaudience Thank you for addressing my comments, I appreciate you cooperation and patience. I re-reviewed updates and added some more comments.

adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
@VeronikaSolovei9
Copy link
Contributor

May I ask you to add a test where there are 2 or more imps in request?

Copy link
Contributor

@AlexBVolcy AlexBVolcy left a comment

Choose a reason for hiding this comment

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

I noticed you didn't comment a link to your docs PR? Do you mind posting a link to that and if you don't have a docs PR could you make one? Thanks!

@richaudience
Copy link
Contributor Author

Hi Alex,

I send the pull request where you will see the documentation

prebid/prebid.github.io#3302

Copy link
Contributor

@SyntaxNode SyntaxNode left a comment

Choose a reason for hiding this comment

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

I appreciate the extensive test coverage. The coded tests other than TestJsonSamples and TestGetBuilder are not necessary in our opinion. For code coverage, we only consider the json tests since we have extra protection and tests built into that framework. I consider TestResponseOK particularly overkill, as one of the reasons we built the json test framework is to avoid this situation of walls of json hardcoded as strings in test code.

adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/params_test.go Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
static/bidder-info/richaudience.yaml Outdated Show resolved Hide resolved
- banner
userSync:
iframe:
url: "https://sync.richaudience.com/74889303289e27f327ad0c6de7be7264/?consentString={{.GDPRConsent}}&r={{.RedirectURL}}[PDID]"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of [PDID] at the end of the url? This looks like it will cause the redirect url to be incorrectly formed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in next commit i have solved

For us this macro is correct, i will not change this

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the correct way to specify the macro. It only works due to coincidental positioning of the fields of the default redirect url template . Please see: https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#bidder-info

Please remove [PDID] from the url and add it as a userMacro config:

url: "https://sync.richaudience.com/74889303289e27f327ad0c6de7be7264/?consentString={{.GDPRConsent}}&r={{.RedirectURL}}"
userMacro: "[PDID]"

static/bidder-params/richaudience.json Outdated Show resolved Hide resolved
static/bidder-params/richaudience.json Show resolved Hide resolved
@richaudience
Copy link
Contributor Author

Hi

Thanks for your comments, I have push a new commit to apply the recommended changes

Cheers

@richaudience
Copy link
Contributor Author

Can you tell me why the compilation is failing in this point? In my tests it does not fail.
TestTrimCookiesClosestExpirationDates

@SyntaxNode
Copy link
Contributor

Can you tell me why the compilation is failing in this point? In my tests it does not fail. TestTrimCookiesClosestExpirationDates

That's a flaky test not related to your code. Don't worry about it.

openrtb_ext/imp_richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
@VeronikaSolovei9
Copy link
Contributor

In documentation here https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/richaudience.md you mentioned: supported media types: banner and video. In code I can only see support for banner. Please update documentation to avoid ambiguity.
Also from previous discussion: #2001 (comment)

@richaudience
Copy link
Contributor Author

In documentation here https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/richaudience.md you mentioned: supported media types: banner and video. In code I can only see support for banner. Please update documentation to avoid ambiguity. Also from previous discussion: #2001 (comment)

We are not video compatible for prebid server, but we will be soon. There is no need to generate confusion in the documentation.
Thank you for your recommendation.

Cheers

guscarreon
guscarreon previously approved these changes Oct 8, 2021
Copy link
Contributor

@guscarreon guscarreon left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for addressing the comments

adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
adapters/richaudience/richaudience_test.go Outdated Show resolved Hide resolved
- banner
userSync:
iframe:
url: "https://sync.richaudience.com/74889303289e27f327ad0c6de7be7264/?consentString={{.GDPRConsent}}&r={{.RedirectURL}}[PDID]"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the correct way to specify the macro. It only works due to coincidental positioning of the fields of the default redirect url template . Please see: https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#bidder-info

Please remove [PDID] from the url and add it as a userMacro config:

url: "https://sync.richaudience.com/74889303289e27f327ad0c6de7be7264/?consentString={{.GDPRConsent}}&r={{.RedirectURL}}"
userMacro: "[PDID]"

static/bidder-info/richaudience.yaml Outdated Show resolved Hide resolved
@richaudience
Copy link
Contributor Author

everything is ok, what is missing so that you can upload the adapter?

@SyntaxNode
Copy link
Contributor

The changes look good.

Please revisit my comments on the request data structure. You also need to fix the user macro configuration of the user sync in the bidder yaml file.

@richaudience
Copy link
Contributor Author

Hi,

I have modified the two requests you had, please check the code.

Cheer

Copy link
Contributor

@SyntaxNode SyntaxNode left a comment

Choose a reason for hiding this comment

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

Thank you for your updates. The json test coverage looks good as does the code updates. I left a few nitpicks for misleading function names and a behavior change request for bid floor currency handling. The rest looks good to me.

adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Outdated Show resolved Hide resolved
adapters/richaudience/richaudience.go Show resolved Hide resolved
@richaudience
Copy link
Contributor Author

I have applied the latest changes, please check.

Copy link
Contributor

@SyntaxNode SyntaxNode left a comment

Choose a reason for hiding this comment

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

Excellent. Thank you. The code looks good to me now. I have a few final comments after closely reviewing the tests.

Copy link
Contributor

@guscarreon guscarreon left a comment

Choose a reason for hiding this comment

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

LGTM

@SyntaxNode SyntaxNode merged commit d7d4b8b into prebid:master Oct 22, 2021
mansinahar pushed a commit to mansinahar/prebid-server that referenced this pull request Jan 18, 2022
Co-authored-by: sgimenez <sergi.gimenez@richaudience.com>
jorgeluisrocha pushed a commit to jwplayer/prebid-server that referenced this pull request Sep 28, 2022
Co-authored-by: sgimenez <sergi.gimenez@richaudience.com>
shunj-nb pushed a commit to ParticleMedia/prebid-server that referenced this pull request Nov 8, 2022
Co-authored-by: sgimenez <sergi.gimenez@richaudience.com>
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