Skip to content

Firebase deploy --dry-run fails if the Firestore database doesn't exist #11615

Backlog

Description

@inlined

It seems the fix for #11491 wasn't actually tested against a live project. Now, instead of creating a database, it fails that the database doesn't exist.

[REQUIRED] Environment info

firebase-tools: 15.22.0

Platform: MacOS 27

[REQUIRED] Test case

Create a firebase.json with a firestore database that does not yet exist

[REQUIRED] Steps to reproduce

firebase deploy --dry-run --only firestore

Expected behavior

Some dry-run notes

[REQUIRED] Actual behavior

Failure that blocks the release that would have actually created the database

Activity

  1. aalej commented on Dec 1, 2026

    @aalej
    Contributor

    Thanks for reporting this follow up to #11491. I tried to replicate this issue using the latest version of firebase-tools(currently v15.37.0), and I am not able to reproduce the reported failure.

    Using this firebase.json config:

    {
      "firestore": {
        "database": "custom-name",
        "rules": "firestore.rules",
        "indexes": "firestore.indexes.json"
      }
    }

    With v15.37.0

    Running firebase deploy --only firestore --dry-run --project PROJECT_A outputs

    $ firebase --version
    15.37.0
    $ firebase deploy --only firestore --dry-run --project PROJECT_A
    
    === Deploying to 'PROJECT_A'...
    
    i  deploying firestore
    i  firestore: ensuring required API firestore.googleapis.com is enabled...
    ✔  firestore: required API firestore.googleapis.com is enabled
    i  firestore: ensuring required API firestore.googleapis.com is enabled...
    ⚠  firestore: Database custom-name does not exist. A deploy would create it in nam5 (the default, because firebase.json sets no location). Skipping database creation because this is a dry run.
    i  firestore: reading indexes from firestore.indexes.json...
    i  cloud.firestore: checking firestore.rules for compilation errors...
    ✔  cloud.firestore: rules file firestore.rules compiled successfully
    
    ✔  Dry run complete!
    

    It skips database creation during --dry-run and proceeds with rules and indexes validation, which is the expected behavior.

    With v15.36.0

    Running firebase deploy --only firestore --dry-run --project PROJECT_A outputs

    $ firebase --version
    15.36.0
    $ firebase deploy --only firestore --dry-run --project PROJECT_A
    
    === Deploying to 'PROJECT_A'...
    
    i  deploying firestore
    i  firestore: ensuring required API firestore.googleapis.com is enabled...
    ✔  firestore: required API firestore.googleapis.com is enabled
    i  firestore: ensuring required API firestore.googleapis.com is enabled...
    i  firestore: Creating the new Firestore database custom-name...
    i  firestore: reading indexes from firestore.indexes.json...
    i  cloud.firestore: checking firestore.rules for compilation errors...
    ✔  cloud.firestore: rules file firestore.rules compiled successfully
    
    ✔  Dry run complete!
    

    On 15.36.0, it created the missing database during --dry-run(the bug tracked in #11491), rather than skipping creation.

    Since your issue lists firebase-tools: 15.22.0 and since the fix for #11491 was only released on 15.37.0, could you try updating to 15.37.0 and let us know if you still encounter the issue with --dry-run? If it still fails, please share the output of running with --debug(please omit any PIIs before sharing the contents):

    firebase deploy --dry-run --only firestore --debug
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions