-
Notifications
You must be signed in to change notification settings - Fork 44
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 fails to start without project id property #355
Comments
I wonder if this is an issue with out-dated documentation — https://cloud.google.com/sdk/gcloud/reference/beta/emulators/datastore/start also declares that the |
@meredithslota I question here particularly Consider it starts in an isolated environment without any env variable predefined, then As well there is no method in builder to pass the project id explicitly I propose:
It will make it clear as right now there is no clue to know why it failed to start when no env variable has been provided. |
@artemptushkin , Thanks for reporting this. We have fixed this issue in this PR and is up for review. You can find the explanation and fix in the PR itself. |
#923) * Running gcloud datastore emulator with --project argument * Allow user to pass a custom project id when creating a new LocalDatastoreHelper instance * Creating a local variable to increase the readability and emphasizing on the fact that project id not nullable now * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [2.13.0](https://github.com/googleapis/java-datastore/compare/v2.12.5...v2.13.0) (2022-12-06) ### Features * Next release from main branch is 2.13.0 ([#917](https://github.com/googleapis/java-datastore/issues/917)) ([1f12435](https://github.com/googleapis/java-datastore/commit/1f1243577cbdc206b6a0bfcde818411eb1b806ad)) ### Bug Fixes * [#355](https://github.com/googleapis/java-datastore/issues/355) Explicitly passing --project argument when starting emulator ([#923](https://github.com/googleapis/java-datastore/issues/923)) ([ef4065d](https://github.com/googleapis/java-datastore/commit/ef4065d233b968f58a34673aa53d39f60a013e2d)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#932](https://github.com/googleapis/java-datastore/issues/932)) ([1dbcea7](https://github.com/googleapis/java-datastore/commit/1dbcea73827961148800c1ec8e87065dbceb6c88)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.18 ([#924](https://github.com/googleapis/java-datastore/issues/924)) ([625e896](https://github.com/googleapis/java-datastore/commit/625e89685172ae546a813f5f7184223d01fbb0ac)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#930](https://github.com/googleapis/java-datastore/issues/930)) ([77285be](https://github.com/googleapis/java-datastore/commit/77285be97fbd6bca1ada35202842238e306dd8dc)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.18 ([#925](https://github.com/googleapis/java-datastore/issues/925)) ([0c7539d](https://github.com/googleapis/java-datastore/commit/0c7539d736ec993d7bb0531d7cd4dab1b08487a0)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#931](https://github.com/googleapis/java-datastore/issues/931)) ([40b4011](https://github.com/googleapis/java-datastore/commit/40b4011e3a826a91e33541efdecb05f0e129f87c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* chore: upgrade native image checks to graalvm-22.3.0 (#1718) (#926) chore: upgrade native image checks to graalvm-22.3.0 Source-Link: googleapis/synthtool@5e52896 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:27b1b1884dce60460d7521b23c2a73376cba90c0ef3d9f0d32e4bdb786959cfd Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore: add new branch to sync-repo-settings (#927) * fix: #355 Explicitly passing --project argument when starting emulator (#923) * Running gcloud datastore emulator with --project argument * Allow user to pass a custom project id when creating a new LocalDatastoreHelper instance * Creating a local variable to increase the readability and emphasizing on the fact that project id not nullable now * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.5 (#929) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 (#931) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 (#930) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 (#932) * chore(main): release 2.13.0 (#921) :robot: I have created a release *beep* *boop* --- ## [2.13.0](https://github.com/googleapis/java-datastore/compare/v2.12.5...v2.13.0) (2022-12-06) ### Features * Next release from main branch is 2.13.0 ([#917](https://github.com/googleapis/java-datastore/issues/917)) ([1f12435](https://github.com/googleapis/java-datastore/commit/1f1243577cbdc206b6a0bfcde818411eb1b806ad)) ### Bug Fixes * [#355](https://github.com/googleapis/java-datastore/issues/355) Explicitly passing --project argument when starting emulator ([#923](https://github.com/googleapis/java-datastore/issues/923)) ([ef4065d](https://github.com/googleapis/java-datastore/commit/ef4065d233b968f58a34673aa53d39f60a013e2d)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#932](https://github.com/googleapis/java-datastore/issues/932)) ([1dbcea7](https://github.com/googleapis/java-datastore/commit/1dbcea73827961148800c1ec8e87065dbceb6c88)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.18 ([#924](https://github.com/googleapis/java-datastore/issues/924)) ([625e896](https://github.com/googleapis/java-datastore/commit/625e89685172ae546a813f5f7184223d01fbb0ac)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#930](https://github.com/googleapis/java-datastore/issues/930)) ([77285be](https://github.com/googleapis/java-datastore/commit/77285be97fbd6bca1ada35202842238e306dd8dc)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.18 ([#925](https://github.com/googleapis/java-datastore/issues/925)) ([0c7539d](https://github.com/googleapis/java-datastore/commit/0c7539d736ec993d7bb0531d7cd4dab1b08487a0)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#931](https://github.com/googleapis/java-datastore/issues/931)) ([40b4011](https://github.com/googleapis/java-datastore/commit/40b4011e3a826a91e33541efdecb05f0e129f87c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-datastore to v2.13.0 (#935) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore) | `2.12.5` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-datastore/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-datastore/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-datastore/2.13.0/compatibility-slim/2.12.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-datastore/2.13.0/confidence-slim/2.12.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-datastore</summary> ### [`v2.13.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-datastorecomparev2125v2130-2022-12-06) [Compare Source](https://github.com/googleapis/java-datastore/compare/v2.12.5...v2.13.0) ##### Features - Next release from main branch is 2.13.0 ([#​917](https://github.com/googleapis/java-datastore/issues/917)) ([1f12435](https://github.com/googleapis/java-datastore/commit/1f1243577cbdc206b6a0bfcde818411eb1b806ad)) ##### Bug Fixes - [#​355](https://github.com/googleapis/java-datastore/issues/355) Explicitly passing --project argument when starting emulator ([#​923](https://github.com/googleapis/java-datastore/issues/923)) ([ef4065d](https://github.com/googleapis/java-datastore/commit/ef4065d233b968f58a34673aa53d39f60a013e2d)) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#​932](https://github.com/googleapis/java-datastore/issues/932)) ([1dbcea7](https://github.com/googleapis/java-datastore/commit/1dbcea73827961148800c1ec8e87065dbceb6c88)) - Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.18 ([#​924](https://github.com/googleapis/java-datastore/issues/924)) ([625e896](https://github.com/googleapis/java-datastore/commit/625e89685172ae546a813f5f7184223d01fbb0ac)) - Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#​930](https://github.com/googleapis/java-datastore/issues/930)) ([77285be](https://github.com/googleapis/java-datastore/commit/77285be97fbd6bca1ada35202842238e306dd8dc)) - Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.18 ([#​925](https://github.com/googleapis/java-datastore/issues/925)) ([0c7539d](https://github.com/googleapis/java-datastore/commit/0c7539d736ec993d7bb0531d7cd4dab1b08487a0)) - Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#​931](https://github.com/googleapis/java-datastore/issues/931)) ([40b4011](https://github.com/googleapis/java-datastore/commit/40b4011e3a826a91e33541efdecb05f0e129f87c)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-datastore). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4yNC4wIiwidXBkYXRlZEluVmVyIjoiMzQuMjQuMCJ9--> * chore(main): release 2.13.1-SNAPSHOT (#934) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport (#933) * chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: googleapis/googleapis@758f0d1 Source-Link: googleapis/googleapis-gen@78bd8f0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * build(deps): bump certifi from 2022.9.24 to 2022.12.7 in /synthtool/gcp/templates/java_library/.kokoro (#1732) (#937) build(deps): bump certifi Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeff Ching <chingor@google.com> Source-Link: https://github.com/googleapis/synthtool/commit/ae0d43e5f17972981fe501ecf5a5d20055128bea Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:9de537d592b60e5eac73b374a28263969bae91ecdb29b445e894576fbf54851c * chore(deps): update dependency com.google.cloud:libraries-bom to v26.2.0 (#938) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Prateek <jainsahab@google.com> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeff Ching <chingor@google.com>
Environment details
org.springframework.cloud:spring-cloud-gcp-starter-data-datastore:1.2.5.RELEASE
, I checked - same with the latestgoogle-cloud-datastore:1.104.0
google-cloud-core:1.93.7
Steps to reproduce
This version emulator fails to start without
--project
propertygcloud beta emulators datastore start
Starting emulator with Java code like this:
Causes: no messages in logs, the application failed to call the Datastore then with I/O exceptions, i.e. curl doesn't work.
Workaround
Set env variable:
CLOUDSDK_CORE_PROJECT
with the projectId valueQuestions
LocalDatastoreHelper
doesn't pass--project
on startup and doesn't expect this from the builder?LocalDatastoreHelper #start
fail to start on this kind of errors?Besides the outcomes of these questions, I would expect this class to fail to start or log something.
The text was updated successfully, but these errors were encountered: