-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paver deprecation - attempt #? #138
Paver deprecation - attempt #? #138
Conversation
b59eca8
to
f861c19
Compare
In the specific case of webworkers for proctoring, we need to force Django to load before we run `npm run webpack` so that the file ../workers.json gets written. See https://github.com/openedx/edx-proctoring/blob/73c7f55e2be91324fa07fec6e6ac0a667fdd8412/edx_proctoring/apps.py#L46 Also adds JS_ENV_EXTRA_CONFIG, which is required to create the webworker config.
f861c19
to
a1a1b23
Compare
{% if edxapp_staticfiles_storage_overrides %} | ||
{% for override in edxapp_staticfiles_storage_overrides %} | ||
export STATICFILES_STORAGE={{ override | quote }} | ||
sudo -E -H -u {{ edxapp_user }} \ | ||
env "PATH=$PATH" \ | ||
npm run webpack \ | ||
{{ edxapp_venv_bin }} python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT WEBPACK_CONFIG_PATH \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call (or the other one) caused a very unhelpful error during the Ansible run: env: ‘/edx/app/edxapp/venvs/edxapp/bin’: Permission denied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhh, I see the problem...
{{ edxapp_venv_bin }} python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT WEBPACK_CONFIG_PATH \ | |
{{ edxapp_venv_bin }}/python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT WEBPACK_CONFIG_PATH \ |
Once more into the breach.
This attempt removes the extraneous
npm install
call.More importantly, it adds an extra call to load django before running webpack. This forces the
workers.json
file to get written out: https://github.com/openedx/edx-proctoring/blob/73c7f55e2be91324fa07fec6e6ac0a667fdd8412/edx_proctoring/apps.py#L46 This file is then important to ensure that the webpack-workers plugin is then initialized and run: https://github.com/openedx/edx-platform/blob/master/webpack.common.config.js#L57The JS_ENV_EXTRA_CONFIG is also required to be set even though it is set to an empty dict.
Reverts #137