Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulator Idempotency: Database - Closed, new Revision available. #8764

Closed
wants to merge 9 commits into from

Conversation

DellaBitta
Copy link
Contributor

Do not merge

Waiting for the PRs for Auth and Firestore to be in place so all three may be merged at the same time.

Discussion

Update the connectDatabaseEmulator function to support its invocation more than once. If the Database instance is already in use, and connectDatabaseEmulator is invoked with the same configuration, then the invocation will now succeed instead of assert.

This unlocks support for web frameworks which may render the page numerous times with the same instances of RTDB. Before this PR customers needed to add extra code to guard against calling connectDatabaseEmulator in their SSR logic. Now we do that guarding logic on their behalf which should simplify our customer's apps.

Fixes #6824.

Testing

CI, new tests added to integration tests.

API Changes

N/A

Copy link

changeset-bot bot commented Feb 5, 2025

⚠️ No Changeset found

Latest commit: dffe5b4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v6.1

@DellaBitta DellaBitta changed the title Ddb database emulator reconnect Emulator Idempotency: Database Feb 5, 2025
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 5, 2025

Size Report 1

Affected Products

  • @firebase/database

    TypeBase (5250e80)Merge (48fb170)Diff
    browser249 kB249 kB-104 B (-0.0%)
    main254 kB254 kB-104 B (-0.0%)
    module249 kB249 kB-104 B (-0.0%)
  • @firebase/database-compat/standalone

    TypeBase (5250e80)Merge (48fb170)Diff
    main366 kB366 kB-104 B (-0.0%)
  • bundle

    TypeBase (5250e80)Merge (48fb170)Diff
    database (Append to a list of data)150 kB149 kB-100 B (-0.1%)
    database (Filtering data)148 kB148 kB-100 B (-0.1%)
    database (Listen for child events)165 kB165 kB-100 B (-0.1%)
    database (Listen for value events + Detach listeners)165 kB165 kB-100 B (-0.1%)
    database (Listen for value events)165 kB165 kB-100 B (-0.1%)
    database (Read data once)164 kB164 kB-100 B (-0.1%)
    database (Save data as transactions)167 kB167 kB-100 B (-0.1%)
    database (Sort data)150 kB150 kB-100 B (-0.1%)
    database (Write data)149 kB149 kB-100 B (-0.1%)
  • firebase

    TypeBase (5250e80)Merge (48fb170)Diff
    firebase-compat.js791 kB791 kB-97 B (-0.0%)
    firebase-database-compat.js164 kB164 kB-97 B (-0.1%)
    firebase-database.js187 kB186 kB-100 B (-0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/YNy7mJBFR1.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 5, 2025

Size Analysis Report 1

Affected Products

  • @firebase/database

    • connectDatabaseEmulator

      Size

      TypeBase (5250e80)Merge (48fb170)Diff
      size117 kB117 kB-99 B (-0.1%)
      size-with-ext-deps140 kB140 kB-100 B (-0.1%)
    • getDatabase

      Size

      TypeBase (5250e80)Merge (48fb170)Diff
      size117 kB117 kB-99 B (-0.1%)
      size-with-ext-deps147 kB147 kB-100 B (-0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/n4kjbXVXBP.html

@DellaBitta DellaBitta changed the title Emulator Idempotency: Database Emulator Idempotency: Database - Closed, new Revision available. Feb 6, 2025
@DellaBitta DellaBitta closed this Feb 6, 2025
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.

two attempts to connect to auth emulator cause config error
2 participants