From 4c843f3832a0c192fc1842ff42cd8092b8049009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 11 Oct 2023 10:39:40 +0200 Subject: [PATCH] feat: upgrade to quince --- CHANGELOG.md | 8 ++++++++ .../20231003_133500_dave_remove_trailing_slash.md | 11 ----------- changelog.d/20231004_141842_codewithemad_test_lint.md | 1 - ...20231116_110038_arbrandes_add_learner_dashboard.md | 1 - setup.py | 4 ++-- tutormfe/__about__.py | 3 ++- tutormfe/patches/openedx-cms-development-settings | 2 +- tutormfe/patches/openedx-cms-production-settings | 2 +- tutormfe/patches/openedx-lms-development-settings | 2 +- tutormfe/patches/openedx-lms-production-settings | 2 +- tutormfe/plugin.py | 5 +++-- tutormfe/templates/mfe/build/mfe/Dockerfile | 2 +- 12 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 changelog.d/20231003_133500_dave_remove_trailing_slash.md delete mode 100644 changelog.d/20231004_141842_codewithemad_test_lint.md delete mode 100644 changelog.d/20231116_110038_arbrandes_add_learner_dashboard.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 53c7fc61..f3ecb984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,14 @@ instructions, because git commits are used to generate release notes: + +## v17.0.0 (2023-12-04) + +- 💥Upgrade to Quince. + - [Bugfix] Remove the trailing slash from auto-generated ``PUBLIC_PATH`` env vars for MFEs in order to be consistent with LMS/Studio config, and so that we don't have to strip it off on the JavaScript side after the React Router 6 upgrade. (by @ormsbee) + - [Improvement] Added Makefile and test action to repository and formatted code with Black and isort. (by @CodeWithEmad) + - [Feature] Add support for the Learner Dashboard MFE. (by @arbrandes) + ## v16.1.2 (2023-11-06) diff --git a/changelog.d/20231003_133500_dave_remove_trailing_slash.md b/changelog.d/20231003_133500_dave_remove_trailing_slash.md deleted file mode 100644 index 36416779..00000000 --- a/changelog.d/20231003_133500_dave_remove_trailing_slash.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -- [Bugfix] Remove the trailing slash from auto-generated PUBLIC_PATH env vars for MFEs in order to be consistent with LMS/Studio config, and so that we don't have to strip it off on the JavaScript side after the React Router 6 upgrade. (by @ormsbee) diff --git a/changelog.d/20231004_141842_codewithemad_test_lint.md b/changelog.d/20231004_141842_codewithemad_test_lint.md deleted file mode 100644 index 81ca4f19..00000000 --- a/changelog.d/20231004_141842_codewithemad_test_lint.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Added Makefile and test action to repository and formatted code with Black and isort. (by @CodeWithEmad) \ No newline at end of file diff --git a/changelog.d/20231116_110038_arbrandes_add_learner_dashboard.md b/changelog.d/20231116_110038_arbrandes_add_learner_dashboard.md deleted file mode 100644 index e5c319a4..00000000 --- a/changelog.d/20231116_110038_arbrandes_add_learner_dashboard.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] Add support for the Learner Dashboard MFE. (by @arbrandes) diff --git a/setup.py b/setup.py index 9346bb82..1234f35c 100644 --- a/setup.py +++ b/setup.py @@ -40,8 +40,8 @@ def load_about(): packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.8", - install_requires=["tutor>=16.1.2,<17.0.0"], - extras_require={"dev": ["tutor[dev]>=16.1.2,<17.0.0"]}, + install_requires=["tutor>=17.0.0,<18.0.0"], + extras_require={"dev": ["tutor[dev]>=17.0.0,<18.0.0"]}, entry_points={"tutor.plugin.v1": ["mfe = tutormfe.plugin"]}, classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/tutormfe/__about__.py b/tutormfe/__about__.py index c79efc0d..c28054cd 100644 --- a/tutormfe/__about__.py +++ b/tutormfe/__about__.py @@ -1 +1,2 @@ -__version__ = "16.1.2" +__version__ = "17.0.0" + diff --git a/tutormfe/patches/openedx-cms-development-settings b/tutormfe/patches/openedx-cms-development-settings index d38cc94d..1ec9474b 100644 --- a/tutormfe/patches/openedx-cms-development-settings +++ b/tutormfe/patches/openedx-cms-development-settings @@ -4,6 +4,6 @@ COURSE_AUTHORING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/course-authoring" CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ app["port"] }}") LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ app["port"] }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}:{{ app["port"] }}") +CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ app["port"] }}") {% endif %} {% endfor %} diff --git a/tutormfe/patches/openedx-cms-production-settings b/tutormfe/patches/openedx-cms-production-settings index 4455ca45..0b6931d2 100644 --- a/tutormfe/patches/openedx-cms-production-settings +++ b/tutormfe/patches/openedx-cms-production-settings @@ -7,4 +7,4 @@ COURSE_AUTHORING_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}htt LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}") CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}") +CSRF_TRUSTED_ORIGINS.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") diff --git a/tutormfe/patches/openedx-lms-development-settings b/tutormfe/patches/openedx-lms-development-settings index d968e44b..942af330 100644 --- a/tutormfe/patches/openedx-lms-development-settings +++ b/tutormfe/patches/openedx-lms-development-settings @@ -61,7 +61,7 @@ MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True # {{ app_name }} MFE CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ app["port"] }}") LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ app["port"] }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}:{{ app["port"] }}") +CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ app["port"] }}") {% endfor %} {{ patch("mfe-lms-common-settings") }} diff --git a/tutormfe/patches/openedx-lms-production-settings b/tutormfe/patches/openedx-lms-production-settings index ae295a99..518ac23b 100644 --- a/tutormfe/patches/openedx-lms-production-settings +++ b/tutormfe/patches/openedx-lms-production-settings @@ -58,7 +58,7 @@ MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}") CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}") +CSRF_TRUSTED_ORIGINS.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") {{ patch("mfe-lms-common-settings") }} {{ patch("mfe-lms-production-settings") }} diff --git a/tutormfe/plugin.py b/tutormfe/plugin.py index f6ce03cb..4d08bc9b 100644 --- a/tutormfe/plugin.py +++ b/tutormfe/plugin.py @@ -39,8 +39,9 @@ def get_github_refs_path(name: str) -> str: str: A string URL to the Github API, pointing to heads if version_suffix is set, tags otherwise. """ - - return f"https://api.github.com/repos/{name}/git/refs/{'heads' if __version_suffix__ else 'tags'}" + # TODO remove this once we upgrade to quince + return f"https://api.github.com/repos/{name}/git/refs/heads" + # return f"https://api.github.com/repos/{name}/git/refs/{'heads' if __version_suffix__ else 'tags'}" CORE_MFE_APPS: dict[str, MFE_ATTRS_TYPE] = { diff --git a/tutormfe/templates/mfe/build/mfe/Dockerfile b/tutormfe/templates/mfe/build/mfe/Dockerfile index e2f9ab5e..14622248 100644 --- a/tutormfe/templates/mfe/build/mfe/Dockerfile +++ b/tutormfe/templates/mfe/build/mfe/Dockerfile @@ -1,5 +1,5 @@ # https://hub.docker.com/_/node/tags -FROM docker.io/node:18.16.0-bullseye-slim AS base +FROM docker.io/node:18.19.0-bullseye-slim AS base RUN apt update \ && apt install -y git \