Hello folks 👋
# spicedb
p
Hello folks 👋 I'm facing an strange behaviour in SpiceDB. I've SpiceDB 1.31.0 running,a nd when querying a lookupSubjects with a limit: 1. the limit is ignored 2. it never returns a cursor that I can use to paginate. In my case, spicedb contains 10 records that would match the query, and when I pass a limit 5, it returns all 10 of them without a cursor instead of returning 5 and a cursor to keep going. Is it expected behaviour? I'm not seeing that with lookupResources for example Thx so much! (Investigating more, it seems that zed cli doesn't document --page-limit for lookup-subjects, but it does for lookup-resources; on top of that, on the protobuf docs, both seem to accept the optional_concrete_limit param https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.LookupSubjectsRequest)
y
yeah, [LookupSubjects](https://github.com/authzed/spicedb/blob/main/internal/services/v1/permissions.go#L602-L604) doesn't have cursor support yet. the big sticking point is wildcard subjects; we have an idea of how to support it but we haven't had the time to implement a proper fix yet. the version of SpiceDB you're on will quietly ignore the limit; more recent versions will return an error to indicate that what you're trying to do isn't supported. this is something that we should document in the meantime. is there a place where you'd look first for that kind of documentation?
p
Thanks for the answer @yetitwo , that makes sense. For me the problem was seeing that PB docs do mention it, and zed docs doesn't. My rule of thumb for spicedb is to look at the buf.build docs for documentation so it'd be great to update those.
y
that makes sense! i've got a PR up in that repo right now.
p
👏
Thx so much!
and apologies for the confusion
p
No problem, thx for updating the docs 🙏
2 Views