Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Support auto-configuration of the Datastore emulator #1642

Closed
meltsufin opened this issue Apr 10, 2019 · 4 comments · Fixed by #1661
Closed

Support auto-configuration of the Datastore emulator #1642

meltsufin opened this issue Apr 10, 2019 · 4 comments · Fixed by #1661
Labels
datastore GCP Datastore

Comments

@meltsufin
Copy link
Contributor

Currently, we support the Datastore emulator by allowing the client to configure host and port via the spring.cloud.gcp.datastore.emulator-host property. However, it remains the user's responsibility to start and stop the emulator.

The proposal is to add the spring.cloud.gcp.datastore.emulator=true property to automatically configure the emulator, start, and stop it. LocalDatastoreHelper from google-cloud-java can be used to accomplish it.

See discussion here.

@lucasoares
Copy link
Contributor

lucasoares commented Apr 10, 2019

I created the issue on google github here and I will submit the PR accepting a custom port.

We should also consider to make this same approach to all google's emulators.

@lucasoares
Copy link
Contributor

lucasoares commented Apr 26, 2019

@meltsufin google cloud lauched the release with my modification accepting port on the datastore emulator:
https://github.com/googleapis/google-cloud-java/releases/tag/v0.88.0

@meltsufin
Copy link
Contributor Author

@lucasoares Would you be interested in a contributing a PR for it?

@lucasoares
Copy link
Contributor

lucasoares commented Apr 29, 2019

@meltsufin I can help with that but I'm not a spring contributor.. To do that I will need to change datastore client's version, but spring use the google client BOM in spring-cloud-gcp-dependencies and it will not let me change only the datastore version. What I should do in this case?

Please look at the PR and let me know about my concerns.

If I continue with the contribution I will try to enter in some community chat to ask ppl questions like that. Thank you.

meltsufin pushed a commit that referenced this issue May 16, 2019
- Support for `spring.cloud.gcp.datastore.emulator.enabled` property
- `spring.cloud.gcp.datastore.emulator-host` deprecated in favor of `spring.cloud.gcp.datastore.host`
- The autoconfiguration itself manage the lifecycle to start and stop the emulator

Fixes #1642.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
datastore GCP Datastore
Development

Successfully merging a pull request may close this issue.

2 participants