From f7a2809d5efbfa189b7c7f128cd57ed77e561c43 Mon Sep 17 00:00:00 2001 From: Dan Manjarres Date: Thu, 14 Sep 2023 11:34:15 -0700 Subject: [PATCH 1/3] homa_grpc 1.57 --- WORKSPACE.bazel | 12 ++++++------ protocol_driver_grpc.cc | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 911840d8..385f15e2 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -26,9 +26,9 @@ http_archive( ##### Unfortunately this does not compile against the latest grpc. http_archive( name = "grpc_homa", - sha256 = "2c0fe4669620f1a685bedf2f8ad0547cccb9155d1f4b304c5f7ce362d3b92d05", - strip_prefix = "grpc_homa-homa-2.0", - url = "https://github.com/PlatformLab/grpc_homa/archive/refs/tags/homa-2.0.tar.gz", + sha256 = "d358a83a72f5fd776ab0a98f83403e3f0ca14bdc551389b379c9649e190141b4", + strip_prefix = "grpc_homa-grpc-1.57.0.0", + url = "https://github.com/PlatformLab/grpc_homa/archive/refs/tags/grpc-1.57.0.0.tar.gz", build_file = "@//:grpc_homa.BUILD", ) @@ -44,9 +44,9 @@ http_archive( ##### grpc_deps() and grpc_extra_deps(). http_archive( name = "com_github_grpc_grpc", - sha256 = "931f07db9d48cff6a6007c1033ba6d691fe655bea2765444bc1ad974dfc840aa", - strip_prefix = "grpc-1.56.2", - url = "https://github.com/grpc/grpc/archive/refs/tags/v1.56.2.tar.gz", + sha256 = "8393767af531b2d0549a4c26cf8ba1f665b16c16fb6c9238a7755e45444881dd", + strip_prefix = "grpc-1.57.0", + url = "https://github.com/grpc/grpc/archive/refs/tags/v1.57.0.tar.gz", ) load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") grpc_deps() diff --git a/protocol_driver_grpc.cc b/protocol_driver_grpc.cc index 94f2620e..9d699f93 100644 --- a/protocol_driver_grpc.cc +++ b/protocol_driver_grpc.cc @@ -49,7 +49,9 @@ absl::StatusOr> CreateClientChannel( const std::string& socket_address, std::string_view transport) { if (transport == "homa") { #if WITH_HOMA_GRPC - return HomaClient::createInsecureChannel(socket_address.data()); + return grpc::CreateCustomChannel(AddGrpcProtocol(socket_address), + HomaClient::insecureChannelCredentials(), + DistbenchCustomChannelArguments()); #else LOG(ERROR) << "Homa transport not compiled in"; LOG(ERROR) << "You must build with bazel build --//:with-homa-grpc"; From f067696925d1b51a05c677c313b862cbbc6bfc5f Mon Sep 17 00:00:00 2001 From: Dan Manjarres Date: Fri, 15 Sep 2023 10:36:13 -0700 Subject: [PATCH 2/3] re-enable homa-grpc in deploy_to_cloudlab --- deploy_to_cloudlab.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy_to_cloudlab.sh b/deploy_to_cloudlab.sh index bb9d8e53..3c5e919b 100755 --- a/deploy_to_cloudlab.sh +++ b/deploy_to_cloudlab.sh @@ -444,7 +444,7 @@ echo_magenta "\\nBuilding distbench binary..." (cd "${WORKTREE}"; bazel build -c opt :distbench \ --//:with-mercury=true \ --//:with-homa=true \ - --//:with-homa-grpc=false \ + --//:with-homa-grpc=true \ "${REPO_ENV[@]}" ) echo_magenta "\\nKilling any previous distbench processes..." From cd23ed10e004a9aab6c08713606594235fd6c288 Mon Sep 17 00:00:00 2001 From: Dan Manjarres Date: Sun, 17 Sep 2023 14:20:09 -0700 Subject: [PATCH 3/3] this fails with bazel test :protocol_driver_test --//:with-homa-grpc=true --//:with-homa=true --test_output=streamed --test_filter=ProtocolDriverTests/ProtocolDriverTest.Invoke/6 --- WORKSPACE.bazel | 5 ++--- protocol_driver_grpc.cc | 12 ++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 385f15e2..436537c3 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -26,9 +26,8 @@ http_archive( ##### Unfortunately this does not compile against the latest grpc. http_archive( name = "grpc_homa", - sha256 = "d358a83a72f5fd776ab0a98f83403e3f0ca14bdc551389b379c9649e190141b4", - strip_prefix = "grpc_homa-grpc-1.57.0.0", - url = "https://github.com/PlatformLab/grpc_homa/archive/refs/tags/grpc-1.57.0.0.tar.gz", + strip_prefix = "grpc_homa-a4ebed9f8b08e858638a05383fdc5c5df0a610a2", + url = "https://github.com/PlatformLab/grpc_homa/archive/a4ebed9f8b08e858638a05383fdc5c5df0a610a2.tar.gz", build_file = "@//:grpc_homa.BUILD", ) diff --git a/protocol_driver_grpc.cc b/protocol_driver_grpc.cc index 9d699f93..467bc61c 100644 --- a/protocol_driver_grpc.cc +++ b/protocol_driver_grpc.cc @@ -49,9 +49,21 @@ absl::StatusOr> CreateClientChannel( const std::string& socket_address, std::string_view transport) { if (transport == "homa") { #if WITH_HOMA_GRPC + LOG(ERROR) << socket_address; + LOG(ERROR) << AddGrpcProtocol(socket_address); + return HomaClient::createInsecureChannel(socket_address.data()); + #if 0 + return grpc::CreateCustomChannel(socket_address, + HomaClient::insecureChannelCredentials(), + DistbenchCustomChannelArguments()); return grpc::CreateCustomChannel(AddGrpcProtocol(socket_address), HomaClient::insecureChannelCredentials(), DistbenchCustomChannelArguments()); + return grpc::CreateChannel(AddGrpcProtocol(socket_address), + HomaClient::insecureChannelCredentials()); + return grpc::CreateChannel(socket_address, + HomaClient::insecureChannelCredentials()); + #endif #else LOG(ERROR) << "Homa transport not compiled in"; LOG(ERROR) << "You must build with bazel build --//:with-homa-grpc";