API providers shouldn't just announce changes. They should ship the fix. Ziek turns upstream API and SDK releases into targeted, verified pull requests for the downstream codebases that need them.
A version bump alone would still leave broken calls.
Azure changed where deployment APIs live and how resource queries are called. This PR adapts Ray’s code to both changes while preserving support for SDK 24.
SDK 24 → 25The deployment API moved.
Version 25 moved deployments into azure-mgmt-resource-deployments. Ray could no longer assume they lived on the resource client.
The fix: select the dedicated deployment client when available, with a fallback to the original client for SDK 24.
config.py · deployment call · excerpt
− client=resource_client.deployments,+ client=deployments_client.deployments,
The helper chooses the client by availability, without checking version numbers.
SDK 25 → 26The argument now needs a name.
Version 26 requires api_version and filter to be passed by keyword. The old positional calls raise TypeError.
The fix: name the arguments at seven affected call sites. Older SDK versions accept the same syntax.
config.py · identity lookup · excerpt
− existing_msi = get_identity(− msi_resource_id, "2023-01-31")+ existing_msi = get_identity(+ resource_id=msi_resource_id,+ api_version="2023-01-31"+ )
These keyword arguments work with SDK 24, 25 and 26.
Tests that catch the original mistake.
The new test fake enforces SDK 26’s stricter signatures when tests run on SDK 24. Reverting any of the seven argument fixes causes a test to fail in the author’s mutation checks.
Reported runs against real SDK packages| Azure SDK | Targeted suite |
|---|
| 24.0.0 · legacy | 39 passed + 10 subtests |
|---|
| 25.0.0 · split package | 39 passed + 10 subtests |
|---|
| 26.0.0 · strict arguments | 39 passed + 10 subtests |
|---|