Determine the best way to serve the visual review toolbar — CDN edition
Background
The Visual Review Tools are a standalone script that users can include in their review apps. It injects a cute little feedback box that users can use to post back to the MR that spawned the request. More about how it works..
Right now it looks like this:
A working example is available at https://review-app-test.sarahghp.now.sh/ and it posts to sarahghp/review-app-tester!1. I recommend posting poetry.
Initial Question
Right now, we are using gitlab.com
as a CDN for the Visual Review Toolbar. We build it with Webpack and host it at https://gitlab.com/assets/webpack/visual_review_toolbar.js. That's okay for an iterative MVC, but probably not a permanent solution, especially since the Visual Review tools are being moved to their own project (see https://gitlab.com/gitlab-org/gitlab-ce/issues/62442).
So, what's the best way to do this going forward? How does it relate to our caching question (https://gitlab.com/gitlab-org/gitlab-ce/issues/62468)?
Current Options
- Leave it as it is. Just open MRs against Gitlab from the separate project for the minimized script when ready for a new deploy. This will keep it aligned with the general release process.
- Do something to make it more CDN friendly but keep it in the primary Gitlab assets collection.
- Use https://unpkg.com/ only. Because we want to create an NPM package to facilitate more-automated deployments of the script, we'd like to create an NPM package. (See visual-review-tools#2 (closed)). Should we then just point people to Unpkg? This has the virtue of a single, easy release point but maybe we don't just want to rely on a third-party service, especially one separate from the rest of our CDN?
- Both Unpkg and through the current Gitlab CDN setup.
- Something I have not considered, but that you can suggest!