From e85b08bd73c69c2f09a4245463686f11ed00a471 Mon Sep 17 00:00:00 2001 From: Taddes Date: Tue, 28 Apr 2026 00:03:31 +0300 Subject: [PATCH] feat: pin spanner docker (#2236) * create grepable pin with context for spanner * try to update and pin both spanner versions --- .github/workflows/main-workflow.yml | 3 ++- docker/docker-compose.spanner.yaml | 10 ++-------- docs/src/introduction.md | 7 +++++++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main-workflow.yml b/.github/workflows/main-workflow.yml index 498b9f01..410be787 100644 --- a/.github/workflows/main-workflow.yml +++ b/.github/workflows/main-workflow.yml @@ -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 diff --git a/docker/docker-compose.spanner.yaml b/docker/docker-compose.spanner.yaml index fa0f6fe4..c2a99246 100644 --- a/docker/docker-compose.spanner.yaml +++ b/docker/docker-compose.spanner.yaml @@ -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" diff --git a/docs/src/introduction.md b/docs/src/introduction.md index 2fa2836a..a9b81608 100644 --- a/docs/src/introduction.md +++ b/docs/src/introduction.md @@ -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: