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

Add support for specifying Firestore/Datastore DBs #2145

Closed
TazBruce opened this issue Aug 28, 2023 · 3 comments · Fixed by #2164
Closed

Add support for specifying Firestore/Datastore DBs #2145

TazBruce opened this issue Aug 28, 2023 · 3 comments · Fixed by #2164
Assignees
Labels
priority: p2 type: enhancement New feature or request

Comments

@TazBruce
Copy link

Is your feature request related to a problem? Please describe.
It is currently quite difficult to contain a Firestore/Datastore database to a single microservice. Currently the only solution is to use the (default) database and ensure microservices do not use the same collection names.

Describe the solution you'd like
GCP has recently added support for multiple databases, meaning it's now possible to assign one per microservice. This could possibly be implemented by creating an optional system property such as spring.cloud.gcp.firestore.database = "xyz"

Describe alternatives you've considered
This could also possibly be implemented by adding the field to a Document annotation such as @Document(collectionName="users", databaseName="xyz")

Thanks!

@suztomo suztomo added type: enhancement New feature or request priority: p2 labels Sep 1, 2023
@suztomo
Copy link
Contributor

suztomo commented Sep 1, 2023

contain a Firestore/Datastore database to a single microservice

Memo: This "contain" means "limit". This is a request to limit a (micro)service to use only a certain "database" (Pre-GA Offerings) https://cloud.google.com/firestore/docs/manage-databases#create_a_database.

@MarcinLachowicz
Copy link
Contributor

I'm looking for the same mechanism too :)

MarcinLachowicz pushed a commit to MarcinLachowicz/spring-cloud-gcp that referenced this issue Sep 4, 2023
MarcinLachowicz pushed a commit to MarcinLachowicz/spring-cloud-gcp that referenced this issue Sep 4, 2023
MarcinLachowicz added a commit to MarcinLachowicz/spring-cloud-gcp that referenced this issue Sep 4, 2023
MarcinLachowicz added a commit to MarcinLachowicz/spring-cloud-gcp that referenced this issue Sep 4, 2023
@MarcinLachowicz
Copy link
Contributor

Created a PR for Datastore: #2150

meltsufin pushed a commit that referenced this issue Sep 12, 2023
@meltsufin meltsufin self-assigned this Sep 13, 2023
meltsufin added a commit that referenced this issue Sep 19, 2023
Also adds routing headers for all Firestore requests.

Fixes #2145.
meltsufin added a commit that referenced this issue Sep 19, 2023
Also adds routing headers for all Firestore requests.

Fixes #2145.
meltsufin added a commit that referenced this issue Sep 20, 2023
Also adds routing headers for all Firestore requests.

Backport of #2164.

Fixes #2145.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants