Repository navigation
Conversation
…luster Adds a 3-node one-per-region (us-east1/us-west1/us-central1) docker-compose cluster and a separate examples-it-multiregion workflow that brings it up, makes defaultdb multi-region, and runs RegionalIdeaIT with CRDB_MULTIREGION=true and CRDB_URL pointed at node1. examples-it.yml (single-node Testcontainers) is untouched.
…es jdbc:postgresql) The first run failed with IllegalArgumentException at RegionalIdeaIT.java:32 (ds.setUrl): the test feeds CRDB_URL straight to PGSimpleDataSource, which rejects the libpq-style postgres:// URL copied from the go example. Switch to jdbc:postgresql://localhost:26257/defaultdb?sslmode=disable&user=root (user=root needed since the JDBC driver otherwise uses the runner's OS user).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the gated
RegionalIdeaIT(REGIONAL BY ROW region-homed writes) actually execute in CI against a real multi-region CockroachDB cluster.examples/ideas-board/multiregion-compose.yml— 3-node insecure cluster, one node per region (us-east1,us-west1,us-central1) via--locality, RF=3. One-shotcrdb-initrunscockroach init, waits for 3 regions, thenSET PRIMARY REGION us-east1+ADD REGION us-west1/us-central1ondefaultdb. On-disk ephemeral stores + capped caches; every SQL call has astatement_timeoutand every loop is bounded (fails instead of hanging)..github/workflows/examples-it-multiregion.yml— new workflow: up -d →timeout 420 docker compose run --rm crdb-init→./gradlew -p examples/ideas-board test --tests '*RegionalIdeaIT*'withCRDB_MULTIREGION=trueandCRDB_URL=postgres://root@localhost:26257/defaultdb?sslmode=disable.down -valways; logs dumped on failure.Shape copied from the proven go-library
examples-it-multiregion.yml/multiregion-compose.yml.examples-it.yml(single-node Testcontainers) is left untouched.Notes
RegionalIdeaITneeds onlyus-east1+us-west1on the DB; the compose adds a 3rd region (us-central1) to stay a near-verbatim copy of the go cluster and give RF=3. Test only asserts on the 2 it uses../gradlew -p examples/ideas-board test --tests '*RegionalIdeaIT*'builds, resolves the published 0.1.2 lib, discovers the IT, and SKIPS withoutCRDB_MULTIREGION(JDK 25). The multi-region run itself only happens in CI (needs the cluster).