api(materialize/v0): add at_revision zedtoken to DownloadPermissionSetsResponse#169
Merged
Merged
Conversation
…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.
|
The latest Buf updates on your PR. Results from workflow Lint / lint (pull_request).
|
ostafen
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DownloadPermissionSetsResponsecurrently exposes the snapshot revision only asa
google.protobuf.Timestamp. Customers who want to resume from a download bycalling
WatchPermissionSetshave no way to obtain aZedTokenfor thesnapshot, so they either skip the cursor (leaving a gap between the snapshot
and the WPS stream) or parse the revision out of
metadata.jsonand re-encodeit themselves — neither is something we want to expose as a contract.
This PR adds an
at_revisionZedTokenfield to the response so that thesnapshot revision can be passed directly to
WatchPermissionSetsasoptional_starting_after, picking up the stream immediately after thesnapshot with no event-history gap.
Changes
authzed.api.v1.ZedToken at_revision = 3;toDownloadPermissionSetsResponseinauthzed/api/materialize/v0/watchpermissionsets.proto.docs/apidocs.swagger.json.Field name
at_revisionmatches the existing naming convention used byPermissionSetChange.at_revisionand mirrors the request'soptional_at_revision.Testing
buf buildpasses.buf breaking --against '.git#branch=main'passes — additive, non-breakingchange (new field, new tag number).