Merged
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
timmc-edx
approved these changes
Dec 18, 2024
timmc-edx
reviewed
Dec 18, 2024
| 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 \ |
Member
There was a problem hiding this comment.
This call (or the other one) caused a very unhelpful error during the Ansible run: env: ‘/edx/app/edxapp/venvs/edxapp/bin’: Permission denied
Member
There was a problem hiding this comment.
ohhh, I see the problem...
Suggested change
| {{ 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Once more into the breach.
This attempt removes the extraneous
npm installcall.More importantly, it adds an extra call to load django before running webpack. This forces the
workers.jsonfile 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