From 43a78278c1593f23137cf1bdebde06641672f2d5 Mon Sep 17 00:00:00 2001 From: William Batista Date: Mon, 21 Oct 2024 13:09:31 -0400 Subject: [PATCH 1/2] move ShareBuild to the core api instead of build the build API is specifically meant for build orchestration --- proto/depot/build/v1/build.proto | 16 ---------------- proto/depot/core/v1/project.proto | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/proto/depot/build/v1/build.proto b/proto/depot/build/v1/build.proto index 95d1974..235fdbf 100644 --- a/proto/depot/build/v1/build.proto +++ b/proto/depot/build/v1/build.proto @@ -4,8 +4,6 @@ package depot.build.v1; service BuildService { rpc CreateBuild(CreateBuildRequest) returns (CreateBuildResponse); rpc FinishBuild(FinishBuildRequest) returns (FinishBuildResponse); - rpc ShareBuild(ShareBuildRequest) returns (ShareBuildResponse); - rpc StopSharingBuild(StopSharingBuildRequest) returns (StopSharingBuildResponse); } message CreateBuildRequest { @@ -32,17 +30,3 @@ message FinishBuildRequest { } message FinishBuildResponse {} - -message ShareBuildRequest { - string build_id = 1; -} - -message ShareBuildResponse { - string share_url = 1; -} - -message StopSharingBuildRequest { - string build_id = 1; -} - -message StopSharingBuildResponse {} diff --git a/proto/depot/core/v1/project.proto b/proto/depot/core/v1/project.proto index b3f6c0b..e27747f 100644 --- a/proto/depot/core/v1/project.proto +++ b/proto/depot/core/v1/project.proto @@ -42,6 +42,12 @@ service ProjectService { // Delete project API token. rpc DeleteToken(DeleteTokenRequest) returns (DeleteTokenResponse) {} + + // Share a URL to a build with users outside of your organization + rpc ShareBuild(ShareBuildRequest) returns (ShareBuildResponse); + + // Stop sharing a build + rpc StopSharingBuild(StopSharingBuildRequest) returns (StopSharingBuildResponse); } message Project { @@ -214,3 +220,17 @@ message DeleteTokenRequest { } message DeleteTokenResponse {} + +message ShareBuildRequest { + string build_id = 1; +} + +message ShareBuildResponse { + string share_url = 1; +} + +message StopSharingBuildRequest { + string build_id = 1; +} + +message StopSharingBuildResponse {} From 69fccb06f868b8cbf365087350acf48415c4733a Mon Sep 17 00:00:00 2001 From: William Batista Date: Mon, 21 Oct 2024 13:35:59 -0400 Subject: [PATCH 2/2] move changes to new core/v1/build.proto --- proto/depot/core/v1/build.proto | 24 ++++++++++++++++++++++++ proto/depot/core/v1/project.proto | 20 -------------------- 2 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 proto/depot/core/v1/build.proto diff --git a/proto/depot/core/v1/build.proto b/proto/depot/core/v1/build.proto new file mode 100644 index 0000000..a816cb1 --- /dev/null +++ b/proto/depot/core/v1/build.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package depot.core.v1; + +service BuildService { + // Share a URL to a build with users outside of your organization + rpc ShareBuild(ShareBuildRequest) returns (ShareBuildResponse); + + // Stop sharing a build + rpc StopSharingBuild(StopSharingBuildRequest) returns (StopSharingBuildResponse); +} + +message ShareBuildRequest { + string build_id = 1; +} + +message ShareBuildResponse { + string share_url = 1; +} + +message StopSharingBuildRequest { + string build_id = 1; +} + +message StopSharingBuildResponse {} diff --git a/proto/depot/core/v1/project.proto b/proto/depot/core/v1/project.proto index e27747f..b3f6c0b 100644 --- a/proto/depot/core/v1/project.proto +++ b/proto/depot/core/v1/project.proto @@ -42,12 +42,6 @@ service ProjectService { // Delete project API token. rpc DeleteToken(DeleteTokenRequest) returns (DeleteTokenResponse) {} - - // Share a URL to a build with users outside of your organization - rpc ShareBuild(ShareBuildRequest) returns (ShareBuildResponse); - - // Stop sharing a build - rpc StopSharingBuild(StopSharingBuildRequest) returns (StopSharingBuildResponse); } message Project { @@ -220,17 +214,3 @@ message DeleteTokenRequest { } message DeleteTokenResponse {} - -message ShareBuildRequest { - string build_id = 1; -} - -message ShareBuildResponse { - string share_url = 1; -} - -message StopSharingBuildRequest { - string build_id = 1; -} - -message StopSharingBuildResponse {}