Skip to content

Comments

chore: add cockroachdb 26.1 to the matrix and modify version parsing#2907

Open
tstirrat15 wants to merge 1 commit intomainfrom
test-against-crdb-26.1
Open

chore: add cockroachdb 26.1 to the matrix and modify version parsing#2907
tstirrat15 wants to merge 1 commit intomainfrom
test-against-crdb-26.1

Conversation

@tstirrat15
Copy link
Contributor

@tstirrat15 tstirrat15 commented Feb 18, 2026

Description

Cockroach 26.1 has been released and we want to make sure that SpiceDB plays nice with it. This moves the matrix so that we test against 26.1.

We found that Cockroach now restricts access to its internal table, so we can't grab the version object directly. This changes the logic so that we rely on string parsing. This is less safe/direct, but it also works with v26.1.

Changes

  • Move matrix so that we test against 26.1

Testing

Review. See that tests pass.

@tstirrat15 tstirrat15 marked this pull request as ready for review February 18, 2026 23:52
@tstirrat15 tstirrat15 requested a review from a team as a code owner February 18, 2026 23:52
@github-actions github-actions bot added the area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) label Feb 18, 2026
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.27%. Comparing base (f3e150e) to head (4e0383b).

❌ Your project check has failed because the head coverage (73.27%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2907      +/-   ##
==========================================
- Coverage   74.54%   73.27%   -1.27%     
==========================================
  Files         484      484              
  Lines       59228    59220       -8     
==========================================
- Hits        44146    43387     -759     
- Misses      11990    12789     +799     
+ Partials     3092     3044      -48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tstirrat15 tstirrat15 force-pushed the test-against-crdb-26.1 branch 2 times, most recently from 128c01f to 05fdf9e Compare February 19, 2026 00:26
@tstirrat15 tstirrat15 changed the title chore: add cockroachdb 26.1 to the matrix chore: add cockroachdb 26.1 to the matrix and modify version parsing Feb 19, 2026
@github-actions github-actions bot added the area/datastore Affects the storage system label Feb 19, 2026
@tstirrat15 tstirrat15 force-pushed the test-against-crdb-26.1 branch 2 times, most recently from 0af5c22 to 22651c5 Compare February 19, 2026 00:32
@tstirrat15 tstirrat15 force-pushed the test-against-crdb-26.1 branch 3 times, most recently from ae66de5 to 3406d66 Compare February 20, 2026 19:49
@tstirrat15 tstirrat15 force-pushed the test-against-crdb-26.1 branch from 3406d66 to 6500d9b Compare February 20, 2026 20:38
WithAcquireTimeout(5*time.Second),
))

t.Run("TestVersionReading", createDatastoreTest(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wrap VersionReadingTest at all with createDatastoreTest? just write it as a normal test func TestVersionReading(t *testing.T) { .. }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the createDatastoreTest is parametrized over CRDB versions and takes care of setting up the datastore. I want to be sure that we're correctly reading the version for all CRDB versions that we're testing against.

const (
readMaxConns = 10
)
// Set up a raw connection to the DB
Copy link
Contributor

@miparnisari miparnisari Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to what DB? where was the DB created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DB instance in the test? Or are you wanting a more descriptive comment?

Copy link
Contributor

@miparnisari miparnisari Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the DB is created in createDatastoreTest, and the url that we hardcoded in line 986 just... works? is that it?

i wonder if we could structure this better. e.g. if the DB created points to port 5433, this test will break.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so - I copied this test from the structure of a preceding test. I haven't dug into how they work internally. I kinda wonder if this is something with a pgx test connection or a detail of how we're using test containers.

@tstirrat15 tstirrat15 force-pushed the test-against-crdb-26.1 branch from 6500d9b to f7ddc05 Compare February 23, 2026 14:50
@tstirrat15 tstirrat15 force-pushed the test-against-crdb-26.1 branch from f7ddc05 to 4e0383b Compare February 23, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants