-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
docs: tweak webpack config design in assets ADR #31949
docs: tweak webpack config design in assets ADR #31949
Conversation
a89911d
to
9e1fc18
Compare
9e1fc18
to
dac54fe
Compare
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.
Seems like a reasonable cleanup to do at this time, thanks for digging into it.
There's at least one recent usage of I think the main use case of Other than that, looks ok at a glance. |
Good catch @jmbowman , I'll reach out just to make sure that defining
Yup, that's what Tutor does. Webpack is run with prod config to build the base (production) image, and then Webpack is re-run with dev config in order to build the development image.
At least in Tutor, the |
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
# but use /openedx/staticfiles as the static root: | ||
scripts/build-assets.sh --theme-dirs ./mythemes | ||
|
||
Furthermore, to facilitate a Python-free build reimplementation, we will remove two Django settings related to assets. These settings have never worked in Tutor, and 2U states that edx.org does not use them. However, on the off chance that some community operators rely on them, there exist alternative configuration methods for each, which will work both with and without Tutor: |
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.
However, on the off chance that some community operators rely on them
Whoops, I should have reworded this, since Jeremy pointed out that OpenCraft probably uses JS_ENV_EXTRA_CONFIG. Anyway, I reached out in #opencraft
to make sure they see this.
EdX Release Notice: This PR has been deployed to the production environment. |
Changes
Drop print_asset_settings in favor of cleaning up Django settings
@feanil @jmbowman , this revisits a decision we came to on the PR that introduced the assets rewrite ADR: #31790 (comment) . As I've worked on implementing it, I've come to feel that a
print_assets_settings
command would be tech debt as soon as we added it. Consider the three Django setting it'd need to print:JS_ENV_EXTRA_CONFIG
: This is a JSON dictionary. Taking it from a Django setting and then escaping & piping it through a management command into an environment variable has always been crazy, especially since it's not used by any Python code. This ought to just be a build-time environment variable for Webpack to consume. Tutor has always just ignored this Django setting, and I'm told (edge.)edx.org doesn't override it, so why not take this opportunity to kill it?WEBPACK_CONFIG_PATH
: This is also silly to have as a Django setting, as it is unused by Python code. Again, Tutor has never respected this Django setting, and I don't recall (edge.)edx.org using it either, so I recommend killing it too.STATIC_ROOT
. Do we really want a special management command just to print out the static root? I propose we just use the existingprint_setting
command for it.Explain OPENEDX_BUILD_ASSETS_OPTS environment variable
This was always part the plan in my head, but in order to explain the changes above, I've spelled it out in the ADR.
Add 'non-Tutor migration guide'
This just points up to the Reimplementation Specification section of the ADR. Nothing new; just wanted to make it extra where non-Tutor deployers should look for migration instructions.
Latest rendered ADR
https://github.com/kdmccormick/edx-platform/blob/kdmccormick/assets-adr-update/docs/decisions/0017-reimplement-asset-processing.rst
Post-merge