Skip to content

Conversation

@ostafen
Copy link

@ostafen ostafen commented Nov 12, 2025

Description

This PR adds extends the materialize API with a BrokenSetsService containing a ListBrokenSets rpc method.
The method returns a list of all the broken sets detected during the hydration process up to a specific revision.

@github-actions
Copy link

github-actions bot commented Nov 12, 2025

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 14, 2025, 8:33 AM

@ostafen ostafen marked this pull request as ready for review November 12, 2025 14:04
@ostafen ostafen requested a review from vroldanbet November 12, 2025 14:05
Copy link
Contributor

@vroldanbet vroldanbet left a comment

Choose a reason for hiding this comment

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

LGTM, just nits

option java_multiple_files = true;
option java_package = "com.authzed.api.materialize.v0";

service BrokenPermissionsService {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be BrokenWatchedPermissionsService? I'm also not opposed to leaving it as-is

Suggested change
service BrokenPermissionsService {
service BrokenWatchedPermissionsService {

Copy link
Member

Choose a reason for hiding this comment

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

all cycles detected during the hydration process.
BrokenWatchedPermissionsService

These don't line up; I think we should just use BrokenPermissionsService, since these will be found during LPS

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean? They could also happen during updates, wouldn't they?

@vroldanbet vroldanbet changed the title feat: add broken sets service feat: add broken permissions service Nov 13, 2025

message ReadBrokenWatchedPermissionsRequest {
// optional_at_revision defines the specific revision at which the broken watched permissions should be evaluated.
// At this time, it is only compared against the revision of the provided backing store snapshot.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I follow this. The first line is sufficient to explain the semantics, I'd drop it.
Also please clarify that if no argument is provided, the server will use the latest available revision.

// resource_type is the type of the resource to watch for changes.
string resource_type = 1;
// permission is the permission to watch for changes.
string permission = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

The part that gives me a pause is the fact you could technically use a relation here too.
Perhaps I'd rename it to resource_relation, so it also looks symmetric when we eventually add subject_type and subject_relation.

Or you could use resource_permission_or_relation but that seems loooong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants