Skip to content

[serve] Refactor internal autoscaling policy state extraction logic into a single helper#62452

Merged
abrarsheikh merged 2 commits intoray-project:masterfrom
vaishdho1:refactor-duplicate-policy-state-extraction-logic
Apr 17, 2026
Merged

[serve] Refactor internal autoscaling policy state extraction logic into a single helper#62452
abrarsheikh merged 2 commits intoray-project:masterfrom
vaishdho1:refactor-duplicate-policy-state-extraction-logic

Conversation

@vaishdho1
Copy link
Copy Markdown
Contributor

Description

This PR refactors duplicated internal policy state extraction (delay counter and timestamp keys) into _extract_internal_policy_state in autoscaling_policy.py. Follow up to #58857.

Related Issues

Related to #58857

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
@vaishdho1 vaishdho1 requested a review from a team as a code owner April 8, 2026 23:35
Copy link
Copy Markdown
Contributor

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

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 the autoscaling policy by extracting internal state extraction logic into a new helper function, _extract_internal_policy_state. This helper is then utilized in _apply_default_params_and_merge_state and _merge_user_state_with_internal_state to reduce code duplication. I have no feedback to provide.

@ray-gardener ray-gardener bot added serve Ray Serve Related Issue community-contribution Contributed by the community labels Apr 9, 2026
@abrarsheikh abrarsheikh added the go add ONLY when ready to merge, run all tests label Apr 11, 2026
@abrarsheikh abrarsheikh enabled auto-merge (squash) April 11, 2026 06:39
@github-actions github-actions bot disabled auto-merge April 15, 2026 06:25
@abrarsheikh abrarsheikh merged commit e133f34 into ray-project:master Apr 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants