Skip to content

Commit

Permalink
feat: upgrade to quince
Browse files Browse the repository at this point in the history
  • Loading branch information
regisb committed Dec 11, 2023
1 parent d38c731 commit 28d0d53
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 30 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ instructions, because git commits are used to generate release notes:

<!-- scriv-insert-here -->

<a id='changelog-17.0.0'></a>
## 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)

<a id='changelog-16.1.3'></a>
## v16.1.3 (2023-12-07)

Expand Down
11 changes: 0 additions & 11 deletions changelog.d/20231003_133500_dave_remove_trailing_slash.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/20231208_132545_mpwheel_mfe_dev_ports.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/20231208_142032_arbrandes_nightly.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/20231208_193911_regis_mfe_refs_for_master.md

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tutormfe/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "16.1.3"
__version__ = "17.0.0"
2 changes: 1 addition & 1 deletion tutormfe/patches/openedx-cms-development-settings
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }}")
2 changes: 1 addition & 1 deletion tutormfe/patches/openedx-cms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}")
2 changes: 1 addition & 1 deletion tutormfe/patches/openedx-lms-development-settings
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
Expand Down
2 changes: 1 addition & 1 deletion tutormfe/patches/openedx-lms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
2 changes: 1 addition & 1 deletion tutormfe/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_mfes() -> dict[str, MFE_ATTRS_TYPE]:


@tutor_hooks.Actions.PLUGIN_LOADED.add()
def _clear_get_mfes_cache(_name: str):
def _clear_get_mfes_cache(_name: str) -> None:
"""
Don't forget to clear cache, or we'll have some strange surprises...
"""
Expand Down
4 changes: 2 additions & 2 deletions tutormfe/templates/mfe/build/mfe/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 28d0d53

Please sign in to comment.