From bd85430982bb56d076bb99903401f6cad32f114e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 11 Dec 2023 21:18:46 +0100 Subject: [PATCH 01/20] chore: restore nightly suffix --- tutor/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/__about__.py b/tutor/__about__.py index 33297dd3a4..b35db59044 100644 --- a/tutor/__about__.py +++ b/tutor/__about__.py @@ -10,7 +10,7 @@ # the nightly branch. # The suffix is cleanly separated from the __version__ in this module to avoid # conflicts when merging branches. -__version_suffix__ = "" +__version_suffix__ = "nightly" # The app name will be used to define the name of the default tutor root and # plugin directory. To avoid conflicts between multiple locally-installed From 6e5f75b244f742d75bbfceb8dd99f9c933aaf0d5 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Tue, 12 Dec 2023 13:57:38 -0400 Subject: [PATCH 02/20] fix: wrap django 4 imports in try-except block --- ...40233_maria.grimaldi_fix_django4_import_errors.md | 12 ++++++++++++ .../apps/openedx/settings/partials/common_all.py | 9 ++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md diff --git a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md new file mode 100644 index 0000000000..f677a6059e --- /dev/null +++ b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md @@ -0,0 +1,12 @@ + + + + +[Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch. diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index c088b97b17..ec68e3ed43 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -150,9 +150,12 @@ # These warnings are visible in simple commands and init tasks import warnings -from django.utils.deprecation import RemovedInDjango50Warning, RemovedInDjango51Warning -warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) -warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) +try: + from django.utils.deprecation import RemovedInDjango50Warning, RemovedInDjango51Warning + warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) + warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) +except ImportError: + pass warnings.filterwarnings("ignore", category=DeprecationWarning, module="wiki.plugins.links.wiki_plugin") warnings.filterwarnings("ignore", category=DeprecationWarning, module="boto.plugin") From 64d82c38c88085d7e5e03e06344ca474b9e64bdf Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Mon, 18 Dec 2023 16:50:01 -0500 Subject: [PATCH 03/20] docs: add REMOVE-AFTER-V18 comment to Django 5 import try-except also fixup changelog format --- ...0233_maria.grimaldi_fix_django4_import_errors.md | 13 +------------ .../apps/openedx/settings/partials/common_all.py | 4 ++++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md index f677a6059e..ad88d1cb42 100644 --- a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md +++ b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md @@ -1,12 +1 @@ - - - - -[Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch. +- [Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch (by @mariajgrimaldi). diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index ec68e3ed43..cf3bc44ddd 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -155,6 +155,10 @@ warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) except ImportError: + # REMOVE-AFTER-V18: + # In Quince, edx-platform uses Django 5. But on master, edx-platform still uses Django 3. + # So, Tutor v17 needs to silence these warnings, whereas Tutor v17-nightly fails to import them. + # Once edx-platform master is upgraded to Django 5, the try-except wrapper can be removed. pass warnings.filterwarnings("ignore", category=DeprecationWarning, module="wiki.plugins.links.wiki_plugin") From 53ebfd45be632a51cf49f3fa921253bbb44bb94a Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Fri, 15 Dec 2023 19:30:22 +0300 Subject: [PATCH 04/20] feat: add atlas pull with global settings --- changelog.d/20231219_214829_i_atlas.md | 1 + docs/configuration.rst | 68 +++---------------- docs/troubleshooting.rst | 4 +- .../openedx/settings/partials/common_all.py | 2 - tutor/templates/build/openedx/Dockerfile | 23 ++----- .../build/openedx/locale/customlocales.md | 13 ---- .../build/openedx/settings/cms/assets.py | 3 - .../build/openedx/settings/lms/assets.py | 3 - .../build/openedx/settings/partials/i18n.py | 2 - tutor/templates/config/defaults.yml | 3 + 10 files changed, 22 insertions(+), 100 deletions(-) create mode 100644 changelog.d/20231219_214829_i_atlas.md delete mode 100644 tutor/templates/build/openedx/locale/customlocales.md diff --git a/changelog.d/20231219_214829_i_atlas.md b/changelog.d/20231219_214829_i_atlas.md new file mode 100644 index 0000000000..6c3ef1b7d4 --- /dev/null +++ b/changelog.d/20231219_214829_i_atlas.md @@ -0,0 +1 @@ +- 💥[Feature] Pull translations via `atlas` during Docker build. This breaks the `openedx-i18n` custom locale Tutor feature in favor of [OEP-58](https://docs.openedx.org/en/latest/developers/concepts/oep58.html) in favor of . (by @omarithawi) diff --git a/docs/configuration.rst b/docs/configuration.rst index 0f88d79e19..6260d2996d 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -387,68 +387,22 @@ If you don't create your fork from this tag, you *will* have important compatibi .. _i18n: -Adding custom translations -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you are not running Open edX in English (``LANGUAGE_CODE`` default: ``"en"``), chances are that some strings will not be properly translated. In most cases, this is because not enough contributors have helped translate Open edX into your language. It happens! With Tutor, available translated languages include those that come bundled with `edx-platform `__ as well as those from `openedx-i18n `__. - -Tutor offers a relatively simple mechanism to add custom translations to the openedx Docker image. You should create a folder that corresponds to your language code in the "build/openedx/locale" folder of the Tutor environment. This folder should contain a "LC_MESSAGES" folder. For instance:: - - mkdir -p "$(tutor config printroot)/env/build/openedx/locale/fr/LC_MESSAGES" - -The language code should be similar to those used in edx-platform or openedx-i18n (see links above). - -Then, add a "django.po" file there that will contain your custom translations:: - - msgid "" - msgstr "" - "Content-Type: text/plain; charset=UTF-8" - - msgid "String to translate" - msgstr "你翻译的东西 la traduction de votre bidule" - - -.. warning:: - Don't forget to specify the file ``Content-Type`` when adding message strings with non-ASCII characters; otherwise a ``UnicodeDecodeError`` will be raised during compilation. - -The "String to translate" part should match *exactly* the string that you would like to translate. You cannot make it up! The best way to find this string is to copy-paste it from the `upstream django.po file for the English language `__. - -If you cannot find the string to translate in this file, then it means that you are trying to translate a string that is used in some piece of javascript code. Those strings are stored in a different file named "djangojs.po". You can check it out `in the edx-platform repo as well `__. Your custom javascript strings should also be stored in a "djangojs.po" file that should be placed in the same directory. - -To recap, here is an example. To translate a few strings in French, both from django.po and djangojs.po, we would have the following file hierarchy:: - - $(tutor config printroot)/env/build/openedx/locale/ - fr/ - LC_MESSAGES/ - django.po - djangojs.po - -With django.po containing:: - - msgid "" - msgstr "" - "Content-Type: text/plain; charset=UTF-8" - - msgid "It works! Powered by Open edX{registered_trademark}" - msgstr "Ça marche ! Propulsé by Open edX{registered_trademark}" - -And djangojs.po:: - - msgid "" - msgstr "" - "Content-Type: text/plain; charset=UTF-8" +Getting and customizing Translations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - msgid "%(num_points)s point possible (graded, results hidden)" - msgid_plural "%(num_points)s points possible (graded, results hidden)" - msgstr[0] "%(num_points)s point possible (noté, résultats cachés)" - msgstr[1] "%(num_points)s points possibles (notés, résultats cachés)" +Tutor builds images with the latest translations using the ```atlas pull`` command `__. -Then you will have to re-build the openedx Docker image:: +By default the translations are pulled from the `openedx-translations repository `_ +from the ``ATLAS_REVISION`` branch. You can use custom translations on your fork of the openedx-translations repository by setting the following configuration parameters: - tutor images build openedx +- ``ATLAS_REVISION`` (default: ``"main"`` on nightly and ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used) +- ``ATLAS_REPOSITORY`` (default: ``"openedx/openedx-translations"``). There's a feature request to `support GitLab and other providers `_. +- ``ATLAS_OPTIONS`` (default: ``""``) Pass additional arguments to ``atlas pull``. Refer to the `atlas documentations `_ for more information. -Beware that this will take a long time! Unfortunately, it's difficult to accelerate this process, as translation files need to be compiled before collecting the assets. In development it's possible to accelerate the iteration loop -- but that exercise is left to the reader. +If you are not running Open edX in English (``LANGUAGE_CODE`` default: ``"en"``), chances are that some strings will not be properly translated. In most cases, this is because not enough contributors have helped translate Open edX into your language. It happens! +With ``atlas``, it's possible to add custom translations by either `contributing to the Translations project in Transifex `_ or forking the `openedx-translations repository `_ +and making custom changes as explained in `the repository docs `_. Running a different ``openedx`` Docker image ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 8c2bc8ad85..7e78608d57 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -158,7 +158,9 @@ The error produced should help you better understand what is happening. The chosen default language does not display properly ----------------------------------------------------- -By default, Open edX comes with a `limited set ` of translation/localization files. To complement these languages, we add locales from the `openedx-i18n project `_. But not all supported locales are downloaded. In some cases, the chosen default language will not display properly because it was not packaged in either edx-platform or openedx-i18n. If you feel like your language should be packaged, please `open an issue on the openedx-i18n project `_. +By default, Open edX comes with a `limited set ` of translation/localization files. + +Refer to the :ref:`i18n` section for more information about using your own translations. When I make changes to a course in the CMS, they are not taken into account by the LMS -------------------------------------------------------------------------------------- diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index cf3bc44ddd..3db8bf9658 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -178,8 +178,6 @@ EMAIL_FILE_PATH = "/tmp/openedx/emails" # Language/locales -LOCALE_PATHS.append("/openedx/locale/contrib/locale") -LOCALE_PATHS.append("/openedx/locale/user/locale") LANGUAGE_COOKIE_NAME = "openedx-language-preference" # Allow the platform to include itself in an iframe diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 0aef8e81b8..9010de195c 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -67,15 +67,6 @@ COPY --from=code /openedx/edx-platform / FROM scratch as mnt-{{ name }} {% endfor %} -###### Download extra locales to /openedx/locale/contrib/locale -FROM minimal as locales -ARG OPENEDX_I18N_REPOSITORY=https://github.com/openedx/openedx-i18n.git -ARG OPENEDX_I18N_VERSION=release/quince -ADD --keep-git-dir=true $OPENEDX_I18N_REPOSITORY#$OPENEDX_I18N_VERSION /tmp/openedx-i18n -RUN mkdir --parents /openedx/locale && \ - mv /tmp/openedx-i18n/edx-platform/locale /openedx/locale/contrib && \ - rm -rf /tmp/openedx-i18n/ - ###### Install python requirements in virtualenv FROM python as python-requirements ENV PATH /openedx/venv/bin:${PATH} @@ -156,7 +147,6 @@ USER ${APP_USER_ID} # https://hub.docker.com/r/powerman/dockerize/tags COPY --link --from=docker.io/powerman/dockerize:0.19.0 /usr/local/bin/dockerize /usr/local/bin/dockerize COPY --chown=app:app --from=edx-platform / /openedx/edx-platform -COPY --chown=app:app --from=locales /openedx/locale /openedx/locale COPY --chown=app:app --from=python /opt/pyenv /opt/pyenv COPY --chown=app:app --from=python-requirements /openedx/venv /openedx/venv COPY --chown=app:app --from=python-requirements /mnt /mnt @@ -190,15 +180,10 @@ ENV REVISION_CFG /openedx/config/revisions.yml COPY --chown=app:app settings/lms/*.py ./lms/envs/tutor/ COPY --chown=app:app settings/cms/*.py ./cms/envs/tutor/ -# Copy user-specific locales to /openedx/locale/user/locale and compile them -RUN mkdir /openedx/locale/user -COPY --chown=app:app ./locale/ /openedx/locale/user/locale/ -RUN cd /openedx/locale/user && \ - django-admin compilemessages -v1 - -# Compile i18n strings: in some cases, js locales are not properly compiled out of the box -# and we need to do a pass ourselves. Also, we need to compile the djangojs.js files for -# the downloaded locales. +# Pull latest translations via atlas +RUN atlas pull --repository='{{ ATLAS_REPOSITORY }}' --branch='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} \ + translations/edx-platform/conf/locale:conf/locale +RUN ./manage.py lms --settings=tutor.i18n compilemessages -v1 RUN ./manage.py lms --settings=tutor.i18n compilejsi18n RUN ./manage.py cms --settings=tutor.i18n compilejsi18n diff --git a/tutor/templates/build/openedx/locale/customlocales.md b/tutor/templates/build/openedx/locale/customlocales.md deleted file mode 100644 index a098936305..0000000000 --- a/tutor/templates/build/openedx/locale/customlocales.md +++ /dev/null @@ -1,13 +0,0 @@ -Add your custom translations to this folder, with the following filesystem structure: - - languagecode/ - LC_MESSAGES/ - django.po - djangojs.po - -Where "languagecode" is one of "fr", "de_DE", "zh_CN", etc. - -The localized string in the *.po file should have the following format: - - msgid "String to translate" - msgstr "Your custom translation 你发音的东西 le bidule que vous voulez traduire" diff --git a/tutor/templates/build/openedx/settings/cms/assets.py b/tutor/templates/build/openedx/settings/cms/assets.py index 59b1dd0d30..914453dc4c 100644 --- a/tutor/templates/build/openedx/settings/cms/assets.py +++ b/tutor/templates/build/openedx/settings/cms/assets.py @@ -4,6 +4,3 @@ WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = STATIC_ROOT / "webpack-stats.json" derive_settings(__name__) - -LOCALE_PATHS.append("/openedx/locale/contrib/locale") -LOCALE_PATHS.append("/openedx/locale/user/locale") diff --git a/tutor/templates/build/openedx/settings/lms/assets.py b/tutor/templates/build/openedx/settings/lms/assets.py index 4cf476d1ca..b3f85deec4 100644 --- a/tutor/templates/build/openedx/settings/lms/assets.py +++ b/tutor/templates/build/openedx/settings/lms/assets.py @@ -4,6 +4,3 @@ WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = STATIC_ROOT / "webpack-stats.json" derive_settings(__name__) - -LOCALE_PATHS.append("/openedx/locale/contrib/locale") -LOCALE_PATHS.append("/openedx/locale/user/locale") diff --git a/tutor/templates/build/openedx/settings/partials/i18n.py b/tutor/templates/build/openedx/settings/partials/i18n.py index 708c2507e0..3ca5259847 100644 --- a/tutor/templates/build/openedx/settings/partials/i18n.py +++ b/tutor/templates/build/openedx/settings/partials/i18n.py @@ -14,7 +14,5 @@ derive_settings(__name__) -LOCALE_PATHS.append("/openedx/locale/contrib/locale") -LOCALE_PATHS.append("/openedx/locale/user/locale") {{ patch("openedx-common-i18n-settings") }} diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 9ab1967ada..d49ce62d88 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -2,6 +2,9 @@ # This file includes all Tutor setting defaults. Settings that do not have a # default value, such as passwords, should be stored in base.yml. # This must be defined early +ATLAS_REVISION: "{% if OPENEDX_COMMON_VERSION == 'master' %}main{% else %}{{ OPENEDX_COMMON_VERSION }}{% endif %}" +ATLAS_REPOSITORY: "openedx/openedx-translations" +ATLAS_OPTIONS: "" CADDY_HTTP_PORT: 80 CMS_HOST: "studio.{{ LMS_HOST }}" CMS_OAUTH2_KEY_SSO: "cms-sso" From 61dcbdc5c878e4d9b043e95e1aa2c3e68ad742a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 22 Jan 2024 11:17:26 +0100 Subject: [PATCH 05/20] fix: don't apply security fixes in nightly --- tutor/templates/build/openedx/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 0a296ba920..9010de195c 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -51,8 +51,6 @@ RUN git config --global user.email "tutor@overhang.io" \ {{ patch("openedx-dockerfile-git-patches-default") }} {%- else %} # Patch edx-platform -# XBlock JWT security fix https://github.com/openedx/edx-platform/pull/34047 -RUN curl -fsSL https://github.com/openedx/edx-platform/commit/89f5f69682a5e1422f89e867491e8974dd0a8208.patch | git am {%- endif %} {# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/.patch | git am #} From b2b373f534ce78f8c86bc3f5a4eac970505acc0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 9 Feb 2024 22:24:04 +0100 Subject: [PATCH 06/20] v17.0.2 --- CHANGELOG.md | 16 ++++++++++++++++ .../20240110_101228_kyle_importnewdemocourse.md | 7 ------- ...29_144929_kshitij_fix_tutor_docker_compose.md | 2 -- .../20240130_123351_regis_fix_save_on_plugins.md | 2 -- ..._153925_danyal.faheem_remove_pkg_resources.md | 1 - changelog.d/20240209_220759_regis.md | 1 - tutor/__about__.py | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) delete mode 100644 changelog.d/20240110_101228_kyle_importnewdemocourse.md delete mode 100644 changelog.d/20240129_144929_kshitij_fix_tutor_docker_compose.md delete mode 100644 changelog.d/20240130_123351_regis_fix_save_on_plugins.md delete mode 100644 changelog.d/20240202_153925_danyal.faheem_remove_pkg_resources.md delete mode 100644 changelog.d/20240209_220759_regis.md diff --git a/CHANGELOG.md b/CHANGELOG.md index f0146dfdec..11011201c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,22 @@ instructions, because git commits are used to generate release notes: + +## v17.0.2 (2024-02-09) + +- [Feature] Several enhancements to the Demo Course (by @kdmccormick): + - The [Open edX Demo Course](https://github.com/openedx/openedx-demo-course) has been re-built from scratch with up-to-date instruction-focused content. Its directory structure has changed. + - In order to support both the old and new structures of the Demo Course's repository, the command `tutor local do importdemocourse` will now auto-determine the course root based on the location of `course.xml`. Use the `--repo-dir` argument to override this behavior. + - The new command `tutor local do importdemolibraries` will import any content libraries defined within the Demo Course repository. At the moment, that is just the "Respiratory System Question Bank", which is an optional but helpful extension to the new Demo Course. + - To try out the new Demo Course now, run: `tutor local do importdemocourse --version master`. + - To try out the demo Respiratory System Question Bank now, run: `tutor local do importdemolibraries --version master`. + - To revert back to an older Demo Course version at any point, run: `tutor local do importdemocourse --version open-release/quince.2`, replacing `quince.2` with your preferred course version. +- [Bugfix] Remove duplicate volume declarations that cause `docker compose` v2.24.1 to fail. +- [Bugfix] Actually update the environment on `tutor plugins enable ...`. (by @regisb) +- [Feature] Introduce a `tutor.hooks.lru_cache` decorator that is automatically cleared whenever a plugin is loaded or unloaded. This is useful, in particular when a plugin implements a costly function that depends on tutor hooks. (by @regisb) +- [Bugfix] Fix compatibility with Python 3.12 by replacing pkg_resources with importlib_metadata and importlib_resources. (by @Danyal-Faheem) +- [Improvement] Upgrade base release to open-release/quince.2. (by @regisb) + ## v17.0.1 (2024-01-25) diff --git a/changelog.d/20240110_101228_kyle_importnewdemocourse.md b/changelog.d/20240110_101228_kyle_importnewdemocourse.md deleted file mode 100644 index 79a7d44b70..0000000000 --- a/changelog.d/20240110_101228_kyle_importnewdemocourse.md +++ /dev/null @@ -1,7 +0,0 @@ -- [Feature] Several enhancements to the Demo Course (by @kdmccormick): - - The [Open edX Demo Course](https://github.com/openedx/openedx-demo-course) has been re-built from scratch with up-to-date instruction-focused content. Its directory structure has changed. - - In order to support both the old and new structures of the Demo Course's repository, the command `tutor local do importdemocourse` will now auto-determine the course root based on the location of `course.xml`. Use the `--repo-dir` argument to override this behavior. - - The new command `tutor local do importdemolibraries` will import any content libraries defined within the Demo Course repository. At the moment, that is just the "Respiratory System Question Bank", which is an optional but helpful extension to the new Demo Course. - - To try out the new Demo Course now, run: `tutor local do importdemocourse --version master`. - - To try out the demo Respiratory System Question Bank now, run: `tutor local do importdemolibraries --version master`. - - To revert back to an older Demo Course version at any point, run: `tutor local do importdemocourse --version open-release/quince.2`, replacing `quince.2` with your preferred course version. diff --git a/changelog.d/20240129_144929_kshitij_fix_tutor_docker_compose.md b/changelog.d/20240129_144929_kshitij_fix_tutor_docker_compose.md deleted file mode 100644 index 4a9625ced2..0000000000 --- a/changelog.d/20240129_144929_kshitij_fix_tutor_docker_compose.md +++ /dev/null @@ -1,2 +0,0 @@ -- [Bugfix] Fixes duplicate volume declarations causing Tutor commands that - invoke Docker to fail. \ No newline at end of file diff --git a/changelog.d/20240130_123351_regis_fix_save_on_plugins.md b/changelog.d/20240130_123351_regis_fix_save_on_plugins.md deleted file mode 100644 index 164dd818c3..0000000000 --- a/changelog.d/20240130_123351_regis_fix_save_on_plugins.md +++ /dev/null @@ -1,2 +0,0 @@ -- [Bugfix] Actually update the environment on `tutor plugins enable ...`. (by @regisb) -- [Feature] Introduce a `tutor.hooks.lru_cache` decorator that is automatically cleared whenever a plugin is loaded or unloaded. This is useful, in particular when a plugin implements a costly function that depends on tutor hooks. (by @regisb) diff --git a/changelog.d/20240202_153925_danyal.faheem_remove_pkg_resources.md b/changelog.d/20240202_153925_danyal.faheem_remove_pkg_resources.md deleted file mode 100644 index d7cd4d9b8a..0000000000 --- a/changelog.d/20240202_153925_danyal.faheem_remove_pkg_resources.md +++ /dev/null @@ -1 +0,0 @@ -[Depreciation] Replace pkg_resources with importlib_metadata and importlib_resources. (by @Danyal-Faheem) \ No newline at end of file diff --git a/changelog.d/20240209_220759_regis.md b/changelog.d/20240209_220759_regis.md deleted file mode 100644 index bb40ed3119..0000000000 --- a/changelog.d/20240209_220759_regis.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Upgrade base release to open-release/quince.2. (by @regisb) diff --git a/tutor/__about__.py b/tutor/__about__.py index 3b0f631190..c49850aaad 100644 --- a/tutor/__about__.py +++ b/tutor/__about__.py @@ -2,7 +2,7 @@ # Increment this version number to trigger a new release. See # docs/tutor.html#versioning for information on the versioning scheme. -__version__ = "17.0.1" +__version__ = "17.0.2" # The version suffix will be appended to the actual version, separated by a # dash. Use this suffix to differentiate between the actual released version and From 116a8b9e5d36a063f0be3271a361459ae169e0f1 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Wed, 24 Jan 2024 08:07:25 +0300 Subject: [PATCH 07/20] feat: atlas pull for plugins and xblocks --- changelog.d/20240124_080753_i_plugins_xblocks.md | 1 + tutor/templates/build/openedx/Dockerfile | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20240124_080753_i_plugins_xblocks.md diff --git a/changelog.d/20240124_080753_i_plugins_xblocks.md b/changelog.d/20240124_080753_i_plugins_xblocks.md new file mode 100644 index 0000000000..652f5375c3 --- /dev/null +++ b/changelog.d/20240124_080753_i_plugins_xblocks.md @@ -0,0 +1 @@ +- [Feature] `atlas pull` translations for XBlocks and Plugins (by @OmarIthawi) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index c9d48530b4..ebefd7e019 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -186,8 +186,14 @@ COPY --chown=app:app settings/lms/*.py ./lms/envs/tutor/ COPY --chown=app:app settings/cms/*.py ./cms/envs/tutor/ # Pull latest translations via atlas -RUN atlas pull --repository='{{ ATLAS_REPOSITORY }}' --branch='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} \ - translations/edx-platform/conf/locale:conf/locale +RUN ./manage.py lms --settings=tutor.i18n pull_plugin_translations --verbose --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} +RUN ./manage.py lms --settings=tutor.i18n pull_xblock_translations --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} +RUN atlas pull --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} \ + translations/edx-platform/conf/locale:conf/locale \ + translations/studio-frontend/src/i18n/messages:conf/plugins-locale/studio-frontend +RUN ./manage.py lms --settings=tutor.i18n compile_xblock_translations +RUN ./manage.py cms --settings=tutor.i18n compile_xblock_translations +RUN ./manage.py lms --settings=tutor.i18n compile_plugin_translations RUN ./manage.py lms --settings=tutor.i18n compilemessages -v1 RUN ./manage.py lms --settings=tutor.i18n compilejsi18n RUN ./manage.py cms --settings=tutor.i18n compilejsi18n From ab2689a3fb63817d248c0a06f8b310cbb8f03a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 10 Apr 2024 11:25:09 +0200 Subject: [PATCH 08/20] chore: upgrade to node 18 in edx-platform 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: 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) --- changelog.d/20240410_102248_regis_node18.md | 1 + tutor/templates/build/openedx/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20240410_102248_regis_node18.md diff --git a/changelog.d/20240410_102248_regis_node18.md b/changelog.d/20240410_102248_regis_node18.md new file mode 100644 index 0000000000..17308dfb30 --- /dev/null +++ b/changelog.d/20240410_102248_regis_node18.md @@ -0,0 +1 @@ +- [Improvement] Upgrade Nodejs from 16.14.0 to 18.20.1 in edx-platform. (by @regisb) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index ebefd7e019..bb66c511a9 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -122,7 +122,7 @@ ENV PATH /openedx/nodeenv/bin:/openedx/venv/bin:${PATH} # https://github.com/openedx/edx-platform/blob/master/requirements/edx/base.txt # https://github.com/pyenv/pyenv/releases RUN pip install nodeenv==1.8.0 -RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt +RUN nodeenv /openedx/nodeenv --node=18.20.1 --prebuilt # Install nodejs requirements ARG NPM_REGISTRY={{ NPM_REGISTRY }} From b1ffba23c93696b845673a403903c19a4920744c Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Thu, 11 Apr 2024 14:47:20 -0400 Subject: [PATCH 09/20] Revert "chore: upgrade to node 18 in edx-platform" (#1040) This reverts commit ab2689a3fb63817d248c0a06f8b310cbb8f03a52, as the upstream Node upgrade was reverted: https://github.com/openedx/edx-platform/pull/34496 --- changelog.d/20240410_102248_regis_node18.md | 1 - tutor/templates/build/openedx/Dockerfile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 changelog.d/20240410_102248_regis_node18.md diff --git a/changelog.d/20240410_102248_regis_node18.md b/changelog.d/20240410_102248_regis_node18.md deleted file mode 100644 index 17308dfb30..0000000000 --- a/changelog.d/20240410_102248_regis_node18.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Upgrade Nodejs from 16.14.0 to 18.20.1 in edx-platform. (by @regisb) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index bb66c511a9..ebefd7e019 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -122,7 +122,7 @@ ENV PATH /openedx/nodeenv/bin:/openedx/venv/bin:${PATH} # https://github.com/openedx/edx-platform/blob/master/requirements/edx/base.txt # https://github.com/pyenv/pyenv/releases RUN pip install nodeenv==1.8.0 -RUN nodeenv /openedx/nodeenv --node=18.20.1 --prebuilt +RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt # Install nodejs requirements ARG NPM_REGISTRY={{ NPM_REGISTRY }} From 21e32fc3904e1f6bba013d666c4f4b640c6c4985 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Tue, 23 Apr 2024 12:22:16 -0400 Subject: [PATCH 10/20] revert: revert: chore: upgrade to node 18 in edx-platform This reverts commit b1ffba23c93696b845673a403903c19a4920744c, restoring the Node 16->18 upgrade. Upstream PR: https://github.com/openedx/edx-platform/pull/34503 --- changelog.d/20240410_102248_regis_node18.md | 1 + tutor/templates/build/openedx/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20240410_102248_regis_node18.md diff --git a/changelog.d/20240410_102248_regis_node18.md b/changelog.d/20240410_102248_regis_node18.md new file mode 100644 index 0000000000..17308dfb30 --- /dev/null +++ b/changelog.d/20240410_102248_regis_node18.md @@ -0,0 +1 @@ +- [Improvement] Upgrade Nodejs from 16.14.0 to 18.20.1 in edx-platform. (by @regisb) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index ebefd7e019..bb66c511a9 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -122,7 +122,7 @@ ENV PATH /openedx/nodeenv/bin:/openedx/venv/bin:${PATH} # https://github.com/openedx/edx-platform/blob/master/requirements/edx/base.txt # https://github.com/pyenv/pyenv/releases RUN pip install nodeenv==1.8.0 -RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt +RUN nodeenv /openedx/nodeenv --node=18.20.1 --prebuilt # Install nodejs requirements ARG NPM_REGISTRY={{ NPM_REGISTRY }} From 943bee6cbe96821ef6e25f5613b5b5ef49059e09 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Thu, 25 Apr 2024 23:12:41 -0700 Subject: [PATCH 11/20] docs: improve the "Working on edx-platform Python dependencies" section (#1048) --- .../20240425_105236_braden_bind_mount_docs.md | 1 + docs/tutorials/edx-platform.rst | 26 ++++++++++--------- tutor/plugins/openedx.py | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 changelog.d/20240425_105236_braden_bind_mount_docs.md diff --git a/changelog.d/20240425_105236_braden_bind_mount_docs.md b/changelog.d/20240425_105236_braden_bind_mount_docs.md new file mode 100644 index 0000000000..9b24a89e1e --- /dev/null +++ b/changelog.d/20240425_105236_braden_bind_mount_docs.md @@ -0,0 +1 @@ +- [Improvement] Auto-detect bind mounts of openedx-learning for edx-platform (by @bradenmacdonald) diff --git a/docs/tutorials/edx-platform.rst b/docs/tutorials/edx-platform.rst index 6a6aba10b7..afc39002cd 100644 --- a/docs/tutorials/edx-platform.rst +++ b/docs/tutorials/edx-platform.rst @@ -100,6 +100,8 @@ Verify that your repository is properly bind-mounted by running ``tutor mounts l - service: cms-job container_path: /mnt/edx-ora2 +(If the ``_mounts`` entries are empty, it didn't work automatically - see below.) + You should then re-build the "openedx" Docker image to pick up your changes:: tutor images build openedx-dev @@ -111,6 +113,18 @@ To push your changes in production, you should do the same with ``tutor local`` tutor images build openedx tutor local start -d +What if my edx-platform package is not automatically bind-mounted? +------------------------------------------------------------------ + +It is quite possible that your package is not automatically recognized and bind-mounted by Tutor. Out of the box, Tutor defines a set of regular expressions: if your package name matches this regular expression, it will be automatically bind-mounted. But if it does not, you have to tell Tutor about it. + +To do so, you will need to create a :ref:`Tutor plugin ` that implements the :py:data:`tutor.hooks.Filters.MOUNTED_DIRECTORIES` filter:: + + from tutor import hooks + hooks.Filters.MOUNTED_DIRECTORIES.add_item(("openedx", "my-package")) + +After you implement and enable that plugin, ``tutor mounts list`` should display your directory among the bind-mounted directories. + Debugging with breakpoints -------------------------- @@ -153,18 +167,6 @@ Then, run unit tests with ``pytest`` commands:: .. note:: Getting all edx-platform unit tests to pass on Tutor is currently a work-in-progress. Some unit tests are still failing. If you manage to fix some of these, please report your findings in the `Open edX forum `__. -What if my edx-platform package is not automatically bind-mounted? ------------------------------------------------------------------- - -It is quite possible that your package is not automatically recognized and bind-mounted by Tutor. Out of the box, Tutor defines a set of regular expressions: if your package name matches this regular expression, it will be automatically bind-mounted. But if it does not, you have to tell Tutor about it. - -To do so, you will need to create a :ref:`Tutor plugin ` that implements the :py:data:`tutor.hooks.Filters.MOUNTED_DIRECTORIES` filter:: - - from tutor import hooks - hooks.Filters.MOUNTED_DIRECTORIES.add_item(("openedx", "my-package")) - -After you implement and enable that plugin, ``tutor mounts list`` should display your directory among the bind-mounted directories. - Do I have to re-build the "openedx" Docker image after every change? -------------------------------------------------------------------- diff --git a/tutor/plugins/openedx.py b/tutor/plugins/openedx.py index 284d53f1aa..2984d60792 100644 --- a/tutor/plugins/openedx.py +++ b/tutor/plugins/openedx.py @@ -65,6 +65,7 @@ def _mount_edx_platform_compose( ("openedx", "edx-enterprise"), ("openedx", "edx-ora2"), ("openedx", "edx-search"), + ("openedx", "openedx-learning"), ("openedx", r"platform-plugin-.*"), ] ) From db6f4d18cecbc3da91c457e06db3c18a1929ee16 Mon Sep 17 00:00:00 2001 From: Syed Muhammad Dawoud Sheraz Ali <40599381+DawoudSheraz@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:04:58 +0500 Subject: [PATCH 12/20] FEAT!: upgrade mongo to v7 (#1029) * FEAT!: upgrade mongo to v7 --- ...40329_164354_dawoud.sheraz_mongo_update.md | 10 ++++++++++ docs/configuration.rst | 2 +- tutor/commands/upgrade/common.py | 19 +++++++++++++++++++ tutor/commands/upgrade/compose.py | 18 ++++++++++++++++-- tutor/commands/upgrade/k8s.py | 17 ++++++++++++++++- tutor/templates/config/defaults.yml | 2 +- tutor/templates/k8s/deployments.yml | 2 +- tutor/templates/local/docker-compose.yml | 2 +- 8 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md diff --git a/changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md b/changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md new file mode 100644 index 0000000000..3dcd45f4e0 --- /dev/null +++ b/changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md @@ -0,0 +1,10 @@ +- 💥[Feature] Update MongoDB to v7.0.7 (by @dawoudsheraz) + + MongoDB is updating from 4.4 to 7. Since there have been major releases since 4.4, the upgrade would need to go through them before running Mongo 7. Mongo would need to follow 4.4 --> 5.0 --> 6.0 --> 7.0 upgrade path to work correctly. + The container will keep on restarting with featureCompatibility error if the upgrade path is not followed. + + To upgrade mongo, run the following command based in the appropriate environment: + ``` + tutor upgrade --from=quince + ``` + For k8s only, the above command will not perform the upgrade automatically. Instead, the command will output a series of commands that would need to be run manually to carry out the upgrade. \ No newline at end of file diff --git a/docs/configuration.rst b/docs/configuration.rst index 5edf0061d0..e27c6a58ec 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -75,7 +75,7 @@ This configuration parameter defines which Caddy Docker image to use. This configuration parameter defines which Elasticsearch Docker image to use. -- ``DOCKER_IMAGE_MONGODB`` (default: ``"docker.io/mongo:4.4.22"``) +- ``DOCKER_IMAGE_MONGODB`` (default: ``"docker.io/mongo:7.0.7"``) This configuration parameter defines which MongoDB Docker image to use. diff --git a/tutor/commands/upgrade/common.py b/tutor/commands/upgrade/common.py index 0b50f3eeb7..e641a77001 100644 --- a/tutor/commands/upgrade/common.py +++ b/tutor/commands/upgrade/common.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import click from tutor import config as tutor_config @@ -41,6 +43,23 @@ def upgrade_from_nutmeg(context: click.Context, config: Config) -> None: ) +def get_mongo_upgrade_parameters( + docker_version: str, compatibility_version: str +) -> tuple[int, dict[str, int | str]]: + """ + Helper utility to get parameters required during mongo upgrade. + """ + mongo_version = int(docker_version.split(".")[0]) + admin_command: dict[str, int | str] = { + "setFeatureCompatibilityVersion": compatibility_version + } + if mongo_version == 7: + # Explicit confirmation is required to upgrade to 7 from 6 + # https://www.mongodb.com/docs/manual/reference/command/setFeatureCompatibilityVersion/#confirm + admin_command.update({"confirm": 1}) + return mongo_version, admin_command + + PALM_RENAME_ORA2_FOLDER_COMMAND = """ if stat '/openedx/data/ora2/SET-ME-PLEASE (ex. bucket-name)' 2> /dev/null; then echo "Renaming ora2 folder..." diff --git a/tutor/commands/upgrade/compose.py b/tutor/commands/upgrade/compose.py index 7aef353bda..b23f3e7058 100644 --- a/tutor/commands/upgrade/compose.py +++ b/tutor/commands/upgrade/compose.py @@ -46,6 +46,9 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "palm": running_release = "quince" + if running_release == "quince": + upgrade_from_quince(context, config) + def upgrade_from_ironwood(context: click.Context, config: Config) -> None: click.echo(fmt.title("Upgrading from Ironwood")) @@ -155,6 +158,13 @@ def upgrade_from_olive(context: click.Context, config: Config) -> None: upgrade_mongodb(context, config, "4.4.22", "4.4") +def upgrade_from_quince(context: click.Context, config: Config) -> None: + click.echo(fmt.title("Upgrading from Quince")) + upgrade_mongodb(context, config, "5.0.26", "5.0") + upgrade_mongodb(context, config, "6.0.14", "6.0") + upgrade_mongodb(context, config, "7.0.7", "7.0") + + def upgrade_mongodb( context: click.Context, config: Config, @@ -168,7 +178,11 @@ def upgrade_mongodb( ) return + mongo_version, admin_command = common_upgrade.get_mongo_upgrade_parameters( + to_docker_version, to_compatibility_version + ) click.echo(fmt.title(f"Upgrading MongoDb to v{to_docker_version}")) + # Note that the DOCKER_IMAGE_MONGODB value is never saved, because we only save the # environment, not the configuration. config["DOCKER_IMAGE_MONGODB"] = f"mongo:{to_docker_version}" @@ -180,9 +194,9 @@ def upgrade_mongodb( compose.execute, args=[ "mongodb", - "mongo", + "mongosh" if mongo_version >= 6 else "mongo", "--eval", - f'db.adminCommand({{ setFeatureCompatibilityVersion: "{to_compatibility_version}" }})', + f"db.adminCommand({admin_command})", ], ) context.invoke(compose.stop) diff --git a/tutor/commands/upgrade/k8s.py b/tutor/commands/upgrade/k8s.py index 64cebaf354..19e81243cc 100644 --- a/tutor/commands/upgrade/k8s.py +++ b/tutor/commands/upgrade/k8s.py @@ -45,6 +45,9 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "palm": running_release = "quince" + if running_release == "quince": + upgrade_from_quince(config) + def upgrade_from_ironwood(config: Config) -> None: upgrade_mongodb(config, "3.4.24", "3.4") @@ -162,6 +165,13 @@ def upgrade_from_olive(context: Context, config: Config) -> None: upgrade_mongodb(config, "4.4.22", "4.4") +def upgrade_from_quince(config: Config) -> None: + click.echo(fmt.title("Upgrading from Quince")) + upgrade_mongodb(config, "5.0.26", "5.0") + upgrade_mongodb(config, "6.0.14", "6.0") + upgrade_mongodb(config, "7.0.7", "7.0") + + def upgrade_mongodb( config: Config, to_docker_version: str, to_compatibility_version: str ) -> None: @@ -171,13 +181,18 @@ def upgrade_mongodb( "responsibility to upgrade your MongoDb instance to {to_docker_version}." ) return + mongo_version, admin_command = common_upgrade.get_mongo_upgrade_parameters( + to_docker_version, to_compatibility_version + ) + mongo_binary = "mongosh" if mongo_version >= 6 else "mongo" + message = f"""Automatic release upgrade is unsupported in Kubernetes. You should manually upgrade your MongoDb cluster to {to_docker_version} by running something similar to: tutor k8s stop tutor config save --set DOCKER_IMAGE_MONGODB=mongo:{to_docker_version} tutor k8s start - tutor k8s exec mongodb mongo --eval 'db.adminCommand({{ setFeatureCompatibilityVersion: "{to_compatibility_version}" }})' + tutor k8s exec mongodb {mongo_binary} --eval 'db.adminCommand({admin_command})' tutor config save --unset DOCKER_IMAGE_MONGODB """ fmt.echo_info(message) diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 4de92875aa..70726bfc6f 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -20,7 +20,7 @@ DOCKER_IMAGE_CADDY: "docker.io/caddy:2.7.4" # https://hub.docker.com/_/elasticsearch/tags DOCKER_IMAGE_ELASTICSEARCH: "docker.io/elasticsearch:7.17.13" # https://hub.docker.com/_/mongo/tags -DOCKER_IMAGE_MONGODB: "docker.io/mongo:4.4.25" +DOCKER_IMAGE_MONGODB: "docker.io/mongo:7.0.7" # https://hub.docker.com/_/mysql/tags DOCKER_IMAGE_MYSQL: "docker.io/mysql:8.1.0" DOCKER_IMAGE_PERMISSIONS: "{{ DOCKER_REGISTRY }}overhangio/openedx-permissions:{{ TUTOR_VERSION }}" diff --git a/tutor/templates/k8s/deployments.yml b/tutor/templates/k8s/deployments.yml index a48740baf3..5deaec4300 100644 --- a/tutor/templates/k8s/deployments.yml +++ b/tutor/templates/k8s/deployments.yml @@ -352,7 +352,7 @@ spec: containers: - name: mongodb image: {{ DOCKER_IMAGE_MONGODB }} - args: ["mongod", "--nojournal", "--storageEngine", "wiredTiger"] + args: ["mongod", "--storageEngine", "wiredTiger"] ports: - containerPort: 27017 volumeMounts: diff --git a/tutor/templates/local/docker-compose.yml b/tutor/templates/local/docker-compose.yml index 5580cbae97..c3b83428a1 100644 --- a/tutor/templates/local/docker-compose.yml +++ b/tutor/templates/local/docker-compose.yml @@ -28,7 +28,7 @@ services: mongodb: image: {{ DOCKER_IMAGE_MONGODB }} # Use WiredTiger in all environments, just like at edx.org - command: mongod --nojournal --storageEngine wiredTiger + command: mongod --storageEngine wiredTiger restart: unless-stopped user: "999:999" volumes: From c3d35af807f2203dd9ea59856439e7621d432b23 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Wed, 8 May 2024 16:31:02 -0400 Subject: [PATCH 13/20] fix: allow course import from Course Authoring MFE (#1063) Remove CORS_ALLOW_HEADERS setting from the LMS/Studio config template. This setting, which holds site-agnostic application logic, is now consistently set to a reasonable value upstream by LMS and CMS config. Using the upstream values fixes a bug where course import in Studio using the new Course Authoring MFE was broken in Tutor deployments because it required additional headers to be allowed (content-range and content-disposition) Co-authored-by: Kyle McCormick --- changelog.d/20240508_111720_dave_fix_cors_headers.md | 1 + tutor/templates/apps/openedx/settings/partials/common_all.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20240508_111720_dave_fix_cors_headers.md diff --git a/changelog.d/20240508_111720_dave_fix_cors_headers.md b/changelog.d/20240508_111720_dave_fix_cors_headers.md new file mode 100644 index 0000000000..5af383eb36 --- /dev/null +++ b/changelog.d/20240508_111720_dave_fix_cors_headers.md @@ -0,0 +1 @@ +- [Bugfix] Remove CORS_ALLOW_HEADERS setting from the LMS/Studio config template. This setting, which holds site-agnostic application logic, is now consistently set to a reasonable value upstream by LMS and CMS config. Using the upstream values fixes a bug where course import in Studio using the new Course Authoring MFE was broken in Tutor deployments because it required additional headers to be allowed (content-range and content-disposition) (by @ormsbee) diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index 9113c62dfe..c317f4c06f 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -230,7 +230,8 @@ CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_ALLOW_ALL = False CORS_ALLOW_INSECURE = {% if ENABLE_HTTPS %}False{% else %}True{% endif %} -CORS_ALLOW_HEADERS = corsheaders_default_headers + ('use-jwt-cookie',) +# Note: CORS_ALLOW_HEADERS is intentionally not defined here, because it should +# be consistent across deployments, and is therefore set in edx-platform. # Add your MFE and third-party app domains here CORS_ORIGIN_WHITELIST = [] From c7b4327c52001c8c2b94284027a3ab3c4ade1a8b Mon Sep 17 00:00:00 2001 From: Syed Muhammad Dawoud Sheraz Ali <40599381+DawoudSheraz@users.noreply.github.com> Date: Thu, 9 May 2024 12:55:38 +0500 Subject: [PATCH 14/20] feat: upgrade Open edX image to Python 3.11 (#1056) --- changelog.d/20240502_200434_dawoud.sheraz_py311.md | 1 + tutor/templates/build/openedx/Dockerfile | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 changelog.d/20240502_200434_dawoud.sheraz_py311.md diff --git a/changelog.d/20240502_200434_dawoud.sheraz_py311.md b/changelog.d/20240502_200434_dawoud.sheraz_py311.md new file mode 100644 index 0000000000..e0986615cf --- /dev/null +++ b/changelog.d/20240502_200434_dawoud.sheraz_py311.md @@ -0,0 +1 @@ +- [Feature] Upgrade Open edX image to use Python 3.11 (by @dawoudsheraz) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index bb66c511a9..0024a219a1 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -24,9 +24,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ # Install pyenv # https://www.python.org/downloads/ # https://github.com/pyenv/pyenv/releases -ARG PYTHON_VERSION=3.8.18 +ARG PYTHON_VERSION=3.11.8 ENV PYENV_ROOT /opt/pyenv -RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.29 --depth 1 +RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1 # Install Python RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION @@ -89,7 +89,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ # https://pypi.org/project/setuptools/ # https://pypi.org/project/pip/ # https://pypi.org/project/wheel/ - setuptools==68.2.2 pip==23.2.1. wheel==0.41.2 + setuptools==69.1.1 pip==24.0 wheel==0.43.0 # Install base requirements RUN --mount=type=bind,from=edx-platform,source=/requirements/edx/base.txt,target=/openedx/edx-platform/requirements/edx/base.txt \ @@ -102,7 +102,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ # Use redis as a django cache https://pypi.org/project/django-redis/ django-redis==5.4.0 \ # uwsgi server https://pypi.org/project/uWSGI/ - uwsgi==2.0.22 + uwsgi==2.0.24 {{ patch("openedx-dockerfile-post-python-requirements") }} @@ -120,7 +120,6 @@ ENV PATH /openedx/nodeenv/bin:/openedx/venv/bin:${PATH} # Install nodeenv with the version provided by edx-platform # https://github.com/openedx/edx-platform/blob/master/requirements/edx/base.txt -# https://github.com/pyenv/pyenv/releases RUN pip install nodeenv==1.8.0 RUN nodeenv /openedx/nodeenv --node=18.20.1 --prebuilt @@ -260,9 +259,9 @@ USER app RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ pip install -r requirements/edx/development.txt # https://pypi.org/project/ipdb/ -# https://pypi.org/project/ipython (8.12.x for Python 3.8) +# https://pypi.org/project/ipython (>=Python 3.10 started with 8.20) RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ - pip install ipdb==0.13.13 ipython==8.12.3 + pip install ipdb==0.13.13 ipython==8.24.0 {# Re-install mounted requirements, otherwise they will be superseded by upstream reqs #} {% for name in iter_mounted_directories(MOUNTS, "openedx") %} From c84a741edc213fb2691a20bf27675b8e8bb1ce76 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Thu, 16 May 2024 15:09:15 -0400 Subject: [PATCH 15/20] feat!: remove dependency on Paver scripts (#1042) BREAKING CHANGE: `openedx-assets` is replaed with `npm run` subcommands. For details, see the changelog entry. For further details and rationale, see the upstream DEPR ticket: https://github.com/openedx/edx-platform/issues/31895 --- .../20240318_154804_kyle_assets_build.md | 21 ++ docs/__init__.py | 0 docs/dev.rst | 4 +- .../templates/apps/openedx/config/cms.env.yml | 2 - .../templates/apps/openedx/config/lms.env.yml | 2 - .../openedx/settings/partials/common_cms.py | 2 +- .../openedx/settings/partials/common_lms.py | 2 +- tutor/templates/build/openedx/Dockerfile | 41 ++-- .../build/openedx/bin/openedx-assets | 218 ------------------ .../build/openedx/settings/cms/assets.py | 3 +- .../build/openedx/settings/lms/assets.py | 3 +- .../build/openedx/settings/partials/assets.py | 3 - .../build/openedx/settings/partials/i18n.py | 2 - tutor/templates/dev/docker-compose.yml | 2 +- .../jobs/init/mounted-directories.sh | 2 +- 15 files changed, 49 insertions(+), 258 deletions(-) create mode 100644 changelog.d/20240318_154804_kyle_assets_build.md create mode 100644 docs/__init__.py delete mode 100755 tutor/templates/build/openedx/bin/openedx-assets diff --git a/changelog.d/20240318_154804_kyle_assets_build.md b/changelog.d/20240318_154804_kyle_assets_build.md new file mode 100644 index 0000000000..de11359740 --- /dev/null +++ b/changelog.d/20240318_154804_kyle_assets_build.md @@ -0,0 +1,21 @@ +- 💥[Feature] The `openedx-assets` command is replaced with `npm run` subcommands. + This will slightly reduce the build time for edx-platform assets and comprehensive themes. + It will also open up the door for more significant build time reductions in the future. + Here is a migration guide, where each command is to be run in the `lms` or `cms` container. + + **Before** | **After** + -----------------------------------------|------------------------------------------------------------------------------------- + `openedx-assets build --env=prod ARGS` | `npm run build -- ARGS` + `openedx-assets build --env=dev ARGS` | `npm run build-dev -- ARGS` + `openedx-assets common --env=prod ARGS` | `npm run compile-sass -- --skip-themes ARGS` + `openedx-assets common --env=dev ARGS` | `npm run compile-sass-dev -- --skip-themes ARGS` + `openedx-assets webpack --env=prod ARGS` | `npm run webpack -- ARGS` + `openedx-assets webpack --env=dev ARGS` | `npm run webpack-dev -- ARGS` + `openedx-assets npm` | `npm run postinstall` (`npm clean-install` runs this automatically) + `openedx-assets xmodule` | (no longer necessary) + `openedx-assets collect ARGS` | `./manage.py lms collectstatic --noinput ARGS && ./manage.py cms collectstatic ARGS` + `openedx-assets watch-themes ARGS` | `npm run watch-themes -- ARGS` + + For more details, see the [deprecation notice for paver](https://github.com/openedx/edx-platform/issues/34467) + and the [static assets reference](https://github.com/openedx/edx-platform/tree/open-release/redwood.master/docs/references/static-assets.rst) + in edx-platform. diff --git a/docs/__init__.py b/docs/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/dev.rst b/docs/dev.rst index 6b1f1975bf..216dfb3819 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -99,9 +99,9 @@ To open a python shell in the LMS or CMS, run:: You can then import edx-platform and django modules and execute python code. -To rebuild assets, you can use the ``openedx-assets`` command that ships with Tutor:: +To rebuild assets, you can run the ``build-dev`` NPM script that comes with edx-plaform:: - tutor dev run lms openedx-assets build --env=dev + tutor dev run lms npm run build-dev .. _specialized for developer usage: diff --git a/tutor/templates/apps/openedx/config/cms.env.yml b/tutor/templates/apps/openedx/config/cms.env.yml index c062b2c230..53e99b0c2d 100644 --- a/tutor/templates/apps/openedx/config/cms.env.yml +++ b/tutor/templates/apps/openedx/config/cms.env.yml @@ -27,8 +27,6 @@ CELERY_BROKER_USER: "{{ REDIS_USERNAME }}" CELERY_BROKER_PASSWORD: "{{ REDIS_PASSWORD }}" ALTERNATE_WORKER_QUEUES: "lms" ENABLE_COMPREHENSIVE_THEMING: true -COMPREHENSIVE_THEME_DIRS: ["/openedx/themes"] -STATIC_ROOT_BASE: "/openedx/staticfiles" EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend" EMAIL_HOST: "{{ SMTP_HOST }}" EMAIL_PORT: {{ SMTP_PORT }} diff --git a/tutor/templates/apps/openedx/config/lms.env.yml b/tutor/templates/apps/openedx/config/lms.env.yml index a1f93eb9a5..565820c81b 100644 --- a/tutor/templates/apps/openedx/config/lms.env.yml +++ b/tutor/templates/apps/openedx/config/lms.env.yml @@ -33,8 +33,6 @@ CELERY_BROKER_USER: "{{ REDIS_USERNAME }}" CELERY_BROKER_PASSWORD: "{{ REDIS_PASSWORD }}" ALTERNATE_WORKER_QUEUES: "cms" ENABLE_COMPREHENSIVE_THEMING: true -COMPREHENSIVE_THEME_DIRS: ["/openedx/themes"] -STATIC_ROOT_BASE: "/openedx/staticfiles" EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend" EMAIL_HOST: "{{ SMTP_HOST }}" EMAIL_PORT: {{ SMTP_PORT }} diff --git a/tutor/templates/apps/openedx/settings/partials/common_cms.py b/tutor/templates/apps/openedx/settings/partials/common_cms.py index 1b2f48a2f9..c5dde04400 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_cms.py +++ b/tutor/templates/apps/openedx/settings/partials/common_cms.py @@ -21,7 +21,7 @@ FRONTEND_REGISTER_URL = LMS_ROOT_URL + '/register' # Create folders if necessary -for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]: +for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT, ORA2_FILEUPLOAD_ROOT]: if not os.path.exists(folder): os.makedirs(folder, exist_ok=True) diff --git a/tutor/templates/apps/openedx/settings/partials/common_lms.py b/tutor/templates/apps/openedx/settings/partials/common_lms.py index e3b86492e0..1a06d613c2 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_lms.py +++ b/tutor/templates/apps/openedx/settings/partials/common_lms.py @@ -38,7 +38,7 @@ } # Create folders if necessary -for folder in [DATA_DIR, LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]: +for folder in [DATA_DIR, LOG_DIR, MEDIA_ROOT, STATIC_ROOT, ORA2_FILEUPLOAD_ROOT]: if not os.path.exists(folder): os.makedirs(folder, exist_ok=True) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 0024a219a1..dfce1fc9a5 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -162,6 +162,10 @@ RUN ln -s /openedx/node_modules /openedx/edx-platform/node_modules ENV PATH /openedx/venv/bin:./node_modules/.bin:/openedx/nodeenv/bin:${PATH} ENV VIRTUAL_ENV /openedx/venv/ +ENV COMPREHENSIVE_THEME_DIRS /openedx/themes +ENV STATIC_ROOT_LMS /openedx/staticfiles +ENV STATIC_ROOT_CMS /openedx/staticfiles/studio + WORKDIR /openedx/edx-platform {# Install auto-mounted directories as Python packages. #} @@ -204,27 +208,22 @@ ENV PATH /openedx/bin:${PATH} {{ patch("openedx-dockerfile-pre-assets") }} -# Collect production assets. By default, only assets from the default theme +# Build & collect production assets. By default, only assets from the default theme # will be processed. This makes the docker image lighter and faster to build. -# Only the custom themes added to /openedx/themes will be compiled. -# Here, we don't run "paver update_assets" which is slow, compiles all themes -# and requires a complex settings file. Instead, we decompose the commands -# and run each one individually to collect the production static assets to -# /openedx/staticfiles. -ENV NO_PYTHON_UNINSTALL 1 -ENV NO_PREREQ_INSTALL 1 -# We need to rely on a separate openedx-assets command to accelerate asset processing. -# For instance, we don't want to run all steps of asset collection every time the theme -# is modified. -RUN openedx-assets xmodule \ - && openedx-assets npm \ - && openedx-assets webpack --env=prod \ - && openedx-assets common -COPY --chown=app:app ./themes/ /openedx/themes/ -RUN openedx-assets themes \ - && openedx-assets collect --settings=tutor.assets \ - # De-duplicate static assets with symlinks - && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/ +RUN npm run postinstall # Postinstall artifacts are stuck in nodejs-requirements layer. Create them here too. +RUN npm run compile-sass -- --skip-themes +RUN npm run webpack + +# Now that the default theme is built, build any custom themes +COPY --chown=app:app ./themes/ /openedx/themes +RUN npm run compile-sass -- --skip-default + +# and finally, collect assets for the production image, +# de-duping assets with symlinks. +RUN ./manage.py lms collectstatic --noinput --settings=tutor.assets && \ + ./manage.py cms collectstatic --noinput --settings=tutor.assets && \ + # De-duplicate static assets with symlinks \ + rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/ # Create a data directory, which might be used (or not) RUN mkdir /openedx/data @@ -277,7 +276,7 @@ ENV PYTHONBREAKPOINT=ipdb.set_trace # static assets, then production assets will be served instead. RUN rm -r /openedx/staticfiles && \ mkdir /openedx/staticfiles && \ - openedx-assets webpack --env=dev + npm run build-dev {{ patch("openedx-dev-dockerfile-post-python-requirements") }} diff --git a/tutor/templates/build/openedx/bin/openedx-assets b/tutor/templates/build/openedx/bin/openedx-assets deleted file mode 100755 index 1b89434d67..0000000000 --- a/tutor/templates/build/openedx/bin/openedx-assets +++ /dev/null @@ -1,218 +0,0 @@ -#! /usr/bin/env python -from __future__ import print_function -import argparse -import os -import subprocess -import sys -import traceback - -from path import Path - -from pavelib import assets - - -DEFAULT_STATIC_ROOT = "/openedx/staticfiles" -DEFAULT_THEMES_DIR = "/openedx/themes" - - -def main(): - parser = argparse.ArgumentParser( - description="Various assets processing/building/collection utility for Open edX" - ) - subparsers = parser.add_subparsers() - - npm = subparsers.add_parser("npm", help="Copy static assets from node_modules") - npm.set_defaults(func=run_npm) - - build = subparsers.add_parser("build", help="Build all assets") - build.add_argument("-e", "--env", choices=["prod", "dev"], default="prod") - build.add_argument("--theme-dirs", nargs="+", default=[DEFAULT_THEMES_DIR]) - build.add_argument("--themes", nargs="+", default=["all"]) - build.add_argument("-r", "--static-root", default=DEFAULT_STATIC_ROOT) - build.add_argument("--systems", nargs="+", default=["lms", "cms"]) - build.set_defaults(func=run_build) - - xmodule = subparsers.add_parser("xmodule", help="Process assets from xmodule") - xmodule.set_defaults(func=run_xmodule) - - webpack = subparsers.add_parser("webpack", help="Run webpack") - webpack.add_argument("-r", "--static-root", default=DEFAULT_STATIC_ROOT) - webpack.add_argument("-e", "--env", choices=["prod", "dev"], default="prod") - webpack.set_defaults(func=run_webpack) - - common = subparsers.add_parser( - "common", help="Compile static assets for common theme" - ) - common.add_argument("--systems", nargs="+", default=["lms", "cms"]) - common.set_defaults(func=run_common) - - themes = subparsers.add_parser( - "themes", help="Compile static assets for custom themes" - ) - themes.add_argument("--theme-dirs", nargs="+", default=[DEFAULT_THEMES_DIR]) - themes.add_argument("--themes", nargs="+", default=["all"]) - themes.add_argument("--systems", nargs="+", default=["lms", "cms"]) - themes.set_defaults(func=run_themes) - - collect = subparsers.add_parser( - "collect", help="Collect static assets to be served by webserver" - ) - collect.add_argument( - "-s", - "--settings", - default="tutor.assets", - help="Django settings module", - ) - collect.add_argument( - "--systems", - nargs="+", - choices=["lms", "cms"], - default=["lms", "cms"], - help="Limit collection to lms or cms", - ) - collect.set_defaults(func=run_collect) - - watch_themes = subparsers.add_parser( - "watch-themes", help="Watch theme assets for changes and recompile on-the-fly" - ) - watch_themes.add_argument( - "-e", - "--env", - choices=["prod", "dev"], - default="prod", - help="Webpack target to run", - ) - watch_themes.add_argument("--theme-dirs", default=[DEFAULT_THEMES_DIR]) - watch_themes.set_defaults(func=run_watch_themes) - - args = parser.parse_args() - args.func(args) - - -def run_build(args): - run_xmodule(args) - run_npm(args) - run_webpack(args) - run_common(args) - run_themes(args) - - -def run_xmodule(_args): - # Collecting xmodule assets is incompatible with setting the django path, because - # of an unfortunate call to settings.configure() - django_settings_module = os.environ.get("DJANGO_SETTINGS_MODULE") - if django_settings_module: - os.environ.pop("DJANGO_SETTINGS_MODULE") - - sys.argv[1:] = ["common/static/xmodule"] - import xmodule.static_content - - xmodule.static_content.main() - - if django_settings_module: - os.environ["DJANGO_SETTINGS_MODULE"] = django_settings_module - - -def run_npm(_args): - assets.process_npm_assets() - - -def run_webpack(args): - os.environ["STATIC_ROOT_LMS"] = args.static_root - os.environ["STATIC_ROOT_CMS"] = os.path.join(args.static_root, "studio") - os.environ["NODE_ENV"] = {"prod": "production", "dev": "development"}[args.env] - subprocess.check_call( - [ - "webpack", - "--progress", - "--config=webpack.{env}.config.js".format(env=args.env), - ] - ) - - -def run_common(args): - for system in args.systems: - print("Compiling {} sass assets from common theme...".format(system)) - assets._compile_sass(system, None, False, False, []) - - -def run_themes(args): - for theme_dir in args.theme_dirs: - local_themes = ( - list_subdirectories(theme_dir) if "all" in args.themes else args.themes - ) - for theme in local_themes: - theme_path = os.path.join(theme_dir, theme) - if os.path.exists(theme_path): - for system in args.systems: - print( - "Compiling {} sass assets from theme {}...".format( - system, theme_path - ) - ) - assets._compile_sass(system, Path(theme_path), False, False, []) - - -def run_collect(args): - assets.collect_assets(args.systems, args.settings) - - -def run_watch_themes(args): - """ - Watch static assets for changes and re-compile those changes when - necessary. This piece of code is heavily inspired from the - edx-platform/pavelib/assets.py:watch_assets function, which could not be - used directly because it does not properly read the platform settings - environment variable. - - Note that this function will only work for watching assets in development - mode. In production, watching changes does not make much sense anyway. - """ - observer = assets.Observer() - for theme_dir in args.theme_dirs: - print("Watching changes in {}...".format(theme_dir)) - ThemeWatcher(theme_dir).register(observer) - observer.start() - try: - while True: - observer.join(2) - except KeyboardInterrupt: - observer.stop() - - -def list_subdirectories(path): - return [ - subpath - for subpath in os.listdir(path) - if os.path.isdir(os.path.join(path, subpath)) - ] - - -class ThemeWatcher(assets.SassWatcher): - def __init__(self, theme_dir): - super(ThemeWatcher, self).__init__() - self.theme_dir = theme_dir - - # pylint: disable=arguments-differ - def register(self, observer): - return super(ThemeWatcher, self).register(observer, [self.theme_dir]) - - @assets.debounce() - def on_any_event(self, event): - components = os.path.relpath(event.src_path, self.theme_dir).split("/") - try: - theme = components[0] - system = components[1] - except IndexError: - return - try: - print("Detected change:", event.src_path) - print("\tRecompiling {} theme for {}".format(theme, system)) - assets._compile_sass(system, Path(self.theme_dir) / theme, False, False, []) - print("\tDone recompiling {} theme for {}".format(theme, system)) - except Exception: # pylint: disable=broad-except - traceback.print_exc() - - -if __name__ == "__main__": - main() diff --git a/tutor/templates/build/openedx/settings/cms/assets.py b/tutor/templates/build/openedx/settings/cms/assets.py index 914453dc4c..010df2b44a 100644 --- a/tutor/templates/build/openedx/settings/cms/assets.py +++ b/tutor/templates/build/openedx/settings/cms/assets.py @@ -1,6 +1,5 @@ {% include "build/openedx/settings/partials/assets.py" %} -STATIC_ROOT = path(STATIC_ROOT_BASE) / 'studio' -WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = STATIC_ROOT / "webpack-stats.json" +WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = path(STATIC_ROOT) / "webpack-stats.json" derive_settings(__name__) diff --git a/tutor/templates/build/openedx/settings/lms/assets.py b/tutor/templates/build/openedx/settings/lms/assets.py index b3f85deec4..010df2b44a 100644 --- a/tutor/templates/build/openedx/settings/lms/assets.py +++ b/tutor/templates/build/openedx/settings/lms/assets.py @@ -1,6 +1,5 @@ {% include "build/openedx/settings/partials/assets.py" %} -STATIC_ROOT = path(STATIC_ROOT_BASE) -WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = STATIC_ROOT / "webpack-stats.json" +WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = path(STATIC_ROOT) / "webpack-stats.json" derive_settings(__name__) diff --git a/tutor/templates/build/openedx/settings/partials/assets.py b/tutor/templates/build/openedx/settings/partials/assets.py index fce97cdb85..86ef9110ab 100644 --- a/tutor/templates/build/openedx/settings/partials/assets.py +++ b/tutor/templates/build/openedx/settings/partials/assets.py @@ -5,9 +5,6 @@ from openedx.core.lib.derived import derive_settings ENABLE_COMPREHENSIVE_THEMING = True -COMPREHENSIVE_THEME_DIRS.append('/openedx/themes') - -STATIC_ROOT_BASE = '/openedx/staticfiles' SECRET_KEY = 'secret' XQUEUE_INTERFACE = { diff --git a/tutor/templates/build/openedx/settings/partials/i18n.py b/tutor/templates/build/openedx/settings/partials/i18n.py index 3ca5259847..4c5e98a77f 100644 --- a/tutor/templates/build/openedx/settings/partials/i18n.py +++ b/tutor/templates/build/openedx/settings/partials/i18n.py @@ -1,8 +1,6 @@ from ..common import * from openedx.core.lib.derived import derive_settings -STATIC_ROOT_BASE = '/openedx/staticfiles' - SECRET_KEY = 'secret' XQUEUE_INTERFACE = { 'django_auth': None, diff --git a/tutor/templates/dev/docker-compose.yml b/tutor/templates/dev/docker-compose.yml index 4aa01ee56c..1575c9165a 100644 --- a/tutor/templates/dev/docker-compose.yml +++ b/tutor/templates/dev/docker-compose.yml @@ -43,7 +43,7 @@ services: # Additional service for watching theme changes watchthemes: <<: *openedx-service - command: openedx-assets watch-themes --env dev + command: npm run watch-sass restart: unless-stopped {% if RUN_ELASTICSEARCH and is_docker_rootless() %} diff --git a/tutor/templates/jobs/init/mounted-directories.sh b/tutor/templates/jobs/init/mounted-directories.sh index e10dc7b7c9..0f7c615b8b 100644 --- a/tutor/templates/jobs/init/mounted-directories.sh +++ b/tutor/templates/jobs/init/mounted-directories.sh @@ -37,7 +37,7 @@ pip install -e . npm clean-install # Regenerate static assets. -openedx-assets build --env=dev +npm run build-dev set -x echo "Done setting up bind-mounted edx-platform." From f5dbd5465def50f4c0d07b52897ab213037bdfa7 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 22 May 2024 09:54:52 -0400 Subject: [PATCH 16/20] fix: clean translations before pulling them (#1026) If one is using a bind-mounted edx-platform directory, they may already have pulled translations. This will cause the Docker build to fail with: CommandError: "/openedx/edx-platform/conf/plugins-locale/plugins" should be empty before running atlas pull. To fix this, we simply clean out the edx-platform translation target directories before pulling in the Dockerfile. --- tutor/templates/build/openedx/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index e88fb773e8..368268e812 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -193,6 +193,7 @@ COPY --chown=app:app settings/lms/*.py ./lms/envs/tutor/ COPY --chown=app:app settings/cms/*.py ./cms/envs/tutor/ # Pull latest translations via atlas +RUN make clean_translations RUN ./manage.py lms --settings=tutor.i18n pull_plugin_translations --verbose --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} RUN ./manage.py lms --settings=tutor.i18n pull_xblock_translations --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} RUN atlas pull --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} \ From cf6ac56a131cdd49cd541fb46185192a5f1560a4 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 5 Jun 2024 10:17:06 -0400 Subject: [PATCH 17/20] perf: use COPY --link to increase Docker cache hit frequency (#1073) The --link flag is a feature of Docker BuildKit which tells Docker to treat the COPY'd layer independently of previous layers, enabling more aggressive build caching. For more details, see this Docker blog post [1]. When using COPY --link to copy files from a stage that does not contain /etc/passwd, we must --chown with $APP_USER_ID rather than app. Otherwise, the build would fail with "unknown user id". [1] https://www.docker.com/blog/image-rebase-and-improved-remote-cache-support-in-new-buildkit/ --- .../20240531_094930_kyle_assets_link.md | 1 + tutor/templates/build/openedx/Dockerfile | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 changelog.d/20240531_094930_kyle_assets_link.md diff --git a/changelog.d/20240531_094930_kyle_assets_link.md b/changelog.d/20240531_094930_kyle_assets_link.md new file mode 100644 index 0000000000..42b41b01eb --- /dev/null +++ b/changelog.d/20240531_094930_kyle_assets_link.md @@ -0,0 +1 @@ +- [Improvement] Made Docker cache hits more frequent during the openedx image build via BuildKit's `COPY --link` feature (by @kdmccormick). diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 368268e812..4d7d8b0081 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -152,14 +152,20 @@ RUN if [ "$APP_USER_ID" = 0 ]; then echo "app user may not be root" && false; fi RUN useradd --no-log-init --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app USER ${APP_USER_ID} +# Note: +# For directories from other stages, we prefer 'COPY --link' to plain 'COPY' because it copies +# without regard to files from previous layers, providing significant caching benefits. However, +# since Linux's username->userid mapping is stored in a file (/etc/passwd), it means that we must +# --chown with an integer user id ($APP_USER_ID) rather the a username (app). + # https://hub.docker.com/r/powerman/dockerize/tags COPY --link --from=docker.io/powerman/dockerize:0.19.0 /usr/local/bin/dockerize /usr/local/bin/dockerize -COPY --chown=app:app --from=edx-platform / /openedx/edx-platform -COPY --chown=app:app --from=python /opt/pyenv /opt/pyenv -COPY --chown=app:app --from=python-requirements /openedx/venv /openedx/venv -COPY --chown=app:app --from=python-requirements /mnt /mnt -COPY --chown=app:app --from=nodejs-requirements /openedx/nodeenv /openedx/nodeenv -COPY --chown=app:app --from=nodejs-requirements /openedx/edx-platform/node_modules /openedx/node_modules +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=edx-platform / /openedx/edx-platform +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=python /opt/pyenv /opt/pyenv +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=python-requirements /openedx/venv /openedx/venv +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=python-requirements /mnt /mnt +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=nodejs-requirements /openedx/nodeenv /openedx/nodeenv +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=nodejs-requirements /openedx/edx-platform/node_modules /openedx/node_modules # Symlink node_modules such that we can bind-mount the edx-platform repository RUN ln -s /openedx/node_modules /openedx/edx-platform/node_modules @@ -174,7 +180,7 @@ WORKDIR /openedx/edx-platform {# Install auto-mounted directories as Python packages. #} {% for name in iter_mounted_directories(MOUNTS, "openedx") %} -COPY --from=mnt-{{ name }} --chown=app:app / /mnt/{{ name }} +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=mnt-{{ name }} / /mnt/{{ name }} RUN pip install -e "/mnt/{{ name }}" {% endfor %} @@ -269,7 +275,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ {# Re-install mounted requirements, otherwise they will be superseded by upstream reqs #} {% for name in iter_mounted_directories(MOUNTS, "openedx") %} -COPY --from=mnt-{{ name }} --chown=app:app / /mnt/{{ name }} +COPY --link --chown=$APP_USER_ID:$APP_USER_ID --from=mnt-{{ name }} / /mnt/{{ name }} RUN pip install -e "/mnt/{{ name }}" {% endfor %} From 3d5e8fa455cc99b5897e50cab91215831027a096 Mon Sep 17 00:00:00 2001 From: rohan-saeed <147135540+rohan-saeed@users.noreply.github.com> Date: Fri, 7 Jun 2024 18:14:53 +0500 Subject: [PATCH 18/20] feat!: upgrade mysql to 8.4.0 (#1071) --- changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md | 2 ++ docs/configuration.rst | 2 +- tests/commands/test_images.py | 2 +- tutor/templates/config/defaults.yml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md diff --git a/changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md b/changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md new file mode 100644 index 0000000000..7191b7ecb3 --- /dev/null +++ b/changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md @@ -0,0 +1,2 @@ +- 💥[Improvement] Upgrade MySQL to 8.4.0 (by @rohansaeed) + The upgrade should be automatic for most users. However, if you are running a third-party MySQL (i.e., RUN_MYSQL=false), you are expected to upgrade manually. Please refer to the third-party provider's documentation for detailed upgrade instructions. Ensuring that your MySQL version is up-to-date is crucial for maintaining compatibility and security. diff --git a/docs/configuration.rst b/docs/configuration.rst index a6c3fc7cbb..928f3ad357 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -81,7 +81,7 @@ This configuration parameter defines which MongoDB Docker image to use. .. https://hub.docker.com/_/mysql/tags?page=1&name=8.0 -- ``DOCKER_IMAGE_MYSQL`` (default: ``"docker.io/mysql:8.1.0"``) +- ``DOCKER_IMAGE_MYSQL`` (default: ``"docker.io/mysql:8.4.0"``) This configuration parameter defines which MySQL Docker image to use. diff --git a/tests/commands/test_images.py b/tests/commands/test_images.py index 32ddba885f..22a9072c5e 100644 --- a/tests/commands/test_images.py +++ b/tests/commands/test_images.py @@ -49,7 +49,7 @@ def test_images_pull_all_vendor_images(self, image_pull: Mock) -> None: self.assertIsNone(result.exception) self.assertEqual(0, result.exit_code) # Note: we should update this tag whenever the mysql image is updated - image_pull.assert_called_once_with("docker.io/mysql:8.1.0") + image_pull.assert_called_once_with("docker.io/mysql:8.4.0") def test_images_printtag_image(self) -> None: result = self.invoke(["images", "printtag", "openedx"]) diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 61df930202..c60e9f0e58 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -21,7 +21,7 @@ DOCKER_IMAGE_ELASTICSEARCH: "docker.io/elasticsearch:7.17.13" # https://hub.docker.com/_/mongo/tags DOCKER_IMAGE_MONGODB: "docker.io/mongo:7.0.7" # https://hub.docker.com/_/mysql/tags -DOCKER_IMAGE_MYSQL: "docker.io/mysql:8.1.0" +DOCKER_IMAGE_MYSQL: "docker.io/mysql:8.4.0" DOCKER_IMAGE_PERMISSIONS: "{{ DOCKER_REGISTRY }}overhangio/openedx-permissions:{{ TUTOR_VERSION }}" # https://hub.docker.com/_/redis/tags DOCKER_IMAGE_REDIS: "docker.io/redis:7.2.4" From fc292414466eea9ac18c8278e4a57fd3a96c9d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 7 Jun 2024 11:16:50 +0200 Subject: [PATCH 19/20] feat: cache edx-platform checkout in image build Similar to what we need with the MFE image, we leverage Docker's ADD directive to implement caching of the edx-platform git checkout step. See: https://github.com/overhangio/tutor-mfe/pull/163 https://docs.docker.com/reference/dockerfile/#add --- changelog.d/20240607_111921_regis_edx_platform_code_cache.md | 1 + tutor/templates/build/openedx/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20240607_111921_regis_edx_platform_code_cache.md diff --git a/changelog.d/20240607_111921_regis_edx_platform_code_cache.md b/changelog.d/20240607_111921_regis_edx_platform_code_cache.md new file mode 100644 index 0000000000..f56c6f8dd3 --- /dev/null +++ b/changelog.d/20240607_111921_regis_edx_platform_code_cache.md @@ -0,0 +1 @@ +- 💥[Improvement] Ensure that the edx-platform repository git checkout is cached by Docker during image build. This means that the cache will automatically be cleared any time there is an upstream change. Thus, it is no longer necessary to run `tutor images build --no-cache` just to fetch the latest edx-platform changes. For this to work, any GitHub repository referenced by `EDX_PLATFORM_REPOSITORY` needs to end with ".git". Make sure that this is the case if you have modified the value of this setting in the past. (by @regisb) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 4d7d8b0081..65b7e6a2da 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -38,9 +38,9 @@ RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv FROM minimal as code ARG EDX_PLATFORM_REPOSITORY={{ EDX_PLATFORM_REPOSITORY }} ARG EDX_PLATFORM_VERSION={{ EDX_PLATFORM_VERSION }} -RUN mkdir -p /openedx/edx-platform && \ - git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform +RUN mkdir -p /openedx/edx-platform WORKDIR /openedx/edx-platform +ADD --keep-git-dir=true $EDX_PLATFORM_REPOSITORY#$EDX_PLATFORM_VERSION . # Identify tutor user to apply patches using git RUN git config --global user.email "tutor@overhang.io" \ From 0ba4a2278652d49ae5bca26cc30b120be7c73d7b Mon Sep 17 00:00:00 2001 From: DawoudSheraz Date: Fri, 3 May 2024 11:57:29 +0500 Subject: [PATCH 20/20] v18.0.0 upgrade to redwood --- CHANGELOG.md | 39 +++++++++++++++++++ ...aria.grimaldi_fix_django4_import_errors.md | 1 - changelog.d/20231219_214829_i_atlas.md | 1 - .../20240124_080753_i_plugins_xblocks.md | 1 - .../20240318_154804_kyle_assets_build.md | 21 ---------- ...40329_164354_dawoud.sheraz_mongo_update.md | 10 ----- changelog.d/20240410_102248_regis_node18.md | 1 - .../20240425_105236_braden_bind_mount_docs.md | 1 - .../20240502_200434_dawoud.sheraz_py311.md | 1 - .../20240508_111720_dave_fix_cors_headers.md | 1 - .../20240531_094930_kyle_assets_link.md | 1 - ...31_132815_rohan.saeed_supply_mysql8_4_0.md | 2 - ...07_111921_regis_edx_platform_code_cache.md | 1 - docs/configuration.rst | 6 +-- docs/dev.rst | 2 +- docs/install.rst | 4 +- docs/quickstart.rst | 2 +- docs/reference/indexes.rst | 10 ++--- docs/tutorials/edx-platform.rst | 2 +- requirements/plugins.txt | 28 ++++++------- tests/test_env.py | 2 +- tutor/__about__.py | 4 +- tutor/commands/upgrade/__init__.py | 3 +- tutor/commands/upgrade/compose.py | 1 + tutor/commands/upgrade/k8s.py | 1 + tutor/env.py | 1 + tutor/templates/build/openedx/Dockerfile | 9 +---- tutor/templates/build/openedx/revisions.yml | 2 +- tutor/templates/config/defaults.yml | 2 +- 29 files changed, 77 insertions(+), 83 deletions(-) delete mode 100644 changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md delete mode 100644 changelog.d/20231219_214829_i_atlas.md delete mode 100644 changelog.d/20240124_080753_i_plugins_xblocks.md delete mode 100644 changelog.d/20240318_154804_kyle_assets_build.md delete mode 100644 changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md delete mode 100644 changelog.d/20240410_102248_regis_node18.md delete mode 100644 changelog.d/20240425_105236_braden_bind_mount_docs.md delete mode 100644 changelog.d/20240502_200434_dawoud.sheraz_py311.md delete mode 100644 changelog.d/20240508_111720_dave_fix_cors_headers.md delete mode 100644 changelog.d/20240531_094930_kyle_assets_link.md delete mode 100644 changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md delete mode 100644 changelog.d/20240607_111921_regis_edx_platform_code_cache.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 38f1161d57..239925c3d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,45 @@ instructions, because git commits are used to generate release notes: + +## v18.0.0 (2024-06-19) + +- 💥[Feature] Upgrade to Redwood (by @dawoudsheraz) +- [Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch (by @mariajgrimaldi). +- 💥[Feature] Pull translations via `atlas` during Docker build. This breaks the `openedx-i18n` custom locale Tutor feature in favor of [OEP-58](https://docs.openedx.org/en/latest/developers/concepts/oep58.html) in favor of . (by @omarithawi) +- 💥[Feature] The `openedx-assets` command is replaced with `npm run` subcommands. This will slightly reduce the build time for edx-platform assets and comprehensive themes. It will also open up the door for more significant build time reductions in the future. Here is a migration guide, where each command is to be run in the `lms` or `cms` container: + + **Before** | **After** + -----------------------------------------|------------------------------------------------------------------------------------- + `openedx-assets build --env=prod ARGS` | `npm run build -- ARGS` + `openedx-assets build --env=dev ARGS` | `npm run build-dev -- ARGS` + `openedx-assets common --env=prod ARGS` | `npm run compile-sass -- --skip-themes ARGS` + `openedx-assets common --env=dev ARGS` | `npm run compile-sass-dev -- --skip-themes ARGS` + `openedx-assets webpack --env=prod ARGS` | `npm run webpack -- ARGS` + `openedx-assets webpack --env=dev ARGS` | `npm run webpack-dev -- ARGS` + `openedx-assets npm` | `npm run postinstall` (`npm clean-install` runs this automatically) + `openedx-assets xmodule` | (no longer necessary) + `openedx-assets collect ARGS` | `./manage.py lms collectstatic --noinput ARGS && ./manage.py cms collectstatic ARGS` + `openedx-assets watch-themes ARGS` | `npm run watch-themes -- ARGS` + +For more details, see the [deprecation notice for paver](https://github.com/openedx/edx-platform/issues/34467) +and the [static assets reference](https://github.com/openedx/edx-platform/tree/open-release/redwood.master/docs/references/static-assets.rst) +in edx-platform. + +- 💥[Feature] Update MongoDB to v7.0.7 (by @dawoudsheraz) MongoDB is upgraded from version 4.4 to 7.0. Since there have been major releases since 4.4, the upgrade will need to go through them before running Mongo 7. MongoDB would need to follow 4.4 --> 5.0 --> 6.0 --> 7.0 upgrade path to work correctly. The container will keep on restarting with featureCompatibility error if the upgrade path is not followed. To upgrade mongo, run the following command based in the appropriate environment: + + tutor upgrade --from=quince + +For k8s only, the above command will not perform the upgrade automatically. Instead, the command will output a series of commands that would need to be run manually to carry out the upgrade. + +- [Improvement] Upgrade Nodejs from 16.14.0 to 18.20.1 in edx-platform. (by @regisb) +- [Improvement] Auto-detect bind mounts of openedx-learning for edx-platform (by @bradenmacdonald) +- [Feature] Upgrade Open edX image to use Python 3.11 (by @dawoudsheraz) +- [Bugfix] Remove CORS_ALLOW_HEADERS setting from the LMS/Studio config template. This setting, which holds site-agnostic application logic, is now consistently set to a reasonable value upstream by LMS and CMS config. Using the upstream values fixes a bug where course import in Studio using the new Course Authoring MFE was broken in Tutor deployments because it required additional headers to be allowed (content-range and content-disposition) (by @ormsbee) +- [Improvement] Made Docker cache hits more frequent during the openedx image build via BuildKit's `COPY --link` feature (by @kdmccormick). +- 💥[Improvement] Upgrade MySQL to 8.4.0. The upgrade should be automatic for most users. However, if you are running a third-party MySQL (i.e., RUN_MYSQL=false), you are expected to upgrade manually. Please refer to the third-party provider's documentation for detailed upgrade instructions. Ensuring that your MySQL version is up-to-date is crucial for maintaining compatibility and security. (by @rohansaeed) +- 💥[Improvement] Ensure that the edx-platform repository git checkout is cached by Docker during image build. This means that the cache will automatically be cleared any time there is an upstream change. Thus, it is no longer necessary to run `tutor images build --no-cache` just to fetch the latest edx-platform changes. For this to work, any GitHub repository referenced by `EDX_PLATFORM_REPOSITORY` needs to end with ".git". Make sure that this is the case if you have modified the value of this setting in the past. (by @regisb) + ## v17.0.6 (2024-06-13) diff --git a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md deleted file mode 100644 index ad88d1cb42..0000000000 --- a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch (by @mariajgrimaldi). diff --git a/changelog.d/20231219_214829_i_atlas.md b/changelog.d/20231219_214829_i_atlas.md deleted file mode 100644 index 6c3ef1b7d4..0000000000 --- a/changelog.d/20231219_214829_i_atlas.md +++ /dev/null @@ -1 +0,0 @@ -- 💥[Feature] Pull translations via `atlas` during Docker build. This breaks the `openedx-i18n` custom locale Tutor feature in favor of [OEP-58](https://docs.openedx.org/en/latest/developers/concepts/oep58.html) in favor of . (by @omarithawi) diff --git a/changelog.d/20240124_080753_i_plugins_xblocks.md b/changelog.d/20240124_080753_i_plugins_xblocks.md deleted file mode 100644 index 652f5375c3..0000000000 --- a/changelog.d/20240124_080753_i_plugins_xblocks.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] `atlas pull` translations for XBlocks and Plugins (by @OmarIthawi) diff --git a/changelog.d/20240318_154804_kyle_assets_build.md b/changelog.d/20240318_154804_kyle_assets_build.md deleted file mode 100644 index de11359740..0000000000 --- a/changelog.d/20240318_154804_kyle_assets_build.md +++ /dev/null @@ -1,21 +0,0 @@ -- 💥[Feature] The `openedx-assets` command is replaced with `npm run` subcommands. - This will slightly reduce the build time for edx-platform assets and comprehensive themes. - It will also open up the door for more significant build time reductions in the future. - Here is a migration guide, where each command is to be run in the `lms` or `cms` container. - - **Before** | **After** - -----------------------------------------|------------------------------------------------------------------------------------- - `openedx-assets build --env=prod ARGS` | `npm run build -- ARGS` - `openedx-assets build --env=dev ARGS` | `npm run build-dev -- ARGS` - `openedx-assets common --env=prod ARGS` | `npm run compile-sass -- --skip-themes ARGS` - `openedx-assets common --env=dev ARGS` | `npm run compile-sass-dev -- --skip-themes ARGS` - `openedx-assets webpack --env=prod ARGS` | `npm run webpack -- ARGS` - `openedx-assets webpack --env=dev ARGS` | `npm run webpack-dev -- ARGS` - `openedx-assets npm` | `npm run postinstall` (`npm clean-install` runs this automatically) - `openedx-assets xmodule` | (no longer necessary) - `openedx-assets collect ARGS` | `./manage.py lms collectstatic --noinput ARGS && ./manage.py cms collectstatic ARGS` - `openedx-assets watch-themes ARGS` | `npm run watch-themes -- ARGS` - - For more details, see the [deprecation notice for paver](https://github.com/openedx/edx-platform/issues/34467) - and the [static assets reference](https://github.com/openedx/edx-platform/tree/open-release/redwood.master/docs/references/static-assets.rst) - in edx-platform. diff --git a/changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md b/changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md deleted file mode 100644 index 3dcd45f4e0..0000000000 --- a/changelog.d/20240329_164354_dawoud.sheraz_mongo_update.md +++ /dev/null @@ -1,10 +0,0 @@ -- 💥[Feature] Update MongoDB to v7.0.7 (by @dawoudsheraz) - - MongoDB is updating from 4.4 to 7. Since there have been major releases since 4.4, the upgrade would need to go through them before running Mongo 7. Mongo would need to follow 4.4 --> 5.0 --> 6.0 --> 7.0 upgrade path to work correctly. - The container will keep on restarting with featureCompatibility error if the upgrade path is not followed. - - To upgrade mongo, run the following command based in the appropriate environment: - ``` - tutor upgrade --from=quince - ``` - For k8s only, the above command will not perform the upgrade automatically. Instead, the command will output a series of commands that would need to be run manually to carry out the upgrade. \ No newline at end of file diff --git a/changelog.d/20240410_102248_regis_node18.md b/changelog.d/20240410_102248_regis_node18.md deleted file mode 100644 index 17308dfb30..0000000000 --- a/changelog.d/20240410_102248_regis_node18.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Upgrade Nodejs from 16.14.0 to 18.20.1 in edx-platform. (by @regisb) diff --git a/changelog.d/20240425_105236_braden_bind_mount_docs.md b/changelog.d/20240425_105236_braden_bind_mount_docs.md deleted file mode 100644 index 9b24a89e1e..0000000000 --- a/changelog.d/20240425_105236_braden_bind_mount_docs.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Auto-detect bind mounts of openedx-learning for edx-platform (by @bradenmacdonald) diff --git a/changelog.d/20240502_200434_dawoud.sheraz_py311.md b/changelog.d/20240502_200434_dawoud.sheraz_py311.md deleted file mode 100644 index e0986615cf..0000000000 --- a/changelog.d/20240502_200434_dawoud.sheraz_py311.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] Upgrade Open edX image to use Python 3.11 (by @dawoudsheraz) diff --git a/changelog.d/20240508_111720_dave_fix_cors_headers.md b/changelog.d/20240508_111720_dave_fix_cors_headers.md deleted file mode 100644 index 5af383eb36..0000000000 --- a/changelog.d/20240508_111720_dave_fix_cors_headers.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Remove CORS_ALLOW_HEADERS setting from the LMS/Studio config template. This setting, which holds site-agnostic application logic, is now consistently set to a reasonable value upstream by LMS and CMS config. Using the upstream values fixes a bug where course import in Studio using the new Course Authoring MFE was broken in Tutor deployments because it required additional headers to be allowed (content-range and content-disposition) (by @ormsbee) diff --git a/changelog.d/20240531_094930_kyle_assets_link.md b/changelog.d/20240531_094930_kyle_assets_link.md deleted file mode 100644 index 42b41b01eb..0000000000 --- a/changelog.d/20240531_094930_kyle_assets_link.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Made Docker cache hits more frequent during the openedx image build via BuildKit's `COPY --link` feature (by @kdmccormick). diff --git a/changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md b/changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md deleted file mode 100644 index 7191b7ecb3..0000000000 --- a/changelog.d/20240531_132815_rohan.saeed_supply_mysql8_4_0.md +++ /dev/null @@ -1,2 +0,0 @@ -- 💥[Improvement] Upgrade MySQL to 8.4.0 (by @rohansaeed) - The upgrade should be automatic for most users. However, if you are running a third-party MySQL (i.e., RUN_MYSQL=false), you are expected to upgrade manually. Please refer to the third-party provider's documentation for detailed upgrade instructions. Ensuring that your MySQL version is up-to-date is crucial for maintaining compatibility and security. diff --git a/changelog.d/20240607_111921_regis_edx_platform_code_cache.md b/changelog.d/20240607_111921_regis_edx_platform_code_cache.md deleted file mode 100644 index f56c6f8dd3..0000000000 --- a/changelog.d/20240607_111921_regis_edx_platform_code_cache.md +++ /dev/null @@ -1 +0,0 @@ -- 💥[Improvement] Ensure that the edx-platform repository git checkout is cached by Docker during image build. This means that the cache will automatically be cleared any time there is an upstream change. Thus, it is no longer necessary to run `tutor images build --no-cache` just to fetch the latest edx-platform changes. For this to work, any GitHub repository referenced by `EDX_PLATFORM_REPOSITORY` needs to end with ".git". Make sure that this is the case if you have modified the value of this setting in the past. (by @regisb) diff --git a/docs/configuration.rst b/docs/configuration.rst index 928f3ad357..4897a46206 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -132,7 +132,7 @@ Open edX customisation This defines the git repository from which you install Open edX platform code. If you run an Open edX fork with custom patches, set this to your own git repository. You may also override this configuration parameter at build time, by providing a ``--build-arg`` option. -- ``OPENEDX_COMMON_VERSION`` (default: ``"open-release/quince.1"``, or ``master`` in :ref:`nightly `) +- ``OPENEDX_COMMON_VERSION`` (default: ``"open-release/redwood.1"``, or ``master`` in :ref:`nightly `) This defines the default version that will be pulled from all Open edX git repositories. @@ -378,9 +378,9 @@ Note that your edx-platform version must be a fork of the latest release **tag** If you don't create your fork from this tag, you *will* have important compatibility issues with other services. In particular: -- Do not try to run a fork from an older (pre-Quince) version of edx-platform: this will simply not work. +- Do not try to run a fork from an older (pre-Redwood) version of edx-platform: this will simply not work. - Do not try to run a fork from the edx-platform master branch: there is a 99% probability that it will fail. -- Do not try to run a fork from the open-release/quince.master branch: Tutor will attempt to apply security and bug fix patches that might already be included in the open-release/quince.master but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the open-release/quince.master branch. +- Do not try to run a fork from the open-release/redwood.master branch: Tutor will attempt to apply security and bug fix patches that might already be included in the open-release/redwood.master but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the open-release/redwood.master branch. .. _i18n: diff --git a/docs/dev.rst b/docs/dev.rst index f2d274d22a..c7c95616e7 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -113,7 +113,7 @@ The ``openedx-dev`` Docker image is based on the same ``openedx`` image used by - The user that runs inside the container has the same UID as the user on the host, to avoid permission problems inside mounted volumes (and in particular in the edx-platform repository). - Additional Python and system requirements are installed for convenient debugging: `ipython `__, `ipdb `__, vim, telnet. -- The edx-platform `development requirements `__ are installed. +- The edx-platform `development requirements `__ are installed. If you are using a custom ``openedx`` image, then you will need to rebuild ``openedx-dev`` every time you modify ``openedx``. To so, run:: diff --git a/docs/install.rst b/docs/install.rst index b058ddced5..7645fbf49d 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -123,11 +123,11 @@ Major Open edX releases are published twice a year, in June and December, by the 4. Test the new release in a sandboxed environment. 5. If you are running edx-platform, or some other repository from a custom branch, then you should rebase (and test) your changes on top of the latest release tag (see :ref:`edx_platform_fork`). -The process for upgrading from one major release to the next works similarly to any other upgrade, with the ``launch`` command (see above). The single difference is that if the ``launch`` command detects that your tutor environment was generated with an older release, it will perform a few release-specific upgrade steps. These extra upgrade steps will be performed just once. But they will be ignored if you updated your local environment (for instance: with ``tutor config save``) before running ``launch``. This situation typically occurs if you need to re-build some Docker images (see above). In such a case, you should make use of the ``upgrade`` command. For instance, to upgrade a local installation from Palm to Quince and rebuild some Docker images, run:: +The process for upgrading from one major release to the next works similarly to any other upgrade, with the ``launch`` command (see above). The single difference is that if the ``launch`` command detects that your tutor environment was generated with an older release, it will perform a few release-specific upgrade steps. These extra upgrade steps will be performed just once. But they will be ignored if you updated your local environment (for instance: with ``tutor config save``) before running ``launch``. This situation typically occurs if you need to re-build some Docker images (see above). In such a case, you should make use of the ``upgrade`` command. For instance, to upgrade a local installation from Quince to Redwood and rebuild some Docker images, run:: tutor config save tutor images build all # list the images that should be rebuilt here - tutor local upgrade --from=palm + tutor local upgrade --from=quince tutor local launch .. _autocomplete: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 58cf4d4e32..0c774f8b4a 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -22,7 +22,7 @@ Yes :) This is what happens when you run ``tutor local launch``: 2. Configuration files are generated from templates. 3. Docker images are downloaded. 4. Docker containers are provisioned. -5. A full, production-ready Open edX platform (`Quince `__ release) is run with docker-compose. +5. A full, production-ready Open edX platform (`Redwood `__ release) is run with docker-compose. The whole procedure should require less than 10 minutes, on a server with good bandwidth. Note that your host environment will not be affected in any way, since everything runs inside docker containers. Root access is not even necessary. diff --git a/docs/reference/indexes.rst b/docs/reference/indexes.rst index e9c337ea33..45fff4b3c0 100644 --- a/docs/reference/indexes.rst +++ b/docs/reference/indexes.rst @@ -7,10 +7,10 @@ Plugin indexes are a great way to have your plugins discovered by other users. P Index file paths ================ -A plugin index is a yaml-formatted file. It can be stored on the web or on your computer. In both cases, the index file location must end with "/plugins.yml". For instance, the following are valid index locations if you run the Open edX "Quince" release: +A plugin index is a yaml-formatted file. It can be stored on the web or on your computer. In both cases, the index file location must end with "/plugins.yml". For instance, the following are valid index locations if you run the Open edX "Redwood" release: -- https://overhang.io/tutor/main/quince/plugins.yml -- ``/path/to/your/local/index/quince/plugins.yml`` +- https://overhang.io/tutor/main/redwood/plugins.yml +- ``/path/to/your/local/index/redwood/plugins.yml`` To add either indexes, run the ``tutor plugins index add`` command without the suffix. For instance:: @@ -106,9 +106,9 @@ Manage plugins in development Plugin developers and maintainers often want to install local versions of their plugins. They usually achieve this with ``pip install -e /path/to/tutor-plugin``. We can improve that workflow by creating an index for local plugins:: # Create the plugin index directory - mkdir -p ~/localindex/quince/ + mkdir -p ~/localindex/redwood/ # Edit the index - vim ~/localindex/quince/plugins.yml + vim ~/localindex/redwood/plugins.yml Add the following to the index:: diff --git a/docs/tutorials/edx-platform.rst b/docs/tutorials/edx-platform.rst index afc39002cd..793498a248 100644 --- a/docs/tutorials/edx-platform.rst +++ b/docs/tutorials/edx-platform.rst @@ -69,7 +69,7 @@ Quite often, developers don't want to work on edx-platform directly, but on a de cd /my/workspace/edx-ora2 git clone https://github.com/openedx/edx-ora2 . -Then, check out the right version of the package. This is the version that is indicated in the `edx-platform/requirements/edx/base.txt `__. Be careful that the version that is currently in use in your version of edx-platform is **not necessarily the head of the master branch**:: +Then, check out the right version of the package. This is the version that is indicated in the `edx-platform/requirements/edx/base.txt `__. Be careful that the version that is currently in use in your version of edx-platform is **not necessarily the head of the master branch**:: git checkout diff --git a/requirements/plugins.txt b/requirements/plugins.txt index 36e7c0a5e5..2c4be2fe12 100644 --- a/requirements/plugins.txt +++ b/requirements/plugins.txt @@ -1,14 +1,14 @@ -# change version ranges when upgrading from quince -tutor-android>=17.0.0,<18.0.0 -tutor-cairn>=17.0.0,<18.0.0 -tutor-credentials>=17.0.0,<18.0.0 -tutor-discovery>=17.0.0,<18.0.0 -tutor-ecommerce>=17.0.0,<18.0.0 -tutor-forum>=17.0.0,<18.0.0 -tutor-indigo>=17.0.0,<18.0.0 -tutor-jupyter>=17.0.0,<18.0.0 -tutor-mfe>=17.0.0,<18.0.0 -tutor-minio>=17.0.0,<18.0.0 -tutor-notes>=17.0.0,<18.0.0 -tutor-webui>=17.0.0,<18.0.0 -tutor-xqueue>=17.0.0,<18.0.0 +# change version ranges when upgrading from redwood +tutor-android>=18.0.0,<19.0.0 +tutor-cairn>=18.0.0,<19.0.0 +tutor-credentials>=18.0.0,<19.0.0 +tutor-discovery>=18.0.0,<19.0.0 +tutor-ecommerce>=18.0.0,<19.0.0 +tutor-forum>=18.0.0,<19.0.0 +tutor-indigo>=18.0.0,<19.0.0 +tutor-jupyter>=18.0.0,<19.0.0 +tutor-mfe>=18.0.0,<19.0.0 +tutor-minio>=18.0.0,<19.0.0 +tutor-notes>=18.0.0,<19.0.0 +tutor-webui>=18.0.0,<19.0.0 +tutor-xqueue>=18.0.0,<19.0.0 diff --git a/tests/test_env.py b/tests/test_env.py index 27cff9678b..e2ba7bbe1d 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -260,7 +260,7 @@ def test_current_version_in_latest_env(self) -> None: ) as f: f.write(__version__) self.assertEqual(__version__, env.current_version(root)) - self.assertEqual("quince", env.get_env_release(root)) + self.assertEqual("redwood", env.get_env_release(root)) self.assertIsNone(env.should_upgrade_from_release(root)) self.assertTrue(env.is_up_to_date(root)) diff --git a/tutor/__about__.py b/tutor/__about__.py index 04bcbbf459..8c37f09911 100644 --- a/tutor/__about__.py +++ b/tutor/__about__.py @@ -2,7 +2,7 @@ # Increment this version number to trigger a new release. See # docs/tutor.html#versioning for information on the versioning scheme. -__version__ = "17.0.6" +__version__ = "18.0.0" # The version suffix will be appended to the actual version, separated by a # dash. Use this suffix to differentiate between the actual released version and @@ -10,7 +10,7 @@ # the nightly branch. # The suffix is cleanly separated from the __version__ in this module to avoid # conflicts when merging branches. -__version_suffix__ = "nightly" +__version_suffix__ = "" # The app name will be used to define the name of the default tutor root and # plugin directory. To avoid conflicts between multiple locally-installed diff --git a/tutor/commands/upgrade/__init__.py b/tutor/commands/upgrade/__init__.py index b7a4e028de..44592344a5 100644 --- a/tutor/commands/upgrade/__init__.py +++ b/tutor/commands/upgrade/__init__.py @@ -1,4 +1,4 @@ -# Note: don't forget to change this when we upgrade from quince +# Note: don't forget to change this when we upgrade from redwood OPENEDX_RELEASE_NAMES = [ "ironwood", "juniper", @@ -9,4 +9,5 @@ "olive", "palm", "quince", + "redwood", ] diff --git a/tutor/commands/upgrade/compose.py b/tutor/commands/upgrade/compose.py index b23f3e7058..df54c71d8b 100644 --- a/tutor/commands/upgrade/compose.py +++ b/tutor/commands/upgrade/compose.py @@ -48,6 +48,7 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "quince": upgrade_from_quince(context, config) + running_release = "redwood" def upgrade_from_ironwood(context: click.Context, config: Config) -> None: diff --git a/tutor/commands/upgrade/k8s.py b/tutor/commands/upgrade/k8s.py index 19e81243cc..db18835704 100644 --- a/tutor/commands/upgrade/k8s.py +++ b/tutor/commands/upgrade/k8s.py @@ -47,6 +47,7 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "quince": upgrade_from_quince(config) + running_release = "redwood" def upgrade_from_ironwood(config: Config) -> None: diff --git a/tutor/env.py b/tutor/env.py index 6f150fd792..4b91d2d539 100644 --- a/tutor/env.py +++ b/tutor/env.py @@ -467,6 +467,7 @@ def get_release(version: str) -> str: "15": "olive", "16": "palm", "17": "quince", + "18": "redwood", }[version.split(".", maxsplit=1)[0]] diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 65b7e6a2da..6964dedea1 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -53,13 +53,6 @@ RUN git config --global user.email "tutor@overhang.io" \ # Patches in nightly node {%- else %} # Patches in non-nightly mode -# Prevent course structure cache infinite growth -# https://github.com/openedx/edx-platform/pull/34210 -RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am -# Security patch for "Privilege re-escalation in Studio after staff access removed" -# https://github.com/openedx/edx-platform/security/advisories/GHSA-99vw-2wrq-xh9x -# https://discuss.openedx.org/t/upcoming-security-fix-for-edx-platform-on-2024-05-17/13004 -RUN curl -fsSL https://github.com/openedx/edx-platform/commit/3ff69fd5813256f935f19c237ea0c42d4c16edbf.patch | git am {%- endif %} {# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/.patch | git am #} @@ -111,7 +104,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ {{ patch("openedx-dockerfile-post-python-requirements") }} # Install scorm xblock -RUN pip install "openedx-scorm-xblock>=17.0.0,<18.0.0" +RUN pip install "openedx-scorm-xblock>=18.0.0,<19.0.0" {% for extra_requirements in OPENEDX_EXTRA_PIP_REQUIREMENTS %} RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ diff --git a/tutor/templates/build/openedx/revisions.yml b/tutor/templates/build/openedx/revisions.yml index c01e271e53..d30d0cbc0e 100644 --- a/tutor/templates/build/openedx/revisions.yml +++ b/tutor/templates/build/openedx/revisions.yml @@ -1 +1 @@ -EDX_PLATFORM_REVISION: quince +EDX_PLATFORM_REVISION: redwood diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index c60e9f0e58..a7f70c8948 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -61,7 +61,7 @@ OPENEDX_LMS_UWSGI_WORKERS: 2 OPENEDX_MYSQL_DATABASE: "openedx" OPENEDX_MYSQL_USERNAME: "openedx" # the common version will be automatically set to "master" in the nightly branch -OPENEDX_COMMON_VERSION: "open-release/quince.3" +OPENEDX_COMMON_VERSION: "open-release/redwood.1" OPENEDX_EXTRA_PIP_REQUIREMENTS: [] MYSQL_HOST: "mysql" MYSQL_PORT: 3306