-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
modules/s2sVendors.js
Outdated
} | ||
} | ||
|
||
export const paramTypes = { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
@jaiminpanchal27 |
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 ? |
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. |
There was a problem hiding this 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. | ||
*/ |
There was a problem hiding this comment.
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
* prebidServerBidAdapter cleanup * move module * wip * remove commented code
* prebidServerBidAdapter cleanup * move module * wip * remove commented code
* prebidServerBidAdapter cleanup * move module * wip * remove commented code
* prebidServerBidAdapter cleanup * move module * wip * remove commented code
* prebidServerBidAdapter cleanup * move module * wip * remove commented code
Type of change
Description of change
Fixes #2420