You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect to see saved data in my configured "--export-on-exit" folder, to then be able to import them on the next start via --import-data.
[REQUIRED] Actual behavior
It stays empty when interrupting the emulator using Ctrl + C.
/Projects/test/building-an-app-3 (main ✔) gcloud emulators firestore start --database-mode datastore-mode --export-on-exit ./saved_data --host-port 0.0.0.0:8081 --project [PROJECT-ID] --verbosity debug
DEBUG: Running [gcloud.emulators.firestore.start] with arguments: [--database-mode: "datastore-mode", --export-on-exit: "./saved_data", --host-port: "<googlecloudsdk.calliope.arg_parsers.HostPort object at 0x7f1313866310>", --project: "[PROJECT ID]", --verbosity: "debug"]
DEBUG: Found Cloud SDK root: /usr/lib64/google-cloud-sdk
Executing: /usr/lib64/google-cloud-sdk/platform/cloud-firestore-emulator/cloud_firestore_emulator start --host=0.0.0.0 --port=8081 --database-mode=datastore-mode --export-on-exit=./saved_data
[firestore] Oct 29, 2024 11:28:12 AM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
[firestore] INFO: Started WebSocket server on ws://0.0.0.0:37901
[firestore] API endpoint: http://0.0.0.0:8081
[firestore] If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:
[firestore]
[firestore] export FIRESTORE_EMULATOR_HOST=0.0.0.0:8081
[firestore]
[firestore] If you are running a Firestore in Datastore Mode project, run:
[firestore]
[firestore] export DATASTORE_EMULATOR_HOST=0.0.0.0:8081
[firestore]
[firestore] Note: Support for Datastore Mode is in preview. If you encounter any bugs please file at https://github.com/firebase/firebase-tools/issues.
[firestore] Dev App Server is now running.
[firestore]
[firestore] Oct 29, 2024 11:28:51 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
[firestore] Oct 29, 2024 11:28:51 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
[firestore] Oct 29, 2024 11:28:52 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
[firestore] Oct 29, 2024 11:28:52 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
[firestore] Oct 29, 2024 11:28:52 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
[firestore] Oct 29, 2024 11:28:53 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
[firestore] Oct 29, 2024 11:28:53 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[firestore] INFO: Detected HTTP/2 connection.
^C
Command killed by keyboard interrupt
The text was updated successfully, but these errors were encountered:
To add some context to this issue, my company is based on ndb which is a google official client library for Google Cloud Datastore.
We've been using the legacy datastore emulator for local testing before deploying to pre-production and production projects. Data persistence between runs is crucial for our testing process, and I wasn't able to achieve with the firestore emulator.
The core issue is that the 2.3.0 release of ndb (1st March 2024) rendered the ndb client incompatible with the legacy emulator (described in this issue).
We find ourselves in an uncomfortable position where we can't update our ndb client because that would mean degrading our local setup to a point that would make it practically unusable.
I've spent some time reading the docs and trying to get the emulator to persist data, but I also may have missed something..
Hey @Nathanmalnoury, sorry to hear you encountered this issue and thanks for the thorough report. I appreciate you taking the time to put together an mcve! I was able to reproduce the behavior you mentioned, I'll raise this to our engineering team so that they can take a look.
[REQUIRED] Environment info
firebase-tools:
I'm using the
gcloud
CLI :Platform:
[REQUIRED] Test case
https://github.com/Nathanmalnoury/repro-firestore-emulator-datastore-mode-persistence
[REQUIRED] Steps to reproduce
Included in test repo
[REQUIRED] Expected behavior
I would expect to see saved data in my configured "--export-on-exit" folder, to then be able to import them on the next start via
--import-data
.[REQUIRED] Actual behavior
It stays empty when interrupting the emulator using
Ctrl + C
.The text was updated successfully, but these errors were encountered: