Without this fix, openedx Docker image building fails with the following
error:
> [linux/arm64 nodejs-requirements 4/4] RUN
--mount=type=bind,from=edx-platform,source=/package.json,target=/openedx/edx-platform/package.json
--mount=type=bind,from=edx-platform,source=/package-lock.json,target=/openedx/edx-platform/package-lock.json
--mount=type=bind,from=edx-platform,source=/scripts/copy-node-modules.sh,target=/openedx/edx-platform/scripts/copy-node-modules.sh
--mount=type=cache,target=/root/.npm,sharing=shared npm
clean-install --no-audit --registry=https://registry.npmjs.org/:
95.51 npm notice
95.51 npm notice New major version of npm available! 8.3.1 -> 10.5.1
95.51 npm notice Changelog:
<https://github.com/npm/cli/releases/tag/v10.5.1>
95.51 npm notice Run `npm install -g npm@10.5.1` to update!
95.51 npm notice
95.51 npm ERR! code EINTEGRITY
95.51 npm ERR!
sha512-sWMb40chzlUOKrHZCGpZoUrVnGm6khfL/fAMKO8vLtUR8yOmWIVVN7MRmep3/DSFhy1Hilon6qAH+UbLZgGG0w==
integrity checksum failed when using sha512: wanted
sha512-sWMb40chzlUOKrHZCGpZoUrVnGm6khfL/fAMKO8vLtUR8yOmWIVVN7MRmep3/DSFhy1Hilon6qAH+UbLZgGG0w==
but got
sha512-P9aZDwDEAVgAbdHG/ViapRzAUJ6zBSq/4I1lJFluIbrld6Sv6LI+HT2J4dgWqtfaCgIyDnHBHSHiJ/anter7wQ==.
(11488 bytes)
When building the nightly images, some patches fail because they come
from the master branch. To address this, we apply certain patches only
if we are not in nightly mode.
See the discussion here: https://github.com/overhangio/tutor/pull/984
And the upstream PR here: https://github.com/openedx/edx-platform/pull/34210
The tl;dr is that the Redis course structure cache was growing without
bounds. While the upstream fix should resolve that issue, we decided
that Tutor should have a maxmemory limit and an eviction policy set for
operational safety.
Thus, Redis now has a 4gb maxmemory. If you need more memory on your
instance, you should implement the "redis-conf" patch.
To manually expire existing keys, run:
tutor local run cms ./manage.py cms shell -c "from django.core.cache import caches; c = caches['course_structure_cache']; [c.expire(key, 604800) for key in c.keys('*')]"
pkg_resources is available in python 3.12 only if setuptools is
explicitely installed, which is not always the case. We fix that by
replacing all usage of pkg_resources with importlib_resources and
importlib_metadata.
Close #966
Environment was not updated correctly on `tutor plugins enable ...`
because of a caching issue. To bypass this issue, we improve the caching
mechanism and introduce a new `lru_cache` decorator.
Close #989.