[AutoPR azure-mgmt-recoveryservices]-generated-from-SDK Generation - Python-6697821 - #48569
Conversation
…osoft.RecoveryServices/RecoveryServices/tspconfig.yaml', API Version: 2026-07-01, SDK Release Type: stable, and CommitSHA: 'e9b8d33567e9422a09711667279fe178fada51a1' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6697506 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Updates the Recovery Services management SDK to the newer 2026-07-01 API version and introduces Region-of-Choice configuration support for vaults.
Changes:
- Bumped default API version from
2026-05-01to2026-07-01across sync/async clients and request builders - Added
RegionOfChoiceSettingsmodel andVaultProperties.region_of_choice_settingswiring, plus new samples/tests - Refreshed generated artifacts/metadata (API view, emitter/parser versions, changelog, package version)
Reviewed changes
Copilot reviewed 65 out of 65 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/recoveryservices/azure-mgmt-recoveryservices/tsp-location.yaml | Updates the spec commit pointer used for generation |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_tests/test_recovery_services_vaults_operations_async.py | Adds Region-of-Choice field to async vault operation tests |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_tests/test_recovery_services_vaults_operations.py | Adds Region-of-Choice field to sync vault operation tests |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/update_vault_extended_info_put.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/update_vault_extended_info.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_user_assigned_identity.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_source_scan_configuration.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_region_of_choice_settings.py | New sample demonstrating Region-of-Choice settings on create |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_redundancy_settings.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_monitoring_settings.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_immutability_config.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_cost_management_settings.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_cmk.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_resource_guard_enabled.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_cred.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_user_assigned_identity.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_source_scan_configuration.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_region_of_choice_settings.py | New sample demonstrating Region-of-Choice settings on update |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_redundancy_settings.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_monitoring_settings.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_immutability_config.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_cost_management_settings.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_cmk3.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_cmk2.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault_with_cmk.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/patch_vault.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/list_usages.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/list_resources.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/list_replication_usages.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/list_private_link_resources.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/list_operations.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/list_by_subscription_ids.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/get_vault_with_region_of_choice_settings.py | New sample demonstrating Region-of-Choice settings on get |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/get_vault_extended_info.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/get_vault.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/get_private_link_resources.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/get_operation_status.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/get_operation_result.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/deleted_vaults_undelete.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/deleted_vaults_list_by_subscription_id.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/deleted_vaults_get_operation_status.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/deleted_vaults_get.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/delete_vault.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/delete_registered_identities.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/check_name_availability_not_available.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/check_name_availability_available.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/capabilities.py | Updates sample’s x-ms-original-file API version reference |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/types.py | Adds Region-of-Choice TypedDict and updates type surface |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_operations.py | Updates request builders default api-version and supported version lists |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/_models.py | Adds RegionOfChoiceSettings model and vault properties field |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/init.py | Exports RegionOfChoiceSettings from models package |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_operations.py | Updates async operations metadata/pylint and supported version lists |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/_configuration.py | Updates async config default api_version and docstrings |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/_client.py | Updates async client docstrings/pylint for new api_version |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_version.py | Bumps package version to 4.2.0 |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_utils/serialization.py | Improves Serializer docstring |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_utils/model_base.py | Adds bool “format=str” deserializer and improves docstrings |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_configuration.py | Updates sync config default api_version and docstrings |
| sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_client.py | Updates sync client docstrings/pylint for new api_version |
| sdk/recoveryservices/azure-mgmt-recoveryservices/apiview-properties.json | Adds RegionOfChoiceSettings mapping and updates cross-language version |
| sdk/recoveryservices/azure-mgmt-recoveryservices/api.metadata.yml | Updates parser version and metadata hash |
| sdk/recoveryservices/azure-mgmt-recoveryservices/api.md | Updates public API surface and adds RegionOfChoiceSettings |
| sdk/recoveryservices/azure-mgmt-recoveryservices/_metadata.json | Updates apiVersion, commit, and generator/tool versions |
| sdk/recoveryservices/azure-mgmt-recoveryservices/CHANGELOG.md | Documents 4.2.0 features (Region-of-Choice support) |
Suppressed comments (3)
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/types.py:1
- The
types.pyTypedDict surface changed field names from snake_case to camelCase (e.g.,operation_identity_type→operationIdentityType). This is a backward-incompatible change for consumers who build request dictionaries using the previous key names (even if runtime serialization accepts either). To preserve compatibility in a minor version bump, consider keeping the snake_case keys as optional aliases (or providing deprecated wrapper TypedDicts) rather than removing them outright.
# pylint: disable=line-too-long,useless-suppression,too-many-lines
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/types.py:1
- Several previously public TypedDict types appear to have been removed from
azure.mgmt.recoveryservices.types(e.g.,CapabilitiesResponse,CheckNameAvailabilityResult, and others shown as removed in the diff). Removing public symbols is a breaking change for importers and static type checkers, but the package version only bumps minor (4.1.0 → 4.2.0). Either restore these types (possibly as deprecated shims) or treat this as a breaking change and align the versioning accordingly.
# pylint: disable=line-too-long,useless-suppression,too-many-lines
sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_region_of_choice_settings.py:1
- The sample points to
docs.microsoft.com, which has been superseded bylearn.microsoft.com. Updating the link would avoid directing users to legacy/redirected documentation.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
sdk/recoveryservices/azure-mgmt-recoveryservices/tests/test_recovery_services_vaults_operations_test.py:26
- This assertion makes the live test depend on unrelated subscription state. The preparer creates only an empty resource group and no vault, so a clean test subscription legitimately returns an empty page and now fails. Create a vault as part of the test and assert that it is listed, or validate iteration without requiring the subscription to already contain a vault.
sdk/recoveryservices/azure-mgmt-recoveryservices/tests/test_recovery_services_vaults_operations_async_test.py:27 - This assertion makes the async live test depend on unrelated subscription state. The preparer creates only an empty resource group and no vault, so a clean test subscription legitimately returns an empty page and now fails. Create a vault as part of the test and assert that it is listed, or validate iteration without requiring the subscription to already contain a vault.
Management SDK PR reviewFindings: None. Unverified checksUnverified checks: None. Review summaryPackage reviewed: Checks completed:
No violations of the MGMT SDK Code Review Rules were found in the reviewed evidence. |
There was a problem hiding this comment.
Hi vidyadharijami, we have approved the PR. You can move on to merge and release though the action suggestion in Release Plan.
…osoft.RecoveryServices/RecoveryServices/tspconfig.yaml', API Version: 2026-07-01, SDK Release Type: stable, and CommitSHA: '29a24a19a18c67892fd965d6aea4595e803becd2' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6697821 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 67 out of 67 changed files in this pull request and generated no new comments.
Suppressed comments (4)
sdk/recoveryservices/azure-mgmt-recoveryservices/tests/test_recovery_services_vaults_operations_test.py:1
list_by_subscription_id()can legitimately return an empty list in a clean subscription (this test doesn't create a vault before listing). The new assertion changes behavior from “response is iterable” to “must have at least one vault”, which can make the test flaky/fail in CI. Consider either (a) creating a vault in the test setup and asserting it’s present, or (b) asserting on the materialized list type/shape (e.g., thatresultis a list) rather than requiring a non-empty result.
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/types.py:1- The public
azure.mgmt.recoveryservices.types.*shapes are now using camelCase keys (e.g.,operationIdentityType) where the previous surface commonly exposed snake_case identifiers. This is a breaking change for callers constructing request bodies via these TypedDicts. If this change is intentional, it should be clearly called out as a breaking change (and may warrant a major version bump). If not intentional, consider preserving backward compatibility by keeping the snake_case fields (possibly deprecated) as aliases alongside the new keys.
# pylint: disable=line-too-long,useless-suppression,too-many-lines
sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_region_of_choice_settings.py:1
- ARM
locationvalues are typically the canonical region name (e.g.,westus) rather than the display name with spaces/casing (e.g.,West US). Using the display name may cause the sample to fail when run. Consider updating this sample’s location string to a canonical value consistent with other management-plane samples.
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_utils/model_base.py:356 _deserialize_bool_as_strassumesattris a string when it’s not already a bool; calling.lower()will raise ifattrisNoneor another non-string JSON value. To avoid runtime AttributeError during deserialization, handle non-string inputs explicitly (e.g., returnattrwhenattr is None, or coerce viastr(attr)with clear semantics, or raise aTypeErrorwith a helpful message).
def _deserialize_bool_as_str(attr):
if isinstance(attr, bool):
return attr
return attr.lower() == "true"
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.
Suppressed comments (5)
sdk/recoveryservices/azure-mgmt-recoveryservices/tests/test_recovery_services_vaults_operations_test.py:1
- This test now assumes there is at least one vault in the subscription. In clean test subscriptions,
list_by_subscription_id()can legitimately return an empty iterator, causing a false failure. Consider asserting only that iteration succeeds (e.g.,result is not None/isinstance(result, list)), or create a vault in the test setup and then assert the created vault appears in the list.
sdk/recoveryservices/azure-mgmt-recoveryservices/tests/test_recovery_services_vaults_operations_async_test.py:1 - Same issue as the sync test: asserting
len(result)makes this test depend on pre-existing vaults in the subscription and can fail in clean environments. Prefer an assertion that doesn't require non-empty results, or provision a vault within the test and validate it appears in the listing.
sdk/recoveryservices/azure-mgmt-recoveryservices/generated_samples/put_vault_with_region_of_choice_settings.py:1 - ARM
locationtypically expects the canonical region name (e.g.,westus) rather than the display name (West US). Using the display name can cause the sample to fail at runtime with validation errors. Recommend switching to a canonical location string or reusing the repository's standardAZURE_LOCATIONconvention used in tests/samples.
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_utils/model_base.py:356 _deserialize_bool_as_strcallsattr.lower()for all non-bool inputs, which will raiseAttributeErrorif the wire value isNoneor another non-string type. Consider guarding withisinstance(attr, str)and handling unexpected types more safely (e.g., returningbool(attr)or raising aValueErrorwith a clear message) to avoid hard-to-diagnose deserialization crashes.
def _deserialize_bool_as_str(attr):
if isinstance(attr, bool):
return attr
return attr.lower() == "true"
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_configuration.py:1
- This introduces a file-wide pylint disable including
useless-suppression, which can mask unrelated lint issues across the entire file. If this was added to address a specific generated line, prefer scoping the suppression to the minimal region or disabling only the specific rule(s) actually triggered.
# pylint: disable=line-too-long,useless-suppression
Configurations: 'specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/RecoveryServices/tspconfig.yaml', API Version: 2026-07-01, SDK Release Type: stable, and CommitSHA: '29a24a19a18c67892fd965d6aea4595e803becd2' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6697821 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://azsdk-releaseplan-dashboard-hveph5aqhhcfhtgu.westus-01.azurewebsites.net/?releaseplan=36019 Submitted by: vijami@microsoft.com