Skip to content

Migrate to Firebase BOM 33.16.0#3691

Open
avazirna wants to merge 5 commits into
masterfrom
deps/firebase-bom-33.16.0
Open

Migrate to Firebase BOM 33.16.0#3691
avazirna wants to merge 5 commits into
masterfrom
deps/firebase-bom-33.16.0

Conversation

@avazirna

@avazirna avazirna commented May 6, 2026

Copy link
Copy Markdown
Contributor

Technical Summary

Replaces five hand-pinned Firebase artifact versions with a single firebase-bom:33.16.0 platform() dependency. Brings the Firebase SDK family from substantial drift (analytics 20.1.2 / crashlytics 18.3.7) to a coherent, current baseline.

What this PR really is — read this carefully

Adopting BOM 33.16.0 transitively forces a wide set of AndroidX upgrades. Hidden dependencies bumped:

AndroidX library Was Now
core 1.3.1 1.13.1
lifecycle-* 2.5.1 2.9.0
fragment 1.0.0 1.6.2
activity-ktx 1.7.0 1.8.0
annotation 1.8.x 1.9.1

So this PR is implicitly also an fragment-1.6 / activity-1.8 upgrade. QA accordingly.

Resolved Firebase versions (managed by BOM)

Artifact Was Now
firebase-analytics 20.1.2 22.5.0
firebase-messaging 24.0.0 24.1.2
firebase-perf 21.0.1 21.0.5
firebase-crashlytics 18.3.7 19.4.4
firebase-auth 23.2.0 23.2.1

Plugin classpath bumps (paired with the BOM)

Plugin Was Now
google-services 4.3.14 4.4.2
firebase-crashlytics-gradle 2.9.2 3.0.2
perf-plugin 2.0.2 2.0.2 (unchanged)

Required code change

FirebaseAnalytics.Param.ITEM_LIST was removed in analytics 21+. Single call site (FirebaseAnalyticsUtil.reportViewArchivedFormsList) migrated to ITEM_LIST_NAME, which matches the human-readable list name actually being passed.

Safety Assurance

Safety story

  • All 5 Firebase artifacts were already on the classpath; this changes versions, not the dependency surface.
  • No production code change beyond the one-line ITEM_LISTITEM_LIST_NAME migration.
  • All unit and instrumentation tests passed, with the exception of DemoUserRestoreTest.demoUserRestoreAndUpdateTest(), which failed as a result of the AppCompat upgrade. This was addressed in a separate PR (Bump androidx.appcompat to 1.7.0  #3692).

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, RELEASES.md is updated accordingly
  • Does the PR introduce any major changes worth communicating ? If yes, RELEASES.md is updated accordingly
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

avazirna and others added 3 commits May 5, 2026 18:49
- com.google.gms:google-services 4.3.14 -> 4.4.2
- com.google.firebase:firebase-crashlytics-gradle 2.9.2 -> 3.0.2

Crashlytics SDK 19.x (which the upcoming firebase-bom:33.16.0 brings in)
requires the 3.x line of the gradle plugin for mapping-file uploads to
function correctly. Bumping these in a separate commit so the change
shows up cleanly in blame and is easy to revert independently.

The firebase:perf-plugin stays at 2.0.2 — confirmed compatible with
firebase-perf SDK 21.0.5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the five hand-pinned Firebase artifact versions with a single
firebase-bom:33.16.0 platform() dependency. The BOM resolves the
artifacts to a coherent set:

  firebase-analytics:    20.1.2 -> 22.5.0
  firebase-messaging:    24.0.0 -> 24.1.2
  firebase-perf:         21.0.1 -> 21.0.5
  firebase-crashlytics:  18.3.7 -> 19.4.4
  firebase-auth:         23.2.0 -> 23.2.1

Eliminates per-artifact version drift; future Firebase bumps only need
to change the BOM line. The gradle-side plugin bump that pairs with
this (Crashlytics 3.0.2, google-services 4.4.2) lands in the previous
commit.

Audit notes:
- No usage of removed/deprecated Analytics APIs (no setCurrentScreen).
- No usage of Crashlytics KeyValueBuilder (only fully removed at 20.x).
- No firebase-*-ktx modules in use, so 34.x's KTX removal stays out of
  scope for this bump.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ITEM_LIST was deprecated and removed from firebase-analytics around
21.0.0 in favor of ITEM_LIST_ID and ITEM_LIST_NAME. The single call
site (reportViewArchivedFormsList) was passing a human-readable list
name ("incomplete" / "saved"), so ITEM_LIST_NAME is the semantic
match. Required to compile against the firebase-bom:33.16.0 versions
(analytics 22.5.0).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@avazirna avazirna self-assigned this May 6, 2026
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main change: adopting Firebase BOM 33.16.0.
Description check ✅ Passed The description covers technical summary, safety story, tests, and review items, though it omits a ticket link and a dedicated product description.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deps/firebase-bom-33.16.0

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/unit-tests/src/org/commcare/android/tests/DemoUserRestoreTest.java (1)

90-94: ⚡ Quick win

Add a tracked issue ID to the @Ignore so this test doesn’t get stranded.
Please include a ticket reference (and ideally an expiry/re-enable condition) directly in the ignore reason to keep follow-up enforceable.

As per coding guidelines, "Use unit tests for logic verification".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/unit-tests/src/org/commcare/android/tests/DemoUserRestoreTest.java`
around lines 90 - 94, The `@Ignore` annotation on DemoUserRestoreTest.java
currently has a long reason but no tracked issue or re-enable condition; update
the ignore reason on the `@Ignore` above the DemoUserRestoreTest class/test to
include a ticket/issue ID (e.g., JIRA-1234 or GitHub issue number) and an
explicit re-enable condition or expiry (for example "re-enable when migrated to
LooperMode.PAUSED and Robolectric bumped" or a date), so the test won't be
orphaned—edit the `@Ignore` string literal to append the issue reference and the
re-enable condition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app/unit-tests/src/org/commcare/android/tests/DemoUserRestoreTest.java`:
- Around line 90-94: The `@Ignore` annotation on DemoUserRestoreTest.java
currently has a long reason but no tracked issue or re-enable condition; update
the ignore reason on the `@Ignore` above the DemoUserRestoreTest class/test to
include a ticket/issue ID (e.g., JIRA-1234 or GitHub issue number) and an
explicit re-enable condition or expiry (for example "re-enable when migrated to
LooperMode.PAUSED and Robolectric bumped" or a date), so the test won't be
orphaned—edit the `@Ignore` string literal to append the issue reference and the
re-enable condition.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3fb7631e-0b44-4342-9006-3dd6763620c2

📥 Commits

Reviewing files that changed from the base of the PR and between 3daf861 and 6531b1c.

📒 Files selected for processing (6)
  • app/AndroidManifest.xml
  • app/build.gradle
  • app/src/org/commcare/google/services/analytics/FirebaseAnalyticsUtil.java
  • app/unit-tests/src/org/commcare/CommCareTestApplication.java
  • app/unit-tests/src/org/commcare/android/tests/DemoUserRestoreTest.java
  • build.gradle

@avazirna avazirna mentioned this pull request May 6, 2026
4 tasks
@avazirna
avazirna force-pushed the deps/firebase-bom-33.16.0 branch from 41fed58 to 2838794 Compare July 14, 2026 08:42
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.84%. Comparing base (b963c8a) to head (a79b10b).
⚠️ Report is 25 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3691      +/-   ##
============================================
+ Coverage     26.81%   26.84%   +0.02%     
- Complexity     4674     4684      +10     
============================================
  Files           984      984              
  Lines         58522    58587      +65     
  Branches       6969     6975       +6     
============================================
+ Hits          15692    15726      +34     
- Misses        40929    40956      +27     
- Partials       1901     1905       +4     

☔ View full report in Codecov by Harness.
📢 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.

@avazirna avazirna changed the title Adopt Firebase BOM 33.16.0 (with implicit AndroidX 1.7 transitive upgrade) Adopt Firebase BOM 33.16.0 Jul 14, 2026
@avazirna
avazirna marked this pull request as ready for review July 14, 2026 10:27
@avazirna avazirna changed the title Adopt Firebase BOM 33.16.0 Migrate to Firebase BOM 33.16.0 Jul 14, 2026

@shubham1g5 shubham1g5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think the QA notes are not well written and needs to be revised here.

Comment thread RELEASES.md
Comment on lines +237 to +238
- **Analytics:** spot-check that Firebase events still arrive (e.g. in the Firebase console DebugView), including the event logged when opening the Saved/Incomplete forms list, whose parameter name changed with the upgrade.
- **Crashlytics:** force a test crash on a debug/QA build and confirm the report shows up in the Crashlytics console.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think both of these are in scope of dev-testing and not QA.

Comment thread RELEASES.md
Comment on lines +235 to +236
- **Push notifications (Firebase Messaging):** verify Connect push notifications are still received and open the right screens — with the app in foreground, backgrounded, and fully killed. A fresh install should register for notifications correctly (new FCM token).
- **Phone OTP (Firebase Auth):** run a PersonalID signup and a recovery, verifying the SMS OTP is sent, auto-read/entry works, and wrong-code and resend flows behave as before.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets be conscise here and say verify Personal ID notifications and phone otp verification still works , the more verbose these notes are, the more likely they are to get lost amongst noise.

Comment thread RELEASES.md
- **Phone OTP (Firebase Auth):** run a PersonalID signup and a recovery, verifying the SMS OTP is sent, auto-read/entry works, and wrong-code and resend flows behave as before.
- **Analytics:** spot-check that Firebase events still arrive (e.g. in the Firebase console DebugView), including the event logged when opening the Saved/Incomplete forms list, whose parameter name changed with the upgrade.
- **Crashlytics:** force a test crash on a debug/QA build and confirm the report shows up in the Crashlytics console.
- **UI smoke test (AppCompat backs all toolbar, options-menu, dialog, and dropdown widgets):**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA would not know what is AppCompat

Comment thread RELEASES.md
Comment on lines +240 to +242
- App Home screen: grid tiles render and size correctly (portrait and landscape), toolbar title shows, options menu opens and shows the right items — including as a demo user, where only "Change Language" should be visible.
- Navigation drawer opens/closes correctly from the home screen.
- Login screen, form entry, and app settings/preferences screens render correctly, including dialogs and spinners/combobox dropdowns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove anything here that's already verified by our integration tests.

@avazirna

Copy link
Copy Markdown
Contributor Author

Think the QA notes are not well written and needs to be revised here.

I agree. I plan to run the dev-focused testing and will revise the notes accordingly

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.

2 participants