-
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
Add Geoedge RTD provider submodule #5869
Conversation
* Add Geoedge RTD provider submodule accroding to RTD phase 3 * Add tests * Add docs * Add integration example * Add as child module of RTD for easier builds
@GeoEdge-r-and-d - sorry for the delay here. We just released a major revision to the Real-Time-Data infrastructure. You need to read https://docs.prebid.org/dev-docs/add-rtd-submodule.html and adjust your implementation. What your module is actually trying to do is not clear to me from the description, but here's what I gather:
If I have this right, you need to change your design:
|
@bretg Thank you very much for reviewing and providing this feedback! |
Also please create a docs pull request as described in https://docs.prebid.org/dev-docs/add-rtd-submodule.html#step-5-website-pull-request I made a round of revisions to that page so hopefully future sub-module authors will learn from this interaction. Would certainly appreciate your feedback. |
* Remove getConfig * Get params from init * Use beforeInit
Extend and document the wap param
@bretg Thank you very much! We changed the code to match your suggestions and the new RTD submodule doc. We also submitted a docs PR as described. |
modules/geoedgeRtdProvider.js
Outdated
/** @type {string} */ | ||
const SUBMODULE_NAME = 'geoedge'; | ||
/** @type {string} */ | ||
export const WRAPPER_URL = '//wrappers.geoedge.be/wrapper.html'; |
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.
Ok, structure of the module is looking better. Will assign someone to look deeper at the javascript. Now we have to talk about this external code. In order to protect publisher pages, Global Module Rule #1 is No External Code
. Looking at wrapper.html, it's pretty small, but it loads another file: https://rumcdn.geoedge.be/$%7Bkey%7D/grumi.js
.
You're going to have to figure out how to live within this Module Rule, basically, all code that's loaded must be inspectable, disclosed, and locked to a specific version so we know when you've changed it. Since the whole point of GeoEdge is to help protect publishers, I suspect you'll understand why this rule exists. :-)
If wrapper.html may be more-or-less static, you might consider including that right in this code. grumi.js probaby depends on the publisher, so for that you're going to need to A) open source it and B) lock it to a version, e.g. grumi-v1.js
If grumi.js needs data (e.g. malware patterns), you might consider:
- separate the code from the data. Loading data files is fine.
- make grumi.js as static as possible and put your application logic server-side
@Fawke - could you take a look at the .js and unit tests? I'll work with them on the external code. Thanks! |
The rules committee has approved the use of external code here with the condition of a prominent disclosure on the documentation.
I've added a draft to the docs PR prebid/prebid.github.io#2474 |
good news! thanks @bretg for bringing this up to the rules committee and fixing the docs! Are there any more changes needed from our side? |
@bretg Let me know if another reviewer is required here, I'll get someone from the team to review. |
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.
My review covers general structure, not detailed javascript interaction
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.
Hi @GeoEdge-r-and-d,
Overall, this looks good. Just look at my inline comments and also, I wanted to mention that you should hardcode the request that you're making for both wrapper.html
and grumi.js
to https
.
Relevant opening and inline comments
* Hardcode HTTPS scheme * Rename to "donePreload" for clarity * Use regex to replace macros instead of loop
Preload request scheme is now always HTTPS
@Fawke thanks for reviewing! We changed the code to match your requests. Please let us know if anything else is needed. |
Hi @GeoEdge-r-and-d, Thanks for making those changes. I think it's better if you remove the |
Thanks @Fawke, we can immediately remove the |
As for @Fawke request at #5869 (comment)
I think this is just the docs PR isn't it? prebid/prebid.github.io#2474 So I think we're done here. |
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
The example html page (the one with working examples of all RTD submodules) is not required for this PR, but good to have for testing. |
@bretg and @Fawke, thanks for reviewing and providing feedback. We see there's a pending request for review from @ncolletti, please let us know if anything else is needed from our side. thanks! |
Merging - our reviews are enough. |
* Add Geoedge RTD provider submodule * Add Geoedge RTD provider submodule accroding to RTD phase 3 * Add tests * Add docs * Add integration example * Add as child module of RTD for easier builds * Update RTD submodule interface See https://docs.prebid.org/dev-docs/add-rtd-submodule.html * Update tests * Update integration example remove unnecessary param * Update docs * Update RTD submodule provider * Remove getConfig * Get params from init * Use beforeInit * Update docs Extend and document the wap param * Update tests * Remove unused config module * Update integreation example Relevant opening and inline comments * Update Geoedge RTD submodule provider * Hardcode HTTPS scheme * Rename to "donePreload" for clarity * Use regex to replace macros instead of loop * Update tests Preload request scheme is now always HTTPS * Remove integration example HTML page As for @Fawke request at prebid#5869 (comment) Co-authored-by: daniel manan <mmndaniel@gmail.com> Co-authored-by: bretg <bgorsline@gmail.com>
Type of change
Description of change
Added new Geoedge RTD provider submodule to allow publishers to integrate Geoedge real time solution with Prebid.js.
Other information
#4610 #5519 @omerBrowsi @Asafsham