authzed / spicedb

Open Source, Google Zanzibar-inspired permissions database to enable fine-grained authorization for customer applications
https://authzed.com/docs
Apache License 2.0
4.95k stars 266 forks source link

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

Closed tstirrat15 closed 2 weeks ago

tstirrat15 commented 4 weeks ago

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 commented 3 weeks ago

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

vroldanbet commented 3 weeks ago

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

tstirrat15 commented 3 weeks ago

@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.

josephschorr commented 2 weeks ago

Fixed by #2043