Closed benvernier-sc closed 2 weeks ago
CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.
I have read the CLA Document and I hereby sign the CLA
You can retrigger this bot by commenting recheck in this Pull Request
@benvernier-sc Decided this approach didn't work?
This PR is part of a proof of concept for https://github.com/authzed/spicedb/issues/1903.
It temporarily uses a
replace
statement ingo.mod
to use the files generated in https://github.com/benvernier-sc/authzed-go/tree/write_relationships_status from https://github.com/authzed/api/pull/106.It defines a new
core
protobuf messageRelationTupleUpdateStatus
that corresponds to theRelationshipUpdateStatus
from the API protobuf.It then updates the signature of
ReadWriteTransaction.WriteRelationships
fromto
This allows to specify whether the store should return the status of the operations or not, and adds a return field with said statuses that are only guaranteed to be populated if
returnStatus
was true.All the usages of
WriteRelationships
store method were updated to ensure the code would still compile. TheWriteRelationships
gRPC handler was updated to actually pass theWithStatus
option from the request and use the returned statuses.So far only the Postgres implementation has been updated to honor the new options. All scenarios have been tested locally, but no automated tests have been written so far.