Skip to content

Commit 632edf4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into seiji/prometheus-autoscaling
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
2 parents e36534b + ace0b67 commit 632edf4

253 files changed

Lines changed: 14535 additions & 2461 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/core.rayci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ steps:
524524
--python-version 3.10 --build-name corebuild-py3.10
525525
--install-mask all-ray-libraries
526526
--run-flaky-tests
527-
--except-tags multi_gpu,cgroup
527+
--except-tags multi_gpu,cgroup,runtime_env_container
528528
depends_on:
529529
- corebuild-multipy(python=3.10)
530530

.buildkite/serve.rayci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ steps:
213213
parallelism: 3
214214
tags:
215215
- serve
216+
- skip-on-microcheck
216217
instance_type: large
217218
commands:
218219
# Full serve suite with HAProxy, minus tags owned by their own steps or images.

.github/CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/python/ray/ @ray-project/ray-core
2222

2323
# Java worker.
24-
/java/ @kfstorm @raulchen @WangTaoTheTonic @SongGuyang @ray-project/ray-core
24+
/java/ @ray-project/ray-core
2525

2626
# C++ worker
2727
/cpp/ @SongGuyang @raulchen @kfstorm @ray-project/ray-core
@@ -32,7 +32,7 @@
3232
/doc/source/cluster/kubernetes/ @andrewsykim @ray-project/ray-core @ray-project/ray-docs
3333

3434
# Public protobuf files.
35-
/src/ray/protobuf/public/ @edoakes @dayshah @MengjinYan
35+
/src/ray/protobuf/public/ @edoakes @MengjinYan
3636

3737
# Azure autoscaler
3838
/python/ray/autoscaler/azure/ @ray-project/ray-core @marosset @jackfrancis @alimaazamat
@@ -45,7 +45,7 @@
4545

4646
# Common directory shared by core and the libraries.
4747
# Stricter enforcement because this defines the public boundary supported by core.
48-
/python/ray/_common/ @edoakes @dayshah @MengjinYan
48+
/python/ray/_common/ @edoakes @MengjinYan
4949

5050
# Ray data.
5151
/python/ray/data/ @ray-project/ray-data
@@ -78,8 +78,8 @@
7878
# LLM
7979
/python/ray/llm/ @ray-project/ray-llm
8080
/python/ray/data/llm.py @ray-project/ray-llm
81-
/python/ray/dashboard/modules/metrics/dashboards/serve_llm_dashboard_panels.py @ray-project/ray-llm
82-
/python/ray/dashboard/modules/metrics/dashboards/serve_llm_grafana_dashboard_base.json @ray-project/ray-llm
81+
/python/ray/dashboard/modules/metrics/dashboards/serve_llm* @ray-project/ray-llm
82+
/python/ray/dashboard/modules/metrics/dashboards/data_llm* @ray-project/ray-llm
8383
/python/ray/serve/llm/ @ray-project/ray-llm
8484
/doc/source/serve/llm/ @ray-project/ray-llm @ray-project/ray-docs
8585
/doc/source/data/working-with-llms.rst @ray-project/ray-llm @ray-project/ray-docs

bazel/ray_deps_setup.bzl

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,14 @@ def ray_deps_setup():
186186
build_file = "@io_ray//bazel:rocksdb.BUILD",
187187
url = "https://github.com/facebook/rocksdb/archive/refs/tags/v10.6.2.tar.gz",
188188
sha256 = "14c619b8a10f994aa6061bd12182b20270c4c27c2f3d9cb4376d57f3cd1c5d7f",
189+
patches = [
190+
# WITH_TSAN=ON injects `-Wl,-pie`, which breaks every CMake
191+
# try_compile under the rules_foreign_cc crosstool (clang +
192+
# static libc++), aborting configure at find_package(Threads).
193+
# `-fsanitize=thread` alone is sufficient for TSan.
194+
"@io_ray//thirdparty/patches:rocksdb-tsan-no-pie.patch",
195+
],
196+
patch_args = ["-p1"],
189197
)
190198

191199
auto_http_archive(
@@ -219,10 +227,10 @@ def ray_deps_setup():
219227
sha256 = "06327c2ddc81e126a6d9a78b0be5014b976a2c0832f492dcfc4755d7facf6d33",
220228
strip_prefix = "xz-5.2.7",
221229
urls = [
222-
"https://cfhcable.dl.sourceforge.net/project/lzmautils/xz-5.2.7.tar.gz",
223-
"https://superb-sea2.dl.sourceforge.net/project/lzmautils/xz-5.2.7.tar.gz",
224-
"https://ayera.dl.sourceforge.net/project/lzmautils/xz-5.2.7.tar.gz",
225-
"https://astuteinternet.dl.sourceforge.net/project/lzmautils/xz-5.2.7.tar.gz",
230+
# Use the SourceForge redirector, which picks a live mirror,
231+
# instead of pinning specific mirrors that can go offline.
232+
"https://downloads.sourceforge.net/project/lzmautils/xz-5.2.7.tar.gz",
233+
"https://tukaani.org/xz/xz-5.2.7.tar.gz",
226234
],
227235
build_file = "//thirdparty/patches:org_lzma_lzma.BUILD.bazel",
228236
)

ci/lint/pyrefly-excluded-files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ python/ray/data/tests/test_hash_shuffle_v2.py
288288
python/ray/data/tests/test_issue_detection.py
289289
python/ray/data/tests/test_issue_detection_manager.py
290290
python/ray/data/tests/test_iter_torch_batches.py
291+
python/ray/data/tests/test_iter_torch_batches_gpu.py
291292
python/ray/data/tests/test_iterator.py
292293
python/ray/data/tests/test_join.py
293294
python/ray/data/tests/test_jumbo_arrow_block.py

ci/ray_ci/serve_di_test_names.txt

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,2 @@
1-
//python/ray/serve/tests:test_api
2-
//python/ray/serve/tests:test_callback
3-
//python/ray/serve/tests:test_cli
4-
//python/ray/serve/tests:test_cli_2
5-
//python/ray/serve/tests:test_deploy
6-
//python/ray/serve/tests:test_deploy_2
7-
//python/ray/serve/tests:test_deploy_app
8-
//python/ray/serve/tests:test_deploy_app_2
9-
//python/ray/serve/tests:test_fastapi
10-
//python/ray/serve/tests:test_failure
11-
//python/ray/serve/tests:test_gcs_failure
12-
//python/ray/serve/tests:test_grpc
13-
//python/ray/serve/tests:test_grpc_e2e
14-
//python/ray/serve/tests:test_grpc_replica_wrapper
15-
//python/ray/serve/tests:test_handle_1
16-
//python/ray/serve/tests:test_handle_2
17-
//python/ray/serve/tests:test_handle_cancellation
18-
//python/ray/serve/tests:test_handle_streaming
19-
//python/ray/serve/tests:test_healthcheck
20-
//python/ray/serve/tests:test_logging
21-
//python/ray/serve/tests:test_metrics
22-
//python/ray/serve/tests:test_model_composition
23-
//python/ray/serve/tests:test_websockets
24-
//python/ray/serve/tests:test_request_timeout
25-
//python/ray/serve/tests:test_streaming_response
26-
//python/ray/serve/tests:test_target_capacity
27-
//python/ray/serve/tests:test_deployment_version
28-
//python/ray/serve/tests:test_http_cancellation
29-
//python/ray/serve/tests:test_http_headers
30-
//python/ray/serve/tests:test_controller_recovery
31-
//python/ray/serve/tests:test_http_routes
32-
//python/ray/serve/tests:test_backpressure
33-
//python/ray/serve/tests:test_batching
34-
//python/ray/serve/tests:test_replica_sync_methods_with_run_sync_in_threadpool
35-
//python/ray/serve/tests:test_replica_request_context
361
//python/ray/serve/tests:test_direct_ingress
37-
//python/ray/serve/tests:test_per_request_headers
382
//python/ray/serve/tests:test_direct_ingress_with_grpc
39-
//python/ray/serve/tests:test_per_request_headers_with_grpc
40-
//python/ray/serve/tests:test_handle

doc/source/_static/css/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,16 @@ table.autosummary tr > td:first-child > p > a > code > span {
378378
overflow-wrap: break-word;
379379
}
380380

381+
/* The theme bolds the whole signature via `dt { font-weight: 700 }`, flattening
382+
its hierarchy. Reset to normal weight and re-bold only the object name so it
383+
stays the scannable anchor. */
384+
dt.sig {
385+
font-weight: normal;
386+
}
387+
dt.sig .sig-name {
388+
font-weight: 700;
389+
}
390+
381391
/* RTD footer container makes the parent */
382392
/* #main-sidebar always scrollable if you don't remove negative margin. */
383393
/* Restrict width to 30% of the window */

doc/source/cluster/kubernetes/user-guides/config.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,20 @@ It's ideal to size each Ray pod to take up the entire Kubernetes node. In other
116116
#### nodeSelector and tolerations
117117
You can control the scheduling of worker groups' Ray pods by setting the `nodeSelector` and `tolerations` fields of the pod spec. Specifically, these fields determine on which Kubernetes nodes the pods may be scheduled. See the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) for more about Pod-to-Node assignment.
118118

119+
(kuberay-config-safe-to-evict)=
120+
#### Preventing eviction of the Ray head Pod by the Cluster Autoscaler
121+
The Ray head Pod is a single point of failure for the Ray cluster. To prevent the Kubernetes Cluster Autoscaler from evicting it during node consolidation, set the [`cluster-autoscaler.kubernetes.io/safe-to-evict`](https://kubernetes.io/docs/reference/labels-annotations-taints/#cluster-autoscaler-kubernetes-io-safe-to-evict) annotation to `"false"` on the head Pod template:
122+
123+
```yaml
124+
headGroupSpec:
125+
template:
126+
metadata:
127+
annotations:
128+
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
129+
```
130+
131+
This setting blocks eviction during autoscaling events. This doesn't prevent Ray head Pod errors such events as node failure, manual Pod deletion, or reclamation of the underlying node (such as spot instance preemption).
132+
119133
#### image
120134
The Ray container images specified in the `RayCluster` CR should carry the same Ray version as the CR's `spec.rayVersion`. If you are using a nightly or development Ray image, you can specify Ray's latest release version under `spec.rayVersion`.
121135

doc/source/cluster/kubernetes/user-guides/k8s-autoscaler.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Horizontal Pod Autoscaling is centrally controlled by a manager in the Kubernete
2121
## Ray Autoscaler with Kubernetes Cluster Autoscaler
2222
The Ray Autoscaler and the [Kubernetes Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) complement each other. After the Ray autoscaler decides to create a Ray Pod, the Kubernetes Cluster Autoscaler can provision a Kubernetes node so that the Pod can be placed. Similarly, after the Ray autoscaler decides to delete an idle Pod, the Kubernetes Cluster Autoscaler can clean up the idle Kubernetes node that remains. It is recommended to configure your RayCluster so that only one Ray Pod fits per Kubernetes node. If you follow this pattern, Ray Autoscaler Pod scaling events correspond roughly one-to-one with cluster autoscaler node scaling events. (We say "roughly" because it is possible for a Ray Pod be deleted and replaced with a new Ray Pod before the underlying Kubernetes node is scaled down.)
2323

24+
Because the Ray head Pod is a single point of failure, consider setting `cluster-autoscaler.kubernetes.io/safe-to-evict: "false"` on its Pod template to prevent the Cluster Autoscaler from evicting it; see {ref}`RayCluster Configuration <kuberay-config-safe-to-evict>`.
25+
2426

2527
## Vertical Pod Autoscaler
2628
There is no relationship between the Ray Autoscaler and the Kubernetes [Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler) (VPA), which is meant to size individual Pods to the appropriate size based on current and past usage. If you find that the load on your individual Ray Pods is too high, there are a number of manual techniques to decrease the load. One method is to schedule fewer tasks/actors per node by increasing the resource requirements specified in the `ray.remote` annotation. For example, changing `@ray.remote(num_cpus=2)` to `@ray.remote(num_cpus=4)` will halve the quantity of that task or actor that can fit in a given Ray Pod.

doc/source/cluster/kubernetes/user-guides/tls.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ For more information on how to configure Ray with TLS authentication, please ref
125125
# Log in to the worker Pod
126126
kubectl exec -it ${WORKER_POD} -- bash
127127

128-
# Since the head Pod has the certificate of $FQ_RAY_IP, the connection to the worker Pods
129-
# will be established successfully, and the exit code of the ray health-check command
130-
# should be 0.
128+
# The worker connects to the head through the head Service address.
129+
# The head certificate includes $FQ_RAY_IP in its SAN entries, so TLS verification succeeds.
130+
# The exit code of the ray health-check command should be 0.
131131
ray health-check --address $FQ_RAY_IP:6379
132132
echo $? # 0
133133

134-
# Since the head Pod has the certificate of $RAY_IP, the connection will fail and an error
135-
# message similar to the following will be displayed: "Peer name raycluster-tls-head-svc is
136-
# not in peer certificate".
134+
# The head certificate doesn't include $RAY_IP in its SAN entries, so TLS verification fails.
135+
# You should see a TLS verification error.
136+
# The error will indicate that the pod IP ($RAY_IP) is not in the certificate.
137137
ray health-check --address $RAY_IP:6379
138138

139139
# If you add `DNS.3 = $RAY_IP` to the [alt_names] section in `gencert_head.sh`,
140-
# the head Pod will generate the certificate of $RAY_IP.
140+
# the generated head certificate will include a SAN entry for $RAY_IP.
141141
#
142142
# For KubeRay versions prior to 0.5.0, this step is necessary because Ray workers in earlier
143143
# versions use $RAY_IP to connect with Ray head.

0 commit comments

Comments
 (0)