Skip to content

Commit

Permalink
[Refactor][GCS] Merge RedisAsioClient into RedisAsyncContext (#49000)
Browse files Browse the repository at this point in the history
Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness authored Dec 5, 2024
1 parent a303957 commit 54050c9
Show file tree
Hide file tree
Showing 9 changed files with 206 additions and 322 deletions.
42 changes: 19 additions & 23 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
# If you would like to help with the move in your PR, please use `git mv` so that the history of the file is retained.

load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:defs.bzl", "py_library", "py_runtime", "py_runtime_pair")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@com_github_grpc_grpc//bazel:cython_library.bzl", "pyx_library")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//bazel:ray.bzl", "COPTS", "PYX_COPTS", "PYX_SRCS", "copy_to_workspace", "ray_cc_binary", "ray_cc_library", "ray_cc_test")
load("@python3_9//:defs.bzl", python39 = "interpreter")
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
load("@python3_9//:defs.bzl", python39 = "interpreter")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:defs.bzl", "py_library", "py_runtime", "py_runtime_pair")
load("//bazel:ray.bzl", "COPTS", "PYX_COPTS", "PYX_SRCS", "copy_to_workspace", "ray_cc_binary", "ray_cc_library", "ray_cc_test")

package(
default_visibility = ["//visibility:public"],
Expand Down Expand Up @@ -90,20 +90,20 @@ config_setting(
# https://github.com/hedronvision/bazel-compile-commands-extractor?tab=readme-ov-file#vscode - directions for clangd config
refresh_compile_commands(
name = "refresh_compile_commands",
exclude_external_sources = True, # removed below to have lsp index external cc files at the cost of 2x index time
# Specify the targets of interest.
# For example, specify a dict of targets and any flags required to build.
targets = {
"//:ray_pkg": "",
"//:ray_pkg": "",
},
exclude_external_sources = True, # removed below to have lsp index external cc files at the cost of 2x index time
# No need to add flags already in .bazelrc. They're automatically picked up.
)

# bazel run :refresh_compile_commands_external_sources for generation with external source files (cc files)
refresh_compile_commands(
name = "refresh_compile_commands_external_sources",
targets = {
"//:ray_pkg": "",
"//:ray_pkg": "",
},
)

Expand All @@ -114,9 +114,9 @@ ray_cc_library(
srcs = [
"src/ray/rpc/common.cc",
"src/ray/rpc/grpc_server.cc",
"src/ray/rpc/server_call.cc",
"src/ray/rpc/rpc_chaos.cc",
"src/ray/rpc/retryable_grpc_client.cc",
"src/ray/rpc/server_call.cc",
],
hdrs = glob([
"src/ray/rpc/rpc_chaos.h",
Expand Down Expand Up @@ -536,10 +536,10 @@ ray_cc_library(
":scheduler",
":worker_rpc",
"//src/ray/protobuf:agent_manager_cc_proto",
"//src/ray/util:thread_checker",
"@boost//:bimap",
"@com_github_grpc_grpc//src/proto/grpc/health/v1:health_proto",
"@com_google_absl//absl/container:btree",
"//src/ray/util:thread_checker",
],
)

Expand Down Expand Up @@ -833,8 +833,8 @@ ray_cc_test(
srcs = ["src/ray/core_worker/test/memory_store_test.cc"],
tags = ["team:core"],
deps = [
":ray_mock",
":core_worker_lib",
":ray_mock",
"@com_google_googletest//:gtest_main",
],
)
Expand Down Expand Up @@ -990,8 +990,8 @@ ray_cc_test(
size = "small",
srcs = ["src/ray/core_worker/test/task_event_buffer_export_event_test.cc"],
tags = [
"no_windows",
"team:core",
"no_windows"
],
deps = [
":core_worker_lib",
Expand Down Expand Up @@ -1936,7 +1936,6 @@ ray_cc_test(
],
)


ray_cc_test(
name = "usage_stats_client_test",
size = "small",
Expand All @@ -1953,7 +1952,6 @@ ray_cc_test(
],
)


ray_cc_library(
name = "gcs_client_lib",
srcs = [
Expand Down Expand Up @@ -2193,13 +2191,11 @@ alias(
ray_cc_library(
name = "redis_client",
srcs = [
"src/ray/gcs/asio.cc",
"src/ray/gcs/redis_async_context.cc",
"src/ray/gcs/redis_client.cc",
"src/ray/gcs/redis_context.cc",
],
hdrs = [
"src/ray/gcs/asio.h",
"src/ray/gcs/redis_async_context.h",
"src/ray/gcs/redis_client.h",
"src/ray/gcs/redis_context.h",
Expand Down Expand Up @@ -2385,9 +2381,9 @@ ray_cc_test(
)

ray_cc_test(
name = "asio_test",
name = "redis_async_context_test",
size = "small",
srcs = ["src/ray/gcs/test/asio_test.cc"],
srcs = ["src/ray/gcs/test/redis_async_context_test.cc"],
args = [
"$(location redis-server)",
"$(location redis-cli)",
Expand All @@ -2410,7 +2406,7 @@ ray_cc_test(
srcs = ["src/ray/gcs/gcs_server/test/export_api/gcs_job_manager_export_event_test.cc"],
tags = [
"no_windows",
"team:core"
"team:core",
],
deps = [
":gcs_server_lib",
Expand All @@ -2427,7 +2423,7 @@ ray_cc_test(
srcs = ["src/ray/gcs/gcs_server/test/export_api/gcs_actor_manager_export_event_test.cc"],
tags = [
"no_windows",
"team:core"
"team:core",
],
deps = [
":gcs_server_lib",
Expand All @@ -2444,7 +2440,7 @@ ray_cc_test(
srcs = ["src/ray/gcs/gcs_server/test/export_api/gcs_node_manager_export_event_test.cc"],
tags = [
"no_windows",
"team:core"
"team:core",
],
deps = [
":gcs_server_lib",
Expand Down Expand Up @@ -2591,6 +2587,7 @@ filegroup(
"//src/ray/protobuf:common_py_proto",
"//src/ray/protobuf:core_worker_py_proto",
"//src/ray/protobuf:event_py_proto",
"//src/ray/protobuf:export_event_py_proto",
"//src/ray/protobuf:gcs_py_proto",
"//src/ray/protobuf:gcs_service_py_proto",
"//src/ray/protobuf:instance_manager_py_proto",
Expand All @@ -2601,7 +2598,6 @@ filegroup(
"//src/ray/protobuf:runtime_env_agent_py_proto",
"//src/ray/protobuf:runtime_env_common_py_proto",
"//src/ray/protobuf:usage_py_proto",
"//src/ray/protobuf:export_event_py_proto",
],
)

Expand Down
140 changes: 0 additions & 140 deletions src/ray/gcs/asio.cc

This file was deleted.

Loading

0 comments on commit 54050c9

Please sign in to comment.