Skip to content

[AutoPR azure-mgmt-containerservice]-generated-from-SDK Generation - Python-5990414#45636

Open
azure-sdk wants to merge 1 commit intoAzure:mainfrom
azure-sdk:sdkauto/azure-mgmt-containerservice-5990414
Open

[AutoPR azure-mgmt-containerservice]-generated-from-SDK Generation - Python-5990414#45636
azure-sdk wants to merge 1 commit intoAzure:mainfrom
azure-sdk:sdkauto/azure-mgmt-containerservice-5990414

Conversation

@azure-sdk
Copy link
Collaborator

@azure-sdk azure-sdk commented Mar 10, 2026

Configurations: 'specification/containerservice/resource-manager/Microsoft.ContainerService/aks/tspconfig.yaml', API Version: 2026-01-01, SDK Release Type: stable, and CommitSHA: '63cb8f987d0d5fb94e781d000c7f7fc7a4a69842' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5990414 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://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=7742a2ce-4418-f111-8341-000d3a376cbb Submitted by: fumingzhang@microsoft.com

Release Plan Details

…osoft.ContainerService/aks/tspconfig.yaml', API Version: 2026-01-01, SDK Release Type: stable, and CommitSHA: '63cb8f987d0d5fb94e781d000c7f7fc7a4a69842' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5990414 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates azure-mgmt-containerservice to a newly generated stable release (API version 2026-01-01) using the “Python Code Generator”, including client/operations surface reshaping and utility/serialization updates.

Changes:

  • Regenerated clients/operations/models for API version 2026-01-01, consolidating operation imports and removing several previously generated operation modules.
  • Introduced a send_request method and updated endpoint/base URL handling in both sync and async clients.
  • Updated shared utility and serialization code (notably removing eval) and bumped package version to 41.0.0.

Reviewed changes

Copilot reviewed 47 out of 266 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_container_service_operations.py Removed legacy generated operation group implementation.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/init.py Switched operation exports to consolidated ._operations module and updated generator header.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_patch.py Updated typing style for __all__.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/init.py Updated model/enum import targets and public __all__ exports for new generator.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_trusted_access_roles_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_trusted_access_role_bindings_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_snapshots_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_resolve_private_link_service_id_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_private_link_resources_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_private_endpoint_connections_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_patch.py Updated typing style for __all__.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operation_status_result_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_mesh_memberships_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_cluster_snapshots_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_maintenance_configurations_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_machines_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_load_balancers_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_jwt_authenticators_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_identity_bindings_operations.py Removed legacy async operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_container_service_operations.py Removed legacy async container service operation group module.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/init.py Switched async operation exports to consolidated ._operations module and updated generator header.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_patch.py Updated typing style for __all__.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py Updated async configuration defaults (API version) and added base_url to configuration.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py Updated async client wiring, added send_request, and changed serializer/deserializer initialization.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/init.py Updated async client import to ._client.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py Bumped package version to 41.0.0 and updated file header.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_utils/utils.py Added ETag/match-condition helper utilities.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_utils/serialization.py Replaced eval conversions with explicit conversions in basic (de)serialization.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_utils/init.py Updated generator header.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_patch.py Updated typing style for __all__.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py Updated sync configuration defaults (API version) and added base_url to configuration.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py Updated sync client wiring, added send_request, and changed serializer/deserializer initialization.
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/init.py Updated sync client import to ._client.
sdk/containerservice/azure-mgmt-containerservice/_metadata.json Updated generation metadata (TypeSpec emitter info, apiVersion, commit).
sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md Added 41.0.0 release notes including new features and breaking changes.

Comment on lines 1791 to +1797
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))
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deserialize_basic no longer supports bool even though the docstring and return contract include bool. This will raise TypeError for boolean fields/parameters during deserialization. Add an explicit bool branch (ideally parsing common wire representations like "true"/"false" and "1"/"0" rather than using Python’s bool("false") == True).

Copilot uses AI. Check for mistakes.
Comment on lines 829 to +837
if data_type == "str":
return cls.serialize_unicode(data)
return eval(data_type)(data) # nosec # pylint: disable=eval-used
if data_type == "int":
return int(data)
if data_type == "float":
return float(data)
if data_type == "bool":
return bool(data)
raise TypeError("Unknown basic data type: {}".format(data_type))
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serialize_basic uses bool(data), which produces incorrect results for string inputs (e.g., "false" becomes True). If serialize_basic can receive strings for booleans, switch to explicit parsing (case-insensitive "true"/"false", "1"/"0"), and otherwise pass through actual bool values unchanged.

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +40
- Model `AgentPoolsOperations` added parameter `etag` in method `begin_create_or_update`
- Model `AgentPoolsOperations` added parameter `match_condition` in method `begin_create_or_update`
- Model `AgentPoolsOperations` added parameter `etag` in method `begin_delete`
- Model `AgentPoolsOperations` added parameter `match_condition` in method `begin_delete`
- Model `ManagedClustersOperations` added parameter `etag` in method `begin_create_or_update`
- Model `ManagedClustersOperations` added parameter `match_condition` in method `begin_create_or_update`
- Model `ManagedClustersOperations` added parameter `etag` in method `begin_delete`
- Model `ManagedClustersOperations` added parameter `match_condition` in method `begin_delete`
- Model `ManagedClustersOperations` added parameter `etag` in method `begin_update_tags`
- Model `ManagedClustersOperations` added parameter `match_condition` in method `begin_update_tags`
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changelog bullets label operation groups as “Model”, which is misleading for readers (they’re operations, not models). Consider changing “Model AgentPoolsOperations…” to “Operation AgentPoolsOperations…” (or “Client operation group …”) for clarity and to better match Azure SDK Python conventions.

Suggested change
- Model `AgentPoolsOperations` added parameter `etag` in method `begin_create_or_update`
- Model `AgentPoolsOperations` added parameter `match_condition` in method `begin_create_or_update`
- Model `AgentPoolsOperations` added parameter `etag` in method `begin_delete`
- Model `AgentPoolsOperations` added parameter `match_condition` in method `begin_delete`
- Model `ManagedClustersOperations` added parameter `etag` in method `begin_create_or_update`
- Model `ManagedClustersOperations` added parameter `match_condition` in method `begin_create_or_update`
- Model `ManagedClustersOperations` added parameter `etag` in method `begin_delete`
- Model `ManagedClustersOperations` added parameter `match_condition` in method `begin_delete`
- Model `ManagedClustersOperations` added parameter `etag` in method `begin_update_tags`
- Model `ManagedClustersOperations` added parameter `match_condition` in method `begin_update_tags`
- Operation `AgentPoolsOperations` added parameter `etag` in method `begin_create_or_update`
- Operation `AgentPoolsOperations` added parameter `match_condition` in method `begin_create_or_update`
- Operation `AgentPoolsOperations` added parameter `etag` in method `begin_delete`
- Operation `AgentPoolsOperations` added parameter `match_condition` in method `begin_delete`
- Operation `ManagedClustersOperations` added parameter `etag` in method `begin_create_or_update`
- Operation `ManagedClustersOperations` added parameter `match_condition` in method `begin_create_or_update`
- Operation `ManagedClustersOperations` added parameter `etag` in method `begin_delete`
- Operation `ManagedClustersOperations` added parameter `match_condition` in method `begin_delete`
- Operation `ManagedClustersOperations` added parameter `etag` in method `begin_update_tags`
- Operation `ManagedClustersOperations` added parameter `match_condition` in method `begin_update_tags`

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +40
def quote_etag(etag: Optional[str]) -> Optional[str]:
if not etag or etag == "*":
return etag
if etag.startswith("W/"):
return etag
if etag.startswith('"') and etag.endswith('"'):
return etag
if etag.startswith("'") and etag.endswith("'"):
return etag
return '"' + etag + '"'


def prep_if_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]:
if match_condition == MatchConditions.IfNotModified:
if_match = quote_etag(etag) if etag else None
return if_match
if match_condition == MatchConditions.IfPresent:
return "*"
return None


def prep_if_none_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]:
if match_condition == MatchConditions.IfModified:
if_none_match = quote_etag(etag) if etag else None
return if_none_match
if match_condition == MatchConditions.IfMissing:
return "*"
return None
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New ETag helpers and the modified (de)serialization behavior introduce edge cases that should be covered by unit tests (e.g., quoting behavior, MatchConditions mappings, and boolean serialization/deserialization). Please add targeted tests to lock in expected behavior and prevent regressions in request precondition handling.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants