[cocoapods] Proxy CocoaPods CDN source metadata#3726
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3726 +/- ##
==========================================
+ Coverage 56.51% 56.64% +0.14%
==========================================
Files 887 892 +5
Lines 38416 38541 +125
Branches 8007 8024 +17
==========================================
+ Hits 21707 21828 +121
- Misses 16611 16615 +4
Partials 98 98 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a3207d2 to
32715f4
Compare
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
|
Subscribed to pull request
Generated by CodeMention |
There was a problem hiding this comment.
Pull request overview
Adds CocoaPods CDN metadata proxying to expo-cocoapods-proxy by registering a proxied CDN source via CocoaPods’ :source_provider hook, enabling podspec metadata requests to go through EAS_BUILD_COCOAPODS_CACHE_URL (with trunk as a fallback) to reduce direct hits to CocoaPods/GitHub.
Changes:
- Introduces a
FallbackableCDNSourceandSourceProviderhook to add a proxied CDN source (and then canonical trunk) whenEAS_BUILD_COCOAPODS_CACHE_URLis set. - Registers the plugin as a default CocoaPods plugin so the hook runs even without explicit Podfile plugin configuration.
- Adds unit + integration specs that exercise proxied CDN usage and fallback behavior during
pod install.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/expo-cocoapods-proxy/lib/expo_cocoapods_proxy/proxy.rb | Adds :source_provider hook integration, proxied CDN source + fallback behavior, and default plugin registration. |
| packages/expo-cocoapods-proxy/spec/expo_cocoapods_proxy/proxy_spec.rb | Adds tests for source registration and end-to-end pod install behavior with proxy and fallback scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def proxy | ||
| value = ENV['EAS_BUILD_COCOAPODS_CACHE_URL'] | ||
| value unless value.nil? || value.empty? | ||
| end |
Summary
Adds CocoaPods podspec metadata proxying to
expo-cocoapods-proxyvia CocoaPods supported:source_providerplugin hook.When
EAS_BUILD_COCOAPODS_CACHE_URLis set, the plugin now registers a proxied CDN source backed by the existingtrunkrepo directory, then registers canonicalTrunkSourceas fallback. The proxied source rewrites CocoaPods CDN metadata requests to${EAS_BUILD_COCOAPODS_CACHE_URL}/cdn.cocoapods.org/without creating or warming a separate second CDN repo.Why
The existing proxy behavior covered pod source downloads through
Pod::Downloader::HttpandPod::Downloader::Git, but CocoaPods CDN podspec metadata is resolved throughPod::CDNSource, bypassing those downloaders. That allowed podspec metadata requests to go directly to CocoaPods/GitHub and hit rate limits.Behavior
sourceentries use the plugin-provided proxied source first.Validation
Based on
turtle-v2, iOS worker images use Ruby 3.2 and CocoaPods 1.13.0, 1.14.3, 1.15.2, or 1.16.2.rubocop --disable-pending-copson the modified Ruby files: no offensesgit diff --check: clean