Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@ jobs:

services:
spanner-emulator:
image: gcr.io/cloud-spanner-emulator/emulator:1.4.0
# SPANNER_EMULATOR_VER (unit tests) — keep in sync with docker/docker-compose.spanner.yaml
image: gcr.io/cloud-spanner-emulator/emulator:1.5.52
ports:
- 9010:9010
- 9020:9020
Expand Down
10 changes: 2 additions & 8 deletions docker/docker-compose.spanner.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
services:
sync-db:
# Getting sporadic errors in spanner.
# These errors are "INTERNAL: ZETASQL_RET_CHECK failure"
# in the `backend/query/query_engine.cc` file for spanner.
# These result in a 500 error, which causes the test to fail.
# I believe come from the SQL parser, but am not sure. I am
# unable to produce these errors locally, and am using the cited
# version.
image: gcr.io/cloud-spanner-emulator/emulator:1.5.13
# SPANNER_EMULATOR_VER (e2e/integration tests) — keep in sync with .github/workflows/main-workflow.yml
image: gcr.io/cloud-spanner-emulator/emulator:1.5.52
ports:
- "9010:9010"
- "9020:9020"
Expand Down
7 changes: 7 additions & 0 deletions docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ Note, that unlike MySQL, there is no automatic migrations facility. Currently, t

Google supports an in-memory Spanner emulator, which can run on your local machine for development purposes. You can install the emulator via the gcloud CLI or Docker by following the instructions [here](https://cloud.google.com/spanner/docs/emulator#installing_and_running_the_emulator). Once the emulator is running, you'll need to create a new instance and a new database.

**Updating the emulator version:** The emulator version is pinned in two places, each marked with `SPANNER_EMULATOR_VER`:

- `docker/docker-compose.spanner.yaml` — used for e2e/integration tests
- `.github/workflows/main-workflow.yml` — used for CI unit tests

Both should always be set to the same version. When upgrading, update both and verify no regressions appear in CI.

##### Quick Setup Using prepare-spanner.sh

The easiest way to set up a Spanner emulator database is to use the `prepare-spanner.sh` script:
Expand Down