Removed deprecated DeploymentMode#63510
Merged
abrarsheikh merged 3 commits intoMay 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the deprecated DeploymentMode enum and replaces its usage with ProxyLocation throughout the Ray Serve codebase, including internal logic, docstrings, and tests. Key changes include the addition of a normalization method in ProxyLocation to handle legacy 'NoServer' values and the update of HTTPOptions to use the new enum. Feedback suggests updating the CLI's deprecated --http-location flag to include 'Disabled' in its choices for better consistency with the new naming convention.
abrarsheikh
reviewed
May 19, 2026
Signed-off-by: john.taylor <john.taylor@anyscale.com>
33e3319 to
aacd3b8
Compare
Signed-off-by: john.taylor <john.taylor@anyscale.com>
abrarsheikh
approved these changes
May 19, 2026
Contributor
|
nice |
TruongQuangPhat
pushed a commit
to cyhapun/ray-fix-issue
that referenced
this pull request
May 27, 2026
Removed the deprecated `DeploymentMode` enum from the Ray tree at `~/ray` and migrated Serve to `ProxyLocation` throughout. ### Core changes (`python/ray/serve/config.py`) - Deleted the `DeploymentMode` class and its `_to_deployment_mode` / `_from_deployment_mode` helpers on `ProxyLocation`. - Added `ProxyLocation._normalize()` to accept `ProxyLocation` values and legacy `"NoServer"` strings (mapped to `Disabled`). - Changed `HTTPOptions.location` from `DeploymentMode` to `ProxyLocation` (default `HeadOnly`; `host=None` / `location=None` → `Disabled`). ### Internal call sites - `_private/proxy_state.py`, `_private/controller.py`, `_private/config.py` — use `ProxyLocation` directly. - `scripts.py` — deprecated `--http-location` still accepts `NoServer`/`HeadOnly`/`EveryNode` but normalizes via `_normalize`; `serve run` passes `proxy_location.value` directly. - `dashboard/modules/serve/serve_head.py` — same. - `_private/api.py` — docstring updated. ### Tests & release - Updated `test_config.py`, `test_proxy_state.py`, `test_standalone.py`, and `release/serve_tests/workloads/serve_test_cluster_utils.py`. - Replaced conversion tests with `test_proxy_location_normalize`. ### Backward compatibility Legacy `"NoServer"` in `HTTPOptions.location` or `--http-location` is still accepted and normalized to `ProxyLocation.Disabled`. Azure autoscaler `DeploymentMode` (unrelated Azure SDK enum) was left unchanged. --------- Signed-off-by: john.taylor <john.taylor@anyscale.com> Signed-off-by: phattruong <23120318@student.hcmus.edu.vn>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed the deprecated
DeploymentModeenum from the Ray tree at~/rayand migrated Serve toProxyLocationthroughout.Core changes (
python/ray/serve/config.py)DeploymentModeclass and its_to_deployment_mode/_from_deployment_modehelpers onProxyLocation.ProxyLocation._normalize()to acceptProxyLocationvalues and legacy"NoServer"strings (mapped toDisabled).HTTPOptions.locationfromDeploymentModetoProxyLocation(defaultHeadOnly;host=None/location=None→Disabled).Internal call sites
_private/proxy_state.py,_private/controller.py,_private/config.py— useProxyLocationdirectly.scripts.py— deprecated--http-locationstill acceptsNoServer/HeadOnly/EveryNodebut normalizes via_normalize;serve runpassesproxy_location.valuedirectly.dashboard/modules/serve/serve_head.py— same._private/api.py— docstring updated.Tests & release
test_config.py,test_proxy_state.py,test_standalone.py, andrelease/serve_tests/workloads/serve_test_cluster_utils.py.test_proxy_location_normalize.Backward compatibility
Legacy
"NoServer"inHTTPOptions.locationor--http-locationis still accepted and normalized toProxyLocation.Disabled.Azure autoscaler
DeploymentMode(unrelated Azure SDK enum) was left unchanged.