chore: add cockroachdb 26.1 to the matrix and modify version parsing#2907
chore: add cockroachdb 26.1 to the matrix and modify version parsing#2907tstirrat15 wants to merge 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ 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. 🚀 New features to boost your workflow:
|
128c01f to
05fdf9e
Compare
0af5c22 to
22651c5
Compare
ae66de5 to
3406d66
Compare
3406d66 to
6500d9b
Compare
| WithAcquireTimeout(5*time.Second), | ||
| )) | ||
|
|
||
| t.Run("TestVersionReading", createDatastoreTest( |
There was a problem hiding this comment.
why wrap VersionReadingTest at all with createDatastoreTest? just write it as a normal test func TestVersionReading(t *testing.T) { .. }
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
to what DB? where was the DB created?
There was a problem hiding this comment.
The DB instance in the test? Or are you wanting a more descriptive comment?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
6500d9b to
f7ddc05
Compare
f7ddc05 to
4e0383b
Compare
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
Testing
Review. See that tests pass.