feat(deploy): CDN bundle sync script and self-hosting docs - #23
Open
Fiona2016 wants to merge 2 commits into
Open
feat(deploy): CDN bundle sync script and self-hosting docs#23Fiona2016 wants to merge 2 commits into
Fiona2016 wants to merge 2 commits into
Conversation
Self-hosting environments need a complete, coherent copy of the deployed bundles, and the standard RUM bundle references hash-named chunk files that are error-prone to collect by hand. The script downloads every entry bundle by name and recovers the chunk names from the chunk table webpack embeds in each entry bundle, over plain HTTPS with no credentials, and fails loudly when any file is missing. The bucket layout and the entry filenames move into deploymentUtils.js so the upload and download sides share one definition.
The README pointed at a placeholder static host without saying where released bundles actually live, and still claimed the package had never been verified on a real browser engine. Document the CDN layout and the sync-bundles workflow for self-hosting, and record the real-browser verification outcome: IE 9, 10 and 11 pass every check in the verification page, and IE 6 and IE 8 degrade to a silent no-op.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #22 (the rum-legacy README this touches lands there); GitHub will retarget this PR to
mainautomatically once #22 merges.What
scripts/deploy/sync-bundles.js: downloads the deployed bundles from the CDN into a local directory, for serving them from another origin. Entry bundles are fetched by name; the hash-named chunk files of the standard RUM bundle are recovered from the chunk table webpack embeds in the entry bundle, so a synced directory is always complete and coherent. No credentials needed; any missing file fails the run loudly.lib/deploymentUtils.js, shared by the upload (deploy-oss.js) and download sides so they cannot drift apart.packages/rum-legacy/README.md: documents where released bundles live (CDN major-version directory), the self-hosting workflow, and updates the verification status — the claim that the package had never run on a real browser engine is no longer true.Verified
Ran the script against the production CDN: all three released entry bundles plus both chunk files downloaded (chunk-table extraction confirmed against the deployed artifact), and the not-yet-released
fc-rum-legacy.jswas reported as HTTP 404 with a non-zero exit — both the success and the failure paths exercised.