Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
arbrandes committed Aug 7, 2023
2 parents ae0c50a + 8522ab6 commit c287909
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions changelog.d/20230627_162842_regis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Improvement] Don't override `imagePullPolicy` in Kubernetes. This was only necessary in older releases. (by @regisb)
1 change: 1 addition & 0 deletions changelog.d/20230802_121750_regis_single_dev_container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Improvement] Fix very high CPU and memory usage in development. We resolve this issue by running just a single container for all MFES, just like in production. To al;low developers to test their changes in Tutor, we run `npm run start` only for those MFEs that have a manual bind-mount that was created with `tutor mounts add .../frontend-app-mymfe`. (by @regisb)
1 change: 1 addition & 0 deletions changelog.d/20230802_123027_regis_fix_dev_profile_link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] In development, fix link to profile in header. (by @regisb)
5 changes: 0 additions & 5 deletions tutormfe/patches/caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,5 @@
request_body {
max_size 2MB
}
reverse_proxy /api/mfe_config/v1* lms:8000 {
# We need to specify the host header, otherwise it will be rejected with 400
# from the lms.
header_up Host {{ LMS_HOST }}
}
import proxy "mfe:8002"
}
1 change: 0 additions & 1 deletion tutormfe/patches/k8s-deployments
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ spec:
containers:
- name: mfe
image: {{ MFE_DOCKER_IMAGE }}
imagePullPolicy: Always
ports:
- containerPort: 8002
volumeMounts:
Expand Down
20 changes: 15 additions & 5 deletions tutormfe/patches/local-docker-compose-dev-services
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
# MFE apps
{% for app_name, app in iter_mfes() %}
{{ app_name }}:
mfe:
ports:
{%- for app_name, app in iter_mfes() %}
{%- if not iter_mounts(MOUNTS, app_name)|list %}
- {{ app["port"] }}:8002 # {{ app_name }}
{%- endif %}
{%- endfor %}

{%- for app_name, app in iter_mfes() %}
{%- set mounts = iter_mounts(MOUNTS, app_name)|list %}
{%- if mounts %}
{{ app_name }}: # Work on this MFE for development
image: "{{ DOCKER_REGISTRY }}overhangio/openedx-{{ app_name }}-dev:{{ MFE_VERSION }}"
ports:
- "{{ app["port"] }}:{{ app["port"] }}"
stdin_open: true
tty: true
volumes:
- ../plugins/mfe/apps/mfe/webpack.dev-tutor.config.js:/openedx/app/webpack.dev-tutor.config.js:ro
{%- for mount in iter_mounts(MOUNTS, app_name) %}
{%- for mount in mounts %}
- {{ mount }}
{%- endfor %}
restart: unless-stopped
depends_on:
- lms
{% endfor %}
{%- endif %}
{%- endfor %}
4 changes: 2 additions & 2 deletions tutormfe/patches/openedx-lms-development-settings
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ MFE_CONFIG["LEARNING_BASE_URL"] = "http://{{ MFE_HOST }}:{{ app["port"] }}"
{% elif app_name == "ora-grading" %}
ORA_GRADING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/ora-grading"
{% elif app_name == "profile" %}
PROFILE_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}:{{ app["port"] }}/profile/u/"
MFE_CONFIG["ACCOUNT_PROFILE_URL"] = "http://{{ MFE_HOST }}:{{ app["port"] }}"
PROFILE_MICROFRONTEND_URL = "http:/{{ MFE_HOST }}:{{ app["port"] }}/profile/u/"
MFE_CONFIG["ACCOUNT_PROFILE_URL"] = "http://{{ MFE_HOST }}:{{ app["port"] }}/profile"
{% elif app_name == "communications" %}
COMMUNICATIONS_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/communications"
MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True
Expand Down
6 changes: 6 additions & 0 deletions tutormfe/templates/mfe/apps/mfe/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
}
}

reverse_proxy /api/mfe_config/v1* lms:8000 {
# We need to specify the host header, otherwise it will be rejected with 400
# from the lms.
header_up Host {{ LMS_HOST }}
}

{% for app_name, app in iter_mfes() %}
@mfe_{{ app_name }} {
path /{{ app_name }} /{{ app_name }}/*
Expand Down

0 comments on commit c287909

Please sign in to comment.