Skip to content

{Core} Add __init__.py to azure.cli.core.sdk#17817

Merged
jiasli merged 1 commit intoAzure:devfrom
jiasli:add-init
Apr 22, 2021
Merged

{Core} Add __init__.py to azure.cli.core.sdk#17817
jiasli merged 1 commit intoAzure:devfrom
jiasli:add-init

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Apr 22, 2021

Description

azure.cli.core.sdk (added by #17671) doesn't have __int__.py, so it will not be included in the whl file, causing CI failure:

https://dev.azure.com/azure-sdk/public/_build/results?buildId=855815&view=logs&jobId=c846b3e8-69b8-5dbd-1a39-4905d81e6a95&j=1e6fba43-bdcf-51f0-a062-3712c33fbb51&t=a1e787eb-ec67-5c3d-79ec-0c68f4f59d65

        # Prepare x-ms-client-request-id header, used by RequestIdPolicy
        if 'x-ms-client-request-id' in cli_ctx.data['headers']:
            client_kwargs['request_id'] = cli_ctx.data['headers']['x-ms-client-request-id']
    
        # Replace NetworkTraceLoggingPolicy to redact 'Authorization' and 'x-ms-authorization-auxiliary' headers.
        #   NetworkTraceLoggingPolicy: log raw network trace, with all headers.
>       from azure.cli.core.sdk.policies import SafeNetworkTraceLoggingPolicy
E       ModuleNotFoundError: No module named 'azure.cli.core.sdk'

This is because setup.py uses find_packages to find packages to include in the whl file:

packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "azure", "azure.cli"]),

Only folders with __int__.py are marked as a package.

Similar problem happened before: #15711 (comment).

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 22, 2021

Core

@yonzhan yonzhan added this to the S186 milestone Apr 22, 2021
Copy link
Collaborator

@yonzhan yonzhan left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants

Comments