Skip to content

ci: run Ideas Board multi-region IT against a docker-compose cluster - #8

Merged
felipeg48 merged 1 commit into
mainfrom
ci/multiregion-it
Nov 19, 2026
Merged

felipeg48 merged 1 commit into
mainfrom
ci/multiregion-it

Conversation

@felipeg48

Copy link
Copy Markdown
Contributor

What

Makes the Ideas Board multi-region integration test (examples/ideas-board/test_regional_it.py) actually run in CI instead of skipping.

  • examples/ideas-board/multiregion-compose.yml — 3-node insecure CockroachDB cluster, one node per region via --locality (us-east1, us-west1, us-central1), --join mesh, on-disk ephemeral stores, --cache=256MiB --max-sql-memory=256MiB. One-shot crdb-init runs cockroach init, waits for all 3 regions, then ALTER DATABASE defaultdb SET PRIMARY REGION + ADD REGION. Only node1 publishes :26257.
  • .github/workflows/examples-it-multiregion.yml — up -d → timeout 420 docker compose run --rm crdb-init → pip install -r requirements.txt → pytest test_regional_it.py -v with CRDB_MULTIREGION=true and CRDB_URL=postgres://root@localhost:26257/defaultdb?sslmode=disable. Dumps cluster logs on failure, down -v always.

Mirrors the proven Go repo setup (cockroachdb-go-library). The existing single-node Testcontainers workflow (examples-it.yml) is untouched; the regional IT still skips there.

Verification

Ran locally against the compose cluster (colima): crdb-init configured defaultdb as multi-region (us-east1 primary + us-west1 + us-central1) and the test passed — rows homed correctly in us-east1 and us-west1 via the hidden crdb_region column. No library or demo bug found.

test_regional_it.py::test_writes_home_rows_in_the_pinned_region PASSED [100%]
1 passed in 1.83s

Add a 3-region (us-east1/us-west1/us-central1) docker-compose cluster and a
dedicated examples-it-multiregion workflow so test_regional_it.py actually
executes instead of skipping. The one-shot crdb-init service inits the cluster,
waits for all regions, and makes defaultdb multi-region; the job then installs
the published packages and runs only the regional IT with CRDB_MULTIREGION=true
and CRDB_URL pointed at node1. Mirrors the proven Go repo setup. The existing
examples-it.yml (single-node Testcontainers) is untouched.
@felipeg48
felipeg48 merged commit b9412f6 into main Nov 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant