Skip to content

[build-tools] Auto-upload embedded bundle after build when opt-in flag is set#3767

Draft
gwdp wants to merge 7 commits into
gwdp/embedded-update-upload-cmd-skeletonfrom
gwdp/embedded-update-auto-upload
Draft

[build-tools] Auto-upload embedded bundle after build when opt-in flag is set#3767
gwdp wants to merge 7 commits into
gwdp/embedded-update-upload-cmd-skeletonfrom
gwdp/embedded-update-auto-upload

Conversation

@gwdp
Copy link
Copy Markdown
Contributor

@gwdp gwdp commented May 20, 2026

Why

After a native build completes, the JS bundle embedded in the artifact isn't registered with EAS Update, so the diff worker has no base to patch against — the first OTA after install always downloads the full bundle. This phase registers it automatically so patch-based updates work from day one.

Ref ENG-21033

How

  • New uploadEmbeddedBundleAsync in packages/build-tools/src/utils/expoUpdatesEmbedded.ts
  • After UPLOAD_APPLICATION_ARCHIVE, both iOS and Android builders check EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE and isEASUpdateConfigured before entering the new UPLOAD_EMBEDDED_BUNDLE phase
  • Opens the build artifact (IPA / APK / AAB) with StreamZip, extracts main.jsbundle + app.manifest (iOS) or index.android.bundle + assets/app.manifest (Android) to a temp dir, then calls eas update:embedded:upload
  • Failures are non-fatal: logged as warnings so the build result is unaffected
  • Added UPLOAD_EMBEDDED_BUNDLE phase to BuildPhase enum, display names, and website IDs

Test Plan

  • yarn tsc --noEmit && yarn lint && yarn fmt:check pass on packages/eas-cli and packages/build-tools

@linear
Copy link
Copy Markdown

linear Bot commented May 20, 2026

ENG-21033

gwdp added a commit that referenced this pull request May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.98%. Comparing base (de82930) to head (14e0f7c).

Additional details and impacted files
@@                             Coverage Diff                              @@
##           gwdp/embedded-update-upload-cmd-skeleton    #3767      +/-   ##
============================================================================
+ Coverage                                     56.91%   56.98%   +0.07%     
============================================================================
  Files                                           908      910       +2     
  Lines                                         39210    39298      +88     
  Branches                                       8187     8210      +23     
============================================================================
+ Hits                                          22314    22389      +75     
- Misses                                        15426    15438      +12     
- Partials                                       1470     1471       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp gwdp changed the title [build-tools] Auto-upload embedded bundle after build when EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE is set [build-tools] Auto-upload embedded bundle after build when opt-in flag is set May 21, 2026
Copy link
Copy Markdown
Contributor Author

gwdp commented May 21, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from af16ad4 to 14e0f7c Compare May 21, 2026 00:53
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

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