We started with code that broke after an upgrade.
We were investigating which downstream repositories needed a fix after an SDK release. Ray gave us a concrete example: its Azure autoscaler relied on deployment APIs that Azure had moved in azure-mgmt-resource 25.0.0.
Ray’s tests pinned SDK 24. That version still supported the old calls. Install a newer SDK, and the same code could fail while creating Azure resources. Updating the dependency version would leave the broken calls in place.
I took on the migration using Ziek for investigation, implementation support and validation. The constraint was to support the newer SDK without breaking existing SDK 24 installations.
We followed the moved API and kept the old path working.
Azure had moved deployment operations into azure-mgmt-resource-deployments. We added a helper that uses its dedicated client when the package is installed and falls back to the original resource client for SDK 24. If neither interface is available, the error names the package to install.
We also updated Ray’s Azure install paths and dependency locks. The patch became PR #66714, where Ray contributors could review the implementation.
A reviewer found the break our first tests missed.
The import fallback worked on SDK 24 and 25. A Ray reviewer tried SDK 26 and found another failure: query parameters such as api_version and filter had become keyword-only.
Our mocks accepted positional arguments, so they let invalid calls pass. The pinned SDK accepted them too. We changed seven call sites to name their arguments, using a call style that all three SDK versions accept.
Then we replaced the permissive mock with a small fake that enforces SDK 26’s signatures. Python now rejects an invalid positional call even when the test environment uses SDK 24.