spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

Add linter to enforce usage of VT versions of marshallers/unmarshallers

Open tstirrat15 opened this issue 1 year ago • 3 comments
trafficstars

Problem Statement

They're more performant and should be used anywhere we're doing this work. A linter will help us keep track of them.

Solution Brainstorm

Write a linter

tstirrat15 avatar Aug 20 '24 18:08 tstirrat15

Here's an example that the linter should catch: https://github.com/authzed/spicedb/blob/d77601bfe8b927c78d348144684bfa972b14e199/internal/datastore/memdb/readwrite.go#L268

tstirrat15 avatar Aug 22 '24 17:08 tstirrat15

I recall that specifically there was some divergence in the serialization of VT and protobuf that led to some errors, this may not be the case anymore

vroldanbet avatar Aug 23 '24 10:08 vroldanbet

@vroldanbet I think that was probably this: https://github.com/planetscale/vtprotobuf/issues/61

We observed a problem as a result of it, and we fixed the problem by bumping to the most recent version of the lib.

tstirrat15 avatar Aug 27 '24 21:08 tstirrat15

Fixed by #2043

josephschorr avatar Aug 30 '24 21:08 josephschorr