Repository navigation
[Autoscaler][Azure] Fix resource SDK 25+ compatibility - #66714
Conversation
There was a problem hiding this comment.
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.
|
Hi @marosset and @alimaazamat, do you have more context on those SDKs? Could you help take a look? Thank you. |
alimaazamat
left a comment
There was a problem hiding this comment.
Thanks for tackling this! The import fallback works well when I tested on 24.x and 25.x, just breaking on 26.0.0.
|
@alimaazamat Thanks again for the detailed review. I pushed the fixes for both issues:
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? |
|
lgtm! Thank you for your contribution! @SaiTejaMutchi can you please rebase? |
1e0f6cf to
6c519e3
Compare
|
Yep, rebased on latest master and pushed it up. Thanks for the review @alimaazamat 🙌 |
Head branch was pushed to by a user without write access
4166d62 to
80dcf20
Compare
|
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. |
80dcf20 to
4790351
Compare
|
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. |
9858cf0 to
9a8af41
Compare
Signed-off-by: Sai Teja Mutchi <[email protected]>
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]>
Signed-off-by: Sai Teja Mutchi <[email protected]>
9a8af41 to
203914a
Compare
Description
azure-mgmt-resource25.0.0 split deployment operations into the separateazure-mgmt-resource-deploymentspackage. Ray's Azure autoscaler still relies on the legacy deployment APIs exposed throughResourceManagementClient, 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, withoutazure-mgmt-resource-deployments: 36 passedazure-mgmt-resource==24.0.0+azure-mgmt-resource-deployments==2.0.0: 36 passedazure-mgmt-resource==25.0.0+azure-mgmt-resource-deployments==2.0.0: 36 passedazure-mgmt-resource==26.0.0+azure-mgmt-resource-deployments==2.0.0: 36 passedAlso ran the targeted Azure autoscaler tests,
test_autoscaler_yaml.py, relevant pre-commit checks,git diff --check, andraydepsets --check.testValidateDefaultConfigfor 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.txtand 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.