From 872883e36fd5f631cd744d898b3fe169cf7a3402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 27 Feb 2020 17:22:55 +0100 Subject: [PATCH] Switch edx-platform from ironwood.2 to ironwood.master There are too many patches on top of ironwood.2, and it's not practical to pull them all one by one. We still want to build on top of a specific version, and not a branch, so we use a dirty hack to guarantee that the docker image is properly rebuilt by CI when we change it. --- CHANGELOG.md | 1 + docs/dev.rst | 2 +- docs/troubleshooting.rst | 2 +- tutor/templates/build/openedx/Dockerfile | 17 ++++++----------- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b42613c..3a57ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Improvement] Switch edx-platform from open-release/ironwood.2 tag to the open-release/ironwood.master branch - [Security] Upgrade django to 1.11.28 - [Improvement] Make it possible to configure the elasticsearch heap size - [Bugfix] Fix broken elasticsearch environment variables diff --git a/docs/dev.rst b/docs/dev.rst index e2395c8..fa3718e 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -23,7 +23,7 @@ This ``openedx-dev`` development image differs from the ``openedx`` production i - The user that runs inside the container has the same UID as the user on the host, in order 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. Since the ``openedx-dev`` is based upon the ``openedx`` docker image, it should be re-built every time the ``openedx`` docker image is modified. diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 85c1a84..d067e05 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -82,7 +82,7 @@ This will occur if you try to run a development environment without patching the "TypeError: get_logger_config() got an unexpected keyword argument 'debug'" ------------------------------------------------------------------------------- -This might occur when you try to run the latest version of ``edx-platform``, and not a version close to ``ironwood.2``. It is no longer necessary to patch the ``LOGGING`` configuration in the latest ``edx-platform`` releases, as indicated in the `development_` section, so you should remove the call to ``get_logger_config`` altogether from your development settings. +This might occur when you try to run the latest version of ``edx-platform``, and not a version close to ``ironwood.master``. It is no longer necessary to patch the ``LOGGING`` configuration in the latest ``edx-platform`` releases, as indicated in the `development_` section, so you should remove the call to ``get_logger_config`` altogether from your development settings. The chosen default language does not display properly ----------------------------------------------------- diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index a01e65d..f761665 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -17,25 +17,20 @@ RUN curl -L -o /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releas && tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz \ && rm /tmp/dockerize.tar.gz -# Checkout edx-platform code +# Checkout edx-platform code: https://github.com/edx/edx-platform/commits/open-release/ironwood.master +# Because we are pulling from a branch, and not a tag, you should manually modify the +# date hash below to force clearing the docker cache. ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git -ARG EDX_PLATFORM_VERSION=open-release/ironwood.2 +ARG EDX_PLATFORM_VERSION=open-release/ironwood.master +ARG EDX_PLATFORM_VERSION_DATE=20200227 RUN mkdir -p /openedx/edx-platform && \ + echo "Puling $EDX_PLATFORM_VERSION tag from $EDX_PLATFORM_REPOSITORY ($EDX_PLATFORM_VERSION_DATE)" && \ git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform WORKDIR /openedx/edx-platform # Apply patches -# Certificates XSS vulnerability https://github.com/edx/edx-platform/pull/20904 -RUN curl https://github.com/edx/edx-platform/commit/b33db2c548a1a530510d785f7659c78783a187fa.patch | git apply - -# CustomTagModule mako template injection https://groups.google.com/forum/#!topic/openedx-ops/aVHomKimstU -RUN curl https://github.com/edx/edx-platform/commit/f9689aadb0f8a41570a4bb76654f980b4e31ad96.patch | git apply - # Allow SigV4 authentication for video uploads to S3 https://github.com/edx/edx-platform/pull/22080 RUN curl https://github.com/overhangio/edx-platform/commit/0d4f6cc3433013960b28e963c4094ef2a2a92f04.patch | git apply - -# Django upgrades -RUN curl https://github.com/edx/edx-platform/commit/7731c68b91ba662e6433ab46e434860afc497944.patch | git apply - -RUN curl https://github.com/edx/edx-platform/commit/86f4902257a431a1a465eec585a116c19d2c4659.patch | git apply - -RUN curl https://github.com/edx/edx-platform/commit/9490d8e083ccdcf8341694e38bbd9f7200ea2ff3.patch | git apply - -RUN curl https://github.com/edx/edx-platform/commit/df76bb257a9946271bff8ed2650d158a83a035a8.patch | git apply - # Download extra locales to /openedx/locale RUN cd /tmp \