feat: fetch scene files from asset bundle CDN instead of catalyst#7833
Open
decentraland-bot wants to merge 7 commits intodevfrom
Open
feat: fetch scene files from asset bundle CDN instead of catalyst#7833decentraland-bot wants to merge 7 commits intodevfrom
decentraland-bot wants to merge 7 commits intodevfrom
Conversation
…atalyst
When a scene has an asset bundle manifest version (i.e. it has been processed
by the asset-bundle-converter and is served from the registry), redirect
index.js and main.crdt downloads to the asset bundle CDN (S3) instead of
fetching them from the catalyst.
Changes:
- SceneHashedContentWithCDN: new ISceneContent decorator that overrides the
URL for the main script (index.js) to point to the CDN.
- LoadSceneSystemLogic: returns SceneHashedContentWithCDN when the scene has
an AB manifest, so the V8 runtime fetches index.js from the CDN.
- LoadSceneSystemLogicBase.LoadMainCrdtAsync: tries the CDN URL first for
main.crdt, falls back to the catalyst URL on any error (e.g. conversion
still in progress).
CDN URL pattern: {assetBundleURL}{abVersion}/{entityId}/{fileName}
This eliminates a class of incidents where a scene marked as fallback could
not load because its index.js or main.crdt files were missing from the
catalyst.
Closes #7625
Contributor
|
Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. |
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.
Pull Request Description
What does this PR change?
Extends CDN redirection to cover all three scene files (
index.js,scene.json,main.crdt) instead of justindex.js. Before using CDN URLs, performs parallel HEAD requests to validate all three files exist on the CDN. If any file is missing, falls back entirely to catalyst (all-or-nothing strategy). Also simplifiesLoadMainCrdtAsync— CDN resolution is now handled uniformly bySceneHashedContentWithCDN.Scenes marked as
fallbackcould fail to load because files were missing from the catalyst. Routing requests to the CDN — where theasset-bundle-converteruploads them — eliminates this class of failure.Addresses #7625
Test Instructions
Prerequisites
assetBundleManifestVersionsetTest Steps
index.js,scene.json,main.crdt) are served from CDN (check logs)assetBundleManifestVersionAdditional Testing Notes
{assetBundleURL}/{abVersion}/{entityId}/{fileName}Quality Checklist
Code Review Reference
Please review our Code Review Standards before submitting.
🤖 Generated with Claude Code