Skip to content

[AutoPR azure-mgmt-containerregistry]-generated-from-SDK Generation - Python-5912575#45312

Open
azure-sdk wants to merge 7 commits intoAzure:mainfrom
azure-sdk:sdkauto/azure-mgmt-containerregistry-5912575
Open

[AutoPR azure-mgmt-containerregistry]-generated-from-SDK Generation - Python-5912575#45312
azure-sdk wants to merge 7 commits intoAzure:mainfrom
azure-sdk:sdkauto/azure-mgmt-containerregistry-5912575

Conversation

@azure-sdk
Copy link
Collaborator

@azure-sdk azure-sdk commented Feb 23, 2026

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

…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.
@joshbaunach joshbaunach marked this pull request as ready for review March 3, 2026 18:47
Copilot AI review requested due to automatic review settings March 3, 2026 18:47
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

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).

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 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@functools.wraps(func)
def wrapper(*args, **kwargs):
try:
# this assumes the client has an _api_version attribute
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
# this assumes the client has an _api_version attribute
# this assumes the client exposes its API version via client._config.api_version

Copilot uses AI. Check for mistakes.
import functools


def api_version_validation(**kwargs):
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@CodeJourneys
Copy link
Contributor

To be merged after PR 44775

@joshbaunach
Copy link

/azp run

@azure-pipelines
Copy link

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.

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.

4 participants