Skip to content

[Autoscaler][Azure] Fix resource SDK 25+ compatibility - #66714

Merged
rueian merged 5 commits into
ray-project:masterfrom
ziek-ai:fix/azure-resource-deployments
Oct 24, 2026
Merged

rueian merged 5 commits into
ray-project:masterfrom
ziek-ai:fix/azure-resource-deployments

Conversation

@SaiTejaMutchi

Copy link
Copy Markdown
Contributor

Description

azure-mgmt-resource 25.0.0 split deployment operations into the separate azure-mgmt-resource-deployments package. Ray's Azure autoscaler still relies on the legacy deployment APIs exposed through ResourceManagementClient, which breaks with the newer SDK layout.

This change uses the dedicated deployments client when available, preserves the legacy path for existing 24.x installations, and raises an actionable error when neither API surface is available. Current Ray-managed Azure installation paths also install azure-mgmt-resource-deployments==2.0.0.

Duplicate work

I searched current Ray PRs and issues for the Azure deployments SDK split, DeploymentsMgmtClient, azure-mgmt-resource-deployments, and related resource SDK 25 and 26 terms. I did not find an active PR implementing this autoscaler source migration.

#57744 was also reviewed and only updates dependency files. It does not implement the corresponding autoscaler source migration.

Tests

Compatibility matrix:

  • azure-mgmt-resource==24.0.0, without azure-mgmt-resource-deployments: 36 passed
  • azure-mgmt-resource==24.0.0 + azure-mgmt-resource-deployments==2.0.0: 36 passed
  • azure-mgmt-resource==25.0.0 + azure-mgmt-resource-deployments==2.0.0: 36 passed
  • azure-mgmt-resource==26.0.0 + azure-mgmt-resource-deployments==2.0.0: 36 passed

Also ran the targeted Azure autoscaler tests, test_autoscaler_yaml.py, relevant pre-commit checks, git diff --check, and raydepsets --check.

testValidateDefaultConfig for vSphere produces the same failure on unmodified upstream and is not introduced by this change.

No live Azure deployment was performed, and the full Ray Bazel/CI suite was not run locally.

Dependency update

This PR adds one Azure SDK dependency to Ray's Azure dependency inputs and installation paths. The corresponding changes in requirements_compiled.txt and the raydepset lock files are generated outputs of that dependency update.

AI assistance

AI assistance was used. I used Ziek for investigation, implementation support, and validation.

Ziek is a system I am building to help software changes propagate safely from upstream providers into affected downstream codebases by identifying impact, determining the appropriate migration, and verifying the result before delivery. This Azure SDK change is a concrete example of that workflow.

I reviewed every changed line, ran the tests listed above, and take responsibility for this change.

@SaiTejaMutchi
SaiTejaMutchi requested review from a team, alimaazamat and marosset as code owners October 5, 2026 04:59

@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 updates the Azure autoscaler to support azure-mgmt-resource version 25.0.0 and above by dynamically importing and utilizing the split azure-mgmt-resource-deployments package, while maintaining backward compatibility with older versions. Feedback on the changes suggests optimizing credential instantiation in config.py by reusing a single AzureCliCredential instance to avoid redundant authentication checks.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Oct 5, 2026
@rueian rueian self-assigned this Oct 6, 2026
@rueian

rueian commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Hi @marosset and @alimaazamat, do you have more context on those SDKs? Could you help take a look? Thank you.

@alimaazamat alimaazamat 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.

Thanks for tackling this! The import fallback works well when I tested on 24.x and 25.x, just breaking on 26.0.0.

@SaiTejaMutchi

Copy link
Copy Markdown
Contributor Author

@alimaazamat Thanks again for the detailed review. I pushed the fixes for both issues:

  • updated the affected Azure resource calls to use explicit keyword arguments
  • replaced the permissive resources mock with a strict fake that enforces the 26.x keyword-only signatures

I also re-ran the Azure autoscaler tests against 24.x, 25.x, and 26.x, and verified the regression tests fail when the affected calls are reverted to positional arguments.

When you have a chance, could you please take another look?

@alimaazamat

Copy link
Copy Markdown
Contributor

lgtm! Thank you for your contribution! @SaiTejaMutchi can you please rebase?

@SaiTejaMutchi
SaiTejaMutchi force-pushed the fix/azure-resource-deployments branch from 1e0f6cf to 6c519e3 Compare October 9, 2026 15:04
@SaiTejaMutchi

Copy link
Copy Markdown
Contributor Author

Yep, rebased on latest master and pushed it up. Thanks for the review @alimaazamat 🙌

@rueian rueian added the go add ONLY when ready to merge, run all tests label Oct 9, 2026
@rueian
rueian enabled auto-merge (squash) October 9, 2026 20:15
auto-merge was automatically disabled October 9, 2026 21:05

Head branch was pushed to by a user without write access

@SaiTejaMutchi
SaiTejaMutchi force-pushed the fix/azure-resource-deployments branch 2 times, most recently from 4166d62 to 80dcf20 Compare October 9, 2026 23:35
@alimaazamat

Copy link
Copy Markdown
Contributor

Buildkite is erroring because requirements_compiled*.txt  and  python/deplocks/**/*.lock  are generated lockfiles that changed with the new azure-mgmt-resource-deployments==2.0.0. Please regenerate the lockfiles and commit them with this PR.
Found these in the docs explaining:

@SaiTejaMutchi
SaiTejaMutchi force-pushed the fix/azure-resource-deployments branch from 80dcf20 to 4790351 Compare October 10, 2026 16:01
@SaiTejaMutchi

Copy link
Copy Markdown
Contributor Author

Thanks for catching this and for the links @alimaazamat . I regenerated the compiled requirements and downstream raydepset lockfiles with Ray’s tooling and committed the generated updates. The fresh Buildkite premerge and release checks are now passing.

@SaiTejaMutchi
SaiTejaMutchi force-pushed the fix/azure-resource-deployments branch 2 times, most recently from 9858cf0 to 9a8af41 Compare October 11, 2026 15:32
azure-mgmt-resource 26.0.0 made filter and api_version keyword-only. Use one keyword style that still works on 24 and 25, and fail positional regressions in tests.

Signed-off-by: Sai Teja Mutchi <[email protected]>
@SaiTejaMutchi
SaiTejaMutchi force-pushed the fix/azure-resource-deployments branch from 9a8af41 to 203914a Compare October 12, 2026 21:45
@rueian
rueian enabled auto-merge (squash) October 13, 2026 22:48
@github-actions
github-actions Bot disabled auto-merge October 17, 2026 00:13
@rueian
rueian enabled auto-merge (squash) October 17, 2026 00:13
@github-actions
github-actions Bot disabled auto-merge October 18, 2026 21:16
@rueian
rueian enabled auto-merge (squash) October 21, 2026 22:43
@rueian
rueian merged commit 3608367 into ray-project:master Oct 24, 2026
7 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 core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants