-
Notifications
You must be signed in to change notification settings - Fork 8
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
Install dev requirements in stylechecker #109
Conversation
4a58d9a
to
46b024e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the changes work as intended. However, there is a minor comment that can decrease the final docker image size even more.
You can ignore that comment if you feel like it is not worth the effort to over-engineer this change.
RUN apk add --no-cache --virtual installdeps \ | ||
curl \ | ||
make \ | ||
cmake \ | ||
gcc \ | ||
g++ \ | ||
musl-dev \ | ||
python3-dev \ | ||
&& apk add --no-cache \ | ||
ca-certificates \ | ||
cmake \ | ||
bash \ | ||
git \ | ||
grep \ | ||
gzip \ | ||
musl-dev \ | ||
openssh \ | ||
perl \ | ||
python3 \ | ||
py3-pip \ | ||
tar \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the effort to delete all install dependencies and leave only the packages that will be used in the package. However, I do not really get how and why some of the packages that are not listed under the virtual installdeps
are used in the actual image. For example can we move the following to installdeps
virtual package:
cmake
appears to be used only when building uncrustifygzip
is used when extracting uncrustify tarballmusl-dev
is a standard C library. I do not really know why we need it at allopenssh
does not look like used at all as we use https connections for github and I do not see any other place that can actually use ssh.py3-pip
is used only here to install packages. Is it not safe to delete it after we are done with installing python packages? Deleting this package may also delete the python packages, so I am not sure if it is safe to move it to virtual package list at all.tar
is used when extracting uncrustify tarball.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved all of these packages to installdeps. Two callouts:
- I added py3-packaging to regular installed packages. Since py3-pip pulled that in and it's needed to run our linters due to pyproject.toml.
- musl-dev is needed during build because some python packages need it to compile some C stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay added back openssh. It's necessary for circleci to check out the github repo.
a8b1f56
to
1fd7bde
Compare
Needed to check Python formatting and linting from CI for citusdata/citus#6700
1fd7bde
to
6139186
Compare
Needed to check Python formatting and linting from CI for citusdata/citus#6700
Since some of these tools need a somewhat recent python version this also required an update of the alpine base image. And to make that in turn work, we need to install
uncrustify
from source (just like we recommend devs to do).