ci(repo): mock firebase for e2e tests#2821
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesFirebase E2E builds now use local no-op stubs for Core, Crashlytics, and Messaging through pubspec overrides. Both iOS E2E workflows activate those overrides and run CocoaPods caching after dependency bootstrap. The Xcode CAS composite action and its workflow usage are removed. Firebase E2E CI integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b63b5a8 to
373de71
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2821 +/- ##
=======================================
Coverage 71.28% 71.28%
=======================================
Files 430 430
Lines 26934 26934
=======================================
Hits 19199 19199
Misses 7735 7735 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Resolve https://linear.app/stream/issue/FLU-602
What
Keeps the native Firebase SDK (Core / Crashlytics / Messaging) out of e2e test builds entirely — nothing is downloaded, compiled, linked, or initialized during e2e runs — and cleans up the iOS build caching in the e2e workflows based on measured data.
How the Firebase mock works
sample_app/e2e_stubs/contains three pure-Dart no-op packages namedfirebase_core,firebase_crashlytics, andfirebase_messaging, stubbing exactly the API surfacesample_appuses (Firebase.initializeApp,FirebaseOptions,recordError/recordFlutterFatalError, the messaging streams/token getters, etc.). Permission requests report denied, tokens resolve tonull, message streams never emit.flutter.pluginsection, the Flutter tool registers no plugins for them → no Firebase pods on iOS, no Firebase Gradle deps on Android.sample_app/pubspec_overrides.e2e.yamlwires them in viadependency_overrides. The e2e workflows copy it overpubspec_overrides.yamlbeforemelos bootstrap— melos merges its own managed overrides into the existing file and preserves the stub entries.project.pbxprojchanges are needed: the existingisE2eTestRunguards cover runtime behavior, andpod installregenerates the CocoaPods build phases on the runner to match the resolved plugin set.Also in this PR
pubspec.lock(the lock is gitignored and doesn't exist beforemelos bootstrap— previously that part of the key was always empty and never rotated on dependency changes).cache-xcode-cas). A verbose diagnostic run proved it works end-to-end on CI (1,734replay cache hitremarks, 0 misses) but delivers only ~10% build-time benefit after normalizing for runner speed (the net is roughly zero on a good day and negative on rotation days) — cache replay is IO-bound and the non-cacheable tail (linking, script phases, kernel compile) dominates on the standard 4-vCPU runners — while costing ~12s restore per run, ~25s save on key rotation, and ~1 GB of cache quota. Recoverable from git history if we move to larger runners.Validation
.flutter-plugins-dependencieshas no firebase entries with stubs active,flutter analyzeclean, and melos bootstrap preserves the stub overrides.Test (local)
🤖 Generated with Claude Code
Summary by CodeRabbit
Summary by CodeRabbit