Skip to content

[cherry-pick][2.60.0][serve] Deflake test_deploy_app_3 (#67165) - #67442

Merged
elliot-barn merged 1 commit into
releases/2.60.0from
cherrypick/2.60.0-pr67165-only
Oct 26, 2026
Merged

elliot-barn merged 1 commit into
releases/2.60.0from
cherrypick/2.60.0-pr67165-only

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

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

Cherry-pick of #67165 ([serve] Deflake test_deploy_app_3) onto
`releases/2.60.0`. Master commit `b2ca380473`.

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_ENV` fixture constant this test imports. Stacked on that
PR so this diff shows only #67165; merge #67439 first, then retarget
this PR to `releases/2.60.0`.

No other backport PR for this change targets `releases/2.60.0`.
`pre-commit run --files` on the touched file passes. Relying on CI for
the test runs.

AI assistance was used to prepare this cherry-pick.

Signed-off-by: john.taylor <[email protected]>
Signed-off-by: qishengxhe <[email protected]>
Co-authored-by: johntaylor-cell <[email protected]>
Co-authored-by: Claude <[email protected]>
(cherry picked from commit c4840ed)

@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 refactors test_deploy_app_3.py to use a new _drained_config helper, which injects INGRESS_DRAIN_ENV into the deployment's environment, replacing manual configuration of draining periods. It also updates some test assertions and timeouts to handle transient states more robustly. The feedback suggests using the ReplicaState enum directly instead of hardcoded string literals or .value attributes when checking replica states to improve type safety and maintainability.

@elliot-barn
elliot-barn merged commit 85ad153 into releases/2.60.0 Oct 26, 2026
4 of 6 checks passed
@elliot-barn
elliot-barn deleted the cherrypick/2.60.0-pr67165-only branch October 26, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants