ci: test against crdb v25.4 and v26.2 - #404
Merged
Merged
Conversation
Add CockroachDB v25.4 and v26.2 to the CI test matrix and remove the now end-of-life v25.1 and v25.3 versions. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
CockroachDB v26.x creates tables with schema_locked enabled by default. It cannot auto-unlock a table for the multi-statement DDL batches used to drop and re-add foreign keys in disable_referential_integrity (auto-unlock only applies to single-statement implicit transactions, and the test suite runs with autocommit_before_ddl disabled). Unlock the affected tables explicitly around each batch and restore their locked state afterwards. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
Adding a foreign key writes a back-reference into the referenced table, so that table must be unlocked too, not just the referencing table. A parent table with no outgoing foreign keys (e.g. students) was never in the referencing set and stayed schema_locked, so the batched ADD CONSTRAINT still failed. Pass both the referencing and referenced tables to with_schema_unlocked in both the remove and add paths. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
CockroachDB v26.x enables the schema_locked storage parameter on new tables by default (via the sql.create_table_with_schema_locked.enabled cluster setting). Locked tables reject DDL run inside a transaction, which is how Active Record migrations and the test suite issue schema changes; CockroachDB can only auto-unlock a table for single-statement implicit transactions. Set create_table_with_schema_locked = false at the session level on connect so Active Record works out of the box, gated to v25.3+ where the session variable exists, and deferring to an explicit :variables entry when the user provides one. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
Add a regression test that locks both the referencing and referenced tables of a foreign key, then verifies disable_referential_integrity succeeds (unlocking the tables around the batched drop/re-add of foreign keys) and restores their locked state. Runs outside a transaction and is gated to CockroachDB v25.3+ where the schema_locked toggle is available. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
rafiss
force-pushed
the
ci-crdb-25.4-26.2
branch
from
August 18, 2026 21:40
bcab6db to
f5e202e
Compare
test_cache_gets_cleared_after_migration runs change_column to add a VARCHAR length limit. Since cockroachdb/cockroach@5a8fd7226192 (v26.2), converting an unbounded string to a bounded one validates existing data and cannot run inside an explicit transaction (https://go.crdb.dev/issue-v/49351/v26.2). Rather than skip the test, run it non-transactionally so change_column executes as an implicit single-statement transaction, which CockroachDB allows. Earlier versions treat the change as metadata-only, so this is safe everywhere. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
rafiss
force-pushed
the
ci-crdb-25.4-26.2
branch
from
August 18, 2026 22:26
6892f87 to
4e8623d
Compare
Merged
rafiss
added a commit
that referenced
this pull request
Aug 19, 2026
- Disabled schema_locked by default on connect for CockroachDB v25.3+ and unlocked tables around batched foreign key changes (#404) - Improved error classification by detecting cached plan failures from the error message instead of the source function (#403) - Stopped advertising support for restarting database transactions (#398) - Fixed enum columns being misdetected as spatial columns (#396) Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
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.
Add CockroachDB v25.4 and v26.2 to the CI test matrix and remove the
now end-of-life v25.1 and v25.3 versions.