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

[Sharethrough] Add new Sharethrough Adapter #903

Merged
merged 31 commits into from
Jun 5, 2019
Merged

[Sharethrough] Add new Sharethrough Adapter #903

merged 31 commits into from
Jun 5, 2019

Conversation

maphe
Copy link
Contributor

@maphe maphe commented May 15, 2019

Sharethrough is adding a new adapter.

This follows guidelines from http://prebid.org/prebid-server/developers/add-new-bidder.html

maphe and others added 27 commits March 18, 2019 16:43
Updating from head repo
#164291358

Co-authored-by: Josh Becker <[email protected]>
[#164291358]

Co-authored-by: Josh Becker <[email protected]>
[#164291358]

Co-authored-by: Josh Becker <[email protected]>
[#164291358]

Co-authored-by: Josh Becker <[email protected]>
[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>
[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>
[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>
Initial implementation for STR Adapter
todo? replace server name by server id?

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>
* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]
* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement unit tests for utils

[#165891351]

* Add UT for utils + butler

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Attempt for testing Bidder interface function implementations

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Finalizing Unit tests

[#165891351]

Co-authored-by: Chris Nguyen <[email protected]>
Co-authored-by: Josh Becker <[email protected]>

* Fixing sharethrough.yaml capabilities

[#165891351]

Co-authored-by: Josh Becker <[email protected]>
[#164911891]

Co-authored-by: Josh Becker <[email protected]>
… sharethrough_master

# Conflicts:
#	exchange/adapter_map.go
#	openrtb_ext/bidders.go
hhhjort
hhhjort previously approved these changes Jun 3, 2019
josephveach
josephveach previously approved these changes Jun 3, 2019
adapters/sharethrough/sharethrough.go Outdated Show resolved Hide resolved
adapters/sharethrough/butler.go Show resolved Hide resolved
adapters/sharethrough/butler.go Outdated Show resolved Hide resolved
adapters/sharethrough/butler.go Show resolved Hide resolved
adapters/sharethrough/butler.go Show resolved Hide resolved
adapters/sharethrough/butler.go Outdated Show resolved Hide resolved
adapters/sharethrough/butler.go Outdated Show resolved Hide resolved
adapters/sharethrough/sharethrough.go Outdated Show resolved Hide resolved
adapters/sharethrough/utils.go Outdated Show resolved Hide resolved
Optimizations, clean up suggested by @mansinahar
@maphe maphe dismissed stale reviews from josephveach and hhhjort via 5aac9ec June 3, 2019 22:29
@maphe
Copy link
Contributor Author

maphe commented Jun 3, 2019

Thank you @mansinahar for the feedbacks and suggestions, I was able to address everything beside getting the right prebid-server version; that won't break anything though, we would just log incorrect data on our side but we could live with it until we find a way to get the correct value

@mansinahar
Copy link
Contributor

@maphe Thank you. Appreciate the PR :)

* Addressing June 4th review from #903

Clean up canAutoPlayVideo + hardcode bhVersion to unknown for now...

* Removing hbVersion butler param since it's not accessible
@maphe
Copy link
Contributor Author

maphe commented Jun 4, 2019

@hhhjort @mansinahar @guscarreon @josephveach thanks again for your help and reviews, everything has been addressed at this point. Hopefully this is in an approvable state, trying to make it into the next release...

@mansinahar
Copy link
Contributor

@maphe Thanks for addressing all the comments. There's just one other minor comment you might wanna take care of. Other than that it LGTM!

@maphe
Copy link
Contributor Author

maphe commented Jun 4, 2019

Thanks @mansinahar, this is addressed now 👍

@maphe
Copy link
Contributor Author

maphe commented Jun 5, 2019

Would any of you be able to provide an ETA for when we can expect the PR to be merged? assuming there are no more changes required...

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

@hhhjort hhhjort merged commit 71915a4 into prebid:master Jun 5, 2019
@josephveach
Copy link
Contributor

@maphe Apologies for reopening this issue: We all failed to notice that, assuming your adapter makes HTTP calls using standard JSON, there should be tests in adapters/sharethrough/sharethroughtest/ using the tool described here: https://github.com/prebid/prebid-server/blob/master/adapters/adapterstest/test_json.go#L50 and referenced here: https://github.com/prebid/prebid-server/blob/master/docs/developers/automated-tests.md under Adapter Tests. Please see pretty much any other adapter's code in the corresponding directory for examples.

Such tests can detect a wide range of issues and also serve to help other people understand what is and is not supposed to work as a request for your adapter. Can you please submit some of these types of tests when you get a chance, or let us know if they would not be applicable?

@maphe
Copy link
Contributor Author

maphe commented Jun 13, 2019

@josephveach thanks for reaching out, I'm looking at the links you shared, although I'm not sure it applies to us. Our adapter actually uses query params and not JSON body, as you can see around this line https://github.com/prebid/prebid-server/blob/master/adapters/sharethrough/butler.go#L88

Can you confirm we cannot leverage this test framework for our adapter?

mgloystein added a commit to spotx/prebid-server that referenced this pull request Jun 14, 2019
* Use the correct labels for cache performance metric (prebid#904)

* PubMatic Adslot validation (prebid#886)

* testing a few changes to validate adslot, more to follow

* Changed AdSlot to optional parameter, modified validation and test cases for the same

* removed imp id from adslot validation error msgs

* assign banner size

* remove TrimSpace where it is not needed as recommended in the review

* Implementation of Categories Http fetcher (prebid#882)

* Implementation of Categories Http fetcher

-Added code to fetch data using http
-Added previously loaded categories to run http request just at the first time

* Moved common Category struct to stored_request

* Added comments

* Minor refactoring

* Minor refactoring

-Added verification if category exist in map

* Minor refactoring

* Minor refactoring

-strings.Replace changed to strings.TrimSuffix

* Improved error handling on Beachfront adapter (prebid#873)

* Removed a redundant error message that was causing some confusion.

* trying to turn '[]' into null and 200 inti 404

* not a goot path

* looking at the status codes

* I think I have covers all these bases.

* checking for empty array response a failing sanely

* removed an attempt to pointlessly reset the status code.

* corrected and added test cases

* Fix Rubicon bidder for multi-format impression processing (prebid#902)

* Replace Dockerfile Alpine linux with Ubuntu (prebid#885)

* Ubuntu dockerfile works, includes backups and out file

* Ubuntu Dockerfile creates image successfully and prebid-server was tested with a sample request. Seems to work fine

* Ubuntu 18.04 now builds, validates.sh, and curls sample request successfully

* Removed sed command

* [fix] broken Go 1.9 compatibility (prebid#910)

This CL addresses Go 1.9 compatibility issue along with adding back Go
1.9 to travis testing setup to prevent such bugs.

Issue: prebid#895

* Fixed "invalid BidType: " error for lifestreet adapter (prebid#893)

* Fixed "invalid BidType: " error for lifestreet adapter

* After run gofmt

* Used standard bid.ext type to get bid.ext.prebid.type

* [Currency support] Activate multi-currencies support (prebid#894)

This CL is the last piece to activate currency conversion support in
PBS. It activates currency support per default.

Currency rates will be fetched once per hour (PrebidJS file is updated
once a day).

Issue: prebid#280

* ImproveDigital adapter: (prebid#887)

- Add support for video
 - Add support for mobile/app
 - Add support for multibid responses
 - Extend optional parameters

* Add a PI exemption environment variable to PBS (prebid#916)

* Refactored to official name of config item

* Changes suggested by Mansi Nahar

* [Sharethrough] Add new Sharethrough Adapter (prebid#903)

* wip

* wip

* wip

* exploration for sharethrough prebid-server

* WIP: updating sharethrough adapter to latest prebid version

Co-authored-by: Chris Nguyen <[email protected]>

* WIP: adding butler params to the request

#164291358

Co-authored-by: Josh Becker <[email protected]>

* Manage bid sizes

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Manage GDPR

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Populate prebid-server version if provided

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Refactor gdpr data extraction from request

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Add instant play capability

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Split in multiple files

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Add s2s-win beacon
todo? replace server name by server id?

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Removing `server` param in s2s-win beacon (will be added in imp req)

[#164291358]

* Clean up code + enable syncer (prebid#4)

[#165257793]

* Proper error handling (prebid#6)

* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement Unit Tests (prebid#7)

* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement unit tests for utils

[#165891351]

* Add UT for utils + butler

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Attempt for testing Bidder interface function implementations

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Finalizing Unit tests

[#165891351]

Co-authored-by: Chris Nguyen <[email protected]>
Co-authored-by: Josh Becker <[email protected]>

* Fixing sharethrough.yaml capabilities

[#165891351]

Co-authored-by: Josh Becker <[email protected]>

* Send supplyId to imp req instead of hbSource (prebid#5)

[#165477915]

* Finalize PR (prebid#8)

[#164911891]

Co-authored-by: Josh Becker <[email protected]>

* Remove test setting

* Add Sharethrough in syncer_test

* Update deserializing of third party partners

* Refactor/optimize UserAgent parsing (prebid#9)

following josephveach's review in prebid#903

* Addressing June 3rd review from prebid#903

Optimizations, clean up suggested by @mansinahar

* Addressing June 4th review from prebid#903 (prebid#10)

* Addressing June 4th review from prebid#903

Clean up canAutoPlayVideo + hardcode bhVersion to unknown for now...

* Removing hbVersion butler param since it's not accessible

* Fix adMarkup error handling

* [Mgid] Add new Mgid Adapter (prebid#907)

* new mgid adapter

* increase coverage

* remove extra imports

* Cache validation fix (prebid#911)

* Cache validation fix

if no bids returned - don't throw cache error, just return empty result

* Cache validation fix

- optimization: do not run auction logic if no bids returned

* Cache validation fix: minor refactoring

* Cache validation fix: minor refactoring

* Cache validation fix: added unit test for no bids returned

* Cache validation fix: minor refactoring

* Remove hard coded targeting keys (prebid#923)
@josephveach
Copy link
Contributor

@maphe Confirmed. There's no need for the JSON tests given how your adapter behaves. Sorry about the false alarm!

@maphe
Copy link
Contributor Author

maphe commented Jun 14, 2019

Cool, thanks @josephveach

@hhhjort
Copy link
Collaborator

hhhjort commented Jun 14, 2019

Actually, you may be able to/ the adapters/adaptertest/test_josn.go:218 diffHttpRequests() function will compare URIs directly, and the bodies separately. I am guessing that setting the expected body to be an empty string, may match the actual empty body you generate, and thus pass the test. It would definitely test that you are generating the correct URIs.

@maphe
Copy link
Contributor Author

maphe commented Jun 14, 2019

Fair enough, I'll try it out...

@maphe
Copy link
Contributor Author

maphe commented Jun 14, 2019

@josephveach @hhhjort just a heads up, I pushed a new PR that fixes a more urgent separate issue (#938), it does not have what was discussed above. I'll try this test_json stuff next week and push another PR if relevant, I'll let you know. Thanks again

katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 1, 2020
* wip

* wip

* wip

* exploration for sharethrough prebid-server

* WIP: updating sharethrough adapter to latest prebid version

Co-authored-by: Chris Nguyen <[email protected]>

* WIP: adding butler params to the request

#164291358

Co-authored-by: Josh Becker <[email protected]>

* Manage bid sizes

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Manage GDPR

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Populate prebid-server version if provided

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Refactor gdpr data extraction from request

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Add instant play capability

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Split in multiple files

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Add s2s-win beacon
todo? replace server name by server id?

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Removing `server` param in s2s-win beacon (will be added in imp req)

[#164291358]

* Clean up code + enable syncer (#4)

[#165257793]

* Proper error handling (#6)

* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement Unit Tests (#7)

* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement unit tests for utils

[#165891351]

* Add UT for utils + butler

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Attempt for testing Bidder interface function implementations

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Finalizing Unit tests

[#165891351]

Co-authored-by: Chris Nguyen <[email protected]>
Co-authored-by: Josh Becker <[email protected]>

* Fixing sharethrough.yaml capabilities

[#165891351]

Co-authored-by: Josh Becker <[email protected]>

* Send supplyId to imp req instead of hbSource (#5)

[#165477915]

* Finalize PR (#8)

[#164911891]

Co-authored-by: Josh Becker <[email protected]>

* Remove test setting

* Add Sharethrough in syncer_test

* Update deserializing of third party partners

* Refactor/optimize UserAgent parsing (#9)

following josephveach's review in prebid#903

* Addressing June 3rd review from prebid#903

Optimizations, clean up suggested by @mansinahar

* Addressing June 4th review from prebid#903 (#10)

* Addressing June 4th review from prebid#903

Clean up canAutoPlayVideo + hardcode bhVersion to unknown for now...

* Removing hbVersion butler param since it's not accessible

* Fix adMarkup error handling
katsuo5 pushed a commit to flux-dev-team/prebid-server-1 that referenced this pull request Dec 2, 2020
* wip

* wip

* wip

* exploration for sharethrough prebid-server

* WIP: updating sharethrough adapter to latest prebid version

Co-authored-by: Chris Nguyen <[email protected]>

* WIP: adding butler params to the request

#164291358

Co-authored-by: Josh Becker <[email protected]>

* Manage bid sizes

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Manage GDPR

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Populate prebid-server version if provided

[#164291358]

Co-authored-by: Josh Becker <[email protected]>

* Refactor gdpr data extraction from request

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Add instant play capability

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Split in multiple files

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Add s2s-win beacon
todo? replace server name by server id?

[#164291358]

Co-authored-by: Eddy Pechuzal <[email protected]>

* Removing `server` param in s2s-win beacon (will be added in imp req)

[#164291358]

* Clean up code + enable syncer (#4)

[#165257793]

* Proper error handling (#6)

* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement Unit Tests (#7)

* Proper error handling

[#165745574]

* Address review (baby clean up) + catch error that was missed

[#165745574]

* Implement unit tests for utils

[#165891351]

* Add UT for utils + butler

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Attempt for testing Bidder interface function implementations

[#165891351]

Co-authored-by: Michael Duran <[email protected]>

* Finalizing Unit tests

[#165891351]

Co-authored-by: Chris Nguyen <[email protected]>
Co-authored-by: Josh Becker <[email protected]>

* Fixing sharethrough.yaml capabilities

[#165891351]

Co-authored-by: Josh Becker <[email protected]>

* Send supplyId to imp req instead of hbSource (#5)

[#165477915]

* Finalize PR (#8)

[#164911891]

Co-authored-by: Josh Becker <[email protected]>

* Remove test setting

* Add Sharethrough in syncer_test

* Update deserializing of third party partners

* Refactor/optimize UserAgent parsing (#9)

following josephveach's review in prebid#903

* Addressing June 3rd review from prebid#903

Optimizations, clean up suggested by @mansinahar

* Addressing June 4th review from prebid#903 (#10)

* Addressing June 4th review from prebid#903

Clean up canAutoPlayVideo + hardcode bhVersion to unknown for now...

* Removing hbVersion butler param since it's not accessible

* Fix adMarkup error handling
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