From 41697b71aae138dd40f467e874ec0aa827d1957a Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 18 Apr 2024 12:59:42 -0400 Subject: [PATCH] Remove hard-coded limits to make them configurable in SpiceDB --- authzed/api/v1/experimental_service.proto | 2 +- authzed/api/v1/permission_service.proto | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/authzed/api/v1/experimental_service.proto b/authzed/api/v1/experimental_service.proto index d24e1c8..9d7eecf 100644 --- a/authzed/api/v1/experimental_service.proto +++ b/authzed/api/v1/experimental_service.proto @@ -116,7 +116,7 @@ message BulkExportRelationshipsRequest { // relationships the server can return in one page. By default, the server // will pick a page size, and the server is free to choose a smaller size // at will. - uint32 optional_limit = 2 [(validate.rules).uint32 = {gte:0, lte: 10000}]; + uint32 optional_limit = 2 [(validate.rules).uint32 = {gte:0}]; // optional_cursor, if specified, indicates the cursor after which results // should resume being returned. The cursor can be found on the diff --git a/authzed/api/v1/permission_service.proto b/authzed/api/v1/permission_service.proto index 22afeea..ad26df7 100644 --- a/authzed/api/v1/permission_service.proto +++ b/authzed/api/v1/permission_service.proto @@ -212,7 +212,7 @@ message ReadRelationshipsRequest { // before the stream is closed on the server side. By default, the stream will continue // resolving relationships until exhausted or the stream is closed due to the client or a // network issue. - uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0, lte: 1000}]; + uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0}]; // optional_cursor, if specified, indicates the cursor after which results should resume being returned. // The cursor can be found on the ReadRelationshipsResponse object. @@ -286,7 +286,7 @@ message DeleteRelationshipsRequest { // the deletion call will fail with an error to prevent partial deletion. If partial deletion // is needed, specify below that partial deletion is allowed. Partial deletions can be used // in a loop to delete large amounts of relationships in a *non-transactional* manner. - uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0, lte: 1000}]; + uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0}]; // optional_allow_partial_deletions, if true and a limit is specified, will delete matching found // relationships up to the count specified in optional_limit, and no more. @@ -473,7 +473,7 @@ message LookupResourcesRequest { // before the stream is closed on the server side. By default, the stream will continue // resolving resources until exhausted or the stream is closed due to the client or a // network issue. - uint32 optional_limit = 6 [(validate.rules).uint32 = {gte:0, lte: 1000}]; + uint32 optional_limit = 6 [(validate.rules).uint32 = {gte:0}]; // optional_cursor, if specified, indicates the cursor after which results should resume being returned. // The cursor can be found on the LookupResourcesResponse object. @@ -566,7 +566,7 @@ message LookupSubjectsRequest { // for each invocation of the API. // // ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED*** - uint32 optional_concrete_limit = 7 [(validate.rules).uint32 = {gte:0, lte: 1000}]; + uint32 optional_concrete_limit = 7 [(validate.rules).uint32 = {gte:0}]; // optional_cursor, if specified, indicates the cursor after which results should resume being returned. // The cursor can be found on the LookupSubjectsResponse object.