Skip to content

[serve][test] Skip HTTPS proxy tests under HAProxy (HTTP-only ingress)#64260

Merged
eicherseiji merged 5 commits into
ray-project:masterfrom
eicherseiji:seiji/haproxy-https-websocket
Jun 23, 2026
Merged

[serve][test] Skip HTTPS proxy tests under HAProxy (HTTP-only ingress)#64260
eicherseiji merged 5 commits into
ray-project:masterfrom
eicherseiji:seiji/haproxy-https-websocket

Conversation

@eicherseiji

@eicherseiji eicherseiji commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@eicherseiji eicherseiji changed the title [serve][test] Skip HTTPS proxy tests under HAProxy (no TLS termination) [serve][test] HTTPS not supported under HAProxy (won't-do): skip HTTPS tests Jun 22, 2026
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>
@eicherseiji eicherseiji changed the title [serve][test] HTTPS not supported under HAProxy (won't-do): skip HTTPS tests [serve][test] Skip HTTPS proxy tests under HAProxy (HTTP-only ingress) Jun 22, 2026
@eicherseiji eicherseiji self-assigned this Jun 22, 2026
@eicherseiji eicherseiji added the go add ONLY when ready to merge, run all tests label Jun 22, 2026
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>
@eicherseiji
eicherseiji marked this pull request as ready for review June 22, 2026 21:56
@eicherseiji
eicherseiji requested a review from a team as a code owner June 22, 2026 21:56
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a TODO?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was aligned as won't do in Ray Serve Stability Tracker

@eicherseiji
eicherseiji enabled auto-merge (squash) June 22, 2026 22:49
@eicherseiji
eicherseiji merged commit 50dcde6 into ray-project:master Jun 23, 2026
7 checks passed
rayhhome pushed a commit to rayhhome/ray that referenced this pull request Jun 23, 2026
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>
limarkdcunha pushed a commit to limarkdcunha/ray that referenced this pull request Jun 30, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants