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: Nativo #3790

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

New Adapter: Nativo #3790

wants to merge 16 commits into from

Conversation

rafataveira
Copy link

No description provided.

Copy link

github-actions bot commented Jul 3, 2024

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, 8c798c9

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:48:	MakeBids		92.9%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:89:	getMediaTypeForImp	100.0%
total:									(statements)		93.8%

@rafataveira
Copy link
Author

@onkarvhanumante Is there any ETA for reviewing this PR?
When is the next version expected to be released?
TIA

@onkarvhanumante
Copy link
Contributor

onkarvhanumante commented Aug 1, 2024

@rafataveira PR tests are failing due to file miss format. Requesting to format files

Run ./validate.sh --nofmt --cov --race 10
gofmt needs to be run, 2 files have issues.  Below is a list of files to review:
adapters/nativo/nativo.go
adapters/nativo/nativo_test.go

@ashishshinde-pubm
Copy link
Contributor

@rafataveira Does this bidder supports request.test parameter and respond with dummy response ? or is there any way this bidder can return dummy response for test purpose ?

@@ -0,0 +1,19 @@
endpoint: "https://exchange.postrelease.com/esi?ntv_epid=7"
maintainer:
email: "[email protected]"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I've sent an email to this address to confirm it is correct. Please respond to the email with a "received" message.

Copy link
Author

Choose a reason for hiding this comment

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

It is correct. I've just replied to the email.

Copy link
Collaborator

Choose a reason for hiding this comment

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

mail confirmed

"title": "Nativo Adapter Params",
"description": "A schema which validates params accepted by the Nativo adapter",
"type": "object",

Copy link
Collaborator

Choose a reason for hiding this comment

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

NIP, please delete white line

Copy link
Author

Choose a reason for hiding this comment

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

done


func TestBidderNativo(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderNativo, config.Adapter{
Endpoint: "https://foo.io/?src=prebid"},
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is it "https://foo.io/?src=prebid" ?
It should be endpoint from yaml

Copy link
Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,19 @@
endpoint: "https://exchange.postrelease.com/esi?ntv_epid=7"
Copy link
Collaborator

Choose a reason for hiding this comment

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

"esi?ntv_epid=7" does not look fine

Copy link
Author

Choose a reason for hiding this comment

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

this is correct, that's the url to our exchange server, in this case, prebid server.

@rafataveira
Copy link
Author

@onkarvhanumante I will review all comments and make the changes accordingly.

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, 46e7869

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:48:	MakeBids		92.9%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:89:	getMediaTypeForImp	100.0%
total:									(statements)		93.8%

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, 3e8a7db

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:48:	MakeBids		92.9%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:89:	getMediaTypeForImp	100.0%
total:									(statements)		93.8%

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

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:19:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:26:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:46:	MakeBids		83.3%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:83:	getMediaTypeForImp	88.9%
total:									(statements)		86.1%

@bsardo
Copy link
Collaborator

bsardo commented Sep 9, 2024

Hi @rafataveira, your tests are failing because you need to run go fmt.

Copy link

github-actions bot commented Sep 9, 2024

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

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:19:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:26:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:46:	MakeBids		83.3%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:83:	getMediaTypeForImp	88.9%
total:									(statements)		86.1%

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, 5d3c8bb

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:19:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:26:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:46:	MakeBids		83.3%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:83:	getMediaTypeForImp	88.9%
total:									(statements)		86.1%

@onkarvhanumante
Copy link
Contributor

@rafataveira , redirect url is not working

@przemkaczmarek could you check if redirect url is working for you

http://jadserve.postrelease.com/suid/101787?gdpr=&gdpr_consent=&us_privacy=&ntv_gpp_consent=&ntv_r=https%3A%2F%2Fprebid.adnxs.com%2Fpbs%2Fv1%2Fsetuid%3Fbidder%3DNativo%26gdpr%3D%26gdpr_consent%3D%26f%3Di%26uid%3D%22NTV_USER_ID%22

@rafataveira
Copy link
Author

@onkarvhanumante you need to use the secure url https:// provided in the nativo.yaml instead of http://

https://jadserve.postrelease.com/suid/101787?gdpr=&gdpr_consent=&us_privacy=&ntv_gpp_consent=&ntv_r=https%3A%2F%2Fprebid.adnxs.com%2Fpbs%2Fv1%2Fsetuid%3Fbidder%3DNativo%26gdpr%3D%26gdpr_consent%3D%26f%3Di%26uid%3D%22NTV_USER_ID%22

@przemkaczmarek
Copy link
Collaborator

works:
image

przemkaczmarek
przemkaczmarek previously approved these changes Sep 25, 2024
@bsardo
Copy link
Collaborator

bsardo commented Sep 25, 2024

works: image

I see this 200 response as well but it is supposed to redirect (302) to the PBS setuid endpoint which is specified in your ntv_r parameter. @rafataveira

@rafataveira
Copy link
Author

@bsardo
Copy link
Collaborator

bsardo commented Sep 30, 2024

@bsardo This is the result of the redirect I get: https://prebid.adnxs.com/pbs/v1/setuid?bidder=Nativo&gdpr=&gdpr_consent=&f=i&uid=%22c0ed3c17-4ba0-4d2e-9cf2-cbf8f9037793%22 image

Hi @rafataveira, I suggest testing your user sync with localhost so that your bidder is known and so that you can ensure your server redirects to the setuid endpoint of the PBS host, which in this case will be the localhost setuid endpoint. Start this process by first hitting the localhost PBS cookie sync endpoint:
POST localhost:8000/cookie_sync with body {"bidders": ["nativo"]} and that will give you the url that would be dropped as a pixel kicking off the cookie sync that should ultimately redirect to the setuid endpoint.

Copy link

github-actions bot commented Oct 1, 2024

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

nativo

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:19:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:26:	MakeRequests		85.7%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:46:	MakeBids		83.3%
github.com/prebid/prebid-server/v2/adapters/nativo/nativo.go:83:	getMediaTypeForImp	88.9%
total:									(statements)		86.1%

@rafataveira
Copy link
Author

@bsardo This is the result of the redirect I get: https://prebid.adnxs.com/pbs/v1/setuid?bidder=Nativo&gdpr=&gdpr_consent=&f=i&uid=%22c0ed3c17-4ba0-4d2e-9cf2-cbf8f9037793%22 image

Hi @rafataveira, I suggest testing your user sync with localhost so that your bidder is known and so that you can ensure your server redirects to the setuid endpoint of the PBS host, which in this case will be the localhost setuid endpoint. Start this process by first hitting the localhost PBS cookie sync endpoint: POST localhost:8000/cookie_sync with body {"bidders": ["nativo"]} and that will give you the url that would be dropped as a pixel kicking off the cookie sync that should ultimately redirect to the setuid endpoint.

I found the issue with the double quotes on userMacro. Now it should work as expected.

@bsardo
Copy link
Collaborator

bsardo commented Oct 3, 2024

@rafataveira we're still seeing an issue with the user sync. Your server is responding with a 200. Since you've classified this user sync as type redirect, your server should be responding with a 302 redirect to the url defined in the ntv_r parameter with the user id macro populated.

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.

6 participants