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

prebidServerBidAdapter cleanup #2844

Merged
merged 5 commits into from
Aug 7, 2018
Merged

prebidServerBidAdapter cleanup #2844

merged 5 commits into from
Aug 7, 2018

Conversation

jaiminpanchal27
Copy link
Collaborator

Type of change

  • Refactoring (no functional changes, no api changes)

Description of change

Fixes #2420

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

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

Overall these changes LGTM. I wonder if we can reconsider the file name s2sVendors.js to something more generic. It's handling the s2sVendor config as well as typeParams that are used by the s2sBidders.

Additional thought, if we name it something config oriented - maybe we could move the s2sconfig stuff in there as well so that it can be easily referenced by any potential files down the road.

@jsnellbaker jsnellbaker added the needs 2nd review Core module updates require two approvals from the core team label Jul 13, 2018
@mkendall07 mkendall07 requested review from snapwich and harpere July 16, 2018 15:54
Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Will want to get feedback from someone at Rubicon as well.

}
}

export const paramTypes = {
Copy link
Member

@mkendall07 mkendall07 Jul 16, 2018

Choose a reason for hiding this comment

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

I do wonder if these belong here. Seems like we've split up transformation in 2 places now (in the bidder transformBidParams function and here). I do like these centralized since it's more of a problem with PBS / PBJS being in sync but wondering if they belong here or not.

Copy link
Collaborator

@snapwich snapwich left a comment

Choose a reason for hiding this comment

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

I'm not sure what the purpose is of having the config pulled out into a separate module that is then explicitly imported into the s2s module. That just means it will always be included with s2s and it might do weird things since the build process still considers a separate module (an entry point in webpack).

I'm pretty sure when I implemented the module system using webpack entry points I mentioned this as something that could not be supported in this fashion (modules directly importing other modules). However, maybe if I understand the intent better I can suggest an alternative.

@mkendall07
Copy link
Member

@jaiminpanchal27
Is the intent just to reduce the size of the PrebidServer adapter? I missed the fact that this file is under /modules. Probably needs to move to core or put back into PrebidServer file per Rich's comments.

@jaiminpanchal27
Copy link
Collaborator Author

yes intent is to not have any bidder specific hardcoded stuff in prebidServerAdapter. We do not have any base factory for this so have done it like how amp does with its vendors. https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/0.1/callout-vendors.js

@snapwich What are your suggestions ? If we add it to core will it be added to build when prebidServerAdapter is not added to build ?

@snapwich
Copy link
Collaborator

If you include it in core it will be auto include. if you want to conditionally include it then it is correct to have it as a module; however if you explicitly require it from another module (with import) then it's no longer conditional and it will be auto-included (when you include that other module, prebidServerBidAdapter in this case).

You'll need to do something like the currency module where it is included separately but then uses hooks to modify functionality, or you can do something like the express module where it exposes a function on the pbjs global and then code outside of the express module looks for it and runs it if present.

Copy link
Collaborator

@snapwich snapwich left a comment

Choose a reason for hiding this comment

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

LGTM

*
* @param {string} typeToConvert The target type. e.g. "string", "number", etc.
* @param {*} value The value to be converted into typeToConvert.
*/
Copy link
Member

@mkendall07 mkendall07 Aug 7, 2018

Choose a reason for hiding this comment

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

this is missing a return type

@mkendall07 mkendall07 merged commit 4682ae3 into master Aug 7, 2018
florevallatmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Sep 6, 2018
* prebidServerBidAdapter cleanup

* move module

* wip

* remove commented code
StefanWallin pushed a commit to mittmedia/Prebid.js that referenced this pull request Sep 28, 2018
* prebidServerBidAdapter cleanup

* move module

* wip

* remove commented code
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
* prebidServerBidAdapter cleanup

* move module

* wip

* remove commented code
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
* prebidServerBidAdapter cleanup

* move module

* wip

* remove commented code
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
* prebidServerBidAdapter cleanup

* move module

* wip

* remove commented code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs update needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants