overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

Removing the Course-Authoring MFE throws an error during env rendering #189

Closed Danyal-Faheem closed 9 months ago

Danyal-Faheem commented 9 months ago

When you remove the course-authoring mfe using the method defined here and then run tutor config save, it throws an error. The error is:

Error rendering patch 'openedx-cms-development-settings':
# MFE-specific settings
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"] }}")

Error rendering template apps/openedx/settings/cms/development.py
Error: Missing configuration value: 'dict object' has no attribute 'port'

This error is likely due to not having a condition in place in the openedx-cms-development-settings patch.