Skip to content

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

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

[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 57.35%. Comparing base (27b005e) to head (28b876a).

Additional details and impacted files
@@                             Coverage Diff                              @@
##           gwdp/embedded-update-upload-cmd-skeleton    #3767      +/-   ##
============================================================================
+ Coverage                                     57.29%   57.35%   +0.07%     
============================================================================
  Files                                           909      911       +2     
  Lines                                         39389    39477      +88     
  Branches                                       8245     8268      +23     
============================================================================
+ Hits                                          22563    22638      +75     
- Misses                                        15354    15366      +12     
- Partials                                       1472     1473       +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 2 times, most recently from 4e508df to af16ad4 Compare May 21, 2026 00:46
@gwdp gwdp requested a review from quinlanj May 21, 2026 00:48
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch 3 times, most recently from 748a8d5 to a4deecb Compare May 21, 2026 22:02
@gwdp gwdp force-pushed the gwdp/embedded-update-upload-cmd-skeleton branch from 21ad729 to b9050ec Compare May 22, 2026 22:14
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from a4deecb to 88e62c9 Compare May 22, 2026 22:14
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from 88e62c9 to 28b876a Compare May 22, 2026 22:22
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@gwdp gwdp marked this pull request as ready for review May 22, 2026 22:36
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

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