From 4b8cf4ccc76563196fe59926a177fe92db7f56ed Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Fri, 24 Jun 2022 09:17:44 -0400 Subject: [PATCH 1/3] fix: update problem with hint according newer python versions --- CHANGELOG.md | 1 + tutor/templates/build/openedx/Dockerfile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 450d80f..5caa709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Every user-facing change should have an entry in this changelog. Please respect --> ## Unreleased +- [Fix] Update problem with hint template so it works with newer python versions. (by @mariajgrimaldi) - [Feature] Add default PYTHONBREAKPOINT to openedx/Dockerfile (by @Carlos-Muniz) - [Bugfix] Fix smtp server port in `cms.yml` which was causing email sending failures in the Studio. (by @regisb) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 045711e..628927e 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -50,6 +50,9 @@ RUN git config --global user.email "tutor@overhang.io" \ # Fix broken "Pages" view in Studio # https://github.com/openedx/edx-platform/pull/30550 RUN curl -fsSL https://github.com/open-craft/edx-platform/commit/3d54f284f82b61e693ad652d8d6e46a226fcb36d.patch | git am +# fix: add () to print statement so problem with hint template works in newer versions +# https://github.com/openedx/edx-platform/pull/30585 +RUN curl -fsSL https://github.com/openedx/edx-platform/commit/468036b3085adbe77a2dbb4a1c3bd88ab831f7b0.patch | git am {%- endif %} {# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ | git am #} From eadb04fee9aa1ca18fa990e89b088e111f8628b4 Mon Sep 17 00:00:00 2001 From: Gabor Boros Date: Thu, 23 Jun 2022 09:57:07 +0200 Subject: [PATCH 2/3] fix: skip waiting for mongodb SRV records Signed-off-by: Gabor Boros --- CHANGELOG.md | 1 + tutor/templates/hooks/lms/init | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5caa709..d35dcab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Every user-facing change should have an entry in this changelog. Please respect - [Feature] Add default PYTHONBREAKPOINT to openedx/Dockerfile (by @Carlos-Muniz) - [Bugfix] Fix smtp server port in `cms.yml` which was causing email sending failures in the Studio. (by @regisb) +- [Bugfix] Skip waiting for MongoDB if it is served using SRV records. (by @gabor-boros) - [Improvement] Use `git am` instead of `cherry-pick` to simplify patching process. - [Improvement] Tutor is now compatible with Docker Compose subcommand. diff --git a/tutor/templates/hooks/lms/init b/tutor/templates/hooks/lms/init index 0276cd8..348b493 100644 --- a/tutor/templates/hooks/lms/init +++ b/tutor/templates/hooks/lms/init @@ -1,5 +1,10 @@ dockerize -wait tcp://{{ MYSQL_HOST }}:{{ MYSQL_PORT }} -timeout 20s + +{%- if MONGODB_HOST.startswith("mongodb+srv://") %} +echo "MongoDB is using SRV records, so we cannot wait for it to be ready" +{%- else %} dockerize -wait tcp://{{ MONGODB_HOST }}:{{ MONGODB_PORT }} -timeout 20s +{%- endif %} echo "Loading settings $DJANGO_SETTINGS_MODULE" @@ -38,3 +43,4 @@ fi # Create waffle switches to enable some features, if they have not been explicitly defined before # Completion tracking: add green ticks to every completed unit (./manage.py lms waffle_switch --list | grep completion.enable_completion_tracking) || ./manage.py lms waffle_switch --create completion.enable_completion_tracking on + From 63bc184eab6a1bf791f9a2b265b65b157f29fa07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Boros?= Date: Thu, 23 Jun 2022 16:22:38 +0200 Subject: [PATCH 3/3] chore: remove extra empty line --- tutor/templates/hooks/lms/init | 1 - 1 file changed, 1 deletion(-) diff --git a/tutor/templates/hooks/lms/init b/tutor/templates/hooks/lms/init index 348b493..88c9462 100644 --- a/tutor/templates/hooks/lms/init +++ b/tutor/templates/hooks/lms/init @@ -43,4 +43,3 @@ fi # Create waffle switches to enable some features, if they have not been explicitly defined before # Completion tracking: add green ticks to every completed unit (./manage.py lms waffle_switch --list | grep completion.enable_completion_tracking) || ./manage.py lms waffle_switch --create completion.enable_completion_tracking on -