This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
fix(server): devCDN should not crash when bundles are not present #1343
Closed
Conversation
This file contains 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
e.g. the legacy browser bundle is optional, not required
PixnBits
commented
Mar 26, 2024
Size Change: 0 B Total Size: 735 kB ℹ️ View Unchanged
|
code-forger
approved these changes
Mar 26, 2024
JAdshead
previously approved these changes
Mar 26, 2024
code-forger
suggested changes
Mar 26, 2024
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 Pr fixes a symptom, not a cause, the root cause is fixed elsewhere
PixnBits
commented
Mar 26, 2024
Comment on lines
+81
to
+89
Object | ||
.values(module) | ||
.filter((bundle) => Object.hasOwnProperty.call(bundle, 'url')) | ||
.forEach((bundle) => { | ||
/* eslint-disable-next-line no-param-reassign -- the in-memory copy is created here during | ||
// the read from network, so the replacement side-effect of this loop is local to the | ||
// consumeRemoteRequest function and not to any arguments */ | ||
bundle.url = bundle.url.replace(new URL(bundle.url).origin, oneAppDevStaticsAddress); | ||
}); |
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 where the test(s) for the previous implementation is/are, so this needs attention
superseding context though: #1343 (review)
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
The development CDN crashes when performing the substitution in the URL of a nonexistant bundle.
Motivation and Context
The legacy browser bundle is optional, not required.
How Has This Been Tested?
Unit tests added that have only one bundle each.
Types of Changes
Checklist:
What is the Impact to Developers Using One App?
Resolve the server crashing on them when running with modules that have not opted in to building the legacy browser bundles.