Skip to content

feat: --response-batch-size for batched LookupResources - #729

Merged
ostafen merged 3 commits into
mainfrom
feat/lr-batched-lookupresources
Nov 20, 2026
Merged

ostafen merged 3 commits into
mainfrom
feat/lr-batched-lookupresources

Conversation

@ostafen

@ostafen ostafen commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

What

Adds a --response-batch-size flag to zed permission lookup-resources. When > 0, the client requests the batched LookupResources API (optional_response_batch_size) and decodes the batched response — a LookupResourcesBatch carrying multiple resources with a single resume cursor per batch. 0 (default) preserves one-resource-per-message behavior.

Why

Lets zed exercise and benchmark batched LookupResources, which cuts per-message gRPC overhead and cursor-token payload on high-cardinality lookups.

Dependency chain

  • authzed/api#176 — proto (merged)
  • authzed/authzed-go#436 — regenerated client (merged); pinned here at 380614b (bumps zed's authzed-go v1.9.0 → the batched client)
  • authzed/spicedb#3517 — server side (open)

Testing

  • go build ./... passes against the pinned client.

…p-resources

- Bump WASM job go-version to 1.27.4 to match the go.mod toolchain
  required by authzed-go v1.11.1-0.20261120130125-380614b108c9.
- Regenerate docs/zed.md for the new --response-batch-size flag.
- Bump go.opentelemetry.io/otel/sdk to v1.47.0 to resolve
  CVE-2026-128085 pulled in by the authzed-go dependency bump.
- Register the response-batch-size flag in the lookup-resources test
  command helper so MustGetUint32 no longer panics.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/commands/permission.go 66.66% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread docs/zed.md Resolved
Comment thread internal/commands/permission.go Resolved
@ostafen
ostafen requested a review from vroldanbet November 20, 2026 15:52
Comment on lines +182 to +185
// Request batching against a server that does not support it (this test
// server is an older SpiceDB that ignores optional_response_batch_size and
// replies with the singular one-resource-per-message shape). zed must fall
// back to reading the singular field and still return every resource.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the locked SpiceDB version may change at any time, compromising this test

@ostafen
ostafen merged commit 9901ba6 into main Nov 20, 2026
14 checks passed
@ostafen
ostafen deleted the feat/lr-batched-lookupresources branch November 20, 2026 16:22
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants