Conversation
…manager/Microsoft.RecoveryServices/SiteRecovery/tspconfig.yaml', API Version: 2025-08-01, SDK Release Type: beta, and CommitSHA: '8742677ebba334087cba3fe495a6512215f9190c' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6143541 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
Note
Copilot was unable to run its full agentic suite in this review.
Regenerates azure-mgmt-recoveryservicessiterecovery from the TypeSpec config for API version 2025-08-01, moving from AutoRest-style generation to the “Python Code Generator” output and updating the package to a new beta major version.
Changes:
- Replaces many per-operation
aio/operations/_*.pymodules with consolidated operation imports viaaio/operations/_operations. - Updates client/configuration initialization to support
base_url/cloud_settingARM endpoint selection and updates request sending API tosend_request. - Updates internal serialization utilities and package metadata/versioning for the new generation pipeline.
Reviewed changes
Copilot reviewed 46 out of 311 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_setting_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_health_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classifications_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classification_mappings_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_intents_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protectable_items_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_policies_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_networks_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_network_mappings_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_logical_networks_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_events_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_eligibility_results_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_appliances_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_alert_settings_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_recovery_points_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_migration_recovery_points_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_cluster_recovery_points_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_cluster_recovery_point_operations.py | Removed generated per-operation module (now consolidated via aio/operations/_operations). |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_patch.py | Updates customization hook boilerplate and typing annotations. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/init.py | Switches operation exports to import from the consolidated _operations module. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_patch.py | Updates customization hook boilerplate and typing annotations. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py | Updates async configuration surface to base_url/cloud_setting, and updates API version default. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_client.py | Updates async client initialization, endpoint resolution, serializer wiring, and renames request helper to send_request. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/init.py | Updates async package export to import client from ._client. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_version.py | Bumps package version to 2.0.0b1. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_utils/serialization.py | Updates serialization internals and typing; replaces eval-based basic type conversions. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_utils/init.py | Adds generated package marker for _utils. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_patch.py | Updates customization hook boilerplate and typing annotations. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_configuration.py | Updates sync configuration surface to base_url/cloud_setting, and updates API version default. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_client.py | Updates sync client initialization, endpoint resolution, serializer wiring, and renames request helper to send_request. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/init.py | Updates package export to import client from ._client. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/init.py | Adds typing ignore for namespace package extend_path. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/init.py | Adds typing ignore for namespace package extend_path. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/_metadata.json | Adds new generation metadata file for TypeSpec/emit pipeline. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/_meta.json | Removes legacy AutoRest generation metadata file. |
| sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/MANIFEST.in | Updates packaging includes (tests/samples) and removes legacy metadata include. |
| if data_type == "str": | ||
| return self.deserialize_unicode(attr) | ||
| return eval(data_type)(attr) # nosec # pylint: disable=eval-used | ||
| if data_type == "int": | ||
| return int(attr) | ||
| if data_type == "float": | ||
| return float(attr) | ||
| raise TypeError("Unknown basic data type: {}".format(data_type)) |
There was a problem hiding this comment.
Deserializer.deserialize_basic no longer supports data_type == "bool", which will break deserialization for any model fields declared as boolean (very common in ARM specs). Add an explicit bool branch (and ideally handle "true"/"false" string values consistently) rather than falling through to the TypeError.
| include azure/mgmt/recoveryservicessiterecovery/py.typed | ||
| recursive-include tests *.py |
There was a problem hiding this comment.
The manifest no longer includes _metadata.json (newly added) and also dropped tests non-Python assets (previously *.json). This can cause missing distribution metadata and/or broken tests in sdist/wheel consumers. Consider adding include _metadata.json and restoring recursive-include tests *.py *.json (or whatever non-Python test assets are required by this package).
| include azure/mgmt/recoveryservicessiterecovery/py.typed | |
| recursive-include tests *.py | |
| include _metadata.json | |
| include azure/mgmt/recoveryservicessiterecovery/py.typed | |
| recursive-include tests *.py *.json |
| ) | ||
|
|
||
| def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: | ||
| def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: |
There was a problem hiding this comment.
Renaming the private _send_request helper to the public send_request is fine, but it is a breaking change for any consumers who were calling _send_request (even if “private”). Since this is a major-version beta (2.0.0b1), it may be acceptable, but a low-cost compatibility improvement would be to keep _send_request as a deprecated alias that forwards to send_request.
| _endpoint = "{endpoint}" | ||
| _cloud = cloud_setting or settings.current.azure_cloud # type: ignore | ||
| _endpoints = get_arm_endpoints(_cloud) | ||
| if not base_url: | ||
| base_url = _endpoints["resource_manager"] | ||
| credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) |
There was a problem hiding this comment.
The client now has non-trivial branching behavior around base_url, cloud_setting, and credential_scopes defaults. Please add at least one unit test covering these branches (e.g., defaulting base_url from cloud_setting/settings.current.azure_cloud, and honoring an explicitly provided base_url / credential_scopes) so regressions in endpoint selection/auth scopes are caught.
| # -------------------------------------------------------------------------- | ||
|
|
||
| VERSION = "1.3.0" | ||
| VERSION = "2.0.0b1" |
There was a problem hiding this comment.
The version bump to 2.0.0b1 implies breaking changes (e.g., constructor parameters shifting away from resource_group_name/resource_name, and request helper rename). Ensure the package changelog/release notes explicitly call out these breaking changes and migration guidance for existing users.
Configurations: 'specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/SiteRecovery/tspconfig.yaml', API Version: 2025-08-01, SDK Release Type: beta, and CommitSHA: '8742677ebba334087cba3fe495a6512215f9190c' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6143541 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.