From 2750bad2498e397b318da3c6532c23b4beaea33b Mon Sep 17 00:00:00 2001 From: Sebastian Beyvers Date: Tue, 7 Nov 2023 18:48:13 +0100 Subject: [PATCH] chore: Added go test build, fixed openapi specs --- .github/workflows/dry-run-rust-build.yaml | 2 ++ .gitignore | 3 ++- .../v2/data_replication_service.proto | 9 +++---- .../storage/services/v2/user_service.proto | 2 +- buf.gen.yaml | 25 +++++++++++++++++++ 5 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 buf.gen.yaml diff --git a/.github/workflows/dry-run-rust-build.yaml b/.github/workflows/dry-run-rust-build.yaml index 199c435c..aaa94f83 100644 --- a/.github/workflows/dry-run-rust-build.yaml +++ b/.github/workflows/dry-run-rust-build.yaml @@ -12,6 +12,8 @@ jobs: uses: bufbuild/buf-setup-action@v1 - name: Lint protofiles with buf uses: bufbuild/buf-lint-action@v1 + - name: Generate buf files + run: buf generate build: # This does not build the whole proto files for production, it tests if rust / tonic runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index 1de56593..a4453962 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -target \ No newline at end of file +target +dry_run \ No newline at end of file diff --git a/aruna/api/storage/services/v2/data_replication_service.proto b/aruna/api/storage/services/v2/data_replication_service.proto index c87593c6..b04d6252 100644 --- a/aruna/api/storage/services/v2/data_replication_service.proto +++ b/aruna/api/storage/services/v2/data_replication_service.proto @@ -95,12 +95,8 @@ message ReplicateProjectDataResponse { } message PartialReplicateDataRequest { - oneof response { - string collection_id = 1; - string dataset_id = 2; - string object_id = 3; - } - string endpoint_id = 4; + string resource_id = 1; + string endpoint_id = 2; } message PartialReplicateDataResponse { @@ -117,6 +113,7 @@ message UpdateReplicationStatusResponse {} message GetReplicationStatusRequest { string resource_id = 1; + string endpoint_id = 2; } message GetReplicationStatusResponse { diff --git a/aruna/api/storage/services/v2/user_service.proto b/aruna/api/storage/services/v2/user_service.proto index 3faf28ec..f5e38deb 100644 --- a/aruna/api/storage/services/v2/user_service.proto +++ b/aruna/api/storage/services/v2/user_service.proto @@ -107,7 +107,7 @@ service UserService { rpc DeleteAPITokens(DeleteAPITokensRequest) returns (DeleteAPITokensResponse) { option (google.api.http) = { - delete : "/v2/user/tokens/{token_id}" + delete : "/v2/user/tokens" }; } diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 00000000..ced06acd --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,25 @@ +version: v1 +managed: + enabled: true + optimize_for: SPEED +plugins: + - plugin: buf.build/protocolbuffers/go:v1.31.0 + out: dry_run + opt: paths=source_relative + - plugin: buf.build/grpc/go:v1.3.0 + out: dry_run + opt: + - paths=source_relative + - require_unimplemented_servers=false + - plugin: buf.build/grpc-ecosystem/gateway:v2.18.0 + out: dry_run + opt: + - paths=source_relative + - allow_repeated_fields_in_body=true + - allow_delete_body=true + - plugin: buf.build/grpc-ecosystem/openapiv2:v2.18.0 + out: dry_run + opt: + - allow_merge=true + - allow_delete_body=true + - visibility_restriction_selectors=SERVER \ No newline at end of file