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

Datastore emulator reset does not work #7415

Closed
selvaradov opened this issue Jul 6, 2024 · 2 comments
Closed

Datastore emulator reset does not work #7415

selvaradov opened this issue Jul 6, 2024 · 2 comments

Comments

@selvaradov
Copy link

Environment info

firebase-tools: I'm using the gcloud cli, not the full firebase emulator suite. when I run gcloud version the output is:

Google Cloud SDK 483.0.0
beta 2024.06.28
bq 2.1.6
bundled-python3-unix 3.11.8
cloud-datastore-emulator 2.3.1
cloud-firestore-emulator 1.19.7
core 2024.06.28
gcloud-crc32c 1.0.0
gsutil 5.30

Platform: WSL in Windows 11

Test case

See description below.

Steps to reproduce

  1. Start the emulator with gcloud emulators firestore start --database-mode=datastore-mode
  2. Add an item to the database, e.g. as here
  3. Try to reset the database as described here with $ curl -X POST "http://HOST:PORT/reset"
  4. Check whether that item is still in the database e.g. as here

Expected behavior

  • The database is reset and no entities are logged to the console

Actual behavior

  • The database replies "Resetting..." but the entity is still present in the database.
  • I am able to remove it by running Node.js code to directly delete all entries, rather than trying to reset it.
@aalej
Copy link
Contributor

aalej commented Jul 8, 2024

Hey @selvaradov, thanks for the detailed report. I created this repo using the steps you provided and code snippets from the documentation. I followed the steps you mentioned, however, after running curl -X POST "http://127.0.0.1:7079/reset” all entities were removed.

I’m currently unable to reproduce the behavior you mentioned. Any chance you could share a minimal reproducible example with us? This will help us narrow down what could’ve caused the issue.

@aalej aalej added the Needs: Author Feedback Issues awaiting author feedback label Jul 8, 2024
@selvaradov
Copy link
Author

Thanks for investigating! After being unable to reproduce this in a clean repo, I think this was probably due to the same misconfiguration as in #7417; sorry for making the two issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants