Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Datastore emulator fails to start without project id property #355

Description

@artemptushkin

Environment details

  1. GCloud datastore emulator 2.1.0
  2. Google Cloud SDK 327.0.0
  3. OS type and version: NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" / MacOS Catalina 10.15.7 (19H15)
  4. Java version: OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10) / OpenJDK Runtime Environment (build 11.0.7+10)
  5. Libs:

Steps to reproduce

This version emulator fails to start without --project property

  1. gcloud beta emulators datastore start
ERROR: (gcloud.beta.emulators.datastore.start) The required property [project] is not currently set.
You may set it for your current workspace by running:

  $ gcloud config set project VALUE

or it can be set temporarily by the environment variable [CLOUDSDK_CORE_PROJECT]

Starting emulator with Java code like this:

LocalDatastoreHelper.create(settings.getConsistency(), settings.getPort());

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 value

Questions

  1. Why LocalDatastoreHelper doesn't pass --project on startup and doesn't expect this from the builder?
  2. Shouldn't 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: datastoreIssues related to the googleapis/java-datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions