gh-145351: use --no-install-recommends#145352
gh-145351: use --no-install-recommends#145352KowalskiThomas wants to merge 1 commit intopython:mainfrom
--no-install-recommends#145352Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
I don't think the failing test is related to my changes 🤔 but I don't have the permissions needed to retry the job I believe. EDIT I just updated the branch (I don't like doing this since it means re-running everything in CI but I think some jobs depend on the failing one before starting, so if I want to check that everything is green I had to do it). |
86e078a to
804f172
Compare
|
@KowalskiThomas here's some different apt-related optimizations I'm doing elsewhere if you're interested in experimenting more: https://github.com/ansible/pylibssh/blob/7ee19d6bfce233bb453b4a48d1c805eb84743935/.github/workflows/reusable-tests.yml#L89-L118 |
Thanks a lot, I'll give that a look and iterate in my fork + port it here if it helps! |
|
So, based on the jobs than ran for this commit (job), it seems like the additional changes make the time for I'll try without installing recommends. Update the numbers seem a bit noisy to be honest. Maybe at this hour of day there's more noise or something, I'll try to run with the proposed additional optimisations locally and see if it helps here. |
hugovk
left a comment
There was a problem hiding this comment.
I think this is worthwhile. It's a simple change, avoids installing stuff we don't need, so we need to be explicit in our dependencies.
Saving a bit of CI time is welcome, and may even prevent some occasional network timeouts (no need to download stuff we don't need).
Shall we also apply it to the others apt-get installs? Won't make so much difference there, but it's simple enough.
.github/workflows/regen-abidump.sh
5:apt-get install -yq abigail-tools python3
.github/workflows/reusable-ubuntu.yml
50: sudo apt-get install bolt-19
.github/workflows/reusable-docs.yml
95: run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
Let's not do KowalskiThomas@e886fd5 -- that's pretty complex and doesn't seem to save much time either.
What is this PR?
Most details/context are available in gh-145351, but in short, local testing (through
docker run) showed that not installing recommended packages for build dependencies brings install time from ~51s down to ~25, which definitely sounds worth doing.Note As far as I know, GitHub Actions, for safety reasons, does not pick up changes from the PR's GHA configuration when there are some, and instead runs the version on the target branch, so I'm testing this change in my fork to validate that it works.
-> Result: I tested it in CI on my fork and the time in CI seems to be going down from 33s down to 21s, which is still worth it in my opinion.