Skip to content

feat: deploy scenes in batches when the content server supports it - #1635

Open
LautaroPetaccio wants to merge 3 commits into
mainfrom
feat/partial-deployments
Open

LautaroPetaccio wants to merge 3 commits into
mainfrom
feat/partial-deployments

Conversation

@LautaroPetaccio

@LautaroPetaccio LautaroPetaccio commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What

sdk-commands deploy uploads scenes in size-bounded batches (decentraland/adr#325) when the catalyst client supports it, so scenes larger than the ~200 MB request ceiling can deploy to both Genesis City and Worlds. It prints progress per batch. Scenes under 50 MiB always upload in a single request, which is faster for small scenes.

  • If the server doesn't support partial deployments, it falls back to a single request when the scene is 200 MB or less, and fails with DEPLOY_PARTIAL_NOT_SUPPORTED otherwise.
  • Server rejections still go through DEPLOY_UPLOAD_FAILED with the server's response body.

The published dcl-catalyst-client (22.0.0) doesn't have deployPartial yet, so the CLI detects it at runtime and keeps doing single-request uploads until decentraland/catalyst-client#491 is released. Then bump the client in sdk-commands and run make sync-deps.

How to test

  • make build && make lint, then the sdk-commands tests (new test/sdk-commands/commands/deploy/upload.spec.ts).
  • Once the client is released: deploy a scene larger than 200 MB with sdk-commands deploy --target-content <worlds server> and check the batch progress lines and the final preview message.

Deploys go through dcl-catalyst-client's deployPartial (ADR-325) when the
installed client provides it, printing progress per batch. Servers
without partial deployment support get the single-request upload when
the scene fits in one request, and a clear error otherwise.

The published client (22.0.0) does not ship deployPartial yet, so it is
detected at runtime and the CLI keeps uploading in a single request
until the dependency is bumped to a release that includes it.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Deploying js-sdk-toolchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9ada7d0
Status:🚫  Build failed.

View logs

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/partial-deployments/dcl-sdk-7.30.2-38395469352.commit-2a2068c.tgz"
  • The @dcl/js-runtime package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/partial-deployments/@dcl/js-runtime/dcl-js-runtime-7.30.2-38395469352.commit-2a2068c.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/partial-deployments/dcl-sdk-commands-7.30.2-38395469352.commit-2a2068c.tgz"
    npx $SDK_COMMANDS init
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/feat/partial-deployments-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=feat/partial-deployments

Batching adds a round trip per batch plus the server's staging work, so
for small scenes a single request is faster. Deployments under 50 MiB
now always use deploy(); larger ones use deployPartial() when the client
has it, with the existing single-request fallback.
deploy used the client's default batch size of 100 MiB. A 150 MiB scene
therefore went out in two sequential requests, and the server stored
the first batch before the client sent anything else.

Batches are now 32 MiB, sent three at a time once the entity is staged,
so the server stores one batch while the next is still uploading. A file
is never split across batches, so a file larger than 32 MiB gets a
batch of its own size instead of failing the upload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant