Repository navigation
[build] Bazel 8.8.1: bump protobuf to v29.6, rules_java to 8.12.0 and gRPC to 1.69.0 - #66483
Conversation
There was a problem hiding this comment.
Code Review
This pull request upgrades Protobuf to v29.6, gRPC to v1.69.0, and Abseil to 20240722.0, along with updating rules_java, rules_cc, and bazel_skylib to ensure compatibility with Bazel 8. It also introduces tracking of in-flight RPC calls in GrpcClient to prevent channels from being prematurely marked as idle. Feedback on the changes highlights a critical race condition in GrpcClient where decrementing the in-flight call counter before executing the user callback could lead to premature client eviction or destruction while the callback is still running.
| num_calls_in_flight->fetch_sub(1); | ||
| user_callback(status, std::move(reply)); |
There was a problem hiding this comment.
Decrementing num_calls_in_flight before invoking user_callback can allow the client to be detected as idle and evicted/destroyed by another thread (e.g., the client pool) while user_callback is still executing. If the callback accesses any resources associated with the client, this could lead to a use-after-free or race condition.
Invoking user_callback first and then decrementing the counter ensures that the client is kept alive and not considered idle until the callback has fully finished executing.
| num_calls_in_flight->fetch_sub(1); | |
| user_callback(status, std::move(reply)); | |
| user_callback(status, std::move(reply)); | |
| num_calls_in_flight->fetch_sub(1); |
There was a problem hiding this comment.
Agreed, fixed in 0c06a11: the callback now runs first and the in-flight count is decremented after it, so the client cannot look idle (and be evicted from CoreWorkerClientPool) while it is still handling the reply. //src/ray/rpc/tests:grpc_server_client_test (including TestNotIdleWhileCallInFlight) and //src/ray/core_worker_rpc_client/tests:core_worker_client_pool_test pass.
d96817d to
b82fc29
Compare
Release perf benchmarksAll 13 core perf release tests (AWS) passed on Compared against the 2.59.0 baselines in
Two metrics are worse than 2.59.0, but master nightly already shows the same values without this PR:
Premerge is fully green with every manual gate unblocked (sanitizers, aarch64, Windows, macOS): build 75924. 🤖 Generated with Claude Code |
3ab4983 to
bb53ec3
Compare
Ray's bazel_skylib 1.6.1 declaration in ray_deps_setup() never took effect: py_repositories() runs first and its maybe() declares bazel_skylib 1.3.0. Declare 1.7.1 at the top of WORKSPACE so it wins, and drop the dead declaration. Also pin rules_pkg to 0.9.1 ahead of protobuf_deps(). 0.9.1 is the newest release that still has the root providers.bzl stub the v3.20.3 protobuf used for Python/Java codegen loads. Both are versions the protobuf 29 / gRPC 1.69 bump (#66483) needs; landing them first keeps that PR smaller. rules_cc stays in #66483: 0.0.14 drops cc_proto_library and 0.0.15+ loads protobuf's bazel/ package, so it can only move together with protobuf. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
rules_java 7.x compiles Java at source/target 8 by default; 8.x defaults to 11. On the protobuf 29 / rules_java 8 branch (#66483) Ray's jars came out as class file version 55, which a Java 8 runtime rejects (UnsupportedClassVersionError in test_raydp and test_logging_java). Pin --java_language_version=8 now; under rules_java 7.x this matches the default and changes nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
sai-miduthuri
left a comment
There was a problem hiding this comment.
Should this PR be stacked with 67717, 67718, 67719, 67720, 67721 ?
|
|
||
| os._exit(1) | ||
| import threading | ||
|
|
||
| # Exit shortly after this call returns, not inside it. The router only | ||
| # treats a request as delivered once the replica's "accepted" message | ||
| # arrives; os._exit() inside the call can kill the process before that | ||
| # message leaves it, so the router retries on the other replica, which | ||
| # then exits too and leaves no live replica. | ||
| threading.Timer(0.5, os._exit, args=(1,)).start() |
There was a problem hiding this comment.
Same comment as #67717 (comment)
Can this use asyncio.sleep + asyncio.create_task?
…lmod mode Not for merge. Proof of concept on top of #66483 and #66305, still on Bazel 7.5.0. - Turn on bzlmod alongside WORKSPACE (--enable_bzlmod --enable_workspace). - MODULE.bazel declares only rules_rust and rules_rust_pyo3 (0.74.0), so none of Ray's WORKSPACE repos change: com_google_protobuf stays 29.6 and the module graph's protobuf/rules_python live in separate canonical repos. - rust_probe/: a rust_library + rust_test, and a pyo3_extension consumed by a py_test as a data file. It cannot go in deps: the module world's rules_python PyInfo is a different provider than WORKSPACE's. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
…lmod mode Not for merge. Proof of concept on top of #66483 and #66305, still on Bazel 7.5.0. - Turn on bzlmod alongside WORKSPACE (--enable_bzlmod --enable_workspace). - MODULE.bazel declares only rules_rust and rules_rust_pyo3 (0.74.0), so none of Ray's WORKSPACE repos change: com_google_protobuf stays 29.6 and the module graph's protobuf/rules_python live in separate canonical repos. - rust_probe/: a rust_library + rust_test, and a pyo3_extension consumed by a py_test as a data file. It cannot go in deps: the module world's rules_python PyInfo is a different provider than WORKSPACE's. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
## Description Fixes four tests that depend on timing. They pass today but failed consistently, on some platforms, once gRPC was bumped to 1.69 in #66483. Each change makes the test wait for the state it assumes, instead of hoping that state is already reached: - `test_release_resource`: the raylet can grant leases out of submission order, so the canary task could take the CPU before `f`. Wait until `f` is running before submitting the canary. (On Windows the canary won every time.) - `test_broadcast` (llm): `self_destruct` called `os._exit()` inside the call, which can kill the replica before its "accepted" message reaches the router. The router then retries on the other replica, which also exits. Exit shortly after the call returns instead. - `test_capacity_queue_router`: same pattern. Let the crashing replica's acceptance through before it exits. - `TestEvictLineageStopsAtTarget`: pass `max_retries` inline. The lambda used a local `const int` without capturing it, which GCC and Clang allow for a constant but MSVC rejects. All test-only. No runtime changes. ## Related issues Split out of #66483 (protobuf 29 / gRPC 1.69) to make that PR easier to review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <sim@local> Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
rules_java 8.x (needed for Bazel 8) loads @com_google_protobuf//bazel:*.bzl, which does not exist in the v23.4-era protobuf Ray pinned, so the two move together. gRPC < 1.69 builds a standalone @upb that does not compile against protobuf 29, so gRPC (and abseil, boringssl to match it) moves too. - Declare bazel_skylib 1.7.1, rules_cc 0.0.16 and rules_java 8.14.0 at the top of WORKSPACE. The first declaration of a repo wins, and rules_python's py_repositories() otherwise pulls skylib 1.3.0 and rules_cc 0.0.13. - Run rules_java_dependencies() after ray_deps_setup(), so its maybe() does not replace Ray's protobuf with 29.0-rc2. - Pin rules_pkg 0.9.1: the v3.20.3 protobuf used by rules_proto_grpc loads the root @rules_pkg//:providers.bzl stub, which rules_pkg 0.10.0 removed. - Arena::CreateMessage -> Arena::Create, always_print_primitive_fields -> always_print_fields_with_no_presence (same output for Ray's protos). - Load cc_proto_library from protobuf; use gRPC's health_cc_grpc target. - Drop protobuf-bazel7.patch, grpc-disable-layering-check.patch and grpc's protobuf.patch; port the thread-count, NextResult and zlib-fdopen patches. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
- rules_java 8.14.0 -> 8.12.0: from 8.13.0 on, the prebuilt java_tools need GLIBCXX_3.4.21, newer than manylinux2014's libstdc++ (jar build). - Keep boringssl at 2ff4b968: later commits require C11 <stdalign.h> on MSVC, which the Windows CI SDK (10.0.19041) lacks (Windows build). - Restore grpc-disable-layering-check.patch, ported to 1.69: gRPC's own BUILD files miss deps that clang enforces on macOS (macOS build). - Define PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE: GCC 10 warns on the deprecated shim's own body in every file including arena.h, and -Werror makes that fatal (all manylinux wheel / cpp / java images). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
rules_java 7.x compiled Java at source/target 8 by default; 8.x defaults to 11. Ray's jars came out as class file version 55, which a Java 8 runtime rejects (UnsupportedClassVersionError in test_raydp and test_logging_java). Pin --java_language_version=8. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
…240722.2 - Keep gRPC's EventEngine client and listener off on Windows. gRPC 1.69 enables them there (1.58 marked them broken), and they abort at teardown: win_socket.cc "Check failed: is_shutdown_" (test_implicit_resource, test_object_spilling_2_asan). Posix keeps 1.69's defaults. - abseil 20240722.0 -> 20240722.2: patch 1 fixed a security issue in hash container create/resize. - UBSan: GCC rejects abseil's hash containers under the null, nonnull-attribute and returns-nonnull-attribute checks (a function-pointer comparison in a constexpr stops being a constant expression). Turn those three off; they must follow -fsanitize=undefined in the same flag list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
The Windows patch moved gRPC's client and listener back to iomgr but left
event_engine_callback_cq on. On Windows grpc_iomgr_run_in_background()
returns IsEventEngineCallbackCqEnabled(), so gRPC assumed I/O makes progress
in the background and gave callback-API code no polling thread, while the
iomgr sockets need one. pubsub_integration_test, which only uses the
callback API, could never connect ('tcp handshaker shutdown' after 20s).
Raylet/GCS only worked because their CompletionQueue threads poll the same
iomgr. Turn the callback CQ off too so callback-API code uses
CallbackAlternativeCQ, which polls iomgr, as 1.58 did.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
GCC 11 reports a false -Wmaybe-uninitialized in protobuf 29's generated move-assignment (CanMoveWithInternalSwap) when it is inlined into core_worker.cc under the ubsan config, and -Werror turns it into a build failure for core_worker_lib. Keep the warning but don't make it fatal under ubsan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
Bazel's own Linux releases need glibc >= 2.25 since Bazel 8, so they cannot start in manylinux2014 (CentOS 7, glibc 2.17), where Ray builds its Linux wheels. Add a bazel-glibc217 wanda image that builds the .bazelversion release from source inside that image (bootstrap with compile.sh, then //src:bazel with an embedded JDK) and smoke-tests a server start there. The core, cpp-core and java image builds and the manylinux CI image copy it in and point bazelisk at it. Wheels keep targeting glibc 2.17. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
On x86_64 the second-stage //src:bazel build runs rules_java's prebuilt ijar, which needs GLIBCXX_3.4.21 and fails on CentOS 7. Ship compile.sh's bazel_nojdk with the Temurin JDK 21 it was built with, passed via --server_javabase. Embed the release label so 'bazel info release' (and anything keyed on the version) reports , not no_version, which is what failed the aarch64 smoke test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
Each test built a fresh mock workspace and HOME, so every bazel query started a new Bazel server, and on Bazel 8 fetched rules_python from the registry to autoload the mock BUILD's py_test. Six of those took the small test past its 60s timeout (69s locally). Nothing writes to the workspace, so make the fixture module-scoped: 21.5s locally. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
Move from Bazel 7.5.0 to 8.8.1, still in WORKSPACE mode (bzlmod stays off, so every repo still comes from WORKSPACE and there is one copy of protobuf, rules_java and rules_python). - .bazelversion 7.5.0 -> 8.8.1. - --noincompatible_disallow_empty_glob: the root BUILD.bazel globs platform-specific paths that are empty on other platforms. - --noincompatible_disallow_ctx_resolve_tools: the 2021 rules_proto_grpc pin still calls ctx.resolve_tools. - Pin rules_proto 7.1.0 ahead of grpc_deps(): 6.0.2 reads native proto_common.ProtoLangToolchainInfo, which Bazel 8 removed. Official Bazel 8 binaries need glibc >= 2.25 and can't start in the manylinux2014 images, so the previous commits build Bazel for glibc 2.17 in CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
Bazel 8 autoloads sh_binary/sh_test from rules_shell, and on Windows they
need a registered shell toolchain to build their launcher. Bzlmod registers
it automatically; in WORKSPACE mode nothing did, so every Windows job failed
analysis on @bazel_tools//tools/test:collect_coverage ("No suitable shell
toolchain found"). Declare rules_shell 0.2.0 (protobuf 29's pin) early and
call rules_shell_toolchains().
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
c867d2a to
59c6539
Compare
…lmod mode Not for merge. Proof of concept on top of #66483 and #66305, still on Bazel 7.5.0. - Turn on bzlmod alongside WORKSPACE (--enable_bzlmod --enable_workspace). - MODULE.bazel declares only rules_rust and rules_rust_pyo3 (0.74.0), so none of Ray's WORKSPACE repos change: com_google_protobuf stays 29.6 and the module graph's protobuf/rules_python live in separate canonical repos. - rust_probe/: a rust_library + rust_test, and a pyo3_extension consumed by a py_test as a data file. It cannot go in deps: the module world's rules_python PyInfo is a different provider than WORKSPACE's. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
The *_pb2_grpc.py stubs come from the Python plugin of the gRPC that Ray builds. From 1.63 on, that plugin emits `_registered_method=True` on client stubs and `server.add_registered_method_handlers()`, which only exist in grpcio >= 1.64. With gRPC 1.69 the stubs failed on grpcio 1.62 (client and server) and 1.63 (server), while setup.py allows grpcio >= 1.42.0. CI pins grpcio 1.75, so it never showed. Patch the plugin to leave both out, so the stubs match what the 1.58 plugin generated. This gives up grpcio's registered-method fast path, which Ray's stubs did not use before either. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
…lmod mode Not for merge. Proof of concept on top of #66483 and #66305, still on Bazel 7.5.0. - Turn on bzlmod alongside WORKSPACE (--enable_bzlmod --enable_workspace). - MODULE.bazel declares only rules_rust and rules_rust_pyo3 (0.74.0), so none of Ray's WORKSPACE repos change: com_google_protobuf stays 29.6 and the module graph's protobuf/rules_python live in separate canonical repos. - rust_probe/: a rust_library + rust_test, and a pyo3_extension consumed by a py_test as a data file. It cannot go in deps: the module world's rules_python PyInfo is a different provider than WORKSPACE's. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 99c1471. Configure here.
| + out->Print("metadata)\n"); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Plugin patch misses version gate
High Severity
The new plugin patch only strips _registered_method=True and add_registered_method_handlers(). gRPC 1.69's Python plugin still emits a GRPC_GENERATED_VERSION check that rejects grpcio below 1.69.0 at import, so *_pb2_grpc.py stubs fail on the grpcio >= 1.42.0 floor setup.py still allows. CI will not catch this because the lockfile pins grpcio 1.78.0.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 99c1471. Configure here.
…9 / rules_java 8 (#67720) ## Description Two forward-compatible changes needed by the protobuf 29 / rules_java 8 bump. Both are no-ops on master's current versions: - Replace `Arena::CreateMessage` with `Arena::Create` (`server_call.h` plus 7 test call sites). `CreateMessage` is deprecated in newer protobuf. #66483 compiles it out with `PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE` because GCC 10 warns on its body under `-Werror`. - Add `--java_language_version=8`. rules_java 7.x already defaults to Java 8. 8.x defaults to 11, which breaks consumers on a Java 8 runtime (e.g. RayDP). ## Related issues Split out of #66483 (protobuf 29 / gRPC 1.69) to make that PR easier to review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…ad it (#68262) ## Description Since the Bazel 8 bump (#66483), Windows C++ tests that read the token from the `auth_token_file` genrule (#67523) crash in setup with `RAY_AUTH_TOKEN_PATH is set but file cannot be opened or is empty`. The genrule's output comes from the remote cache and is never downloaded, so the test's runfiles link points at a missing file. Tagging the genrule `no-remote` makes every build generate it locally. | Targets | Before | After | |---|---|---| | `open_telemetry_metric_recorder_test`, `object_manager_test`, `node_manager_test`, `grpc_server_client_test`, `core_worker_test`, `gcs_client_test` | failed 2/2, [postmerge 21056](https://buildkite.com/ray-project/postmerge/builds/21056) | passed, [premerge 77225](https://buildkite.com/ray-project/premerge/builds/77225) | | `global_state_accessor_test` | failed, [premerge 77216](https://buildkite.com/ray-project/premerge/builds/77216) | passed, [premerge 77227](https://buildkite.com/ray-project/premerge/builds/77227) | ## Related issues Related to #67047 Signed-off-by: Chi-Sheng Liu <[email protected]>
…ueue (#68210) ## Description After the gRPC 1.58 → 1.69 bump (#66483) the `random_shuffle` nightly release test fails every run with `ObjectFetchTimedOutError ... timed out because no locations were found for the object`. gRPC ≥ 1.60 cancels an incoming call that the server has not requested from its completion queue within 30 s (`GRPC_ARG_SERVER_MAX_UNREQUESTED_TIME_IN_SERVER_SECONDS`, default 30). gRPC 1.58 had no such limit, so a busy server just let calls wait. Ray's servers rely on that as backpressure, and callers such as `PinObjectIDs` treat `CANCELLED` as final (only `UNAVAILABLE` / `UNKNOWN` are retried). This PR sets the limit to `INT_MAX` on every Ray gRPC server (`src/ray/rpc/grpc_server.cc`), which restores the 1.58 behaviour. ### Evidence Manual bisect of the 17 commits between the last green nightly (96600b8) and the failing one (74b21dc), one `random_shuffle`-only release build per commit: | Commit | Result | |---|---| | d8b6541 (#67720), the commit before #66483 | passed, [115576](https://buildkite.com/ray-project/release/builds/115576) | | 14eb816 (#66483) | failed, [115577](https://buildkite.com/ray-project/release/builds/115577) | | four later commits | failed, same error | - The first bad build logs `Request to local raylet to pin object failed: RpcError: RPC error: CANCELLED rpc_code: 1` (`core_worker.cc`) more than 155,000 times, starting about a minute into the run. The last good build logs it zero times. - A cancelled pin means the raylet never takes over the primary copy of that object, which matches reducers later finding no location for it. - #66483 changes no runtime code in `src/ray` beyond a JSON print option, so the behaviour change comes from gRPC itself. The unit test reproduces the cancellation directly, and raising the limit removes every cancelled pin in the release test (see Testing). ## Testing - `random_shuffle` release test on this branch (b562204, on top of master 5369f04): **passed**, exit 0, benchmark time 395 s — [release build 115711](https://buildkite.com/ray-project/release/builds/115711). The log has zero `pin object failed` / `CANCELLED` lines and zero `ObjectFetchTimedOutError`, versus 155,000+ cancelled pins on 14eb816. The run still logs 7 worker OOM kills (the #68151 issue) and recovers from them, as the pre-#66483 builds do. One run so far; the failure before the fix was 7 out of 7. - New unit test `TestQueuedCallNotCancelledByServer` in `src/ray/rpc/tests/grpc_server_client_test.cc`: it holds the only `ServerCall` busy (`max_active_rpcs` is 1), leaves a second call queued for 32 s, then checks both calls succeed. Run locally with `bazel test //src/ray/rpc/tests:grpc_server_client_test --test_output=errors`: - with the fix: passes (whole target 41 s). - with the channel arg removed: fails, the queued call returns `RpcError: RPC error: CANCELLED rpc_code: 1`, the same error the release test logs. - The test needs more than 30 s of wall time because the limit is a whole number of seconds with a 30 s default, so the target moves from `small` to `medium`. ## Related issues - Regression introduced by #66483. - Not a duplicate of #68151: that draft investigates the earlier `random_shuffle` slowdown and worker OOM kills from the pyarrow 25 bump (#68005). Those OOM kills also appear in the builds that pass; this PR is about the hard failure that starts at #66483. No other open PR or issue touches this channel arg (searched open PRs for `UNREQUESTED_TIME`, `max_unrequested`, `pin object failed`, and issues for `random_shuffle ObjectFetchTimedOutError`). ## Additional information AI assistance (Claude Code) was used for the bisect, the log analysis and this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
…floop-input * upstream/master: [Data][3/n] update progress bar on lineage reconstruction (ray-project#67366) [Data] Enable the Top-N rewrite by default and expose it on DataContext (ray-project#68329) [Data] Adaptively skip map-side partial aggregation for high-cardinality keys (ray-project#68118) [Core] Spawn specific servers without preexec_fn to fix intermittent startup crashes (ray-project#67947) [Serve] Stop the __wrapped__ walk at non-callables (ray-project#67117) [Data] Deflake test_read_parquet_v2 by cutting redundant Ray Data executions (ray-project#68318) [Data] Retry FooterReader actor deaths with Ray Core and yield footers in listing order (ray-project#67988) [Data] Fix order-dependent schema unification when a list<null> arm is present (ray-project#68259) [Serve] Make @serve.batch work when wrapped in another decorator (ray-project#68177) [serve] Deflake test_metrics_3 - record the batch queue length once a batch is taken (ray-project#68302) [serve] Drop completed requests from the multiplexed model ID index (ray-project#68085) [Data] Fix flaky test_hudi: read each table once instead of sorting in Ray Data, keep size small (ray-project#68162) [Data] Fix flaky test_context: start 2 Ray clusters instead of 5 and keep size small (ray-project#68161) [Data] Fix flaky test_kafka: use recent timestamps in test_read_kafka_datetime_partial_range (ray-project#68248) [Data] Iceberg DSv2 [2/5]: The listing-to-reading manifest for Iceberg (ray-project#67951) [Train] Report training errors when the post-mortem debugger raises a BaseException (ray-project#68317) [RLlib] Skip the PPOConfig docstring example that crashes the rllib doctest target (ray-project#68306) [Train] Support post-mortem debugging for training function errors (ray-project#68296) [train][1/n] Give each health probe its own timeout (ray-project#68191) [Data] Fix unifying a fixed-shape tensor array with a lower-ndim variable-shaped one (ray-project#67266) [Train] Add a guide to debugging failures and hangs (ray-project#68299) [Data] Persist BlockMetadata.num_rows and batch ray.get in _calculate_blocks_rows (ray-project#67662) [Data] Vectorize LeRobot delta segment preparation and validate index contiguity (ray-project#67845) [Data] Avoid full-DataFrame apply in _AbstractKBinsDiscretizer._transform_pandas (ray-project#67862) [doc] Refresh intersphinx inventory snapshots (ray-project#68303) [Data] Fix SimpleImputer on categorical columns in append mode and with existing category values (ray-project#67467) [Data] Replace O(N) list.pop(0) with deque.popleft() in PushBasedShuffleTaskScheduler (ray-project#67243) [Train] Reject an elastic ScalingConfig with max_workers=0 (ray-project#68218) [core][move semantics][3/n]Populate task args with is_move for movable refs (ray-project#66803) [core][sandbox] Remove the readonly option (ray-project#68088) [Data](1/n) Implement the line-chunk reader for CSV and JSONL on DataSource V2 (ray-project#67907) [Data] Set MIMALLOC_PURGE_DELAY=0 on random_shuffle to fix the pyarrow 25 OOM regression (ray-project#68151) [core] Quote each `uv run` argument in the uv runtime env hook (ray-project#68156) [core] Don't let gRPC cancel calls that wait over 30s in the server queue (ray-project#68210) [Data] Fix shuffle and join on native tensor columns with pyarrow 25+ (ray-project#68072) [serve][llm] Remove decode load progress (ray-project#68258) [ci] Bump sglang to 0.5.23 in release tests (ray-project#68250) [Core] Build the test auth token file locally so Windows tests can read it (ray-project#68262) [image] Bump EFA installer to 1.51.0 in CPU base-extra images (ray-project#67730) [serve] Observe the result of rank reassignment reconfigures (ray-project#67923) [Serve][Docs] Explain imperative vs declarative deploys and in-place updates from Python (ray-project#68243) [Data] (Fault tolerance) Ray Data lineage reconstruction docs (ray-project#68061) [RLlib] Add a multi-node footsies APPO memory release test (ray-project#67595) [Train] Remove local mode (ray-project#68239) [Data] Fix filtered Lance row-count metadata (ray-project#67228) [Serve][2/2] Propagate TracingConfig to proxies at startup (ray-project#65437) [Data] Fix synthesized path filtering in DataSourceV2 (ray-project#67079) [RLlib] Run the BCConfig Tune example one trial at a time to unblock the rllib doctest target (ray-project#68242) [Data][Delta DSv2][2/7] List Delta Lake table files from the log (ray-project#67888) [Data] Parallelize Parquet and ORC full-schema reads (ray-project#67542) [Data] Random Shuffle on Shuffle V2 Map/Reduce Operators (ray-project#68004) [Data] Propagate metadata prefetch thread failures to executor (ray-project#68171) [core] Send generator consumed-progress updates from io_service_ (ray-project#67160) [Data] Add @ray-data-connectors as codeowner for datasource/sinks files (ray-project#68154) [data][llm] Keep the prompt in vLLM error rows (ray-project#67665) [data][actor-only][3/n] Actor-only backend: operator fusion (ray-project#67699) [Data] Read text files on DataSource v2 (ray-project#68063) [Autoscaler][KubeRay] Never patch worker group replicas below minReplicas (ray-project#67332) [Serve] Show progress of updating (ray-project#67107) [core][test] Trigger usage-stats OOM test without exhausting host memory (ray-project#68009) [Serve] Remove unused RAY_SERVE_HAPROXY_INGRESS_RETRY_ON and RAY_SERV… (ray-project#68175) [Data] Implement lineage tracker garbage collection upon marking operator durable (ray-project#67788) [Core] Fix recovery suppression race in ObjectRecoveryManager (ray-project#64974) [serve] Pass grpc.so_reuseport to gRPC as an integer (ray-project#66816) [Autoscaler][v2] Preserve retry accounting when trimming status history (ray-project#67360) [doc] Refresh intersphinx inventory snapshots (ray-project#68069) [Doc] Add item to AGENTS.md to update documentation when modifying API-facing code. (ray-project#68204) [Train] Preserve `num_boost_round=0` and avoid mutating `callbacks` in legacy LightGBM/XGBoost trainers (ray-project#68145) [Train] Raise in prepare_data_loader instead of dropping a custom batch_sampler (ray-project#68201) [air] Return None in skip_exceptions when exc or StartTraceback cause is None (ray-project#68172) [Train] Fix `checkpoint_manager` to support metrics only reported in a validation function (ray-project#67909) [Train] Count elastic workers in resource units for fractional resources (ray-project#68139) [Data] Refactor Disk shuffle map to use map Operator (ray-project#67130) [core][move semantics][2/n] Change state to moved on consumption and add enforcements (ray-project#66767) [Data] Propagate labels to object-store SHUFFLE_V2 map/reduce tasks (ray-project#67135) feat(core): add Cambricon MLU resource support (ray-project#66368) [Data] Make `zero_copy_batch=False` copy default batches (ray-project#67154) [data] Fix Parquet filename suffix detection (ray-project#67156) [data] Fix docstring/behavior mismatches in read_json and Dataset.sort (ray-project#66927) [Data] Run video_object_detection.ray on T4s with more memory (ray-project#68149) [core][sandbox] Let a node override network="public" sandboxes' default resolvers (ray-project#67691) [Data] read_mcap: resolve each sample's steps and lay out its row (ray-project#67925) [Data] read_mcap: sample read inputs: TopicSpec, steps, match and samples checks (ray-project#67924) [Data] Keep a map task's buffered rows when max_errored_blocks skips its error; read past corrupt MCAP chunks (ray-project#67167) [core][move semantics][1/n] Adding consume_once flag in actor methods (ray-project#66620) [Data] Size the schema pin and the columns Ray adds in the Parquet decoded-size estimate [3/6] (ray-project#67838) [Serve][LLM][1/3] Token based autoscaling: track autoscaling workload in KV router (ray-project#67937) [Data] Add native direct reads for nonpartitioned Hive tables (ray-project#67114) [Train] Count elastic workers in resource units for fractional resources (ray-project#68139) [Data] Add `condition` to `Dataset.join` and extract equi-join keys from it (ray-project#67590) [data] Add Top-N execution (ray-project#66931) [build] Bazel 8.8.1: bump protobuf to v29.6, rules_java to 8.12.0 and gRPC to 1.69.0 (ray-project#66483) [build] Use Arena::Create and pin Java 8 bytecode ahead of protobuf 29 / rules_java 8 (ray-project#67720) [core][sandbox] Don't join a sandbox's cgroup on every exec (ray-project#67690) [Data] Run `training_ingest_regression_test` on Instances that can be Provisioned (ray-project#68110) [Data] Run Sort on Disk-based Shuffle under SHUFFLE_V2 (ray-project#67850) [core] Deflake tests that race on timing (ray-project#67717) [ci] Bump pypa manylinux2014 base image to 2026.10.22-0 for CPython 3.15 (ray-project#67285) [Data] Make Mcap Data Column Test Insensitive to Struct Field Order (ray-project#68109) [Data] read_mcap V2: cut large files where their log-time order holds (ray-project#67166) [core][sandbox] Commit sandbox as new registry image (ray-project#67972) [Data] read_mcap V2: read neighbouring chunks in one ranged request (ray-project#67930) [train][4/n] Wire WorkerProbes through the HealthManager (ray-project#67915) [train][3/n] Add WorkerProbe results and health reports to the HealthState (ray-project#67879) [Data] (Data fault tolerance ray-project#6/6) Add a manual release test for lineage reconstruction (ray-project#67519) [train][6/n] Act on health decisions in the Ray Train controller (ray-project#67856) [Train] Do not start an elastic worker group with zero workers (ray-project#68101) [Train] Keep the last checkpoint after a metrics-only report in local mode (ray-project#68070) [Data][2/n] Migrate GPU Shuffle to Unified Phase Metrics (ray-project#67359) [Data][Chkpt] Fix `ArrowInvalid` when loading large generated-ID checkpoints (ray-project#68065) [core][test] Create auth token in test_redis_wrong_password (ray-project#68014) [data][actor-only][2/n] Actor-only backend: promote task pools to actor pools (ray-project#67698) [Data] Fix typing mismatches in Dataset public API (ray-project#62077) [Data] read_mcap V2: carry read tasks' summary records in the manifest (ray-project#67929) [Data] Distinguish generated ID collisions with synthesized columns (ray-project#67164) [Data] Fix incorrect scale-up in rate-based autoscaler for custom resources (ray-project#66647) [Data][Delta DSv2][1/7] Shared Parquet and partitioning fixes for the Delta reader (ray-project#67887) [Data] Eliminate redundant aggregation shuffle (ray-project#67198) [Data] Raise minimum supported pyarrow to 23.0.0 and test up to 26.0.1 (ray-project#68005) [Train] Use the default validation timeout when a report's ValidationTaskConfig has none (ray-project#68045) [doc][train] Use the global batch size in the TensorFlow Train examples (ray-project#68006) [TPU] Default multi-slice MASTER_ADDR to slice 0 host 0 in SlicePlacementGroup (ray-project#67878) [Data] Estimate a Parquet row group's decoded Arrow bytes from its footer [2/6] (ray-project#67837) [Data] Predicate pushdown through joins: split conjuncts, derive one-sided OR weakenings (ray-project#67122) [Data] Add partition_filters to read_delta and take file sizes from the log (ray-project#67900) [Data] Stop writing Unity Catalog vended credentials to the environment (ray-project#67899) [Data] Raise an error for Delta tables with column mapping in write_delta (ray-project#67898) [Core] Add initial foundational configurations and flags for fork server (ray-project#67356) [core][sandbox] Image layers caching (ray-project#67874) [Doc][Train] Add device stream batch prefetching section to accelerator guide (ray-project#67779) [Train] Use user-defined train function name in training thread name and error stack traces (ray-project#64292) [serve][docs] Remove beta label from custom autoscaling policies (ray-project#68046) [core] Don't treat a gRPC client with calls in flight as idle (ray-project#67718) [train] Fix checkpoint sorting to support nested metrics (ray-project#59130) [train][5/n] Run ControllerProbes on the controller's node monitor (ray-project#67671) [Train] Rank a checkpoint without the score attribute as worst in min order (ray-project#67901) [Core][RuntimeEnv] Stream runtime environment package downloads (ray-project#67184) [core] Deflake `_run_hanging_command` tests (ray-project#67461) [Data] Add Gravitino Iceberg REST catalog provider (ray-project#67007) [Data] Fix mixed-root partition filtering in Parquet and ORC V2 (ray-project#67067) [core] Keep absl logging at ERROR unless GRPC_VERBOSITY is set (ray-project#67719) [Data][1/n]Add Shuffle Metrics Unification Instrumentation (ray-project#66968) [ci][release] Stop publishing Python 3.10 wheels and images (ray-project#67722) [serve] Copy the ASGI lifespan state into each request scope (ray-project#67844) [Serve][LLM][4/5] Support scale-to-zero application routing (ray-project#67087) [core][sandbox] Let GPU sandboxes request NVIDIA profiling capabilities (ray-project#67974) [Serve][LLM] Exclude LLMRouter from dashboard QPS (ray-project#67873) [Data] Read the Parquet SizeStatistics PyArrow doesn't expose [1/6] (ray-project#67836) Add perf metrics for 2.60.0 (ray-project#67727) [Observability / Train] Add Grafana Annotation support with Ray Train usage (ray-project#66958) Signed-off-by: Eugene Paniot <[email protected]> # Conflicts: # python/ray/data/_internal/planner/plan_udf_map_op.py
## Why **Stacked on #66483**, and based on its branch, so the diff is only the comments. GitHub retargets it to master once #66483 merges. #66483 adds a `bazel-glibc217` wanda image: Bazel compiled from source inside manylinux2014, shipped with a JDK 21. Bazel 8's official Linux binaries need glibc >= 2.25. Ray builds its Linux wheels inside manylinux2014 (CentOS 7, glibc 2.17), so that the wheels keep running on glibc 2.17 systems, and the official binary can't start there. The steps that build and use this image don't say why they exist, or when they can go. This PR adds that. ## What changes Comments only, no behavior change: - **`bazel-glibc217-x86_64` step** (`.buildkite/_forge.rayci.yml`): why the image exists, and a TODO to move the wheel build from manylinux2014 to manylinux_2_28 (glibc 2.28, which raises the user glibc floor to 2.28). After that move, the official Bazel binary runs in the build image and all of this can be deleted. The comment lists everything to remove. - **`bazel-glibc217-aarch64` step** (`.buildkite/linux_aarch64.rayci.yml`): a short version that points to the x86_64 step. - **Every `depends_on: bazel-glibc217-*` edge** (`_forge`, `_wheel-build`, `build`, `linux_aarch64`): a one-line TODO. - **The `COPY --from=bazel` blocks** in the ray-core, ray-cpp-core, ray-java and manylinux-retag Dockerfiles: a one-line TODO. The release pipeline's `_forge` and `_wheel-build` files are symlinks to these, so they pick up the same comments. ## Tests run | Command | Result | |---|---| | `yaml.safe_load` on every `.buildkite/*.rayci.yml` | all parse | | `pre-commit run --files <changed files>` | passed | AI assistance was used to draft this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>


Why
This PR moves Ray to Bazel 8.8.1, still in WORKSPACE mode, together with the dependency bumps that Bazel 8 forces. It is the Bazel 8 step of the Bazel 7.5 → 8 → 9 migration. The earlier steps (#66160, #66207, #66305) got the tree as far as letting Bazel 8 start.
Bazel 8 needs
rules_java8.x. Everyrules_java8.x release loads@com_google_protobuf//bazel:java_proto_library.bzl, and that file does not exist in the v23.4-era protobuf commit Ray pins. Sorules_javaand protobuf have to move together, and protobuf ≥ 29 then pulls gRPC and abseil along.Split for review
The parts that work on master on their own are split out into separate PRs. Please review those first. Once they merge, this PR is rebased and those commits drop out of the diff.
GRPC_VERBOSITYis set (see below)Arena::CreateMessage→Arena::Create, and pin Java 8 bytecode ahead ofrules_java8bazel_skylib1.7.1 andrules_pkg0.9.1What stays here: the Bazel version, the protobuf /
rules_java/ gRPC / abseil /rules_ccbumps, the code and patch changes they need, the glibc 2.17 Bazel build for CI, and the Windows / sanitizer / test fixes for gRPC 1.69.Versions
com_google_protobuf2c5fa078(~v23.4)rules_java8.x loads from itsbazel/packagerules_javajava_tools(singlejar,ijar,one_version) needGLIBCXX_3.4.21, newer than manylinux2014's libstdc++. 8.x also changed the default Java language level from 8 to 11, so.bazelrcpins--java_language_version=8(#67720).com_github_grpc_grpc@upbthat fails to compile against protobuf 29'sdescriptor.proto(FileDescriptorProto.editionis now an enum). 1.69.0 is the first gRPC whosegrpc_deps.bzlpins protobuf 29.com_google_abslrules_protogrpc_deps())proto_common.ProtoLangToolchainInfo, which Bazel 8 removedrules_ccbazel_skylibpaths.is_normalized()(#67721)rules_pkgboringssl2ff4b9682ff4b968(unchanged)b8b3e6e1. Every later boringssl requires C11<stdalign.h>on MSVC, which the Windows CI SDK (10.0.19041) doesn't ship.Bazel 8
.bazelversion7.5.0 → 8.8.1. Bzlmod stays off (--noenable_bzlmod --enable_workspace), so every external repo still comes from WORKSPACE and there is exactly one copy of protobuf,rules_javaandrules_python.--noincompatible_disallow_empty_glob: the rootBUILD.bazelglobs platform-specific paths that are empty on other platforms.--noincompatible_disallow_ctx_resolve_tools: the 2021rules_proto_grpcpin still callsctx.resolve_tools.ci/docker/bazel-glibc217, buildsbazel_nojdkfrom the release's dist zip insiderayproject/manylinux2014(devtoolset-10) and ships it with Temurin JDK 21. The ray-core, ray-cpp-core, ray-java and manylinux images put it behindbazelisk. Rebuilding Bazel only happens when.bazelversionchanges. Wheels still target manylinux2014, so the user glibc floor is unchanged.ci/ray_ci/test_bazel_sharding.pyshares one mock workspace across its tests. Each test used to start a new Bazel server, which on Bazel 8 also re-fetchesrules_pythonfor autoloads and pushed it past its 60s timeout.Declaration order: the first declaration of a repo wins
Several bumps only take effect because of where they are declared. In WORKSPACE, a repo keeps its first declaration: a
maybe()skips a repo that already exists, and a later plainhttp_archiveis ignored.bazel_skylib/rules_ccare declared at the top ofWORKSPACE.py_repositories()(rules_python 0.40.0) declares skylib 1.3.0 and rules_cc 0.0.13 beforeray_deps_setup()runs, so the skylib pin inray_deps_setup.bzlhas had no effect since [build] Move rules_python off 0.9.0 #66207.rules_java_dependencies()runs afterray_deps_setup(). It declares its owncom_google_protobuf(29.0-rc2) throughmaybe(). If it ran first, it would silently replace Ray's pin.rules_pkgis pinned to 0.9.1 beforeprotobuf_deps()runs, which would otherwise declare 1.0.1. The v3.20.3 protobuf thatrules_proto_grpcuses loads the root@rules_pkg//:providers.bzlstub, which was deleted in 0.10.0.rules_proto7.1.0 is declared beforegrpc_deps()for the same reason.The versions that actually resolved were verified by reading each fetched repo's
MODULE.bazel/version.json.bazel querydoes not catch these swaps.Code changes needed by the new versions
.bazelrcdefinesPROTOBUF_FUTURE_REMOVE_CREATEMESSAGE, which compiles out protobuf's deprecatedArena::CreateMessageshim. GCC 10 (the manylinux2014 devtoolset) warns on the shim's own body in every file that includesarena.h, and-Werrormakes that fatal.JsonPrintOptions::always_print_primitive_fields→always_print_fields_with_no_presence(event.cc, one test). The export-event JSON does not change: unset proto3optionalfields were omitted before and still are.cc_proto_libraryloads from@com_google_protobuf//bazel:cc_proto_library.bzlrather than@rules_cc(3 BUILD files).health_cc_grpcin 1.69 (2 BUILD files).null,nonnull-attributeandreturns-nonnull-attributechecks, so those three are off. GCC 11 also reports a false-Wmaybe-uninitializedin protobuf 29's generated move-assignment under ubsan; it is no longer fatal there.gRPC 1.69 behaviour changes
Actor task ordering (real runtime bug, #67718). gRPC 1.69 leaves a channel
IDLEfor a moment after its first call starts.CoreWorkerClientPoolevicts idle clients, so the client that sent an actor's first task could be evicted before the second task, which then went out on a new client with fresh sequence state. The actor ran the second task first and cancelled the first as stale (Task canceled due to stale sequence number). Fix:GrpcClientcounts calls in flight and is only idle when none are. Local repro: 11/20 out of order before, 0/30 after.gRPC INFO logs reach the driver (#67719). gRPC ≥ 1.65 logs through absl and leaves absl's INFO default alone when
GRPC_VERBOSITYis unset, so lines such aschttp2_transport.cc ... Got goawaywere forwarded to drivers as(raylet) .... Ray now sets absl's minimum level to ERROR unlessGRPC_VERBOSITYis set.Windows EventEngine. gRPC 1.69 turns on the EventEngine client and listener on Windows (1.58 marked them broken), and they abort at teardown (
win_socket.cc"Check failed: is_shutdown_"). They stay off on Windows, and so does the EventEngine callback CQ: without it, callback-API code got no polling thread andpubsub_integration_testcould never connect. Posix keeps 1.69's defaults.Test timing. gRPC 1.69 makes some existing races easy to hit.
test_broadcast(LLM) and the Serve replica-death test now let the dying replica's "accepted" message go out before it exits. The rest are in #67717.Patches
protobuf-bazel7.patchexec_toolsleft.third_party/protobuf.patchgrpc-disable-layering-check.patchgsm→csm; fuzzers package gone). Without it macOS fails on gRPC's own missing deps.grpc-configurable-thread-count.patchcpu.ccmoved tosrc/core/util/linux/. Behaviour unchanged.grpc-nextresult-cancelled-init.patchgrpc-python-plugin-no-registered-method.patch_registered_method=Trueandserver.add_registered_method_handlers(), which need grpcio >= 1.64. The patch leaves both out, so the*_pb2_grpc.pystubs match what the 1.58 plugin generated and keep working with thegrpcio >= 1.42.0thatsetup.pyallows. Checked on grpcio 1.42.0, 1.62.3, 1.64.3 and 1.75.0; without the patch the stubs fail on 1.62 and 1.63.grpc-zlib-fdopen.patchhttp_archive.grpc-cython-copts.patch,abseil-cpp-shadow.patchWhat stays the same
com_google_protobuf_rules_proto_grpc(v3.20.3).grpcio >= 1.42.0. Seegrpc-python-plugin-no-registered-method.patchabove; CI pins grpcio 1.75, so only a test with an old grpcio shows this.Please review closely
bazel build //...on Bazel 8 reports conflicting actions for//cpp:plus.so///cpp:counter.so(built in two test configurations). The targets CI builds are not affected.//release:requirements_*already fails to analyze on master's Bazel 7.5.Tests run
bazel build --nobuild //:ray_pkg_zip //:ray_py_proto_zip //java:gen_ray_java_pkg //cpp:ray_cpp_pkg_zipbazel build //:ray_py_proto_zip //src/ray/gcs_rpc_client/tests:gcs_client_testbazel build --nobuild -k //...The Bazel 8 parts were first run in full CI on the PyO3 POC (#66875): all 14 native images built on Bazel 8 inside CentOS 7, and the remaining failures were the gRPC ones fixed here.
AI assistance was used for the analysis and for drafting this change.
🤖 Generated with Claude Code