Skip to content

Conversation

mikehardy
Copy link
Collaborator

Description

The flake hammer (big parallel runs of e2e workflows in CI) turned up flakiness in remote-config onConfigUpdated testing

The root cause is that the listener on one test run can (and should!) get events for updates from other test runs, but it was assuming that it would only ever see the events for it's own local test run.

The cloud function was also susceptible to failing under concurrency.

I re-worked the test suite so it uses individualized remote-config params for each local run, and only verifies if those params were updated when it triggers updates - ignoring all the other possible updates.

This turned up a few little errors in our helper suite:

  • some old non-modular syntax
  • node was out of date for the functions
  • there was no retention policy for the Artifact Registry containers used during the functions cloud build
  • some v1 functions that hadn't been migrated to v2 and were about to run out of support
  • an incorrect delete implementation for remote-config params
  • the test function could orphan old remote-config test params

It also exposed that a couple Other platform APIs still weren't returning that they weren't supported as correct errors

Everything should be repaired now

Related issues

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

The whole point was to re-enable a big chunk of the remote-config test suite so it's almost all tests.

But the side goal was to fix any errors that it exposed in all the packages and repair them - backed by testing

If e2e passes a flake hammer run, it's good


Think react-native-firebase is great? Please consider supporting the project with any of the below:

previously it was attempting to reject but using an undefined helper
function to do so, and there was no e2e test to probe it
Copy link

vercel bot commented Aug 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-native-firebase Ready Ready Preview Comment Aug 25, 2025 3:02am

Copy link

codecov bot commented Aug 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.21%. Comparing base (1cdb412) to head (7b32d05).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8673      +/-   ##
==========================================
+ Coverage   80.06%   80.21%   +0.15%     
==========================================
  Files         181      181              
  Lines        7637     7637              
  Branches     1787     1756      -31     
==========================================
+ Hits         6114     6125      +11     
+ Misses       1401     1394       -7     
+ Partials      122      118       -4     
🚀 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.

previously was not a correctly formatted error object and not thrown
simply returned - e2e test was probing it incorrectly so this slipped
through despite a lot of attention!
this is a non-functional change but brings the helper function codebase
up to spec

also uses node 22 now and has updated firebase-tools
…rrect version

- previously we were still using the old v1 definitions, so no updates were used
- previously default instances/concurrency were allowed, so parallel e2e runs could
  update the template in between the update/alter/publish causing publish errors
previously they were left stale because the delete was not correct
this removes duplicate code in the utility function
…fier

this allows arbitrary verifier functions to be passed in, with the default
just being one that checks the callback count on the spy
they should handle multiple parallel e2e test runs without blowing up
now, so we can hammer on the e2e suite without having to disable these
@mikehardy
Copy link
Collaborator Author

The other platform bug fixes on error handling are related to work a customer is interested in so I want to merge this and keep moving but as ever, happy to entertain any comments and post a follow-on

@mikehardy mikehardy merged commit 47448e9 into main Aug 25, 2025
23 of 24 checks passed
@mikehardy mikehardy deleted the remoteConfig-e2e-stabilization branch August 25, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant