[go: up one dir, main page]

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

Support --use-firestore-in-datastore-mode in the datastore emulator. #1406

Open
ablx opened this issue Dec 21, 2022 · 5 comments
Open

Support --use-firestore-in-datastore-mode in the datastore emulator. #1406

ablx opened this issue Dec 21, 2022 · 5 comments
Labels
priority: p3 type: enhancement New feature or request

Comments

@ablx
Copy link
Contributor
ablx commented Dec 21, 2022

At the moment, the datastore emulator is not able to act as the "real" Firestore in Datastore mode.
To be specific, transactions do only allow ancestor queries. The emulator itself is capable of behaving like Firestore in Datastore mode, using the argument --use-firestore-in-datastore-mode - but one cannot set this in Spring.

Datastore Docs: https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode

@meltsufin meltsufin added type: enhancement New feature or request priority: p3 labels Dec 21, 2022
@meltsufin
Copy link
Member

We'd be happy to accept a contribution for this! Thanks!

@ablx
Copy link
Contributor Author
ablx commented Jan 2, 2023

Hey, I took a look into this. Unfortunally, this requires a change in com.google.cloud.datastore.testing.LocalDatastoreHelper (to hand over the parameter to the emulator) which is not part of the Spring Integration - and I was not able to find that class here on GitHub, so it seems it is not open source.

@ablx
Copy link
Contributor Author
ablx commented Jan 2, 2023

For everyone with the same problem: One can use Testcontainers as a workaround.
See this gist: https://gist.github.com/ablx/44a47523235bf2f3a4b63a4088d7945b

@meltsufin
Copy link
Member

For the record, LocalDatastoreHelper is open source - https://github.com/googleapis/java-datastore/blob/main/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java.
Thanks for sharing the testcontainers option!

@ablx
Copy link
Contributor Author
ablx commented Jan 5, 2023

Great, thanks for the link. I'll implement the feature in the near future.

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

No branches or pull requests

2 participants