Repository navigation
[cherry-pick][2.60.0][serve] Deflake test_deploy_app_3 (#67165) - #67438
Merged
elliot-barn merged 1 commit intoOct 26, 2026
Merged
elliot-barn merged 1 commit into
elliot-barn merged 1 commit into
Conversation
…7165) `test_deploy_app_3` (added in ray-project#66267) flakes on the HAProxy, gRPC and flaky-tests shards. One commit per cause: - Two waits read replica counts and pids in separate calls, so a replica changing state in between could pass for the state they wait for. They now read one snapshot, as ray-project#67163 does for the same race in `test_deploy_app_2`. - The HAProxy shard's 0.01s drain lets a stopping replica close connections HAProxy still uses. The traffic tests whose replicas stop during a rollout now use the 5s drain `test_deploy_app_2` already uses; the gang test is left out, since gang replicas are force-stopped. - Under direct ingress, a request moving from the handle to a replica can briefly count twice, which raised the autoscaling target in `test_surge_rolling_update_follows_autoscaling_mid_rollout`. A 2s upscale delay filters it. - Two waits that ran close to their limit under load get more room. Tested with `pytest python/ray/serve/tests/test_deploy_app_3.py` under the default and HAProxy shard environments with CPU stressors: 13 of 13 in each at the final commit. --------- Signed-off-by: john.taylor <[email protected]> Co-authored-by: Claude <[email protected]> (cherry picked from commit b2ca380) Signed-off-by: qishengxhe <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request optimizes and stabilizes Ray Serve integration tests, particularly on Windows. Key changes include isolating the long-running test_deploy_app_2.py into its own Bazel target with an eternal timeout, extracting shared test environments, and introducing INGRESS_DRAIN_ENV to ensure stopping replicas outlast HAProxy reloads during rolling updates. Additionally, test robustness is improved by adding explicit timeouts to wait_for_condition calls, utilizing single-snapshot reads to prevent race conditions in assertions, and adjusting autoscaling delays. There are no review comments provided, so I have no additional feedback to offer.
qishengxhe
changed the base branch from
releases/2.60.0
to
cherrypick/2.60.0-pr66492
October 26, 2026 20:10
elliot-barn
pushed a commit
that referenced
this pull request
Oct 26, 2026
…, a longer ingress drain for the traffic tests, and a Windows timeout (#66492) (#67439) Cherry-pick of #66492 ([serve] Deflake test_deploy_app_2 - wait budgets, a longer ingress drain for the traffic tests, and a Windows timeout) onto `releases/2.60.0`. Master commit `09cc6ec807`. Applied cleanly with `git cherry-pick -x`. Test-only changes: `BUILD.bazel`, `test_config_files/fail_on_flag.py`, `test_deploy_app_2.py`. Needed on the release branch because #67165 (cherry-pick in #67438) imports `INGRESS_DRAIN_ENV`, which this change adds. Split into its own PR so each squash on the release branch maps to one master commit. No other backport PR for this change targets `releases/2.60.0`. `pre-commit run --files` on the touched files passes. Relying on CI for the test runs. AI assistance was used to prepare this cherry-pick. Signed-off-by: qishengxhe <[email protected]> Co-authored-by: johntaylor-cell <[email protected]>
elliot-barn
merged commit Oct 26, 2026
c4840ed
into
ray-project:cherrypick/2.60.0-pr66492
5 of 7 checks passed
This was referenced Oct 26, 2026
elliot-barn
added a commit
that referenced
this pull request
Oct 26, 2026
Cherry-pick of #67165 onto `releases/2.60.0`. Original PR: #67165 (merged on master as b2ca380). This cherry-pick was first made as #67438. That PR was stacked on the #66492 cherry-pick branch and merged into it after #67439 had already landed, so it never reached `releases/2.60.0`. This PR applies the same commit (c4840ed) directly onto `releases/2.60.0`. It replaces #67441, which was opened from the stacked branch and showed the already-landed #66492 changes alongside this one. ## Change `python/ray/serve/tests/test_deploy_app_3.py` only, +59/-41, identical to #67165 and #67438. The cherry-pick applied cleanly. From #67165: `test_deploy_app_3` flakes on the HAProxy, gRPC and flaky-tests shards. The fix: - waits read replica counts and pids from one snapshot; - traffic tests whose replicas stop during a rollout use the 5s HAProxy drain; - handles the direct-ingress request-count race. ## Testing Test-only change, verified on master in #67165. This PR's premerge runs the Serve test shards against `releases/2.60.0`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: john.taylor <[email protected]> Signed-off-by: qishengxhe <[email protected]> Co-authored-by: qishengxhe <[email protected]> Co-authored-by: johntaylor-cell <[email protected]> Co-authored-by: Claude <[email protected]>
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.
Cherry-pick of #67165 ([serve] Deflake test_deploy_app_3) onto
releases/2.60.0. Master commitb2ca380473.Applied cleanly with
git cherry-pick -x. Test-only change:test_deploy_app_3.py.Depends on #67439 (cherry-pick of #66492), which adds the
INGRESS_DRAIN_ENVfixture constant this test imports. Stacked on that PR so this diff shows only #67165; merge #67439 first, then retarget this PR toreleases/2.60.0.No other backport PR for this change targets
releases/2.60.0.pre-commit run --fileson the touched file passes. Relying on CI for the test runs.AI assistance was used to prepare this cherry-pick.