spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
704 stars 694 forks source link

Firestore Autoconfiguration emulator not setting the project id #2514

Closed batigoal82 closed 3 years ago

batigoal82 commented 4 years ago

Describe the bug With #2244 , autoconfiguration for firestore emulator has been introduced. The autoconfiguration configures a hard coded project id "unused". The consequences are that anything you do in your code like adding documents to your collection will work and can be retrieved from code but will not be revealed in the Firebase UI at http://localhost:4000/firestore.

Environment info spring-cloud-gcp version 1.2.5.RELEASE $ firebase --version 8.10.0

Steps to reproduce

Expected behavior Firebase UI at http://localhost:4000/firestore should show the data.

Actual behavior Firebase UI at http://localhost:4000/firestore shows only an empty root.

meltsufin commented 4 years ago

Does the project ID affect the local Firestore UI? What should it be set to instead? cc/ @dmitry-s PTAL.

mac2000 commented 3 years ago

@meltsufin maybe it can just use project from application properties if it is present and unused otherwise which probably might solve the issue and won't be confusing

here is another reason to control it, whenever we are using emulator we can curl -X DELETE /project/{projectId} to cleanup database, so it will be better to control projectId name