Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buf CLI migrate to v2 #2691

Merged
merged 4 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions apis/proto/buf.lock

This file was deleted.

45 changes: 20 additions & 25 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,35 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: v1
version: v2
managed:
enabled: false
go_package_prefix:
default: github.com/vdaas/vald/apis/grpc
except:
- buf.build/googleapis/googleapis
disable:
- file_option: go_package
module: buf.build/googleapis/googleapis
override:
- file_option: go_package_prefix
value: github.com/vdaas/vald/apis/grpc
plugins:
- plugin: buf.build/protocolbuffers/go
- remote: buf.build/protocolbuffers/go
out: apis/grpc
opt:
- paths=source_relative
- plugin: buf.build/community/planetscale-vtprotobuf
opt: paths=source_relative
- remote: buf.build/community/planetscale-vtprotobuf
out: apis/grpc
opt:
- paths=source_relative
- features=grpc+marshal+unmarshal+size+equal+clone
- plugin: buf.build/community/mfridman-go-json
- remote: buf.build/community/mfridman-go-json
out: apis/grpc
opt:
- paths=source_relative
- plugin: buf.build/community/pseudomuto-doc
opt: paths=source_relative
kpango marked this conversation as resolved.
Show resolved Hide resolved
- remote: buf.build/community/pseudomuto-doc
out: apis/docs/v1
opt:
- markdown,docs.md
- plugin: buf.build/grpc-ecosystem/openapiv2
opt: markdown,docs.md
- remote: buf.build/grpc-ecosystem/openapiv2
out: apis/swagger
opt:
- json_names_for_fields=true
- plugin: buf.build/community/neoeinstein-prost
opt: json_names_for_fields=true
- remote: buf.build/community/neoeinstein-prost
out: rust/libs/proto/src
opt:
- enable_type_names
- plugin: buf.build/community/neoeinstein-tonic
opt: enable_type_names
- remote: buf.build/community/neoeinstein-tonic
out: rust/libs/proto/src
opt:
- no_include
opt: no_include
9 changes: 9 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 1baebb0a15184714854fa1ddfd22a29b
digest: b5:6ee11b05d5f54b6257c79c3141eb1050723c4433cf490259ba1d8c02cd08c3e325625527b00fec4dc8b338901f1f3c567ef7ff0698b1c92d09b2dfa6f516c1e6
- name: buf.build/googleapis/googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: b5:93b70089baa4fc05a92d3e52db91a4b7812db3b57b9664f6cb301733938cb630e377a938e8a56779388171c749c1d42a2e9a6c6230f2ff45f127a8102a6a27d0
18 changes: 0 additions & 18 deletions buf.work.yaml

This file was deleted.

23 changes: 16 additions & 7 deletions apis/proto/buf.yaml → buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
version: v2
modules:
- path: apis/proto
deps:
- buf.build/bufbuild/protovalidate
- buf.build/googleapis/googleapis
lint:
use:
- STANDARD
except:
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT
4 changes: 0 additions & 4 deletions rust/libs/proto/src/filter.egress.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub mod filter_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/** Represent the egress filter service.
*/
#[derive(Debug, Clone)]
pub struct FilterClient<T> {
inner: tonic::client::Grpc<T>,
Expand Down Expand Up @@ -189,8 +187,6 @@ pub mod filter_server {
tonic::Status,
>;
}
/** Represent the egress filter service.
*/
#[derive(Debug)]
pub struct FilterServer<T: Filter> {
inner: Arc<T>,
Expand Down
4 changes: 0 additions & 4 deletions rust/libs/proto/src/filter.ingress.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub mod filter_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/** Represent the ingress filter service.
*/
#[derive(Debug, Clone)]
pub struct FilterClient<T> {
inner: tonic::client::Grpc<T>,
Expand Down Expand Up @@ -189,8 +187,6 @@ pub mod filter_server {
tonic::Status,
>;
}
/** Represent the ingress filter service.
*/
#[derive(Debug)]
pub struct FilterServer<T: Filter> {
inner: Arc<T>,
Expand Down
2 changes: 0 additions & 2 deletions rust/libs/proto/src/meta.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ pub mod meta_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
///
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::super::super::payload::v1::meta::Key>,
Expand Down Expand Up @@ -177,7 +176,6 @@ pub mod meta_server {
/// Generated trait containing gRPC methods that should be implemented for use with MetaServer.
#[async_trait]
pub trait Meta: Send + Sync + 'static {
///
async fn get(
&self,
request: tonic::Request<super::super::super::payload::v1::meta::Key>,
Expand Down
8 changes: 0 additions & 8 deletions rust/libs/proto/src/vald.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ pub mod filter_client {
.insert(GrpcMethod::new("vald.v1.Filter", "SearchObject"));
self.inner.unary(req, path, codec).await
}
/** A method to search multiple objects.
*/
pub async fn multi_search_object(
&mut self,
request: impl tonic::IntoRequest<
Expand Down Expand Up @@ -477,8 +475,6 @@ pub mod filter_server {
tonic::Response<super::super::super::payload::v1::search::Response>,
tonic::Status,
>;
/** A method to search multiple objects.
*/
async fn multi_search_object(
&self,
request: tonic::Request<
Expand Down Expand Up @@ -4046,8 +4042,6 @@ pub mod search_client {
req.extensions_mut().insert(GrpcMethod::new("vald.v1.Search", "Search"));
self.inner.unary(req, path, codec).await
}
/** A method to search indexed vectors by ID.
*/
pub async fn search_by_id(
&mut self,
request: impl tonic::IntoRequest<
Expand Down Expand Up @@ -4398,8 +4392,6 @@ pub mod search_server {
tonic::Response<super::super::super::payload::v1::search::Response>,
tonic::Status,
>;
/** A method to search indexed vectors by ID.
*/
async fn search_by_id(
&self,
request: tonic::Request<super::super::super::payload::v1::search::IdRequest>,
Expand Down
Loading