From f5c1a8fb148846dbb6c7f2be950391ef063627d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rold=C3=A1n=20Betancort?= Date: Mon, 2 Oct 2023 09:54:03 +0100 Subject: [PATCH] generate protos for new serialization error reason --- magefiles/gen.go | 2 +- proto/authzed/api/v0/zz_generated.version.go | 2 +- proto/authzed/api/v1/error_reason.pb.go | 31 ++++++++++++++----- proto/authzed/api/v1/zz_generated.version.go | 2 +- .../api/v1alpha1/zz_generated.version.go | 2 +- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/magefiles/gen.go b/magefiles/gen.go index 9950bec..82d7654 100644 --- a/magefiles/gen.go +++ b/magefiles/gen.go @@ -24,7 +24,7 @@ func (g Gen) All() error { const ( ProtoPath = "proto/authzed/api" BufRepository = "buf.build/authzed/api" - BufTag = "352257977a8fd299fcc3a4a6fdbdb2311b2e8f22" + BufTag = "97ac42fe44d433708249326a5a9580cc59ed9e7f" ) // Proto runs proto codegen diff --git a/proto/authzed/api/v0/zz_generated.version.go b/proto/authzed/api/v0/zz_generated.version.go index 5d18871..3175413 100644 --- a/proto/authzed/api/v0/zz_generated.version.go +++ b/proto/authzed/api/v0/zz_generated.version.go @@ -2,5 +2,5 @@ package v0 const ( BufRepository = "buf.build/authzed/api" - BufTag = "352257977a8fd299fcc3a4a6fdbdb2311b2e8f22" + BufTag = "97ac42fe44d433708249326a5a9580cc59ed9e7f" ) diff --git a/proto/authzed/api/v1/error_reason.pb.go b/proto/authzed/api/v1/error_reason.pb.go index 931dd2f..b06d495 100644 --- a/proto/authzed/api/v1/error_reason.pb.go +++ b/proto/authzed/api/v1/error_reason.pb.go @@ -284,6 +284,19 @@ const ( // } // } ErrorReason_ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED ErrorReason = 19 + // The request failed due to a serialization error in the backend database. + // This typically indicates that various in flight transactions conflicted with each other + // and the database had to abort one or more of them. SpiceDB will retry a few times before returning + // the error to the client. + // + // Example of an ErrorInfo: + // + // { + // "reason": "ERROR_REASON_SERIALIZATION_FAILURE", + // "domain": "authzed.com", + // "metadata": {} + // } + ErrorReason_ERROR_REASON_SERIALIZATION_FAILURE ErrorReason = 20 ) // Enum value maps for ErrorReason. @@ -309,6 +322,7 @@ var ( 17: "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE", 18: "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP", 19: "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED", + 20: "ERROR_REASON_SERIALIZATION_FAILURE", } ErrorReason_value = map[string]int32{ "ERROR_REASON_UNSPECIFIED": 0, @@ -331,6 +345,7 @@ var ( "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE": 17, "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP": 18, "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED": 19, + "ERROR_REASON_SERIALIZATION_FAILURE": 20, } ) @@ -367,7 +382,7 @@ var file_authzed_api_v1_error_reason_proto_rawDesc = []byte{ 0x0a, 0x21, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2a, 0xf0, 0x06, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, + 0x2e, 0x76, 0x31, 0x2a, 0x98, 0x07, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, @@ -422,12 +437,14 @@ var file_authzed_api_v1_error_reason_proto_rawDesc = []byte{ 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x10, 0x12, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x49, 0x4d, 0x55, 0x4d, 0x5f, 0x44, 0x45, 0x50, 0x54, 0x48, 0x5f, 0x45, 0x58, 0x43, 0x45, - 0x45, 0x44, 0x45, 0x44, 0x10, 0x13, 0x42, 0x48, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x5a, 0x32, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x44, 0x45, 0x44, 0x10, 0x13, 0x12, 0x26, 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x14, 0x42, 0x48, + 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, + 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, + 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/authzed/api/v1/zz_generated.version.go b/proto/authzed/api/v1/zz_generated.version.go index 8537d9c..85a8cfe 100644 --- a/proto/authzed/api/v1/zz_generated.version.go +++ b/proto/authzed/api/v1/zz_generated.version.go @@ -2,5 +2,5 @@ package v1 const ( BufRepository = "buf.build/authzed/api" - BufTag = "352257977a8fd299fcc3a4a6fdbdb2311b2e8f22" + BufTag = "97ac42fe44d433708249326a5a9580cc59ed9e7f" ) diff --git a/proto/authzed/api/v1alpha1/zz_generated.version.go b/proto/authzed/api/v1alpha1/zz_generated.version.go index 23ef3ed..d6cecfa 100644 --- a/proto/authzed/api/v1alpha1/zz_generated.version.go +++ b/proto/authzed/api/v1alpha1/zz_generated.version.go @@ -2,5 +2,5 @@ package v1alpha1 const ( BufRepository = "buf.build/authzed/api" - BufTag = "352257977a8fd299fcc3a4a6fdbdb2311b2e8f22" + BufTag = "97ac42fe44d433708249326a5a9580cc59ed9e7f" )