Skip to content

Commit

Permalink
fix: Don't build uwsgi with xml support
Browse files Browse the repository at this point in the history
When uwsgi runs with xml support, it throws the following error on
startup with the latest version of edx-platform:

```
xmlsec.InternalError: (-1, 'lxml & xmlsec libxml2 library version mismatch')
```

See xmlsec/python-xmlsec#320 for more details
on this.

Essentially, the uWSGI wheel is built against a different version of
libxml2 and it causes this version mismach error when trying to load
xmlsec.  The xml support in uWSGI is only needed for runing with xml
configuration files, which tutor does not do.  Following the guidance of
the above issue, I updated the `openedx` Dockerfile to no longer compile
with any xml support as a part of the build. The time to build uWSGI was
only slightly more than building from cache so I'm not concerned about
major slowdowns in the build time for un-cached builds.
  • Loading branch information
feanil authored Nov 15, 2024
1 parent 61f0f4e commit 437e2cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Don't build uwsgi with XML support (by @feanil)
4 changes: 3 additions & 1 deletion tutor/templates/build/openedx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ RUN --mount=type=bind,from=edx-platform,source=/requirements/edx/base.txt,target
pip install -r /openedx/edx-platform/requirements/edx/base.txt

# Install extra requirements
# We don't need xml configuration support in uwsgi so don't install it.
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install \
UWSGI_PROFILE_OVERRIDE="xml=no" \
pip install --no-cache-dir --compile \
# Use redis as a django cache https://pypi.org/project/django-redis/
django-redis==5.4.0 \
# uwsgi server https://pypi.org/project/uWSGI/
Expand Down

0 comments on commit 437e2cd

Please sign in to comment.