Skip to content

fix: include folder entries in deploy zip count to match server limit @W-24345651@ - #1844

Merged
soridalac merged 1 commit into
mainfrom
wr/fixZipEntryCount
Oct 1, 2026
Merged

soridalac merged 1 commit into
mainfrom
wr/fixZipEntryCount

Conversation

@WillieRuemmele

Copy link
Copy Markdown
Member

Summary

  • The Metadata API server counts all zip entries (files + folders) toward the 10,000 limit, but the CLI only counted files in its warning threshold check
  • This caused the warning to undercount (Scenario A in the issue) or not fire at all (Scenario B) for folder-heavy projects like those with many LWC bundles
  • Now both code paths (mdapiPath directory zip and ComponentSet converter zip) include directory entries in the count

Fixes forcedotcom/cli#3655

Work Item

@W-24345651@: Deploy zip file count doesn't match the server's: folder entries count toward the 10,000 limit

Proof of Work

  • Tests: all passing (including new entryCount test)
  • Lint: clean
  • Type check: clean
  • Build: clean

Test plan

  • Deploy a project with many LWC bundles where file count < 8000 but file+folder count > 8000 — verify warning now fires
  • Deploy a project where file+folder count > 10000 — verify the warning count matches the server's rejection count
  • Deploy a small project — verify no spurious warnings

… @W-24345651@

The Metadata API server counts all zip entries (files + folders) toward
the 10,000 limit, but the CLI only counted files. This caused the
warning threshold to undercount and sometimes not fire at all when
folder-heavy projects (e.g. many LWC bundles) exceeded the limit.
@soridalac

Copy link
Copy Markdown
Member

QA notes:
Tested on: dreamhouse-lwc + generated LWC project

✅ Source deploy: zipFileCount 113 → 148 (files + directories counted)
✅ mdapi deploy: zipFileCount = 149, matches filesystem count exactly
✅ Warning fires at 8,000+ entries (tested with 2,700 LWC bundles → count 8102)
✅ Server rejects at 10,000+ entries ("Too many files in zip")
✅ Pre-built zip (--zip-file) path: no regression

@soridalac

Copy link
Copy Markdown
Member

failed xNUTs fixed in this PR: salesforcecli/plugin-deploy-retrieve#1657

@soridalac
soridalac merged commit 399687d into main Oct 1, 2026
86 of 90 checks passed
@soridalac
soridalac deleted the wr/fixZipEntryCount branch October 1, 2026 19:32
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.

[BUG]: Deploy zip file count doesn't match the server's: folder entries count toward the 10,000 limit ("Too many files in zip" below 10,000 files)

3 participants