Skip to content

api(materialize/v0): add at_revision zedtoken to DownloadPermissionSetsResponse#169

Merged
vroldanbet merged 1 commit into
mainfrom
add-zedtoken-to-download-api
May 21, 2026
Merged

api(materialize/v0): add at_revision zedtoken to DownloadPermissionSetsResponse#169
vroldanbet merged 1 commit into
mainfrom
add-zedtoken-to-download-api

Conversation

@vroldanbet
Copy link
Copy Markdown
Contributor

Description

DownloadPermissionSetsResponse currently exposes the snapshot revision only as
a google.protobuf.Timestamp. Customers who want to resume from a download by
calling WatchPermissionSets have no way to obtain a ZedToken for the
snapshot, so they either skip the cursor (leaving a gap between the snapshot
and the WPS stream) or parse the revision out of metadata.json and re-encode
it themselves — neither is something we want to expose as a contract.

This PR adds an at_revision ZedToken field to the response so that the
snapshot revision can be passed directly to WatchPermissionSets as
optional_starting_after, picking up the stream immediately after the
snapshot with no event-history gap.

Changes

  • Add authzed.api.v1.ZedToken at_revision = 3; to
    DownloadPermissionSetsResponse in
    authzed/api/materialize/v0/watchpermissionsets.proto.
  • Regenerate docs/apidocs.swagger.json.

Field name at_revision matches the existing naming convention used by
PermissionSetChange.at_revision and mirrors the request's
optional_at_revision.

Testing

  • buf build passes.
  • buf breaking --against '.git#branch=main' passes — additive, non-breaking
    change (new field, new tag number).

…tsResponse

DownloadPermissionSetsResponse only exposes the snapshot revision as a
Timestamp, so callers wanting to resume into WatchPermissionSets have to
either skip the cursor (gap between snapshot and stream) or re-encode the
revision from metadata.json themselves. Add an at_revision ZedToken so the
snapshot revision can be passed directly to WatchPermissionSets as
optional_starting_after.

Naming matches PermissionSetChange.at_revision and mirrors the request's
optional_at_revision.

Regenerate docs/apidocs.swagger.json.
@github-actions
Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Lint / lint (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 21, 2026, 5:50 PM

Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

LGTM

@vroldanbet vroldanbet merged commit d5fc38f into main May 21, 2026
3 checks passed
@vroldanbet vroldanbet deleted the add-zedtoken-to-download-api branch May 21, 2026 18:02
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 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