[AutoPR azure-mgmt-containerregistry]-generated-from-SDK Generation - Python-5912575#45312
[AutoPR azure-mgmt-containerregistry]-generated-from-SDK Generation - Python-5912575#45312azure-sdk wants to merge 7 commits intoAzure:mainfrom
Conversation
…rosoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '8b8076693baafd8d4ebeaca903bdaa0c191766b9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5912575 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
Updates azure-mgmt-containerregistry to a newly generated (TypeSpec-based) beta for API version 2026-01-01-preview, refreshing the client surface area, models, and internal plumbing (serialization, versioning, and API-version validation).
Changes:
- Regenerated client/operation groups to add archive + pipeline features and remove older task/run/agent-pool related groups.
- Updated model exports/enums and bumped package version to
14.1.0b5. - Introduced API-version gating helper (
_validation.py) and adjusted request sending + serialization internals.
Reviewed changes
Copilot reviewed 39 out of 211 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/operations/init.py | Re-exports operation groups from consolidated _operations module; updates public __all__. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/_patch.py | Modernizes __all__ typing to built-in generics. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/_enums.py | Updates/extends enums and enum value docstrings for the new API surface. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/init.py | Switches exports to _models and _enums, reflecting new/removed models. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_tokens_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_tasks_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_task_runs_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_scope_maps_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_runs_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_replications_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_private_endpoint_connections_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_patch.py | Modernizes __all__ typing to built-in generics. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_cache_rules_operations.py | Removed legacy per-operation module (now expected consolidated elsewhere). |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/init.py | Re-exports async operation groups from consolidated _operations module; updates public __all__. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_patch.py | Modernizes __all__ typing to built-in generics. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_configuration.py | Adds base_url + api_version to async configuration. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_client.py | Updates async client construction, operation groups, and exposes send_request. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/init.py | Updates async client import path to the new _client module. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_version.py | Bumps package version to 14.1.0b5 and updates header. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_validation.py | Adds API-version validation decorator used for gating methods/params. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_utils/serialization.py | Removes eval usage and hardens basic type (de)serialization. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_utils/init.py | Updates generator header. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_patch.py | Modernizes __all__ typing to built-in generics. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_configuration.py | Adds base_url + api_version to sync configuration. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_client.py | Updates sync client construction, operation groups, and exposes send_request. |
| sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/init.py | Updates client import path to the new _client module. |
| sdk/containerregistry/azure-mgmt-containerregistry/_metadata.json | Updates generation metadata to TypeSpec emitter + new apiVersion/commit. |
| sdk/containerregistry/azure-mgmt-containerregistry/CHANGELOG.md | Adds 14.1.0b5 release notes (features + breaking changes). |
| 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)) |
There was a problem hiding this comment.
serialize_basic converts booleans via bool(data), which will silently turn many non-boolean inputs into True (e.g., bool('false') is True). Since this method is meant to serialize basic types, it should either (a) require data to already be a bool for data_type == 'bool', or (b) explicitly parse acceptable string/int representations (e.g., 'true'/'false', 1/0) and raise TypeError for anything else.
| @functools.wraps(func) | ||
| def wrapper(*args, **kwargs): | ||
| try: | ||
| # this assumes the client has an _api_version attribute |
There was a problem hiding this comment.
The inline comment says the client has an _api_version attribute, but the implementation reads client._config.api_version. Please update the comment to match the actual assumption to avoid misleading future maintainers.
| # this assumes the client has an _api_version attribute | |
| # this assumes the client exposes its API version via client._config.api_version |
| import functools | ||
|
|
||
|
|
||
| def api_version_validation(**kwargs): |
There was a problem hiding this comment.
New runtime behavior was introduced (API-version gating via api_version_validation, plus related client api_version plumbing). Please add at least one unit test covering the intended behavior (e.g., older client._config.api_version raises for a method/parameter introduced in a newer version, and a supported version does not), to prevent regressions.
|
To be merged after PR 44775 |
|
/azp run |
|
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
…rosoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '8b3c0253cc35ce32eb17b148c1854cafc28a4e44' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6002631 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
…rosoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: 'b37b0676411ff84913d5358998668b867ac75a0f' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6004033 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '8b8076693baafd8d4ebeaca903bdaa0c191766b9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5912575 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=31653d04-daec-f011-8544-6045bd0569b8 Submitted by: joshbaunach@microsoft.com
Release Plan Details
Spec pull request: Release containerregistry microsoft.container registry/2026-01-01-preview azure-rest-api-specs#39535
Spec API version: 2026-01-01-preview