diff --git a/CHANGELOG.md b/CHANGELOG.md index 497463be..e079f6a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,20 @@ instructions, because git commits are used to generate release notes: + +## v17.0.0 (2023-12-09) + +- 💥Upgrade to Quince (by @regisb). +- [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) +- [Bugfix] Append trailing slash to PUBLIC_PATH, as its absence breaks some MFEs. (by @arbrandes) +- [Feature] Added patch to allow changes to Dockerfile after the npm build has completed. (by @Danyal-Faheem) +- [Bugfix] Auto-build "mfe" image during `dev/local launch` in nightly. (by @regisb) +- [Bugfix] Specify port for dev server to listen on (by @michaelwheeler) +- [Feature] Enable the new per-unit discussions sidebar in the Learning MFE. (by @arbrandes) +- [Bugfix] Support MFE remotes that are not on GitHub. (by @gabor-boros and @regisb) +- 💥[Bugfix] Bypass rate-limiting when checking for upstream git changes. To achieve that, we use the `ADD --keep-git-dir` option, which is only compatible with BuildKit 0.11, from January 2023. Also, we get rid of the `get_github_refs_path` function. (by @gabor-boros and @regisb) + ## v16.1.3 (2023-12-07) 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/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/changelog.d/20231206_183103_arbrandes_fix_trailing_slash.md b/changelog.d/20231206_183103_arbrandes_fix_trailing_slash.md deleted file mode 100644 index 5241d67f..00000000 --- a/changelog.d/20231206_183103_arbrandes_fix_trailing_slash.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Append trailing slash to PUBLIC_PATH, as its absence breaks some MFEs. (by @arbrandes) diff --git a/changelog.d/20231208_112435_danyal.faheem_mfe_post_npm_build_patch.md b/changelog.d/20231208_112435_danyal.faheem_mfe_post_npm_build_patch.md deleted file mode 100644 index 8d5bf3cb..00000000 --- a/changelog.d/20231208_112435_danyal.faheem_mfe_post_npm_build_patch.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] Added patch to allow changes to Dockerfile after the npm build has completed. (by @Danyal-Faheem) \ No newline at end of file diff --git a/changelog.d/20231208_112710_regis_nightly_auto_build_mfe.md b/changelog.d/20231208_112710_regis_nightly_auto_build_mfe.md deleted file mode 100644 index 453cf083..00000000 --- a/changelog.d/20231208_112710_regis_nightly_auto_build_mfe.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Auto-build "mfe" image during `dev/local launch` in nightly. (by @regisb) diff --git a/changelog.d/20231208_132545_mpwheel_mfe_dev_ports.md b/changelog.d/20231208_132545_mpwheel_mfe_dev_ports.md deleted file mode 100644 index 4d959bf8..00000000 --- a/changelog.d/20231208_132545_mpwheel_mfe_dev_ports.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Specify port for dev server to listen on (by @michaelwheeler) diff --git a/changelog.d/20231208_142032_arbrandes_nightly.md b/changelog.d/20231208_142032_arbrandes_nightly.md deleted file mode 100644 index 155f4ec8..00000000 --- a/changelog.d/20231208_142032_arbrandes_nightly.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] Enable the new per-unit discussions sidebar in the Learning MFE. (by @arbrandes) diff --git a/changelog.d/20231208_193911_regis_mfe_refs_for_master.md b/changelog.d/20231208_193911_regis_mfe_refs_for_master.md deleted file mode 100644 index 9a5f70d8..00000000 --- a/changelog.d/20231208_193911_regis_mfe_refs_for_master.md +++ /dev/null @@ -1,3 +0,0 @@ -- [Bugfix] Support MFE remotes that are not on GitHub. (by @gabor-boros and @regisb) -- 💥[Bugfix] Bypass rate-limiting when checking for upstream git changes. To achieve that, we use the `ADD --keep-git-dir` option, which is only compatible with BuildKit 0.11, from January 2023. Also, we get rid of the `get_github_refs_path` function. (by @gabor-boros and @regisb) - 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 ce2be6bd..a08b09c5 100644 --- a/tutormfe/__about__.py +++ b/tutormfe/__about__.py @@ -1 +1 @@ -__version__ = "16.1.3" +__version__ = "17.0.0" diff --git a/tutormfe/patches/openedx-cms-development-settings b/tutormfe/patches/openedx-cms-development-settings index b4659012..bfbf031e 100644 --- a/tutormfe/patches/openedx-cms-development-settings +++ b/tutormfe/patches/openedx-cms-development-settings @@ -2,4 +2,4 @@ COURSE_AUTHORING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}/course-authoring" CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") +CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") diff --git a/tutormfe/patches/openedx-cms-production-settings b/tutormfe/patches/openedx-cms-production-settings index d86061e5..b1b5e163 100644 --- a/tutormfe/patches/openedx-cms-production-settings +++ b/tutormfe/patches/openedx-cms-production-settings @@ -5,4 +5,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 1b5e5297..bf633746 100644 --- a/tutormfe/patches/openedx-lms-development-settings +++ b/tutormfe/patches/openedx-lms-development-settings @@ -78,7 +78,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 d26de19a..1df4bcfe 100644 --- a/tutormfe/patches/openedx-lms-production-settings +++ b/tutormfe/patches/openedx-lms-production-settings @@ -76,7 +76,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/templates/mfe/build/mfe/Dockerfile b/tutormfe/templates/mfe/build/mfe/Dockerfile index 21617c6e..d637d97a 100644 --- a/tutormfe/templates/mfe/build/mfe/Dockerfile +++ b/tutormfe/templates/mfe/build/mfe/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 # 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 \ @@ -61,7 +61,7 @@ ARG NPM_REGISTRY={{ NPM_REGISTRY }} ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0 {#- We define this environment variable to bypass an issue with the installation of pact https://github.com/pact-foundation/pact-js-core/issues/264 #} ENV PACT_SKIP_BINARY_INSTALL=true -RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/root/.npm,sharing=shared {% endif %}npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY +RUN --mount=type=cache,target=/root/.npm,sharing=shared npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY {{ patch("mfe-dockerfile-post-npm-install") }} {{ patch("mfe-dockerfile-post-npm-install-{}".format(app_name)) }} COPY --from={{ app_name }}-src / /openedx/app