spicedb
spicedb copied to clipboard
Dispatch trailers are not present for all operations
trafficstars
Works as intended:
$ zed permission check resource:jirat manage user:cto --log-level=debug
4:20PM DBG set log level new level=debug
4:20PM DBG extracted response dispatch metadata cached=2 dispatch=0
false
Warns because they are not present:
$ zed schema read
4:20PM WRN error reading dispatched operations trailer error="key `io.spicedb.respmeta.dispatchedoperationscount` not found in trailer"
4:20PM WRN error reading cached operations trailer error="key `io.spicedb.respmeta.cachedoperationscount` not found in trailer"
definition user {}
$ zed relationship read resource:jira
4:20PM WRN error reading dispatched operations trailer error="key `io.spicedb.respmeta.dispatchedoperationscount` not found in trailer"
4:20PM WRN error reading cached operations trailer error="key `io.spicedb.respmeta.cachedoperationscount` not found in trailer"
resource:jira manager usergroup:engineering#manager
resource:jira viewer usergroup:engineering#member
I think it's more than just schema operations, I think it's also read, write, and delete, all of which can do one or more downstream requests.
We also need to set them even in the error path.
We could have a middleware set them if not present to 1 operation and 0 cached?