azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

azure-mgmt-network is huge

Open yoava333 opened this issue 6 years ago • 39 comments

  • Package Name: azure-mgmt-network
  • Package Version: 10.1.0
  • Operating System: alpine-3.11.6
  • Python Version: 3.8

Describe the bug azure-mgmt-network is the biggest dependency by far for my project, the size on disk is 110MB, which means that it slows down everything else - like building & publishing my application.

To Reproduce Steps to reproduce the behavior:

  1. pip install azure-mgmt-network
  2. inspect the site-packages/azure/mgmt/network folder

Expected behavior I would expect the SDK to be much lighter, for comparison the entire GCP python SDK is ~5MB and boto3+botocore is ~50MB (which includes the entire SDK). If I were to install azure-mgmt-compute & azure-mgmt-resource I would get another 30MB, in one of my applications the azure folder is 250MB bigger than all the rest of the filesystem combined.

yoava333 avatar Apr 30 '20 15:04 yoava333

hi @yoava333 , i checked the pkg size, it is huge because network has multi versions, when you download this pkg, it will download pkgs of all version, we will discuss this on our meeting, thx.

chenjianfei2017 avatar May 01 '20 03:05 chenjianfei2017

@lmazuel , do you have any suggestion here? is it possible to optimize the codegen to reduce the size? thanks.

RodgeFu avatar May 06 '20 08:05 RodgeFu

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.

ghost avatar May 15 '20 10:05 ghost

We did some investigation and found that the current network package still include very old api-version. Add "Service Attention" label to include service team to confirm whether we still need to support all the api-versions, it will be helpful to reduce the size if some old api-version can be removed from the package. thanks.

RodgeFu avatar May 15 '20 10:05 RodgeFu

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.

ghost avatar May 19 '20 03:05 ghost

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @vnetsuppgithub.

ghost avatar Aug 12 '20 16:08 ghost

Any update on this?

talmachani avatar Oct 04 '20 07:10 talmachani

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @vnetsuppgithub.

ghost avatar Oct 05 '20 17:10 ghost

Could you update on the status of this issue?

Azure right now is ~330MB I cannot use the sdk it in an AWS Lambda function anymore

image

yoav-orca avatar Nov 12 '20 14:11 yoav-orca

i have the same problem as well... Please update

wagde-orca avatar Nov 16 '20 16:11 wagde-orca

@chenjianfei2017 - I'm from the SDN team, did you come to any conclusion about how to fix this?

allegradomel avatar Nov 16 '20 18:11 allegradomel

The issue is only becoming worse over time, it's now ~370MB image

Where azure-mgmt-network is the biggest offender with ~230MB image

yoav-orca avatar Dec 01 '20 16:12 yoav-orca

@MikhailTryakhov, is it possible that we can make the package smaller? for example, deprecate some very old versions such as 2015-xx-xx. Actually this need cross team collaboration as network has many feature teams, do you know who can be the coordinator to collect thoughts from different feature team? Before deprecation, we need data to insure there is no users to use those deprecated version recently. image

jsntcy avatar Mar 05 '21 03:03 jsntcy

The sheer size of azure-mgmt-network even makes PyCharm unresponsive by selecting or searching for begin_create_or_update.

https://github.com/Azure/azure-cli/blob/b0815f704b1c3a34c4b5a4aecf9489166eef30ef/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_virtual_network.py#L173

nw_client.virtual_networks.begin_create_or_update(resource_group, ...)

I have to set the project to "No interpreter" for coding.

image

jiasli avatar Mar 05 '21 03:03 jiasli

Hey @jsntcy I assume that's impossible. different customers are using different api versions and I'm not sure it's a good idea to deprecate some of them

MikhailTryakhov avatar Mar 05 '21 03:03 MikhailTryakhov

@MikhailTryakhov,

  • We know different customers use different api versions, and we can collect data from telemetry to see if all existing API versions are used, if some versions are not used recently, we may probably deprecate them; otherwise the package will be bigger and bigger in the future as Network will include all existing features in new versions.
  • Also we can suggest customers to upgrade from very old version to new version for better/more features provided.
  • Another possible way: can we split Network package into multiple packages for different sub services.

jsntcy avatar Mar 05 '21 03:03 jsntcy

@jsntcy can you share these metrics?

MikhailTryakhov avatar Mar 05 '21 05:03 MikhailTryakhov

@jsntcy regarding to collect data from telemetry to see if all existing API versions are used

MikhailTryakhov avatar Mar 05 '21 05:03 MikhailTryakhov

@jsntcy any update?

MikhailTryakhov avatar Mar 10 '21 01:03 MikhailTryakhov

Has there been any resolution or progress on this issue?

kenperkins avatar Apr 02 '21 15:04 kenperkins