Removed deprecated DeploymentMode#63510
Open
johntaylor-cell wants to merge 1 commit into
Open
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
| @click.option( | ||
| "--http-location", | ||
| default=DeploymentMode.HeadOnly, | ||
| default="HeadOnly", |
Contributor
There was a problem hiding this comment.
Suggested change
| default="HeadOnly", | |
| default=ProxyLocation.HeadOnly, |
Comment on lines
766
to
+773
| - location: [DEPRECATED: use `proxy_location` field instead] The deployment | ||
| location of HTTP servers: | ||
|
|
||
| - "HeadOnly": start one HTTP server on the head node. Serve | ||
| assumes the head node is the node you executed serve.start | ||
| on. This is the default. | ||
| - "EveryNode": start one HTTP server per node. | ||
| - "NoServer": disable HTTP server. | ||
| - "Disabled" (or legacy "NoServer"): disable HTTP server. |
Contributor
There was a problem hiding this comment.
i guess this is the next one we should drop.
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.