From 8841d19cd6c5875b2391dd2bfe9a7097ab97281f Mon Sep 17 00:00:00 2001 From: Kartik Verma Date: Tue, 2 Nov 2021 08:11:20 +0530 Subject: [PATCH 1/3] fix: organization body in group --- odpf/shield/v1/shield.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odpf/shield/v1/shield.proto b/odpf/shield/v1/shield.proto index 6c1c403d..22a4039a 100644 --- a/odpf/shield/v1/shield.proto +++ b/odpf/shield/v1/shield.proto @@ -333,6 +333,7 @@ message GroupRequestBody { string name = 1 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"]; string slug = 2; google.protobuf.Struct metadata = 3; + string org_id = 4; } message CreateGroupRequest { @@ -345,7 +346,7 @@ message Group { string slug = 3; repeated User admins = 4; int32 member_count = 5; - string org_id = 6; + Organization organization = 6; google.protobuf.Struct metadata = 7; google.protobuf.Timestamp created_at = 8; google.protobuf.Timestamp updated_at = 9; From 162e2548e408be6657b305cdda96e025643858ae Mon Sep 17 00:00:00 2001 From: Kartik Verma Date: Tue, 2 Nov 2021 08:17:01 +0530 Subject: [PATCH 2/3] fix: not reuse existing field number in Group --- odpf/shield/v1/shield.proto | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/odpf/shield/v1/shield.proto b/odpf/shield/v1/shield.proto index 22a4039a..2685dbb7 100644 --- a/odpf/shield/v1/shield.proto +++ b/odpf/shield/v1/shield.proto @@ -341,15 +341,19 @@ message CreateGroupRequest { } message Group { + reserved 6; + reserved "org_id"; + string id = 1; string name = 2 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"]; string slug = 3; repeated User admins = 4; int32 member_count = 5; - Organization organization = 6; + // string OBSOLETE_org_id = 6; [OBSOLETE] google.protobuf.Struct metadata = 7; google.protobuf.Timestamp created_at = 8; google.protobuf.Timestamp updated_at = 9; + Organization organization = 10; } message CreateGroupResponse { From e89a5325e096e02b73237ba9fe85911f5d241e1a Mon Sep 17 00:00:00 2001 From: Kartik Verma Date: Tue, 2 Nov 2021 08:44:39 +0530 Subject: [PATCH 3/3] fix: remove organization body from Group proto to only use org_id --- odpf/shield/v1/shield.proto | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/odpf/shield/v1/shield.proto b/odpf/shield/v1/shield.proto index 2685dbb7..d14f4164 100644 --- a/odpf/shield/v1/shield.proto +++ b/odpf/shield/v1/shield.proto @@ -341,19 +341,15 @@ message CreateGroupRequest { } message Group { - reserved 6; - reserved "org_id"; - string id = 1; string name = 2 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"]; string slug = 3; repeated User admins = 4; int32 member_count = 5; - // string OBSOLETE_org_id = 6; [OBSOLETE] + string org_id = 6; google.protobuf.Struct metadata = 7; google.protobuf.Timestamp created_at = 8; google.protobuf.Timestamp updated_at = 9; - Organization organization = 10; } message CreateGroupResponse {