Skip to content

The addition _utils folder has disrupted the processing logic of Azure CLI build script #41083

@zhoxing-ms

Description

@zhoxing-ms
  • Package Name:
    azure-mgmt-containerregistry
  • Package Version:
    14.0.0
  • Operating System:
    ALL
  • Python Version:
    ALL

Describe the bug
Currently, _utils exists in both the root folder of the mgmt SDK and also API-specific folders in the new Python SDK (like azure-mgmt-containerregistry==14.0.0) :

image

breaking of fact that each API-specific folder is separated and self-containing. At present, the CLI build script mistakenly imports _utils as an api-version folder then import a non-existent azure.mgmt.containerregistry._utils.models package , resulting in a ModuleNotFoundError: No module named 'azure.mgmt.containerregistry._utils.models' error
For more details, please refer to the PR comment Azure/azure-cli#31382 (comment)

Moreover, the serialization.py files in different _utils also contain duplicated code, these duplicate _utils folders and serialization.py code will also increase the package size, which is also our concern

To Reproduce
Steps to reproduce the behavior:
1.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

MgmtThis issue is related to a management-plane library.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions