Skip to content

Commit e85b08b

Browse files
authored
feat: pin spanner docker (#2236)
* create grepable pin with context for spanner * try to update and pin both spanner versions
1 parent 2fc40ea commit e85b08b

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/main-workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ jobs:
836836

837837
services:
838838
spanner-emulator:
839-
image: gcr.io/cloud-spanner-emulator/emulator:1.4.0
839+
# SPANNER_EMULATOR_VER (unit tests) — keep in sync with docker/docker-compose.spanner.yaml
840+
image: gcr.io/cloud-spanner-emulator/emulator:1.5.52
840841
ports:
841842
- 9010:9010
842843
- 9020:9020

docker/docker-compose.spanner.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
services:
22
sync-db:
3-
# Getting sporadic errors in spanner.
4-
# These errors are "INTERNAL: ZETASQL_RET_CHECK failure"
5-
# in the `backend/query/query_engine.cc` file for spanner.
6-
# These result in a 500 error, which causes the test to fail.
7-
# I believe come from the SQL parser, but am not sure. I am
8-
# unable to produce these errors locally, and am using the cited
9-
# version.
10-
image: gcr.io/cloud-spanner-emulator/emulator:1.5.13
3+
# SPANNER_EMULATOR_VER (e2e/integration tests) — keep in sync with .github/workflows/main-workflow.yml
4+
image: gcr.io/cloud-spanner-emulator/emulator:1.5.52
115
ports:
126
- "9010:9010"
137
- "9020:9020"

docs/src/introduction.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,13 @@ Note, that unlike MySQL, there is no automatic migrations facility. Currently, t
355355

356356
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.
357357

358+
**Updating the emulator version:** The emulator version is pinned in two places, each marked with `SPANNER_EMULATOR_VER`:
359+
360+
- `docker/docker-compose.spanner.yaml` — used for e2e/integration tests
361+
- `.github/workflows/main-workflow.yml` — used for CI unit tests
362+
363+
Both should always be set to the same version. When upgrading, update both and verify no regressions appear in CI.
364+
358365
##### Quick Setup Using prepare-spanner.sh
359366

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

0 commit comments

Comments
 (0)