Skip to content

Tags: cowpaths/cloud-spanner-emulator

Tags

v1.5.51-fs.1

Toggle v1.5.51-fs.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add Linux ARM64 (aarch64) CI build, test, and release (#5)

- Add linux-arm64 executor using arm.xlarge resource class
- Add build-linux-arm64, test-linux-arm64, release-linux-arm64 jobs
- Fix install-bazelisk to download the correct binary for aarch64
- Fix package-and-upload to detect arch via uname -m instead of
hardcoding amd64 for all Linux
- Wire into both build-and-test and release workflows

No source code changes needed — the codebase has no arch-specific code,
and all external deps (ZetaSQL, gRPC, etc.) support ARM64.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

v1.5.51-fs.test

Toggle v1.5.51-fs.test's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add persistence layer for emulator state (#3)

## Summary
- Adds a persistence layer that allows the Cloud Spanner emulator to
save and restore state across restarts via a `--data_dir` flag
- Implements WAL (write-ahead log) for recording mutations, periodic
snapshots for full state serialization, and a snapshot loader for
restoring state on startup
- Includes a `PersistenceManager` that coordinates background snapshot
writing and WAL rotation
- Adds protobuf schema (`persistence.proto`) for serializing all
emulator state: instances, databases, schemas, storage, and keys
- Adds `--help` usage message documenting emulator flags

## Components
- **`persistence.proto`** — Protobuf definitions for serialized emulator
state
- **`value_serializer`** — Serializes/deserializes ZetaSQL values and
keys to/from proto
- **`wal_writer`** — Append-only write-ahead log with CRC32C integrity
checks
- **`persistent_storage`** — Storage implementation that wraps in-memory
storage with WAL recording
- **`snapshot_writer`** — Full state snapshot serialization (instances,
databases, schemas, data)
- **`snapshot_loader`** — Restores emulator state from snapshots + WAL
replay
- **`persistence_manager`** — Orchestrates background snapshots, WAL
rotation, and shutdown

## Test plan
- [x] Unit tests for value serializer (`value_serializer_test`)
- [x] Unit tests for WAL writer (`wal_writer_test`)
- [x] Unit tests for persistent storage (`persistent_storage_test`)
- [ ] Integration testing with emulator binary using `--data_dir`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>