Skip to content

Commit 298d2af

Browse files
authored
[Ray Log] remove glog dependency (ray-project#16077)
1 parent e3966f5 commit 298d2af

File tree

11 files changed

+77
-317
lines changed

11 files changed

+77
-317
lines changed

BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ cc_library(
323323
":ray_common",
324324
":ray_util",
325325
"//src/ray/protobuf:common_cc_proto",
326-
"@com_github_google_glog//:glog",
327326
"@msgpack",
328327
],
329328
)
@@ -352,7 +351,6 @@ cc_library(
352351
strip_include_prefix = "src",
353352
deps = [
354353
":plasma_client",
355-
"@com_github_google_glog//:glog",
356354
],
357355
)
358356

@@ -1557,8 +1555,10 @@ cc_library(
15571555
"//src/ray/protobuf:event_cc_proto",
15581556
"@boost//:asio",
15591557
"@boost//:property_tree",
1560-
"@com_github_google_glog//:glog",
15611558
"@com_github_spdlog//:spdlog",
1559+
"@com_google_absl//absl/debugging:failure_signal_handler",
1560+
"@com_google_absl//absl/debugging:stacktrace",
1561+
"@com_google_absl//absl/debugging:symbolize",
15621562
"@com_google_absl//absl/synchronization",
15631563
"@com_google_absl//absl/time",
15641564
"@com_google_googletest//:gtest_main",

bazel/ray.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPTS_WITHOUT_LOG = select({
2121
],
2222
})
2323

24-
COPTS = ["-DRAY_USE_SPDLOG"] + COPTS_WITHOUT_LOG
24+
COPTS = COPTS_WITHOUT_LOG
2525

2626
PYX_COPTS = select({
2727
"//:msvc-cl": [

bazel/ray_deps_setup.bzl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ def auto_http_archive(*, name=None, url=None, urls=True,
2424
build_file=None, build_file_content=None,
2525
strip_prefix=True, **kwargs):
2626
""" Intelligently choose mirrors based on the given URL for the download.
27-
2827
Either url or urls is required.
29-
3028
If name == None , it is auto-deduced, but this is NOT recommended.
3129
If urls == True , mirrors are automatically chosen.
3230
If build_file == True , it is auto-deduced.
@@ -181,18 +179,6 @@ def ray_deps_setup():
181179
sha256 = "b20f58e7f210ceb0e768eb1476073d0748af9b19dfbbf53f4fd16e3fb49c5ac8",
182180
)
183181

184-
auto_http_archive(
185-
name = "com_github_google_glog",
186-
url = "https://github.com/google/glog/archive/925858d9969d8ee22aabc3635af00a37891f4e25.tar.gz",
187-
sha256 = "fb86eca661497ac6f9ce2a106782a30215801bb8a7c8724c6ec38af05a90acf3",
188-
patches = [
189-
"//thirdparty/patches:glog-log-pid-tid.patch",
190-
"//thirdparty/patches:glog-stack-trace.patch",
191-
"//thirdparty/patches:glog-suffix-log.patch",
192-
"//thirdparty/patches:glog-dump-stacktrack.patch",
193-
],
194-
)
195-
196182
auto_http_archive(
197183
name = "cython",
198184
build_file = True,
@@ -214,8 +200,8 @@ def ray_deps_setup():
214200
# This is how diamond dependencies are prevented.
215201
auto_http_archive(
216202
name = "com_google_absl",
217-
url = "https://github.com/abseil/abseil-cpp/archive/aa844899c937bde5d2b24f276b59997e5b668bde.tar.gz",
218-
sha256 = "327a3883d24cf5d81954b8b8713867ecf2289092c7a39a9dc25a9947cf5b8b78",
203+
url = "https://github.com/abseil/abseil-cpp/archive/278e0a071885a22dcd2fd1b5576cc44757299343.tar.gz",
204+
sha256 = "1764491a199eb9325b177126547f03d244f86b4ff28f16f206c7b3e7e4f777ec",
219205
)
220206

221207
# OpenCensus depends on jupp0r/prometheus-cpp

python/ray/tests/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ py_test_module_list(
4343
"test_get_locations.py",
4444
"test_global_state.py",
4545
"test_healthcheck.py",
46+
"test_kill_raylet_signal_log.py",
4647
"test_mldataset.py",
4748
],
4849
size = "medium",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import psutil
2+
import signal
3+
import sys
4+
import pytest
5+
import ray
6+
7+
8+
def get_pid(name):
9+
pids = psutil.process_iter()
10+
for pid in pids:
11+
if name in pid.name():
12+
return pid.pid
13+
14+
return -1
15+
16+
17+
def check_result(filename, num_signal, check_key):
18+
ray.init(num_cpus=1)
19+
session_dir = ray.worker._global_node.get_session_dir_path()
20+
raylet_out_path = filename.format(session_dir)
21+
pid = get_pid("raylet")
22+
assert pid > 0
23+
p = psutil.Process(pid)
24+
p.send_signal(num_signal)
25+
p.wait(timeout=15)
26+
with open(raylet_out_path) as f:
27+
s = f.read()
28+
assert check_key in s
29+
30+
31+
@pytest.mark.skipif(sys.platform == "win32", reason="Not support on Windows.")
32+
def test_kill_raylet_signal_log(shutdown_only):
33+
check_result("{}/logs/raylet.err", signal.SIGABRT, "SIGABRT")
34+
35+
36+
@pytest.mark.skipif(sys.platform != "win32", reason="Only run on Windows.")
37+
def test_kill_raylet_signal_log_win(shutdown_only):
38+
check_result("{}/logs/raylet.out", signal.CTRL_BREAK_EVENT, "SIGTERM")
39+
40+
41+
if __name__ == "__main__":
42+
sys.exit(pytest.main(["-v", __file__]))

0 commit comments

Comments
 (0)