From f81062c91bd5f4eb92ba5a8329d14e70cd92634b Mon Sep 17 00:00:00 2001 From: Derek Wang Date: Tue, 15 Oct 2024 22:39:37 -0700 Subject: [PATCH] chore: rename numaflow-grpc to numaflow-pb (#2159) Signed-off-by: Derek Wang --- .codecov.yml | 24 ++++++++--------- rust/Cargo.lock | 26 +++++++++---------- rust/Cargo.toml | 4 +-- rust/Makefile | 2 +- rust/numaflow-core/Cargo.toml | 2 +- rust/numaflow-core/src/message.rs | 16 ++++++------ rust/numaflow-core/src/monovertex.rs | 6 ++--- .../numaflow-core/src/monovertex/forwarder.rs | 6 ++--- rust/numaflow-core/src/monovertex/metrics.rs | 6 ++--- rust/numaflow-core/src/shared/utils.rs | 6 ++--- rust/numaflow-core/src/sink.rs | 2 +- rust/numaflow-core/src/sink/user_defined.rs | 6 ++--- rust/numaflow-core/src/source/user_defined.rs | 8 +++--- .../src/transformer/user_defined.rs | 4 +-- .../{numaflow-grpc => numaflow-pb}/Cargo.toml | 4 +-- rust/{numaflow-grpc => numaflow-pb}/Makefile | 0 .../{numaflow-grpc => numaflow-pb}/codegen.sh | 0 .../src/clients.rs | 0 .../src/clients/map.v1.rs | 0 .../src/clients/mapstream.v1.rs | 0 .../src/clients/reduce.v1.rs | 0 .../src/clients/sessionreduce.v1.rs | 0 .../src/clients/sideinput.v1.rs | 0 .../src/clients/sink.v1.rs | 0 .../src/clients/source.v1.rs | 0 .../src/clients/sourcetransformer.v1.rs | 0 .../{numaflow-grpc => numaflow-pb}/src/lib.rs | 0 .../src/main.rs | 0 .../src/objects.rs | 0 .../src/objects/isb.rs | 0 .../src/objects/wmb.rs | 0 31 files changed, 61 insertions(+), 61 deletions(-) rename rust/{numaflow-grpc => numaflow-pb}/Cargo.toml (80%) rename rust/{numaflow-grpc => numaflow-pb}/Makefile (100%) rename rust/{numaflow-grpc => numaflow-pb}/codegen.sh (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/map.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/mapstream.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/reduce.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/sessionreduce.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/sideinput.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/sink.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/source.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/clients/sourcetransformer.v1.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/lib.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/main.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/objects.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/objects/isb.rs (100%) rename rust/{numaflow-grpc => numaflow-pb}/src/objects/wmb.rs (100%) diff --git a/.codecov.yml b/.codecov.yml index 98604b458..9939d697d 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,16 +1,16 @@ ignore: -- "**/*.pb.go" -- "**/*.pb.gw.go" -- "**/*generated.go" -- "**/*generated.deepcopy.go" -- "**/*generated.openapi.go" -- "**/*_test.go" -- "pkg/client/.*" -- "vendor/.*" -- "test/.*" -- "rust/**/error.rs" -- "rust/numaflow-models/**" # ignore generated files -- "rust/numaflow-grpc/**" # ignore generated files + - "**/*.pb.go" + - "**/*.pb.gw.go" + - "**/*generated.go" + - "**/*generated.deepcopy.go" + - "**/*generated.openapi.go" + - "**/*_test.go" + - "pkg/client/.*" + - "vendor/.*" + - "test/.*" + - "rust/**/error.rs" + - "rust/numaflow-models/**" # ignore generated files + - "rust/numaflow-pb/**" # ignore generated files coverage: status: patch: off diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 146e3d195..10539de44 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1547,7 +1547,7 @@ version = "0.1.0" dependencies = [ "backoff", "numaflow-core", - "numaflow-grpc", + "numaflow-pb", "servesink", "serving", "tokio", @@ -1614,8 +1614,8 @@ dependencies = [ "kube", "log", "numaflow 0.1.1 (git+https://github.com/numaproj/numaflow-rs.git?rev=9fb3c0ad0f5f43cc42b4919f849b7dcce9a91387)", - "numaflow-grpc", "numaflow-models", + "numaflow-pb", "parking_lot", "pep440_rs", "pin-project", @@ -1640,17 +1640,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "numaflow-grpc" -version = "0.1.0" -dependencies = [ - "prost", - "prost-build", - "prost-types", - "tonic", - "tonic-build", -] - [[package]] name = "numaflow-models" version = "0.0.0-pre" @@ -1665,6 +1654,17 @@ dependencies = [ "uuid", ] +[[package]] +name = "numaflow-pb" +version = "0.1.0" +dependencies = [ + "prost", + "prost-build", + "prost-types", + "tonic", + "tonic-build", +] + [[package]] name = "object" version = "0.36.5" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index f273627ae..99df3be31 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -4,7 +4,7 @@ workspace = { members = [ "servesink", "serving", "numaflow-core", - "numaflow-grpc", + "numaflow-pb", ] } [[bin]] @@ -23,6 +23,6 @@ backoff = { path = "backoff" } servesink = { path = "servesink" } serving = { path = "serving" } numaflow-core = { path = "numaflow-core" } -numaflow-grpc = { path = "numaflow-grpc" } +numaflow-pb = { path = "numaflow-pb" } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/rust/Makefile b/rust/Makefile index c2d29917b..eb4f0e8b9 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -3,7 +3,7 @@ SHELL:=/bin/bash .PHONY: generate generate: $(MAKE) --directory numaflow-models generate - $(MAKE) --directory numaflow-grpc generate + $(MAKE) --directory numaflow-pb generate .PHONY: build build: diff --git a/rust/numaflow-core/Cargo.toml b/rust/numaflow-core/Cargo.toml index 163cd99bb..59f380e8c 100644 --- a/rust/numaflow-core/Cargo.toml +++ b/rust/numaflow-core/Cargo.toml @@ -23,7 +23,7 @@ tower = "0.4.13" uuid = { version = "1.10.0", features = ["v4"] } serde_json = "1.0.122" numaflow-models = { path = "../numaflow-models" } -numaflow-grpc = { path = "../numaflow-grpc" } +numaflow-pb = { path = "../numaflow-pb" } trait-variant = "0.1.2" rcgen = "0.13.1" rustls = { version = "0.23.12", features = ["aws_lc_rs"] } diff --git a/rust/numaflow-core/src/message.rs b/rust/numaflow-core/src/message.rs index b2644e86f..34229ec07 100644 --- a/rust/numaflow-core/src/message.rs +++ b/rust/numaflow-core/src/message.rs @@ -7,11 +7,11 @@ use chrono::{DateTime, Utc}; use crate::shared::utils::{prost_timestamp_from_utc, utc_from_timestamp}; use crate::Error; -use numaflow_grpc::clients::sink::sink_request::Request; -use numaflow_grpc::clients::sink::Status::{Failure, Fallback, Success}; -use numaflow_grpc::clients::sink::{sink_response, SinkRequest, SinkResponse}; -use numaflow_grpc::clients::source::{read_response, AckRequest}; -use numaflow_grpc::clients::sourcetransformer::SourceTransformRequest; +use numaflow_pb::clients::sink::sink_request::Request; +use numaflow_pb::clients::sink::Status::{Failure, Fallback, Success}; +use numaflow_pb::clients::sink::{sink_response, SinkRequest, SinkResponse}; +use numaflow_pb::clients::source::{read_response, AckRequest}; +use numaflow_pb::clients::sourcetransformer::SourceTransformRequest; /// A message that is sent from the source to the sink. #[derive(Debug, Clone)] @@ -42,8 +42,8 @@ pub(crate) struct Offset { impl From for AckRequest { fn from(offset: Offset) -> Self { Self { - request: Some(numaflow_grpc::clients::source::ack_request::Request { - offset: Some(numaflow_grpc::clients::source::Offset { + request: Some(numaflow_pb::clients::source::ack_request::Request { + offset: Some(numaflow_pb::clients::source::Offset { offset: BASE64_STANDARD .decode(offset.offset) .expect("we control the encoding, so this should never fail"), @@ -60,7 +60,7 @@ impl From for SourceTransformRequest { fn from(message: Message) -> Self { Self { request: Some( - numaflow_grpc::clients::sourcetransformer::source_transform_request::Request { + numaflow_pb::clients::sourcetransformer::source_transform_request::Request { id: message.id, keys: message.keys, value: message.value, diff --git a/rust/numaflow-core/src/monovertex.rs b/rust/numaflow-core/src/monovertex.rs index c647d51d0..fb434da8a 100644 --- a/rust/numaflow-core/src/monovertex.rs +++ b/rust/numaflow-core/src/monovertex.rs @@ -6,9 +6,9 @@ use tokio_util::sync::CancellationToken; use tonic::transport::Channel; use tracing::info; -use numaflow_grpc::clients::sink::sink_client::SinkClient; -use numaflow_grpc::clients::source::source_client::SourceClient; -use numaflow_grpc::clients::sourcetransformer::source_transform_client::SourceTransformClient; +use numaflow_pb::clients::sink::sink_client::SinkClient; +use numaflow_pb::clients::source::source_client::SourceClient; +use numaflow_pb::clients::sourcetransformer::source_transform_client::SourceTransformClient; use crate::config::{config, Settings}; use crate::error::{self, Error}; diff --git a/rust/numaflow-core/src/monovertex/forwarder.rs b/rust/numaflow-core/src/monovertex/forwarder.rs index 2ce41a5d8..268598450 100644 --- a/rust/numaflow-core/src/monovertex/forwarder.rs +++ b/rust/numaflow-core/src/monovertex/forwarder.rs @@ -538,9 +538,9 @@ mod tests { use chrono::Utc; use numaflow::source::{Message, Offset, SourceReadRequest}; use numaflow::{sink, source, sourcetransform}; - use numaflow_grpc::clients::sink::sink_client::SinkClient; - use numaflow_grpc::clients::source::source_client::SourceClient; - use numaflow_grpc::clients::sourcetransformer::source_transform_client::SourceTransformClient; + use numaflow_pb::clients::sink::sink_client::SinkClient; + use numaflow_pb::clients::source::source_client::SourceClient; + use numaflow_pb::clients::sourcetransformer::source_transform_client::SourceTransformClient; use tokio::sync::mpsc; use tokio::sync::mpsc::Sender; use tokio_util::sync::CancellationToken; diff --git a/rust/numaflow-core/src/monovertex/metrics.rs b/rust/numaflow-core/src/monovertex/metrics.rs index 0f5cc8824..9c7b7aed0 100644 --- a/rust/numaflow-core/src/monovertex/metrics.rs +++ b/rust/numaflow-core/src/monovertex/metrics.rs @@ -24,9 +24,9 @@ use tonic::transport::Channel; use tonic::Request; use tracing::{debug, error, info}; -use numaflow_grpc::clients::sink::sink_client::SinkClient; -use numaflow_grpc::clients::source::source_client::SourceClient; -use numaflow_grpc::clients::sourcetransformer::source_transform_client::SourceTransformClient; +use numaflow_pb::clients::sink::sink_client::SinkClient; +use numaflow_pb::clients::source::source_client::SourceClient; +use numaflow_pb::clients::sourcetransformer::source_transform_client::SourceTransformClient; use crate::config::config; use crate::source::SourceHandle; diff --git a/rust/numaflow-core/src/shared/utils.rs b/rust/numaflow-core/src/shared/utils.rs index 813153d07..25708d68a 100644 --- a/rust/numaflow-core/src/shared/utils.rs +++ b/rust/numaflow-core/src/shared/utils.rs @@ -24,9 +24,9 @@ use crate::monovertex::metrics::{ use crate::shared::server_info; use crate::source::SourceHandle; use crate::Error; -use numaflow_grpc::clients::sink::sink_client::SinkClient; -use numaflow_grpc::clients::source::source_client::SourceClient; -use numaflow_grpc::clients::sourcetransformer::source_transform_client::SourceTransformClient; +use numaflow_pb::clients::sink::sink_client::SinkClient; +use numaflow_pb::clients::source::source_client::SourceClient; +use numaflow_pb::clients::sourcetransformer::source_transform_client::SourceTransformClient; pub(crate) async fn check_compatibility( cln_token: &CancellationToken, diff --git a/rust/numaflow-core/src/sink.rs b/rust/numaflow-core/src/sink.rs index 8c29966cc..59102213d 100644 --- a/rust/numaflow-core/src/sink.rs +++ b/rust/numaflow-core/src/sink.rs @@ -3,7 +3,7 @@ use tonic::transport::Channel; use crate::config::config; use crate::message::{Message, ResponseFromSink}; -use numaflow_grpc::clients::sink::sink_client::SinkClient; +use numaflow_pb::clients::sink::sink_client::SinkClient; use user_defined::UserDefinedSink; mod log; diff --git a/rust/numaflow-core/src/sink/user_defined.rs b/rust/numaflow-core/src/sink/user_defined.rs index ecc8dc150..4bb74d679 100644 --- a/rust/numaflow-core/src/sink/user_defined.rs +++ b/rust/numaflow-core/src/sink/user_defined.rs @@ -3,8 +3,8 @@ use tokio_stream::wrappers::ReceiverStream; use tonic::transport::Channel; use tonic::{Request, Streaming}; -use numaflow_grpc::clients::sink::sink_client::SinkClient; -use numaflow_grpc::clients::sink::{Handshake, SinkRequest, SinkResponse, TransmissionStatus}; +use numaflow_pb::clients::sink::sink_client::SinkClient; +use numaflow_pb::clients::sink::{Handshake, SinkRequest, SinkResponse, TransmissionStatus}; use crate::error; use crate::message::{Message, ResponseFromSink}; @@ -122,7 +122,7 @@ mod tests { use crate::message::{Message, Offset}; use crate::shared::utils::create_rpc_channel; use crate::sink::user_defined::UserDefinedSink; - use numaflow_grpc::clients::sink::sink_client::SinkClient; + use numaflow_pb::clients::sink::sink_client::SinkClient; struct Logger; #[tonic::async_trait] diff --git a/rust/numaflow-core/src/source/user_defined.rs b/rust/numaflow-core/src/source/user_defined.rs index ae8ff081e..da71191fc 100644 --- a/rust/numaflow-core/src/source/user_defined.rs +++ b/rust/numaflow-core/src/source/user_defined.rs @@ -3,9 +3,9 @@ use tokio_stream::wrappers::ReceiverStream; use tonic::transport::Channel; use tonic::{Request, Streaming}; -use numaflow_grpc::clients::source; -use numaflow_grpc::clients::source::source_client::SourceClient; -use numaflow_grpc::clients::source::{ +use numaflow_pb::clients::source; +use numaflow_pb::clients::source::source_client::SourceClient; +use numaflow_pb::clients::source::{ read_request, AckRequest, AckResponse, ReadRequest, ReadResponse, }; @@ -237,7 +237,7 @@ mod tests { use std::collections::HashSet; use crate::shared::utils::create_rpc_channel; - use numaflow_grpc::clients::source::source_client::SourceClient; + use numaflow_pb::clients::source::source_client::SourceClient; use chrono::Utc; use numaflow::source; diff --git a/rust/numaflow-core/src/transformer/user_defined.rs b/rust/numaflow-core/src/transformer/user_defined.rs index b542b423e..653ee4629 100644 --- a/rust/numaflow-core/src/transformer/user_defined.rs +++ b/rust/numaflow-core/src/transformer/user_defined.rs @@ -8,7 +8,7 @@ use tonic::transport::Channel; use tonic::{Request, Streaming}; use tracing::warn; -use numaflow_grpc::clients::sourcetransformer::{ +use numaflow_pb::clients::sourcetransformer::{ self, source_transform_client::SourceTransformClient, SourceTransformRequest, SourceTransformResponse, }; @@ -230,7 +230,7 @@ mod tests { use crate::shared::utils::create_rpc_channel; use crate::transformer::user_defined::SourceTransformHandle; use numaflow::sourcetransform; - use numaflow_grpc::clients::sourcetransformer::source_transform_client::SourceTransformClient; + use numaflow_pb::clients::sourcetransformer::source_transform_client::SourceTransformClient; use tempfile::TempDir; struct NowCat; diff --git a/rust/numaflow-grpc/Cargo.toml b/rust/numaflow-pb/Cargo.toml similarity index 80% rename from rust/numaflow-grpc/Cargo.toml rename to rust/numaflow-pb/Cargo.toml index 3eba42265..dc2639e6e 100644 --- a/rust/numaflow-grpc/Cargo.toml +++ b/rust/numaflow-pb/Cargo.toml @@ -1,9 +1,9 @@ [[bin]] -name = "numaflow-grpc" +name = "numaflow-pb" path = "src/main.rs" [package] -name = "numaflow-grpc" +name = "numaflow-pb" version = "0.1.0" edition = "2021" diff --git a/rust/numaflow-grpc/Makefile b/rust/numaflow-pb/Makefile similarity index 100% rename from rust/numaflow-grpc/Makefile rename to rust/numaflow-pb/Makefile diff --git a/rust/numaflow-grpc/codegen.sh b/rust/numaflow-pb/codegen.sh similarity index 100% rename from rust/numaflow-grpc/codegen.sh rename to rust/numaflow-pb/codegen.sh diff --git a/rust/numaflow-grpc/src/clients.rs b/rust/numaflow-pb/src/clients.rs similarity index 100% rename from rust/numaflow-grpc/src/clients.rs rename to rust/numaflow-pb/src/clients.rs diff --git a/rust/numaflow-grpc/src/clients/map.v1.rs b/rust/numaflow-pb/src/clients/map.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/map.v1.rs rename to rust/numaflow-pb/src/clients/map.v1.rs diff --git a/rust/numaflow-grpc/src/clients/mapstream.v1.rs b/rust/numaflow-pb/src/clients/mapstream.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/mapstream.v1.rs rename to rust/numaflow-pb/src/clients/mapstream.v1.rs diff --git a/rust/numaflow-grpc/src/clients/reduce.v1.rs b/rust/numaflow-pb/src/clients/reduce.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/reduce.v1.rs rename to rust/numaflow-pb/src/clients/reduce.v1.rs diff --git a/rust/numaflow-grpc/src/clients/sessionreduce.v1.rs b/rust/numaflow-pb/src/clients/sessionreduce.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/sessionreduce.v1.rs rename to rust/numaflow-pb/src/clients/sessionreduce.v1.rs diff --git a/rust/numaflow-grpc/src/clients/sideinput.v1.rs b/rust/numaflow-pb/src/clients/sideinput.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/sideinput.v1.rs rename to rust/numaflow-pb/src/clients/sideinput.v1.rs diff --git a/rust/numaflow-grpc/src/clients/sink.v1.rs b/rust/numaflow-pb/src/clients/sink.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/sink.v1.rs rename to rust/numaflow-pb/src/clients/sink.v1.rs diff --git a/rust/numaflow-grpc/src/clients/source.v1.rs b/rust/numaflow-pb/src/clients/source.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/source.v1.rs rename to rust/numaflow-pb/src/clients/source.v1.rs diff --git a/rust/numaflow-grpc/src/clients/sourcetransformer.v1.rs b/rust/numaflow-pb/src/clients/sourcetransformer.v1.rs similarity index 100% rename from rust/numaflow-grpc/src/clients/sourcetransformer.v1.rs rename to rust/numaflow-pb/src/clients/sourcetransformer.v1.rs diff --git a/rust/numaflow-grpc/src/lib.rs b/rust/numaflow-pb/src/lib.rs similarity index 100% rename from rust/numaflow-grpc/src/lib.rs rename to rust/numaflow-pb/src/lib.rs diff --git a/rust/numaflow-grpc/src/main.rs b/rust/numaflow-pb/src/main.rs similarity index 100% rename from rust/numaflow-grpc/src/main.rs rename to rust/numaflow-pb/src/main.rs diff --git a/rust/numaflow-grpc/src/objects.rs b/rust/numaflow-pb/src/objects.rs similarity index 100% rename from rust/numaflow-grpc/src/objects.rs rename to rust/numaflow-pb/src/objects.rs diff --git a/rust/numaflow-grpc/src/objects/isb.rs b/rust/numaflow-pb/src/objects/isb.rs similarity index 100% rename from rust/numaflow-grpc/src/objects/isb.rs rename to rust/numaflow-pb/src/objects/isb.rs diff --git a/rust/numaflow-grpc/src/objects/wmb.rs b/rust/numaflow-pb/src/objects/wmb.rs similarity index 100% rename from rust/numaflow-grpc/src/objects/wmb.rs rename to rust/numaflow-pb/src/objects/wmb.rs