How can the Google Cloud Datastore Emulator verify our datastore-index.xml?

636 Views Asked by At

We use the Google Cloud Datastore Emulator. It autogenerates indexes.yaml. But as we did with the old Google Plugin for Eclipse, we want to get missing-index messages in the local development environment, and not later in cloud deployment. So, we want the Emulator to use our manually-maintained datastore-indexes.xml

How do we configure the use of a specific datastore-indexes.xml in the Google Cloud Datastore Emulator? I don't see any relevant command-line switches in the help text.

1

There are 1 best solutions below

9
On BEST ANSWER

EDIT:

My answer was based on the dev_appserver emulator, not the current one. After running some tests, it appears that the emulator only has endpoints for a subset of the Datastore API methods, and index building (nor export/import for that matter) are available.

Leaving my previous answer to avoid repeated answers with the same wrong info:

_________

According to the docs, if autoGenerate="false" is in your datastore-indexes.xml, the development server should ignore the contents of WEB-INF/appengine-generated/datastore-indexes-auto.xml.

I think this might be what you're looking for, although I have not yet tested it.