-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azure-mgmt-network is huge #11149
Comments
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. |
@lmazuel , do you have any suggestion here? is it possible to optimize the codegen to reduce the size? thanks. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub. |
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. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @vnetsuppgithub. |
Any update on this? |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @vnetsuppgithub. |
We have written a script that deletes the unreferenced older APIs. It does delete a good chunk of the API folders but not all of it. With the script the Azure directory is now just under 300MB instead of over 700MB. It is compatible with most, but not all, third party packages, as long as they do not point to a version that is trimmed. |
Any update on this? Azure CLI size is getting out of hand :( |
Do we have any decisions? We have similar problem when we ship conda packages. |
Hi @yoava333. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
/unresolve |
Hi yoav-orca, only the original author of the issue can ask that it be unresolved. Please open a new issue with your scenario and details if you would like to discuss this topic with the team. |
/unresolve |
Any updates? I'd like to use the SDK in AWS Lambda but the package is too large |
@travcunn you can try my tool, which will bring the azure packages down to something less massive (300-400MB), but that might still be too large for Lambda. As far as I can tell, this is something that was reported years ago and each release is still growing bigger, so it does not seem to be a priority at Microsoft. @jsntcy you did communicate almost a year ago, can you share if anything came out of your meetings? You can share with your product teams that some decision makers are using this bug as an example as to why Azure should be avoided in favor of AWS. |
HI, we have gradually reduced the size for several release: #21301. |
According to #21301 (comment), 21.1MB is still too large. Azure CLI 2.34.1 (https://azcliprod.blob.core.windows.net/msi/azure-cli-2.34.1.msi) is 52.3MB, which means |
Let me paste the data in e-mail to raise more attention for architect |
Facing issues with pylance in VSCode. The python language server crashes as soon as I installed azure-mgmt-network via
|
See Azure/azure-sdk-for-python#11149 and Azure/azure-sdk-for-python#17801 The size of the azure sdk is ridiculous because they keep old (and unused APIs) around. We run this azure_sdk_trim.py to prune the unused APIs while still maintaining a good compatibility level. This shaves off about 0.5GB from the image. The full images is now around ~1GB.
* Stop installing pip from pip The UBI9 image is recent enough, that we can just rely on the system-packaged pip. Should the need arise we can always backtrack on that, but for now let's stick to the pip rpm we're being provided. * Remove some unneeded collections Namely we remove "fortinet cisco dellemc f5networks junipernetworks mellanox netapp" This saves us ~400MB Before: localhost/utility-container latest 4cd658d42edf 28 seconds ago 1.97 GB After: localhost/utility-container latest 685c976bab41 22 seconds ago 1.54 GB * Run pip install in a single command No need now to have multiple invocations. * Reduce the Azure sdk size impact See Azure/azure-sdk-for-python#11149 and Azure/azure-sdk-for-python#17801 The size of the azure sdk is ridiculous because they keep old (and unused APIs) around. We run this azure_sdk_trim.py to prune the unused APIs while still maintaining a good compatibility level. This shaves off about 0.5GB from the image. The full images is now around ~1GB. * Install git-core only This avoids us installing perl-libs. The fundamental git commands (clone) are in git-core and those are the only ones we are likely going to need for the foreseeable future. * Make kubectl a symlink to oc This won't have an impact on the final size of the image or on du calculations. But it makes the intent clearer as the two commands have the exact same content. * Add ARG variabls to remove some rpms We have some rpms we remove via microdnf (fonts) and some that we forcefully remove as we'll likely never ever need those via rpm -e --nodepts (cracklib-dict) * Move the openshift_client version to a variable So it will be easier to change and there is less clustter in the Containerfile * Fix some small hadolint warnings Quote any >= sign and move the -y as a first argument * Fix package names indentation in README and add vi
Duplicate of #17801, where we're posting most update on the topic |
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:
pip install azure-mgmt-network
site-packages/azure/mgmt/network
folderExpected 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.The text was updated successfully, but these errors were encountered: