-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Split system packages into two sections: required to build python vs required to build users' python packages #7877
Split system packages into two sections: required to build python vs required to build users' python packages #7877
Conversation
99c04c0
to
28ea367
Compare
28ea367
to
9775313
Compare
Nice work! Could the test failure be related? I've never seen it before. |
55d01b5
to
3413284
Compare
Hmm, that's tough to know, normally I'd assume yes, but the error message looks more like a flake network connection... lemme try running it again. For posterity, here's the failing run: https://github.com/dependabot/dependabot-core/actions/runs/5946994350/job/16128413270?pr=7877 |
9775313
to
363999f
Compare
Looks like the CI failure was indeed a network flake, it worked fine the second time around. |
363999f
to
736bc21
Compare
1. Reorder the list of package lexicographically 2. Assume the only packages needed for `pyenv` to install `python` are the ones listed in https://github.com/pyenv/pyenv/wiki#suggested-build-environment 3. Move the remaining packages to a separate section of packages that are installed in the final image, not the builder image (they're not needed for building the various python's) 4. Go through the list of packages that are _potentially_ used for user packages, and search the repo issues/PR's/commit log for any mentions. Also google to see if any common python libraries require them. If so, document why. 5. Delete the remaining packages, they're probably not needed. This should slightly shrink our build times/image size, but there is a risk that one or more of the removed libraries are actually needed. If so, we'll probably see it in Sentry error logs once we deploy and jobs start running against user repos, and then we can re-add the ones that are still needed, except this time we'll actually be able to document _why_ they're needed. I was a little surprised how many packages I was able to delete... some of them may be part of the existing base image, but many of them looked like things that may have been needed for other parts of the monolithic docker image, but are no longer needed for just the Python bits.
736bc21
to
1695861
Compare
pyenv
to installpython
arethe ones listed in https://github.com/pyenv/pyenv/wiki#suggested-build-environment
are installed in the final image, not the builder image (they're not
needed for building the various python's)
packages, and search the repo issues/PR's/commit log for any
mentions. Also google to see if any common python libraries require
them. If so, document why.
This should slightly shrink our build times/image size, but there is a
risk that one or more of the removed libraries are actually needed. If
so, we'll probably see it in Sentry error logs once we deploy and jobs
start running against user repos, and then we can re-add the ones that
are still needed, except this time we'll actually be able to document
why they're needed.
I was a little surprised how many packages I was able to delete... 10 packages are gone!
Some of them may be part of the existing base image, but many of them looked
like things that may have been needed for other parts of the monolithic
docker image, but are no longer needed for just the Python bits.
Stacked on top of: