-
Notifications
You must be signed in to change notification settings - Fork 100
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
Reduce azure gem #737
Comments
We know the exact versions we use on azure: https://github.com/ManageIQ/manageiq-providers-azure/blob/master/config/settings.yml#L4-L19, so maybe we could do the same for azure_stack and find a way to delete the rest? We also don't need to create our own gem - if it's just straight deletes and the license allows us we can kill it directly in the rpm_build code like we do other things: https://github.com/ManageIQ/manageiq-rpm_build/blob/1d172a51ed665cb4f6ab71a6266dcf809a82911e/lib/manageiq/rpm_build/generate_gemset.rb#L154 (though I agree a custom gem would keep dev and prod identical for debugging purposes, and for file-size download and require purposes) |
I think I prefer releasing our own forked gem over modifying it in |
threw together a script: https://github.com/kbrock/azure-sdk-for-ruby/blob/smaller/prune-versions.rb
If we limit it down to only supporting our supported profiles, that will reduce it down by 2mb. which seems a little suspect. I can look into it more later, but supporting all seems good enough. This is a naive and we keep every api binding for the versions, not just the api binding that is actually used by the profile. (it uses some from one version of the api and some from another) But even with being conservative, keeping all profiles, and only pruning |
status: so I wrote a script to prune them down but I'm getting strange issues with unrelated gems. Looks like the dependencies around faraday get botched up. I'm assuming that I'm deleting some objects that are referenced or not pruning out some includes references that are including files for loading but no longer used |
This issue has been automatically marked as stale because it has not been updated for at least 3 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
It's always about level of effort. If it's a small change for big savings, then yes. I'm actually, surprisingly, not a fan of creating our own gem for azure because maintaining it forever (security and bug fixes) will be a hassle, but I do agree with the dev vs prod argument. |
This issue has been automatically closed because it has not been updated for at least 3 months. Feel free to reopen this issue if this issue is still valid. Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
Related, the python client also has this same size issue - See Azure/azure-sdk-for-python#17801 Note that now that we install the python client in the venv, it is taking up almost 385MB on disk (in addition to the Ruby size) |
I think if we upgrade to a newer azure python library, then it will reduce in size by quite a bit. |
I took another crack at this and opened ManageIQ/manageiq-providers-azure_stack#112. This builds on the https://github.com/Fryguy/azure-sdk-for-ruby/tree/drop_unused branch which 1st commit adds a script for dropping gem sizes, then executes that script and commits it as the next 8 commits. I've tested this locally with the azure stack PR and all of the tests pass, and additionally I have tried to autoload every autoloadable constant and that also works. I only measured the time to load everything and these are my results
|
Spin off from #736
Reducing the size of the Azure API gem
Azure is a big gem (145mb for
azure_mgmt_network
) and our single biggest asset on the appliance/pod. So we natural want to find a want to reduce our largest asset.In 2018 an issue was raised that the gem was getting unwieldy, but nothing came of this. The main response is that the gem has been retired as of 2/2021 and we should stop using this gem. ref. While that is a good long term solution, I want a smaller appliance before we are able to port the code.
The gem code has been changing 3-4 times a year but unsure whether they will maintain that cadence. It has been pushed in march, one month after the gem was retired.
My suggested course of action
Given:
Assumption:
Business decisions:
V2017_03_09
,V2018_03_01
, but I wonder if we want to support the latest profile. refPlan:
Determining APIs to keep
Looks like we can remove 29 {34-5} directories of APIs. removing 127mb of the 146mb.
Next Steps
We could do the same thing with azure compute API, though that would probably be closer to 10mb.
/cc @Fryguy @agrare @bdunne you all were on the previous thread
The text was updated successfully, but these errors were encountered: