Skip to content
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

Ugrade base system to Ubuntu 24.04 #1067

Closed
wants to merge 9 commits into from
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-i
xlsx2csv \
gh \
nodejs \
npm \
graphviz \
python3-psycopg2 \
swi-prolog
swi-prolog \
libpcre3

# Install run-time dependencies for Soufflé.
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -95,7 +97,7 @@ COPY scripts/obodash /tools
RUN chmod +x /tools/obodash && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fuck it, we are not going to create a virtual environment just for the
OBO Dashboard. If the OBO Dashboard dependencies end up breaking the
rest of our Python packages, we might as well just create a separate
Docker image just for the dashboard.

Your commit messages are great, but it's important to avoid using offensive language in them. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but I won’t take lessons in how to write commit messages from folks who can’t be bothered to write decent commit messages themselves.

If people complain about an occasional profanity in one of my commit messages, at least I will know that there are some people who read them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I am wrong but I dont think this was meant as a lesson, more like a statement of affectedness.

I also prefer to avoid strong language in the spirit of conduct (as the Covenant Code of Conduct suggests), I had endless discussions of misconduct in some other projects which just distract from our common goals.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I am wrong

My pleasure.

I dont think this was meant as a lesson, more like a statement of affectedness.

A “statement of affectedness” would have been something like, “I felt offended by the presence of that F-word, I don’t like reading such things when I am reviewing a PR. I’d appreciate if you abstained to do that“ or similar.

“It’s important to avoid using offensive language in [commit messages]” is absolutely a lesson in how one should write a commit message – one that I find hard to accept coming from someone who I can’t remember having ever seen write a single decent commit message that actually explains what they are trying to do.

as the Covenant Code of Conduct suggests

The ODK does not have a code of conduct. Maybe it should (though I’d much rather have a “code on how to write efficient commit messages so that future contributors don’t have to guess what the f... the developers had in mind when they committed that change”, but it’s OK, we can have different priorities), but currently it does not.

Even if it had, according to the most popular code of conducts in use out there, the correct response to the occasional use of inappropriate language is a “private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate” – not a public rebuke.

I had endless discussions of misconduct in some other projects which just distract from our common goals

Fine. I hereby publicly apologise for having expressed my state of mind, as to why I believe installing the OBO Dashboard in a virtual environment just to circumvent pip’s default behaviour would be a unnecessary complication, using a 6-letters profanity instead of a more elaborate, professional, and polite phrasing. I did that for the sake of efficiency, but I didn’t consider that indeed people might not want to read a F-word when they are busy reviewing a PR.

I hope this will end the current distraction, and I will temporarily withdraw for all ODK maintenance to be sure you are not distracted again.

git clone --depth 1 https://github.com/OBOFoundry/OBO-Dashboard.git && \
cd OBO-Dashboard && \
python3 -m pip install -r requirements.txt && \
python3 -m pip install -r requirements.txt --break-system-packages && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OBO Dashboard must now be installed with --break-system-packages, otherwise pip will flatly refuse to install it system-wide.

I wonder if this is very suboptimal and we should, instead, install OBO dashboard as a pypi package and install it the usual way? Why is --break-system-packages not needed in docker/builder/Dockerfile?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the break system packages? I can update to the latest version, if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is very suboptimal and we should, instead, install OBO dashboard as a pypi package and install it the usual way?

We could, but then we would need actual releases of the OBO Dashboard package whenever we want to update it in the ODK. For now, the OBO Dashboard is effectively working in a “rolling release” fashion: it doesn’t do releases and we always install it from the tip of the master branch. That would need to change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the break system packages?

What do you mean? We are not breaking anything. --break-system-packages is merely the name of the option that forces pip to accept an instruction to install a package in the system-wide site-packages directory – without that option, it flatly refuses to do, because in Ubuntu 24.04 the system-wide directory is considered to be the private garden of the distribution’s own package system (APT).

The option is named like this as a rather condescending way of telling end-users that they should not try to install anything in the system-wide directory, because if they do they run the risk of introducing a conflict between packages that have been installed there by the distribution (packages installed with apt-get install python3-mypackage) and packages installed with pip.

But in a Docker image, we mostly don’t care about that risk, since when the image is built, the system-wide directory is in effect read-only. Once we are done installing whatever we need in it, nobody will ever modify that directory ever again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would need to change.

I can create a release right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is --break-system-packages not needed in docker/builder/Dockerfile?

Because in docker/builder/Dockerfile we are not installing Python packages to the system-wide directory: we are installing them to a staging area, from where we copy them to the ODKLite/ODKFull images.

echo " " >> Makefile && \
echo "build/robot.jar:" >> Makefile && \
echo " echo 'skipped ROBOT jar download.....' && touch \$@" >> Makefile && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ docs:
@ODK_IMAGE=odklite ./odk.sh python ./odk/schema_documentation.py

# Building docker image
VERSION = "v1.5"
VERSION = "v1.6"
IM=obolibrary/odkfull
IMLITE=obolibrary/odklite
ROB=obolibrary/robot
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# (typically because pre-compiled binaries don't exist for arm64) and
# we don't want to build directly on the final image (to avoid
# cluttering the image with build-time dependencies).
FROM ubuntu:22.04
FROM ubuntu:24.04
WORKDIR /build

# Software versions
Expand Down
2 changes: 1 addition & 1 deletion docker/odklite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
LABEL maintainer="[email protected]"

ENV ROBOT_VERSION=1.9.6
Expand Down
2 changes: 1 addition & 1 deletion docker/robot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
LABEL maintainer="[email protected]"

WORKDIR /tools
Expand Down