Skip to content

Add support for running the emulators over SSL #8967

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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

maneesht
Copy link
Contributor

Fix issue where SSL was defaulted to false in both Firestore and RTDB

@maneesht maneesht requested review from a team and aashishpatil-g as code owners April 23, 2025 18:10
Copy link

changeset-bot bot commented Apr 23, 2025

🦋 Changeset detected

Latest commit: 07f44b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@firebase/database-compat Patch
@firebase/database-types Patch
@firebase/database Patch
@firebase/firestore Patch
@firebase/functions Patch
@firebase/storage Patch
firebase Patch
@firebase/firestore-compat Patch
@firebase/functions-compat Patch
@firebase/storage-compat Patch

Not sure what this means? Click here to learn what changesets are.

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

@maneesht maneesht requested a review from avolkovi April 23, 2025 18:12
Copy link
Contributor

@avolkovi avolkovi left a comment

Choose a reason for hiding this comment

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

💯 :shipit:

@maneesht maneesht requested a review from a team as a code owner April 23, 2025 18:15
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 23, 2025

Size Report 1

Affected Products

  • @firebase/database

    TypeBase (20b45d3)Merge (74a48a1)Diff
    browser249 kB249 kB+111 B (+0.0%)
    main254 kB254 kB+111 B (+0.0%)
    module249 kB249 kB+111 B (+0.0%)
  • @firebase/database-compat/standalone

    TypeBase (20b45d3)Merge (74a48a1)Diff
    main366 kB366 kB+111 B (+0.0%)
  • @firebase/firestore

    TypeBase (20b45d3)Merge (74a48a1)Diff
    browser384 kB384 kB+35 B (+0.0%)
    main594 kB594 kB+57 B (+0.0%)
    module384 kB384 kB+35 B (+0.0%)
    react-native384 kB384 kB+35 B (+0.0%)
  • @firebase/firestore-lite

    TypeBase (20b45d3)Merge (74a48a1)Diff
    browser114 kB114 kB+35 B (+0.0%)
    main157 kB157 kB+57 B (+0.0%)
    module114 kB114 kB+35 B (+0.0%)
    react-native114 kB114 kB+35 B (+0.0%)
  • @firebase/functions

    TypeBase (20b45d3)Merge (74a48a1)Diff
    browser14.0 kB14.0 kB+25 B (+0.2%)
    main14.6 kB14.6 kB+25 B (+0.2%)
    module14.0 kB14.0 kB+25 B (+0.2%)
  • @firebase/storage

    TypeBase (20b45d3)Merge (74a48a1)Diff
    browser58.0 kB58.0 kB+20 B (+0.0%)
    main59.4 kB59.4 kB+20 B (+0.0%)
    module58.0 kB58.0 kB+20 B (+0.0%)
  • bundle

    33 size changes

    TypeBase (20b45d3)Merge (74a48a1)Diff
    database (Append to a list of data)150 kB150 kB+65 B (+0.0%)
    database (Filtering data)149 kB149 kB+65 B (+0.0%)
    database (Listen for child events)165 kB165 kB+65 B (+0.0%)
    database (Listen for value events + Detach listeners)165 kB165 kB+65 B (+0.0%)
    database (Listen for value events)165 kB165 kB+65 B (+0.0%)
    database (Read data once)164 kB165 kB+65 B (+0.0%)
    database (Save data as transactions)167 kB167 kB+65 B (+0.0%)
    database (Sort data)150 kB150 kB+65 B (+0.0%)
    database (Write data)149 kB149 kB+65 B (+0.0%)
    firestore (CSI Auto Indexing Disable and Delete)274 kB274 kB+35 B (+0.0%)
    firestore (CSI Auto Indexing Enable)274 kB274 kB+35 B (+0.0%)
    firestore (Persistence)306 kB306 kB+35 B (+0.0%)
    firestore (Query Cursors)251 kB251 kB+35 B (+0.0%)
    firestore (Query)249 kB249 kB+35 B (+0.0%)
    firestore (Read data once)237 kB237 kB+35 B (+0.0%)
    firestore (Read Write w Persistence)330 kB330 kB+35 B (+0.0%)
    firestore (Realtime updates)239 kB239 kB+35 B (+0.0%)
    firestore (Transaction)216 kB216 kB+35 B (+0.0%)
    firestore (Write data)216 kB216 kB+35 B (+0.0%)
    firestore-lite (Query Cursors)104 kB104 kB+35 B (+0.0%)
    firestore-lite (Query)101 kB101 kB+35 B (+0.0%)
    firestore-lite (Read data once)75.9 kB76.0 kB+35 B (+0.0%)
    firestore-lite (Transaction)101 kB101 kB+35 B (+0.0%)
    firestore-lite (Write data)85.5 kB85.6 kB+35 B (+0.0%)
    functions (call)34.8 kB34.8 kB+17 B (+0.0%)
    storage (getBytes)42.4 kB42.5 kB+14 B (+0.0%)
    storage (getDownloadURL)44.5 kB44.5 kB+14 B (+0.0%)
    storage (getMetadata)44.0 kB44.0 kB+14 B (+0.0%)
    storage (list + listAll)43.4 kB43.4 kB+14 B (+0.0%)
    storage (updateMetadata)44.2 kB44.2 kB+14 B (+0.0%)
    storage (uploadBytes)49.1 kB49.1 kB+14 B (+0.0%)
    storage (uploadBytesResumable)59.0 kB59.0 kB+14 B (+0.0%)
    storage (uploadString)49.3 kB49.3 kB+14 B (+0.0%)

  • firebase

    TypeBase (20b45d3)Merge (74a48a1)Diff
    firebase-compat.js797 kB797 kB+66 B (+0.0%)
    firebase-database-compat.js164 kB164 kB+31 B (+0.0%)
    firebase-database.js187 kB187 kB+50 B (+0.0%)
    firebase-firestore-compat.js342 kB342 kB+16 B (+0.0%)
    firebase-firestore-lite.js132 kB132 kB+35 B (+0.0%)
    firebase-firestore.js443 kB443 kB+35 B (+0.0%)
    firebase-functions-compat.js10.4 kB10.4 kB+13 B (+0.1%)
    firebase-functions.js14.8 kB14.8 kB+17 B (+0.1%)
    firebase-storage-compat.js39.7 kB39.8 kB+14 B (+0.0%)
    firebase-storage.js46.3 kB46.3 kB+14 B (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 23, 2025

Size Analysis Report 1

Affected Products

  • @firebase/database

    • connectDatabaseEmulator

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size117 kB117 kB+65 B (+0.1%)
      size-with-ext-deps140 kB140 kB+65 B (+0.0%)
    • getDatabase

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size117 kB117 kB+65 B (+0.1%)
      size-with-ext-deps147 kB147 kB+65 B (+0.0%)
  • @firebase/firestore

    • connectFirestoreEmulator

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size17.7 kB17.7 kB+35 B (+0.2%)
      size-with-ext-deps88.7 kB88.7 kB+35 B (+0.0%)
    • getFirestore

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size18.0 kB18.0 kB+35 B (+0.2%)
      size-with-ext-deps96.3 kB96.3 kB+35 B (+0.0%)
  • @firebase/functions

    • connectFunctionsEmulator

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size2.75 kB2.77 kB+17 B (+0.6%)
      size-with-ext-deps20.8 kB20.8 kB+17 B (+0.1%)
    • getFunctions

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size2.94 kB2.95 kB+17 B (+0.6%)
      size-with-ext-deps28.6 kB28.7 kB+17 B (+0.1%)
  • @firebase/storage

    • connectStorageEmulator

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size11.5 kB11.5 kB+14 B (+0.1%)
      size-with-ext-deps30.1 kB30.1 kB+14 B (+0.0%)
    • getStorage

      Size

      TypeBase (20b45d3)Merge (74a48a1)Diff
      size11.7 kB11.7 kB+14 B (+0.1%)
      size-with-ext-deps38.0 kB38.0 kB+14 B (+0.0%)

Test Logs

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

@avolkovi avolkovi changed the title Add SSL checks to useEmulator Add support for running the emulators over SSL Apr 24, 2025
Copy link
Contributor

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: v11.0

Copy link
Contributor

github-actions bot commented Apr 28, 2025

Changeset File Check ⚠️

  • Warning: This PR modifies files in the following packages but they have not been included in the changeset file:%0A - @firebase/storage-compat%0A%0A Make sure this was intentional.

@maneesht maneesht requested a review from tonyjhuang as a code owner April 28, 2025 21:33
@maneesht maneesht requested a review from a team as a code owner April 28, 2025 21:35
Copy link
Contributor

@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

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

LGTM(packages/firestore)

@@ -23,7 +23,7 @@ https://github.com/firebase/firebase-js-sdk
| [clearIndexedDbPersistence(firestore)](./firestore_.md#clearindexeddbpersistence_231a8e0) | Clears the persistent storage. This includes pending writes and cached documents.<!-- -->Must be called while the [Firestore](./firestore_.firestore.md#firestore_class) instance is not started (after the app is terminated or when the app is first initialized). On startup, this function must be called before other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200) or [getFirestore()](./firestore_.md#getfirestore)<!-- -->)). If the [Firestore](./firestore_.firestore.md#firestore_class) instance is still running, the promise will be rejected with the error code of <code>failed-precondition</code>.<!-- -->Note: <code>clearIndexedDbPersistence()</code> is primarily intended to help write reliable tests that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications that are sensitive to the disclosure of cached data in between user sessions, we strongly recommend not enabling persistence at all. |
| [collection(firestore, path, pathSegments)](./firestore_.md#collection_1eb4c23) | Gets a <code>CollectionReference</code> instance that refers to the collection at the specified absolute path. |
| [collectionGroup(firestore, collectionId)](./firestore_.md#collectiongroup_1838fc3) | Creates and returns a new <code>Query</code> instance that includes all documents in the database that are contained in a collection or subcollection with the given <code>collectionId</code>. |
| [connectFirestoreEmulator(firestore, host, port, options)](./firestore_.md#connectfirestoreemulator_7c247cd) | Modify this instance to communicate with the Cloud Firestore emulator.<!-- -->Note: This must be called before this instance has been used to do any operations. |
| [connectFirestoreEmulator(firestore, host, port, options)](./firestore_.md#connectfirestoreemulator_6c8868a) | Modify this instance to communicate with the Cloud Firestore emulator.<!-- -->Note: This must be called before this instance has been used to do any operations. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know what role this comment is meant to play in the generated docs?

It is in most (but not all, see database.md) of the identical added doc blurbs.

Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

LGTM with a couple questions about the generated content.

@@ -308,7 +308,7 @@ export declare function collectionGroup(firestore: Firestore, collectionId: stri

The created `Query`<!-- -->.

### connectFirestoreEmulator(firestore, host, port, options) {:#connectfirestoreemulator_7c247cd}
### connectFirestoreEmulator(firestore, host, port, options) {:#connectfirestoreemulator_6c8868a}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this get updated? Just vagaries of the generation process I guess?

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.

6 participants