Skip to content

Commit 6ac5bba

Browse files
authored
fix: Remove call to print WEBPACK_CONFIG_PATH when updating static assets (#194)
This setting was removed from edxapp base configs in openedx/edx-platform#36494 and one of these lines started failing with "CommandError: WEBPACK_CONFIG_PATH not found in settings." We don't actually need to print any *particular* setting here; see comment for why we're making this call at all. So here I change it to use a setting that is more unlikely to go away any time soon. Also, add some "comments" to help draw attention to the comment higher up, as well as a little more explanation of the situation.
1 parent 611f7f9 commit 6ac5bba

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

playbooks/roles/edxapp/templates/edx/bin/edxapp-update-assets.j2

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ export JS_ENV_EXTRA_CONFIG={}
1010
# We need to make a call to a management command before running webpack because proctoring runs a webpack
1111
# webworker that only gets built if the proctoring djangoapp writes out a `workers.json`:
1212
# https://github.com/openedx/edx-proctoring/blob/73c7f55e2be91324fa07fec6e6ac0a667fdd8412/edx_proctoring/apps.py#L4
13+
# We know that `print_setting` will load settings and apps, which is what we
14+
# actually need. Yes, this is absurd.
15+
1316
{% if edxapp_staticfiles_storage_overrides %}
1417
{% for override in edxapp_staticfiles_storage_overrides %}
1518
export STATICFILES_STORAGE={{ override | quote }}
1619
sudo -E -H -u {{ edxapp_user }} \
1720
env "PATH=$PATH" \
18-
{{ edxapp_venv_bin }}/python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT WEBPACK_CONFIG_PATH \
21+
echo "See comment above for why we're uselessly calling print_setting here." >/dev/null \
22+
&& {{ edxapp_venv_bin }}/python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting LMS_BASE >/dev/null \
1923
&& npm run webpack \
2024
&& npm run compile-sass -- --theme-dir /edx/var/edx-themes/edx-themes/edx-platform --theme-dir /edx/app/edxapp/edx-platform/themes \
2125
&& {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS \
@@ -24,7 +28,8 @@ sudo -E -H -u {{ edxapp_user }} \
2428
{% else %}
2529
sudo -E -H -u {{ edxapp_user }} \
2630
env "PATH=$PATH" \
27-
{{ edxapp_venv_bin }}/python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT WEBPACK_CONFIG_PATH \
31+
echo "See comment above for why we're uselessly calling print_setting here." >/dev/null \
32+
&& {{ edxapp_venv_bin }}/python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting LMS_BASE >/dev/null \
2833
&& npm run webpack \
2934
&& npm run compile-sass -- --theme-dir /edx/var/edx-themes/edx-themes/edx-platform --theme-dir /edx/app/edxapp/edx-platform/themes \
3035
&& {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS \

0 commit comments

Comments
 (0)