Skip to content

Datastore mode databases may be silently mode-changed to Firestore native #6451

@rwhogg

Description

@rwhogg

[REQUIRED] Environment info

Firebase CLI v12.6.2

firebase-tools:

Linux

Platform:

[REQUIRED] Test case

  • A Google Cloud project which is being used for Firebase
  • At least one Datastore mode database in that project, with at least one entity (assume is called "fbcli"), and PITR is disabled

[REQUIRED] Steps to reproduce

  1. firebase firestore:databases:update --point-in-time-recovery ENABLED fbcli
  2. firebase firestore:databases:update --point-in-time-recovery DISABLED fbcli
  3. Delete the entity from Datastore
  4. firebase firestore:databases:update --point-in-time-recovery DISABLED fbcli

[REQUIRED] Expected behavior

In all 3 cases, the database should be recognized as being in Datastore mode and the CLI should not make any changes. It should instead respond with an error message saying that only Firestore Native databases are supported by Firebase.

[REQUIRED] Actual behavior

  1. "Error: HTTP Error: 400, Updating database type and other fields together is not supported." PITR is not updated.
  2. Error: HTTP Error: 400, A document with key 't/123456789L' exists in the database. The database must be empty to make this change. Delete this document and try again.
  3. (Not part of Firebase-cli)
  4. CLI returns success message and database has changed to Firebase Native type.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions