[serve][test] Skip HTTPS proxy tests under HAProxy (HTTP-only ingress)#64260
Conversation
HAProxy ingress does not terminate TLS: the HAProxy frontend binds plain HTTP and health-checks replicas over plain HTTP, while direct-ingress replicas serve HTTPS. The backends never pass the health check, the proxy never becomes ready, and serve.run() blocks until timeout. That is why test_https_websocket_with_fastapi hung under HAProxy in CI, not the websocket itself; the whole HTTPS-serving path is affected. Skip the TLS-serving classes (TestHTTPSProxy, TestHTTPSIntegration) under RAY_SERVE_ENABLE_HA_PROXY. The config-only validation classes still run. Supporting HTTPS through HAProxy requires plumbing TLS into the frontend bind and backend health checks, which is a separate feature. Signed-off-by: Seiji Eicher <seiji@anyscale.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a pytest skip decorator, skip_https_under_haproxy, to skip HTTPS-related tests when HAProxy is enabled (RAY_SERVE_ENABLE_HA_PROXY). This is because HAProxy ingress does not terminate TLS, causing HTTPS/wss tests to fail or timeout. The decorator is applied to the TestHTTPSProxy and TestHTTPSIntegration test classes. I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
… feature HAProxy ingress serves plain HTTP only and intentionally does not terminate TLS. HTTPS is served by direct-ingress mode (replicas terminate TLS) or by terminating TLS at a proxy in front of HAProxy. Reword the skip reason and comment to state HTTPS/wss is unsupported under HAProxy by design, rather than implying TLS termination is planned work. Signed-off-by: Seiji Eicher <seiji@anyscale.com>
State the scope plainly: HAProxy ingress serves HTTP only and does not terminate TLS; TLS is handled by direct-ingress mode or an upstream proxy. Signed-off-by: Seiji Eicher <seiji@anyscale.com>
The comment block and the skipif reason restated the same fact. Keep the mechanism note in the comment and let the reason string carry the rest. Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Add the target to the HAProxy allowlist so the HTTP-only skip markers added in this PR are exercised on master. The HTTPS-serving classes skip and the config-only classes still run. Signed-off-by: Seiji Eicher <seiji@anyscale.com>
| from ray.serve.config import HTTPOptions | ||
|
|
||
| # HAProxy ingress is HTTP-only and does not terminate TLS, so HTTPS and wss |
There was a problem hiding this comment.
should this be a TODO?
There was a problem hiding this comment.
It was aligned as won't do in Ray Serve Stability Tracker
ray-project#64260) ## Why Under HAProxy ingress (`RAY_SERVE_ENABLE_HA_PROXY=1`), `test_https_websocket_with_fastapi` hangs until SIGKILL. The cause is not websockets. HAProxy ingress serves plain HTTP and does not terminate TLS. The frontend binds plain HTTP and health-checks replicas over plain HTTP, while direct-ingress replicas serve HTTPS, so backends never pass the health check, the proxy never becomes ready, and `serve.run()` blocks. The whole HTTPS-serving path is affected, not only the websocket test. ## Scope HAProxy ingress is HTTP-only. TLS is terminated by direct-ingress mode (replicas terminate TLS) or by an upstream TLS-terminating proxy in front of HAProxy, so HTTPS is not a path HAProxy serves. Same shape as gRPC, which is served by direct-ingress mode rather than HAProxy. ## What Skip the TLS-serving test classes (`TestHTTPSProxy`, `TestHTTPSIntegration`) under `RAY_SERVE_ENABLE_HA_PROXY`. The config-only validation classes (`TestSSLConfiguration`, `TestHTTPSErrorHandling`) still run. Add `//python/ray/serve/tests:test_https_proxy` to the HAProxy CI allowlist (`ci/ray_ci/serve_hap_test_names.txt`) so the file runs under `RAY_SERVE_ENABLE_HA_PROXY=1`. ## Notes - Unblocks the "run all serve tests under HAProxy" effort (ray-project#64210), where these tests otherwise hang. - The allowlist is deleted wholesale by ray-project#64210. Until that lands, this entry runs the file under HAProxy on master, so the skips are exercised in CI rather than dormant. --------- Signed-off-by: Seiji Eicher <seiji@anyscale.com>
ray-project#64260) ## Why Under HAProxy ingress (`RAY_SERVE_ENABLE_HA_PROXY=1`), `test_https_websocket_with_fastapi` hangs until SIGKILL. The cause is not websockets. HAProxy ingress serves plain HTTP and does not terminate TLS. The frontend binds plain HTTP and health-checks replicas over plain HTTP, while direct-ingress replicas serve HTTPS, so backends never pass the health check, the proxy never becomes ready, and `serve.run()` blocks. The whole HTTPS-serving path is affected, not only the websocket test. ## Scope HAProxy ingress is HTTP-only. TLS is terminated by direct-ingress mode (replicas terminate TLS) or by an upstream TLS-terminating proxy in front of HAProxy, so HTTPS is not a path HAProxy serves. Same shape as gRPC, which is served by direct-ingress mode rather than HAProxy. ## What Skip the TLS-serving test classes (`TestHTTPSProxy`, `TestHTTPSIntegration`) under `RAY_SERVE_ENABLE_HA_PROXY`. The config-only validation classes (`TestSSLConfiguration`, `TestHTTPSErrorHandling`) still run. Add `//python/ray/serve/tests:test_https_proxy` to the HAProxy CI allowlist (`ci/ray_ci/serve_hap_test_names.txt`) so the file runs under `RAY_SERVE_ENABLE_HA_PROXY=1`. ## Notes - Unblocks the "run all serve tests under HAProxy" effort (ray-project#64210), where these tests otherwise hang. - The allowlist is deleted wholesale by ray-project#64210. Until that lands, this entry runs the file under HAProxy on master, so the skips are exercised in CI rather than dormant. --------- Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Why
Under HAProxy ingress (
RAY_SERVE_ENABLE_HA_PROXY=1),test_https_websocket_with_fastapihangs until SIGKILL. The cause is not websockets. HAProxy ingress serves plain HTTP and does not terminate TLS. The frontend binds plain HTTP and health-checks replicas over plain HTTP, while direct-ingress replicas serve HTTPS, so backends never pass the health check, the proxy never becomes ready, andserve.run()blocks. The whole HTTPS-serving path is affected, not only the websocket test.Scope
HAProxy ingress is HTTP-only. TLS is terminated by direct-ingress mode (replicas terminate TLS) or by an upstream TLS-terminating proxy in front of HAProxy, so HTTPS is not a path HAProxy serves. Same shape as gRPC, which is served by direct-ingress mode rather than HAProxy.
What
Skip the TLS-serving test classes (
TestHTTPSProxy,TestHTTPSIntegration) underRAY_SERVE_ENABLE_HA_PROXY. The config-only validation classes (TestSSLConfiguration,TestHTTPSErrorHandling) still run.Add
//python/ray/serve/tests:test_https_proxyto the HAProxy CI allowlist (ci/ray_ci/serve_hap_test_names.txt) so the file runs underRAY_SERVE_ENABLE_HA_PROXY=1.Notes